1
0
Fork 0
discourse-custom-wizard-unl.../assets/javascripts/discourse/controllers/admin-wizard.js.es6

27 Zeilen
555 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(Ember.Object.create({
2017-09-23 04:34:07 +02:00
fields: Ember.A(),
actions: Ember.A()
}));
2017-09-23 04:34:07 +02:00
},
2017-09-24 05:01:18 +02:00
removeStep(step) {
this.get('model.steps').removeObject(step);
2017-09-23 04:34:07 +02:00
}
}
});