2019-04-26 18:16:21 +08:00
|
|
|
import computed from "ember-addons/ember-computed-decorators";
|
|
|
|
|
2016-10-21 01:26:41 +08:00
|
|
|
export default Ember.Controller.extend({
|
2019-04-26 18:16:21 +08:00
|
|
|
@computed
|
2017-02-10 01:11:53 +08:00
|
|
|
adminRoutes: function() {
|
2019-05-27 16:15:39 +08:00
|
|
|
return this.model
|
2018-06-15 23:03:24 +08:00
|
|
|
.map(p => {
|
|
|
|
if (p.get("enabled")) {
|
|
|
|
return p.admin_route;
|
|
|
|
}
|
|
|
|
})
|
|
|
|
.compact();
|
2019-04-26 18:16:21 +08:00
|
|
|
},
|
|
|
|
|
2018-07-03 11:14:53 +08:00
|
|
|
actions: {
|
|
|
|
clearFilter() {
|
|
|
|
this.setProperties({ filter: "", onlyOverridden: false });
|
|
|
|
},
|
|
|
|
|
|
|
|
toggleMenu() {
|
|
|
|
$(".admin-detail").toggleClass("mobile-closed mobile-open");
|
|
|
|
}
|
|
|
|
}
|
2015-02-07 06:32:59 +08:00
|
|
|
});
|