Vulcan/client/body.js
2013-02-16 13:30:46 +09:00

28 lines
649 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');
},
});
Template.body.created = function(){
Session.set('currentScroll', null);
}
Template.body.rendered = function(){
if(currentScroll=Session.get('currentScroll')){
$('body').scrollTop(currentScroll);
Session.set('currentScroll', null);
}
}