2015-02-12 21:22:32 -07:00
|
|
|
import Ember from 'ember';
|
2015-05-24 00:47:23 -05:00
|
|
|
|
|
|
|
export default Ember.Controller.extend({
|
2015-05-25 21:10:50 -05:00
|
|
|
dropdown: Ember.inject.service(),
|
|
|
|
|
2014-10-24 21:09:50 +00:00
|
|
|
// jscs: disable
|
2015-05-21 22:47:51 -05:00
|
|
|
signedOut: Ember.computed.match('currentPath', /(signin|signup|setup|reset)/),
|
2014-10-24 21:09:50 +00:00
|
|
|
// jscs: enable
|
2014-05-14 18:36:13 -05:00
|
|
|
|
2014-07-17 17:28:53 +00:00
|
|
|
topNotificationCount: 0,
|
2015-05-27 16:39:56 +02:00
|
|
|
showMobileMenu: false,
|
2014-10-13 16:23:06 +01:00
|
|
|
showSettingsMenu: false,
|
2014-07-17 17:28:53 +00:00
|
|
|
|
2015-05-24 00:47:23 -05:00
|
|
|
autoNav: false,
|
2015-05-27 16:39:56 +02:00
|
|
|
autoNavOpen: Ember.computed('autoNav', {
|
2015-06-13 09:34:09 -05:00
|
|
|
get: function () {
|
2015-05-27 16:39:56 +02:00
|
|
|
return false;
|
|
|
|
},
|
2015-06-13 09:34:09 -05:00
|
|
|
set: function (key, value) {
|
2015-05-27 16:39:56 +02:00
|
|
|
if (this.get('autoNav')) {
|
|
|
|
return value;
|
|
|
|
}
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
}),
|
2014-10-21 16:02:11 +00:00
|
|
|
|
2014-04-06 18:11:22 -04:00
|
|
|
actions: {
|
2015-06-13 09:34:09 -05:00
|
|
|
topNotificationChange: function (count) {
|
2014-07-17 17:28:53 +00:00
|
|
|
this.set('topNotificationCount', count);
|
2015-05-24 00:47:23 -05:00
|
|
|
},
|
|
|
|
|
2015-06-13 09:34:09 -05:00
|
|
|
toggleAutoNav: function () {
|
2015-05-27 16:39:56 +02:00
|
|
|
this.toggleProperty('autoNav');
|
|
|
|
},
|
|
|
|
|
2015-06-13 09:34:09 -05:00
|
|
|
openAutoNav: function () {
|
2015-05-27 16:39:56 +02:00
|
|
|
this.set('autoNavOpen', true);
|
2015-05-24 00:47:23 -05:00
|
|
|
},
|
|
|
|
|
2015-06-13 09:34:09 -05:00
|
|
|
closeAutoNav: function () {
|
2015-05-27 16:39:56 +02:00
|
|
|
this.set('autoNavOpen', false);
|
2015-06-09 09:25:45 -07:00
|
|
|
},
|
|
|
|
|
2015-06-13 09:34:09 -05:00
|
|
|
closeMobileMenu: function () {
|
2015-06-09 09:25:45 -07:00
|
|
|
this.set('showMobileMenu', false);
|
2014-04-06 18:11:22 -04:00
|
|
|
}
|
|
|
|
}
|
2014-03-11 17:23:32 +01:00
|
|
|
});
|