working ember... again

This commit is contained in:
2013-10-07 23:00:01 +02:00
parent a8c01d264e
commit 2f41560591
46 changed files with 274 additions and 114 deletions
@@ -9,8 +9,8 @@ Qsupplier.App.IndexRoute = Ember.Route.extend
#orders: Qsupplier.App.Order.find({state: 'active'})
#lists: @store.filter 'list', (l)-> l.get('state') == 'active' # DOES NOT WORK!!!! (yet)
# use filter to create a scope on all the records
lists: Qsupplier.App.List.filter -> true
orders: Qsupplier.App.Order.filter -> true
lists: @store.filter 'list', -> true
orders: @store.filter 'order', -> true
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: -> Qsupplier.App.Section.find()
model: -> @store.find 'section'
setupController: (controller, collection) ->
controller.set 'content', collection