2015-02-12 21:22:32 -07:00
|
|
|
import Ember from 'ember';
|
2014-12-13 20:09:19 -07:00
|
|
|
|
2015-05-25 21:10:50 -05:00
|
|
|
export default Ember.Mixin.create({
|
|
|
|
application: Ember.inject.controller(),
|
|
|
|
|
2015-06-02 20:56:42 -06:00
|
|
|
isViewingSubview: Ember.computed('application.showSettingsMenu', {
|
|
|
|
get: function () {
|
2014-12-13 20:09:19 -07:00
|
|
|
return false;
|
2015-06-02 20:56:42 -06: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-13 20:09:19 -07:00
|
|
|
return value;
|
|
|
|
}
|
|
|
|
}),
|
|
|
|
|
|
|
|
actions: {
|
|
|
|
showSubview: function () {
|
|
|
|
this.set('isViewingSubview', true);
|
|
|
|
},
|
|
|
|
|
|
|
|
closeSubview: function () {
|
|
|
|
this.set('isViewingSubview', false);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|