Request cleanup
This commit is contained in:
@@ -13,4 +13,4 @@ Qsupplier.App.ApplicationController = Ember.Controller.extend
|
||||
#error_supplier.eraseRecord()
|
||||
#@set 'supplier', null
|
||||
#@store.find('supplier', 'current').then success, error
|
||||
@set 'supplier', @store.find('supplier', supplier_id)
|
||||
# @set 'supplier', @store.find('supplier', supplier_id)
|
||||
|
||||
@@ -4,7 +4,13 @@ Qsupplier.App.ApplicationRoute = Ember.Route.extend
|
||||
@store.find 'product_category'
|
||||
#@store.find 'order', state: 'active' included in list
|
||||
setupController: (controller)->
|
||||
# @set 'supplier', @store.find('supplier', supplier_id)
|
||||
supplier = @store.push 'supplier', supplier_object
|
||||
controller.set 'supplier', supplier
|
||||
|
||||
@store.find 'list', state: 'active'
|
||||
@store.find 'section'
|
||||
|
||||
controller.set 'product_categories', @store.all('product_category')
|
||||
actions:
|
||||
openModal: (modalName, model)->
|
||||
|
||||
@@ -11,7 +11,7 @@ Qsupplier.App.IndexRoute = Ember.Route.extend
|
||||
# mayby @store.all 'list' will work better!!!! (2014-04-24 a more experienced benjamin :)
|
||||
#orders: @store.filter 'order', -> true
|
||||
orders: @store.all 'order'
|
||||
sections: @store.find 'section'
|
||||
sections: @store.all 'section'
|
||||
setupController: (controller, model)->
|
||||
controller.set('model', model)
|
||||
#$('#section_selector').on 'change', (-> controller.set('sectionId', $(this).val()))
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
Qsupplier.App.SectionsRoute = Ember.Route.extend
|
||||
model: -> @store.find 'section'
|
||||
model: -> @store.all 'section'
|
||||
|
||||
setupController: (controller, collection) ->
|
||||
controller.set 'content', collection
|
||||
|
||||
@@ -2,7 +2,7 @@ root = exports ? this
|
||||
root.Qsupplier=
|
||||
watch_events: ->
|
||||
faye = new Faye.Client(event_host)
|
||||
faye.subscribe "/supplier/#{supplier_id}", (e)=>
|
||||
faye.subscribe "/supplier/#{supplier_object.id}", (e)=>
|
||||
console.log "Event: #{e.event}"
|
||||
console.log e.data
|
||||
if(e.event == 'new_order')
|
||||
|
||||
Reference in New Issue
Block a user