Spiegel von
https://github.com/paviliondev/discourse-custom-wizard.git
synchronisiert 2024-11-10 04:12:53 +01:00
27 Zeilen
537 B
Text
27 Zeilen
537 B
Text
|
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);
|
||
|
}
|
||
|
}
|
||
|
});
|