Supplier section management improvements
This commit is contained in:
@@ -6,3 +6,19 @@ Qsupplier.App.ApplicationRoute = Ember.Route.extend
|
||||
setupController: (controller)->
|
||||
@store.find 'list', state: 'active'
|
||||
controller.set 'product_categories', @store.all('product_category')
|
||||
actions:
|
||||
openModal: (modalName, model)->
|
||||
@controllerFor(modalName).set('model', model)
|
||||
@render modalName,
|
||||
into: 'application'
|
||||
outlet: 'modal'
|
||||
closeModal: ->
|
||||
@disconnectOutlet
|
||||
outlet: 'modal'
|
||||
parentView: 'application'
|
||||
confirm: (options = {})->
|
||||
@send 'openModal', 'modal_confirm', Ember.Object.create
|
||||
title: options.title
|
||||
body: options.body
|
||||
cancel: options.cancel
|
||||
ok: options.ok
|
||||
|
||||
Reference in New Issue
Block a user