Improvements to new menu product category editing and adding new

This commit is contained in:
2014-11-25 13:31:40 +01:00
parent 1707f4d19f
commit a64d3de319
24 changed files with 162 additions and 86 deletions
@@ -5,9 +5,14 @@ App.MenuController = Ember.ObjectController.extend
actions:
editProductCategory: (product_category)->
@modal 'product_category_edit',
model: product_category,
model: product_category
close: -> product_category.rollback()
destroy_text_path: 'product_category.modal.destroy_confirm_text'
moveProductCategory: (product_category)->
@modal 'product_category_move',
model: product_category
newProductCategory: ->
@modal 'product_category_new',
model: @store.createRecord('product_category', position: @get('product_categories.length'))
close: -> @get('model').deleteRecord()