discourse/app/assets/javascripts/admin/controllers/admin-plugins.js.es6

26 lines
549 B
Plaintext
Raw Normal View History

import discourseComputed from "discourse-common/utils/decorators";
import Controller from "@ember/controller";
export default Controller.extend({
@discourseComputed
adminRoutes: function() {
return this.model
2018-06-15 11:03:24 -04:00
.map(p => {
if (p.get("enabled")) {
return p.admin_route;
}
})
.compact();
},
2018-07-02 23:14:53 -04:00
actions: {
clearFilter() {
this.setProperties({ filter: "", onlyOverridden: false });
},
toggleMenu() {
$(".admin-detail").toggleClass("mobile-closed mobile-open");
}
}
});