0
0
Fork 1
Spiegel von https://github.com/paviliondev/discourse-custom-wizard.git synchronisiert 2024-11-14 05:52:52 +01:00
discourse-custom-wizard/assets/javascripts/discourse/controllers/admin-wizard.js.es6

27 Zeilen
534 B
Text

2017-09-23 04:34:07 +02:00
export default Ember.Controller.extend({
actions: {
save() {
this.get('model').save().then(() => {
this.transitionToRoute('adminWizardsCustom');
});
},
remove() {
2017-09-24 05:01:18 +02:00
this.get('model').remove().then(() => {
2017-09-23 04:34:07 +02:00
this.transitionToRoute('adminWizardsCustom');
});
},
addStep() {
this.get('model.steps').pushObject({
fields: Ember.A(),
actions: Ember.A()
});
},
2017-09-24 05:01:18 +02:00
removeStep(step) {
this.get('model.steps').removeObject(step);
2017-09-23 04:34:07 +02:00
}
}
});