2015-02-13 07:22:32 +03:00
|
|
|
import Ember from 'ember';
|
2014-12-14 06:09:19 +03:00
|
|
|
|
2015-05-26 05:10:50 +03:00
|
|
|
export default Ember.Mixin.create({
|
|
|
|
application: Ember.inject.controller(),
|
|
|
|
|
2015-06-03 05:56:42 +03:00
|
|
|
isViewingSubview: Ember.computed('application.showSettingsMenu', {
|
|
|
|
get: function () {
|
2014-12-14 06:09:19 +03:00
|
|
|
return false;
|
2015-06-03 05:56:42 +03:00
|
|
|
},
|
|
|
|
set: function (key, value) {
|
|
|
|
// Not viewing a subview if we can't even see the PSM
|
|
|
|
if (!this.get('application.showSettingsMenu')) {
|
|
|
|
return false;
|
|
|
|
}
|
2014-12-14 06:09:19 +03:00
|
|
|
return value;
|
|
|
|
}
|
|
|
|
}),
|
|
|
|
|
|
|
|
actions: {
|
|
|
|
showSubview: function () {
|
|
|
|
this.set('isViewingSubview', true);
|
|
|
|
},
|
|
|
|
|
|
|
|
closeSubview: function () {
|
|
|
|
this.set('isViewingSubview', false);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|