Vulcan/client/views/common/body.js
2013-04-14 14:51:37 +09:00

31 lines
713 B
JavaScript

Template.body.helpers({
pageName : function(){
return Meteor.Router.page();
},
backgroundColor: function(){
return getSetting('backgroundColor');
},
secondaryColor: function(){
return getSetting('secondaryColor');
},
buttonColor: function(){
return getSetting('buttonColor');
},
headerColor: function(){
return getSetting('headerColor');
},
extraCode: function(){
return getSetting('extraCode');
}
});
Template.body.created = function(){
Session.set('currentScroll', null);
}
Template.body.rendered = function(){
if(currentScroll=Session.get('currentScroll')){
$('body').scrollTop(currentScroll);
Session.set('currentScroll', null);
}
}