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