Fixed loading highlighter at loading tasks with highlighter on app boot.

This commit is contained in:
Martin Edenhofer 2015-09-30 14:05:38 +02:00
parent 19d4cb4559
commit 3622ca0cfb
2 changed files with 19 additions and 5 deletions

View file

@ -105,12 +105,10 @@ class App.TicketZoom extends App.Controller
# start autosave # start autosave
@autosaveStart() @autosaveStart()
# inital load of highlights if !@shown
if @highligher && !@highlighed
@highlighed = true
@highligher.loadHighlights()
if @shown # inital load of highlights
@loadHighlighter()
# trigger shown to article # trigger shown to article
App.Event.trigger('ui::ticket::shown', { ticket_id: @ticket_id } ) App.Event.trigger('ui::ticket::shown', { ticket_id: @ticket_id } )
@ -269,6 +267,12 @@ class App.TicketZoom extends App.Controller
@scrollPageHeader.css('transform', "translateY(#{top}px)") @scrollPageHeader.css('transform', "translateY(#{top}px)")
loadHighlighter: =>
return if !@highligher
return if @highlighed
@highlighed = true
@highligher.loadHighlights()
render: (force) => render: (force) =>
# update taskbar with new meta data # update taskbar with new meta data
@ -366,6 +370,9 @@ class App.TicketZoom extends App.Controller
if @shown if @shown
# inital load of highlights
@loadHighlighter()
# scroll to end of page # scroll to end of page
@scrollToBottom() @scrollToBottom()

View file

@ -147,6 +147,13 @@ class _taskManagerSingleton extends Spine.Module
if params.init if params.init
params.params.init = true params.params.init = true
# modify shown param for controller
if params.params
if !params.show
delete params.params.shown
else
params.params.shown = true
# remember latest active controller # remember latest active controller
if params.show if params.show
@activeTaskHistory.push _.clone(params) @activeTaskHistory.push _.clone(params)