2016-06-30 13:21:47 +03:00
|
|
|
import Mixin from 'ember-metal/mixin';
|
|
|
|
import computed from 'ember-computed';
|
2015-05-26 05:10:50 +03:00
|
|
|
|
2015-10-28 14:36:45 +03:00
|
|
|
export default Mixin.create({
|
2017-03-10 17:30:01 +03:00
|
|
|
showSettingsMenu: false,
|
2015-10-28 14:36:45 +03:00
|
|
|
|
2017-03-10 17:30:01 +03:00
|
|
|
isViewingSubview: computed('showSettingsMenu', {
|
2015-10-28 14:36:45 +03:00
|
|
|
get() {
|
2014-12-14 06:09:19 +03:00
|
|
|
return false;
|
2015-06-03 05:56:42 +03:00
|
|
|
},
|
2015-10-28 14:36:45 +03:00
|
|
|
set(key, value) {
|
2015-06-03 05:56:42 +03:00
|
|
|
// Not viewing a subview if we can't even see the PSM
|
2017-03-10 17:30:01 +03:00
|
|
|
if (!this.get('showSettingsMenu')) {
|
2015-06-03 05:56:42 +03:00
|
|
|
return false;
|
|
|
|
}
|
2014-12-14 06:09:19 +03:00
|
|
|
return value;
|
|
|
|
}
|
|
|
|
}),
|
|
|
|
|
|
|
|
actions: {
|
2015-10-28 14:36:45 +03:00
|
|
|
showSubview() {
|
2014-12-14 06:09:19 +03:00
|
|
|
this.set('isViewingSubview', true);
|
|
|
|
},
|
|
|
|
|
2015-10-28 14:36:45 +03:00
|
|
|
closeSubview() {
|
2014-12-14 06:09:19 +03:00
|
|
|
this.set('isViewingSubview', false);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|