Save progress
This commit is contained in:
@@ -1 +1,7 @@
|
||||
App.ActiveListRoute = Ember.Route.extend {}
|
||||
App.ActiveListRoute = Ember.Route.extend
|
||||
afterModel: (a,b,c)->
|
||||
controller = @controllerFor('application')
|
||||
if table_id = controller.get('list.table.id')
|
||||
transitionTo 'table', table_id
|
||||
else
|
||||
controller.redirect_to 'index', message: 'the_list_has_been_closed'
|
||||
|
||||
@@ -8,17 +8,7 @@ App.ApplicationRoute = Ember.Route.extend
|
||||
faye.subscribe "/user/"+user_id, (e)=>
|
||||
console.log e
|
||||
@events[e.event].call(@) if @events[e.event]
|
||||
@store.find('list', 'current').then (list)=>
|
||||
#@store.find('list', 'current').deleteRecord() # gets not replaced, buty stays as dummy
|
||||
|
||||
# A list record with id current and with the content of the returned list is created
|
||||
# at the moment remove the dummy list, this should be resolved by Ember eventually
|
||||
if error_list = @store.all('list').findBy('id', 'current')
|
||||
error_list.rollback()
|
||||
error_list.transitionTo 'loaded.saved'
|
||||
error_list.unloadRecord()
|
||||
@set 'list', list
|
||||
@controllerFor('active_list').set('model', list)
|
||||
@setCurrentList()
|
||||
|
||||
unauthorized: ->
|
||||
Qstorage.setItem('auth_token', '')
|
||||
|
||||
Reference in New Issue
Block a user