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
@autosaveStart()
# inital load of highlights
if @highligher && !@highlighed
@highlighed = true
@highligher.loadHighlights()
if !@shown
if @shown
# inital load of highlights
@loadHighlighter()
# trigger shown to article
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)")
loadHighlighter: =>
return if !@highligher
return if @highlighed
@highlighed = true
@highligher.loadHighlights()
render: (force) =>
# update taskbar with new meta data
@ -366,6 +370,9 @@ class App.TicketZoom extends App.Controller
if @shown
# inital load of highlights
@loadHighlighter()
# scroll to end of page
@scrollToBottom()

View file

@ -147,6 +147,13 @@ class _taskManagerSingleton extends Spine.Module
if params.init
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
if params.show
@activeTaskHistory.push _.clone(params)