0
0
Fork 1
Spiegel von https://github.com/paviliondev/discourse-custom-wizard.git synchronisiert 2024-09-20 07:41:11 +02:00
discourse-custom-wizard/assets/javascripts/discourse/controllers/admin-wizard.js.es6
2017-09-23 10:34:07 +08:00

26 Zeilen
537 B
JavaScript

export default Ember.Controller.extend({
actions: {
save() {
this.get('model').save().then(() => {
this.transitionToRoute('adminWizardsCustom');
});
},
remove() {
this.get('model').destroy().then(() => {
this.transitionToRoute('adminWizardsCustom');
});
},
addStep() {
this.get('model.steps').pushObject({
fields: Ember.A(),
actions: Ember.A()
});
},
removeStep(name) {
this.get('model.steps').findBy('name', name);
}
}
});