Improved management for ticket changes.
This commit is contained in:
parent
6be0e97a48
commit
f023a34d76
1 changed files with 8 additions and 8 deletions
|
@ -39,6 +39,7 @@ class App.TicketZoom extends App.Controller
|
||||||
url: @url()
|
url: @url()
|
||||||
id: @ticket_id
|
id: @ticket_id
|
||||||
if @ticket
|
if @ticket
|
||||||
|
@ticket = App.Ticket.retrieve( @ticket.id )
|
||||||
meta.head = @ticket.title
|
meta.head = @ticket.title
|
||||||
meta.title = '#' + @ticket.number + ' - ' + @ticket.title
|
meta.title = '#' + @ticket.number + ' - ' + @ticket.title
|
||||||
meta
|
meta
|
||||||
|
@ -135,12 +136,9 @@ class App.TicketZoom extends App.Controller
|
||||||
nav: @nav
|
nav: @nav
|
||||||
isCustomer: @isRole('Customer')
|
isCustomer: @isRole('Customer')
|
||||||
)
|
)
|
||||||
|
@TicketTitle()
|
||||||
|
@Widgets()
|
||||||
|
|
||||||
# show frontend times
|
|
||||||
@frontendTimeUpdate()
|
|
||||||
|
|
||||||
@TicketTitle()
|
|
||||||
@Widgets()
|
|
||||||
@TicketAction()
|
@TicketAction()
|
||||||
@ArticleView()
|
@ArticleView()
|
||||||
|
|
||||||
|
@ -220,6 +218,8 @@ class TicketTitle extends App.Controller
|
||||||
|
|
||||||
constructor: ->
|
constructor: ->
|
||||||
super
|
super
|
||||||
|
|
||||||
|
@ticket = App.Ticket.retrieve( @ticket.id )
|
||||||
@subscribeId = @ticket.subscribe(@render)
|
@subscribeId = @ticket.subscribe(@render)
|
||||||
@render(@ticket)
|
@render(@ticket)
|
||||||
|
|
||||||
|
@ -243,7 +243,6 @@ class TicketTitle extends App.Controller
|
||||||
|
|
||||||
# update title
|
# update title
|
||||||
@ticket.title = title
|
@ticket.title = title
|
||||||
@ticket.load( title: title )
|
|
||||||
@ticket.save()
|
@ticket.save()
|
||||||
|
|
||||||
# update taskbar with new meta data
|
# update taskbar with new meta data
|
||||||
|
@ -257,7 +256,6 @@ class TicketInfo extends App.ControllerDrox
|
||||||
super
|
super
|
||||||
|
|
||||||
@subscribeId = @ticket.subscribe(@render)
|
@subscribeId = @ticket.subscribe(@render)
|
||||||
|
|
||||||
@render(@ticket)
|
@render(@ticket)
|
||||||
|
|
||||||
render: (ticket) =>
|
render: (ticket) =>
|
||||||
|
@ -282,7 +280,6 @@ class TicketInfo extends App.ControllerDrox
|
||||||
class Widgets extends App.Controller
|
class Widgets extends App.Controller
|
||||||
constructor: ->
|
constructor: ->
|
||||||
super
|
super
|
||||||
|
|
||||||
@subscribeId = @ticket.subscribe(@render)
|
@subscribeId = @ticket.subscribe(@render)
|
||||||
@render(@ticket)
|
@render(@ticket)
|
||||||
|
|
||||||
|
@ -312,6 +309,9 @@ class Widgets extends App.Controller
|
||||||
object: ticket
|
object: ticket
|
||||||
)
|
)
|
||||||
|
|
||||||
|
# show frontend times
|
||||||
|
@frontendTimeUpdate()
|
||||||
|
|
||||||
release: =>
|
release: =>
|
||||||
App.Ticket.unsubscribe( @subscribeId )
|
App.Ticket.unsubscribe( @subscribeId )
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue