Improved check if highlighter is enabled.
This commit is contained in:
parent
c7dc7add0b
commit
d0d4ae6c44
2 changed files with 3 additions and 1 deletions
|
@ -93,7 +93,8 @@ class App.TicketZoom extends App.Controller
|
||||||
|
|
||||||
App.Event.trigger('ui::ticket::shown', { ticket_id: @ticket_id } )
|
App.Event.trigger('ui::ticket::shown', { ticket_id: @ticket_id } )
|
||||||
|
|
||||||
if !@highlighed
|
# inital load of highlights
|
||||||
|
if @highligher && !@highlighed
|
||||||
@highlighed = true
|
@highlighed = true
|
||||||
@highligher.loadHighlights()
|
@highligher.loadHighlights()
|
||||||
|
|
||||||
|
|
|
@ -94,6 +94,7 @@ class App.TicketZoomHighlighter extends App.Controller
|
||||||
|
|
||||||
# for testing purposes the highlights get stored in localStorage
|
# for testing purposes the highlights get stored in localStorage
|
||||||
loadHighlights: ->
|
loadHighlights: ->
|
||||||
|
return if !@isRole('Agent')
|
||||||
@el.closest('.content').find('.textBubble-content').each( (index, element) =>
|
@el.closest('.content').find('.textBubble-content').each( (index, element) =>
|
||||||
article_id = $(element).data('id')
|
article_id = $(element).data('id')
|
||||||
article = App.TicketArticle.find(article_id)
|
article = App.TicketArticle.find(article_id)
|
||||||
|
|
Loading…
Reference in a new issue