mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-12-04 21:01:27 -05:00
af042ffe5e
Also, added enabled_site_setting to the Poll plugin so it shows up properly.
25 lines
794 B
JavaScript
25 lines
794 B
JavaScript
export default Ember.Route.extend({
|
|
model() {
|
|
return this.store.findAll('plugin');
|
|
},
|
|
|
|
actions: {
|
|
showSettings(plugin) {
|
|
const controller = this.controllerFor('adminSiteSettings');
|
|
this.transitionTo('adminSiteSettingsCategory', 'plugins').then(function() {
|
|
if (plugin) {
|
|
const match = /^(.*)_enabled/.exec(plugin.get('enabled_setting'));
|
|
if (match[1]) {
|
|
// filterContent() is normally on a debounce from typing.
|
|
// Because we don't want the default of "All Results", we tell it
|
|
// to skip the next debounce.
|
|
controller.set('filter', match[1]);
|
|
controller.set('_skipBounce', true);
|
|
controller.filterContentNow('plugins');
|
|
}
|
|
}
|
|
});
|
|
}
|
|
}
|
|
});
|
|
|