2014-07-05 11:24:28 +09:00
|
|
|
Template[getTemplate('layout')].helpers({
|
2014-07-05 11:42:28 +09:00
|
|
|
mobile_nav: function () {
|
|
|
|
return getTemplate('mobile_nav');
|
|
|
|
},
|
|
|
|
nav: function () {
|
|
|
|
return getTemplate('nav');
|
|
|
|
},
|
2014-12-06 17:49:17 +09:00
|
|
|
messages: function () {
|
|
|
|
return getTemplate('messages');
|
2014-07-05 11:42:28 +09:00
|
|
|
},
|
|
|
|
notifications: function () {
|
|
|
|
return getTemplate('notifications');
|
|
|
|
},
|
|
|
|
footer: function () {
|
|
|
|
return getTemplate('footer');
|
|
|
|
},
|
2013-01-16 07:25:39 +09:00
|
|
|
pageName : function(){
|
2014-09-10 18:32:59 -05:00
|
|
|
return getCurrentTemplate();
|
2013-02-14 10:17:26 +09:00
|
|
|
},
|
2014-08-12 16:16:44 +09:00
|
|
|
css: function () {
|
|
|
|
return getTemplate('css');
|
2014-08-05 10:16:05 +09:00
|
|
|
},
|
|
|
|
heroModules: function () {
|
|
|
|
return heroModules;
|
|
|
|
},
|
|
|
|
getTemplate: function () {
|
|
|
|
return getTemplate(this.template);
|
|
|
|
}
|
2013-01-16 07:25:39 +09:00
|
|
|
});
|
|
|
|
|
2014-07-05 11:24:28 +09:00
|
|
|
Template[getTemplate('layout')].created = function(){
|
2013-01-16 07:25:39 +09:00
|
|
|
Session.set('currentScroll', null);
|
2014-09-16 15:18:27 -04:00
|
|
|
};
|
2012-10-18 15:59:21 +09:00
|
|
|
|
2014-07-05 11:24:28 +09:00
|
|
|
Template[getTemplate('layout')].rendered = function(){
|
2014-05-23 13:08:40 +09:00
|
|
|
if(currentScroll=Session.get('currentScroll')){
|
|
|
|
$('body').scrollTop(currentScroll);
|
|
|
|
Session.set('currentScroll', null);
|
|
|
|
}
|
2015-02-14 19:03:22 +09:00
|
|
|
|
|
|
|
// favicon
|
|
|
|
var link = document.createElement('link');
|
|
|
|
link.type = 'image/x-icon';
|
|
|
|
link.rel = 'shortcut icon';
|
|
|
|
link.href = getSetting('faviconUrl', '/img/favicon.ico');
|
|
|
|
document.getElementsByTagName('head')[0].appendChild(link);
|
|
|
|
|
2014-09-16 15:18:27 -04:00
|
|
|
};
|
2015-01-26 00:42:30 -08:00
|
|
|
|
|
|
|
Template[getTemplate('layout')].events({
|
|
|
|
'click .inner-wrapper': function (e) {
|
|
|
|
if ($('body').hasClass('mobile-nav-open')) {
|
|
|
|
e.preventDefault();
|
|
|
|
$('body').removeClass('mobile-nav-open');
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|