Vulcan/client/views/common/layout.js
2014-07-05 11:24:28 +09:00

31 lines
No EOL
751 B
JavaScript

Template[getTemplate('layout')].helpers({
pageName : function(){
// getCurrentTemplate();
},
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[getTemplate('layout')].created = function(){
Session.set('currentScroll', null);
}
Template[getTemplate('layout')].rendered = function(){
if(currentScroll=Session.get('currentScroll')){
$('body').scrollTop(currentScroll);
Session.set('currentScroll', null);
}
}