2014-07-09 09:46:24 +09:00
|
|
|
Template[getTemplate('mobile_nav')].helpers({
|
2015-03-24 17:03:37 +09:00
|
|
|
mobileNav: function () {
|
|
|
|
return _.sortBy(mobileNav, 'order');
|
2014-07-09 09:46:24 +09:00
|
|
|
},
|
2015-03-12 18:07:23 +09:00
|
|
|
logoTemplate: function () {
|
|
|
|
return getTemplate('logo');
|
|
|
|
},
|
2014-08-13 17:34:56 +09:00
|
|
|
getTemplate: function () {
|
2015-03-10 11:50:21 +09:00
|
|
|
return getTemplate(this.template);
|
2015-03-24 17:03:37 +09:00
|
|
|
},
|
|
|
|
mobileContext: function () {
|
|
|
|
return {mobile: true};
|
2014-07-09 09:46:24 +09:00
|
|
|
}
|
|
|
|
});
|
|
|
|
|
2014-07-05 11:24:28 +09:00
|
|
|
Template[getTemplate('mobile_nav')].events({
|
2014-09-16 15:18:27 -04:00
|
|
|
'click .dropdown-sub-level': function () {
|
2012-12-05 11:05:05 +09:00
|
|
|
$('body').toggleClass('mobile-nav-open');
|
|
|
|
}
|
2014-07-10 11:45:34 +09:00
|
|
|
});
|
|
|
|
|
|
|
|
Template[getTemplate('mobile_nav')].events({
|
2014-08-12 17:11:36 +09:00
|
|
|
'click .dropdown-top-level': function (e) {
|
2014-07-10 11:45:34 +09:00
|
|
|
e.preventDefault();
|
|
|
|
$(e.currentTarget).next().slideToggle('fast');
|
2014-08-12 17:11:36 +09:00
|
|
|
},
|
|
|
|
'click .mobile-nav a': function (e) {
|
|
|
|
if (e.target.className.indexOf('dropdown-top-level') == -1){
|
|
|
|
$('body').removeClass('mobile-nav-open');
|
|
|
|
}
|
2014-07-10 11:45:34 +09:00
|
|
|
}
|
2013-11-24 16:13:53 +02:00
|
|
|
});
|