Added task auto close of merged ticket.

This commit is contained in:
Martin Edenhofer 2013-04-23 08:00:40 +02:00
parent 97a4219125
commit 0e60699d45
2 changed files with 7 additions and 3 deletions

View file

@ -131,7 +131,9 @@ class App.TicketMerge extends App.ControllerModal
@notify @notify
type: 'success', type: 'success',
msg: App.i18n.translateContent( 'Ticket %s merged!', data.slave_ticket['number'] ), msg: App.i18n.translateContent( 'Ticket %s merged!', data.slave_ticket['number'] ),
timeout: 6000, timeout: 4000,
App.TaskManager.remove( @task_key )
else else

View file

@ -83,9 +83,11 @@ class App.TicketZoom extends App.Controller
App.Store.write( @key, data ) App.Store.write( @key, data )
error: (xhr, status, error) => error: (xhr, status, error) =>
# do not close window if request is abort or network error exists
return if status is 'abort' return if status is 'abort'
return if status is 'error'
App.TaskManager.remove( @task_key ) App.TaskManager.remove( @task_key )
@release()
) )
@doNotLog = 1 @doNotLog = 1
@ -599,7 +601,7 @@ class TicketActionRow extends App.Controller
merge_dialog: (e) -> merge_dialog: (e) ->
e.preventDefault() e.preventDefault()
new App.TicketMerge( ticket_id: @ticket.id ) new App.TicketMerge( ticket_id: @ticket.id, task_key: @zoom.task_key )
customer_dialog: (e) -> customer_dialog: (e) ->
e.preventDefault() e.preventDefault()