0
0
Fork 1
Spiegel von https://github.com/paviliondev/discourse-custom-wizard.git synchronisiert 2024-11-23 09:50:28 +01:00
discourse-custom-wizard/assets/javascripts/discourse/routes/admin-wizards-custom.js.es6
Angus McLeod f6251ace06 various
2017-10-22 11:37:58 +08:00

26 Zeilen
601 B
JavaScript

import CustomWizard from '../models/custom-wizard';
export default Discourse.Route.extend({
model() {
return CustomWizard.all();
},
afterModel(model) {
const transitionToWizard = this.get('transitionToWizard');
if (transitionToWizard && model.length) {
this.set('transitionToWizard', null);
this.transitionTo('adminWizard', transitionToWizard);
};
},
setupController(controller, model){
controller.set("model", model.toArray());
},
actions: {
refreshAllWizards() {
this.set('transitionToWizard', 'last');
this.refresh();
}
}
});