Just trigger of title has changed.

This commit is contained in:
Martin Edenhofer 2014-09-28 09:48:43 +02:00
parent 354c8a8634
commit 8b38291215

View file

@ -598,6 +598,12 @@ class TicketTitle extends App.Controller
@render(@ticket) @render(@ticket)
render: (ticket) => render: (ticket) =>
# check if render is needed
if @lastTitle && @lastTitle is ticket.title
return
@lastTitle = ticket.title
@html App.view('ticket_zoom/title')( @html App.view('ticket_zoom/title')(
ticket: ticket ticket: ticket
isCustomer: @isRole('Customer') isCustomer: @isRole('Customer')
@ -613,7 +619,7 @@ class TicketTitle extends App.Controller
@frontendTimeUpdate() @frontendTimeUpdate()
update: (e) => update: (e) =>
title = $(e.target).ceg({ mode: 'textonly' }) || '-' title = $(e.target).ceg() || ''
# update title # update title
if title isnt @ticket.title if title isnt @ticket.title