1
0
mirror of https://github.com/TryGhost/Ghost.git synced 2024-12-30 22:34:07 +03:00
Ghost/ghost/admin/app/controllers/application.js
Jason Williams feac9682d0 Update Ember to 1.13.2
- Refactor to handle deprecations including removal of
  all Views, ArrayControllers, and ItemControllers.
2015-06-24 11:47:28 -05:00

49 lines
1.1 KiB
JavaScript

import Ember from 'ember';
export default Ember.Controller.extend({
dropdown: Ember.inject.service(),
// jscs: disable
signedOut: Ember.computed.match('currentPath', /(signin|signup|setup|reset)/),
// jscs: enable
topNotificationCount: 0,
showMobileMenu: false,
showSettingsMenu: false,
autoNav: false,
autoNavOpen: Ember.computed('autoNav', {
get: function () {
return false;
},
set: function (key, value) {
if (this.get('autoNav')) {
return value;
}
return false;
}
}),
actions: {
topNotificationChange: function (count) {
this.set('topNotificationCount', count);
},
toggleAutoNav: function () {
this.toggleProperty('autoNav');
},
openAutoNav: function () {
this.set('autoNavOpen', true);
},
closeAutoNav: function () {
this.set('autoNavOpen', false);
},
closeMobileMenu: function () {
this.set('showMobileMenu', false);
}
}
});