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) @fetch( @ticket_id, false)
@interval( update, 30000, @key, 'ticket_zoom' ) @interval( update, 30000, @key, 'ticket_zoom' )
url: =>
'#ticket/zoom/' + @ticket.id
activate: => activate: =>
@navupdate '#' @navupdate '#'
@title 'Ticket Zoom ' + @ticket.number @title 'Ticket Zoom ' + @ticket.number

View file

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

View file

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