mirror of
https://github.com/vale981/Vulcan
synced 2025-03-10 04:26:41 -04:00
38 lines
No EOL
930 B
JavaScript
38 lines
No EOL
930 B
JavaScript
Template[getTemplate('mobile_nav')].helpers({
|
|
primaryNav: function () {
|
|
return primaryNav;
|
|
},
|
|
secondaryNav: function () {
|
|
return secondaryNav;
|
|
},
|
|
getTemplate: function () {
|
|
return getTemplate(this);
|
|
},
|
|
canPost: function(){
|
|
return canPost(Meteor.user());
|
|
},
|
|
requirePostsApproval: function(){
|
|
return getSetting('requirePostsApproval');
|
|
},
|
|
userMenu: function () {
|
|
return getTemplate('userMenu');
|
|
}
|
|
});
|
|
|
|
Template[getTemplate('mobile_nav')].events({
|
|
'click .dropdown-sub-level': function () {
|
|
$('body').toggleClass('mobile-nav-open');
|
|
}
|
|
});
|
|
|
|
Template[getTemplate('mobile_nav')].events({
|
|
'click .dropdown-top-level': function (e) {
|
|
e.preventDefault();
|
|
$(e.currentTarget).next().slideToggle('fast');
|
|
},
|
|
'click .mobile-nav a': function (e) {
|
|
if (e.target.className.indexOf('dropdown-top-level') == -1){
|
|
$('body').removeClass('mobile-nav-open');
|
|
}
|
|
}
|
|
}); |