Ongoing rewrite work

This commit is contained in:
Jamie Curnow
2018-07-09 11:22:10 +10:00
parent 30924a6922
commit 54d220a191
72 changed files with 3656 additions and 113 deletions

View File

@@ -17,14 +17,25 @@ module.exports = Mn.View.extend({
events: {
'click @ui.links': function (e) {
e.preventDefault();
Controller.navigate($(e.currentTarget).attr('href'), true);
let href = $(e.currentTarget).attr('href');
if (href !== '#') {
e.preventDefault();
Controller.navigate(href, true);
}
}
},
templateContext: {
showUsers: function () {
return Cache.User.isAdmin();
},
canShow: function (perm) {
return Cache.User.isAdmin() || Cache.User.canView(perm);
}
},
initialize: function () {
this.listenTo(Cache.User, 'change', this.render);
}
});