parent
09a62cf165
commit
e1abc5e4cb
20 changed files with 260 additions and 6 deletions
16
app/controllers/collections/create.js
Normal file
16
app/controllers/collections/create.js
Normal file
|
@ -0,0 +1,16 @@
|
|||
import Ember from 'ember';
|
||||
|
||||
const { Controller } = Ember;
|
||||
|
||||
export default Controller.extend({
|
||||
actions: {
|
||||
onSave(changeset) {
|
||||
changeset.save();
|
||||
this.transitionToRoute('collections.index');
|
||||
},
|
||||
onCancel(changeset) {
|
||||
changeset.rollback();
|
||||
this.transitionToRoute('collections.index');
|
||||
},
|
||||
},
|
||||
});
|
|
@ -13,5 +13,8 @@ export default Controller.extend({
|
|||
rowClick(row) {
|
||||
this.transitionToRoute('collections.detail', row.get('id'));
|
||||
},
|
||||
createCollection() {
|
||||
this.transitionToRoute('collections.create');
|
||||
},
|
||||
},
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue