Improved check if highlighter is enabled.

This commit is contained in:
Martin Edenhofer 2015-06-12 09:44:06 +02:00
parent c7dc7add0b
commit d0d4ae6c44
2 changed files with 3 additions and 1 deletions

View file

@ -93,7 +93,8 @@ class App.TicketZoom extends App.Controller
App.Event.trigger('ui::ticket::shown', { ticket_id: @ticket_id } )
if !@highlighed
# inital load of highlights
if @highligher && !@highlighed
@highlighed = true
@highligher.loadHighlights()

View file

@ -94,6 +94,7 @@ class App.TicketZoomHighlighter extends App.Controller
# for testing purposes the highlights get stored in localStorage
loadHighlights: ->
return if !@isRole('Agent')
@el.closest('.content').find('.textBubble-content').each( (index, element) =>
article_id = $(element).data('id')
article = App.TicketArticle.find(article_id)