Fixed release of active controllers on logout.
This commit is contained in:
parent
951b3d1b6a
commit
167f41fc6b
2 changed files with 6 additions and 4 deletions
|
@ -13,7 +13,9 @@ class Index extends App.ControllerContent
|
|||
App.Event.trigger( 'ui:rerender' )
|
||||
|
||||
# redirect to login
|
||||
@navigate 'login'
|
||||
redirect = =>
|
||||
@navigate 'login'
|
||||
@delay redirect, 150
|
||||
|
||||
App.Config.set( 'logout', Index, 'Routes' )
|
||||
App.Config.set( 'Logout', { prio: 1800, parent: '#current_user', name: 'Sign out', target: '#logout', divider: true, role: [ 'Agent', 'Customer' ] }, 'NavBarRight' )
|
||||
|
|
|
@ -80,11 +80,11 @@ class _taskManagerSingleton extends App.Controller
|
|||
|
||||
# render on logout
|
||||
App.Event.bind 'auth:logout', =>
|
||||
for task in @all
|
||||
for task in @allTasks
|
||||
worker = @worker( task.key )
|
||||
if worker && worker.release
|
||||
worker.release()
|
||||
@workersStarted[ task.key ] = false
|
||||
delete @workersStarted[ task.key ]
|
||||
@reset()
|
||||
|
||||
# send updates to server
|
||||
|
@ -256,7 +256,7 @@ class _taskManagerSingleton extends App.Controller
|
|||
worker = @worker( key )
|
||||
if worker && worker.release
|
||||
worker.release()
|
||||
@workersStarted[ key ] = false
|
||||
delete @workersStarted[ key ]
|
||||
@taskDestroy(task)
|
||||
|
||||
notify: ( key ) =>
|
||||
|
|
Loading…
Reference in a new issue