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() {
|
2017-09-29 13:27:03 +02:00
|
|
|
this.get('model.steps').pushObject(Ember.Object.create({
|
2017-09-23 04:34:07 +02:00
|
|
|
fields: Ember.A(),
|
|
|
|
actions: Ember.A()
|
2017-09-29 13:27:03 +02:00
|
|
|
}));
|
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
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|