Fixed task bar issues - wrong url was called on close.

This commit is contained in:
Martin Edenhofer 2013-04-19 08:59:33 +02:00
parent ad2e06b5b4
commit dce07570cd
3 changed files with 8 additions and 6 deletions

View file

@ -34,6 +34,9 @@ class TicketZoom extends App.Controller
@fetch( @ticket_id, false)
@interval( update, 30000, @key, 'ticket_zoom' )
url: =>
'#ticket/zoom/' + @ticket.id
activate: =>
@navupdate '#'
@title 'Ticket Zoom ' + @ticket.number

View file

@ -50,12 +50,13 @@ class App.TaskWidget extends App.Controller
@render()
# navigate to next task if needed
if active_is_closed
if active_is_closed && !_.isEmpty( tasks_all )
for key, task of tasks_all
task_last = task
if task_last
@navigate task_last.url
if _.isEmpty( tasks_all )
@navigate '#'
@navigate task_last.worker.url()
return
if _.isEmpty( tasks_all )
@navigate '#'
App.Config.set( 'task', App.TaskWidget, 'Widgets' )

View file

@ -63,7 +63,6 @@ class _Singleton extends Spine.Module
type: type
type_id: type_id
params: params
url: window.location.hash
worker: a
active: true
@tasks[@task_count] = task
@ -73,7 +72,6 @@ class _Singleton extends Spine.Module
remove: ( key ) =>
if @tasks[key]
console.log('rrrelease', @tasks[key], @tasks[key].worker)
@tasks[key].worker.release()
delete @tasks[key]
App.Event.trigger 'ui:rerender'