Reduced rerender calls.
This commit is contained in:
parent
d48ea6e710
commit
9e2255b643
1 changed files with 15 additions and 9 deletions
|
@ -170,6 +170,10 @@ class App.TicketZoom extends App.Controller
|
||||||
@doNotLog = 1
|
@doNotLog = 1
|
||||||
@recentView( 'Ticket', ticket_id )
|
@recentView( 'Ticket', ticket_id )
|
||||||
|
|
||||||
|
# scroll to end of page
|
||||||
|
if force
|
||||||
|
@scrollToBottom()
|
||||||
|
|
||||||
error: (xhr) =>
|
error: (xhr) =>
|
||||||
statusText = xhr.statusText
|
statusText = xhr.statusText
|
||||||
status = xhr.status
|
status = xhr.status
|
||||||
|
@ -233,7 +237,7 @@ class App.TicketZoom extends App.Controller
|
||||||
@ticket.article = undefined
|
@ticket.article = undefined
|
||||||
|
|
||||||
# render page
|
# render page
|
||||||
@render(force)
|
@render()
|
||||||
|
|
||||||
positionPageHeaderStart: =>
|
positionPageHeaderStart: =>
|
||||||
|
|
||||||
|
@ -273,13 +277,13 @@ class App.TicketZoom extends App.Controller
|
||||||
@highlighed = true
|
@highlighed = true
|
||||||
@highligher.loadHighlights()
|
@highligher.loadHighlights()
|
||||||
|
|
||||||
render: (force) =>
|
render: =>
|
||||||
|
|
||||||
# update taskbar with new meta data
|
# update taskbar with new meta data
|
||||||
App.Event.trigger 'task:render'
|
App.Event.trigger 'task:render'
|
||||||
@formEnable( @$('.submit') )
|
@formEnable( @$('.submit') )
|
||||||
|
|
||||||
if force || !@renderDone
|
if !@renderDone
|
||||||
@renderDone = true
|
@renderDone = true
|
||||||
@html App.view('ticket_zoom')(
|
@html App.view('ticket_zoom')(
|
||||||
ticket: @ticket
|
ticket: @ticket
|
||||||
|
@ -351,7 +355,6 @@ class App.TicketZoom extends App.Controller
|
||||||
ticket: @ticket
|
ticket: @ticket
|
||||||
el: @el.find('.ticket-article')
|
el: @el.find('.ticket-article')
|
||||||
ui: @
|
ui: @
|
||||||
highlighter: @highlighter
|
|
||||||
)
|
)
|
||||||
|
|
||||||
@article_view.execute(
|
@article_view.execute(
|
||||||
|
@ -368,7 +371,8 @@ class App.TicketZoom extends App.Controller
|
||||||
|
|
||||||
@ticketLastAttributes = @ticket.attributes()
|
@ticketLastAttributes = @ticket.attributes()
|
||||||
|
|
||||||
if @shown
|
if @shown && !@initDone
|
||||||
|
@initDone = true
|
||||||
|
|
||||||
# inital load of highlights
|
# inital load of highlights
|
||||||
@loadHighlighter()
|
@loadHighlighter()
|
||||||
|
@ -589,7 +593,9 @@ class App.TicketZoom extends App.Controller
|
||||||
# submit changes
|
# submit changes
|
||||||
ticket.save(
|
ticket.save(
|
||||||
done: (r) =>
|
done: (r) =>
|
||||||
@renderDone = false
|
|
||||||
|
# enable form
|
||||||
|
@formEnable(e)
|
||||||
|
|
||||||
# reset article - should not be resubmited on next ticket update
|
# reset article - should not be resubmited on next ticket update
|
||||||
ticket.article = undefined
|
ticket.article = undefined
|
||||||
|
|
Loading…
Reference in a new issue