Follow up 92b7c39879 - Fixes #3930 - Make sidebar attachments unique.

This commit is contained in:
Rolf Schmidt 2022-02-25 10:48:37 +01:00
parent c1d467aa3d
commit c1ae526ac0

View file

@ -1,4 +1,12 @@
class SidebarArticleAttachments extends App.Controller
constructor: ->
super
@controllerBind('ui::ticket::load', (data) =>
return if data.ticket_id.toString() isnt @ticket.id.toString()
return if !@el
@showObjects(@el)
)
sidebarItem: =>
return if !@Config.get('ui_ticket_zoom_sidebar_article_attachments')
@item = {
@ -43,9 +51,6 @@ class SidebarArticleAttachments extends App.Controller
@el.on('click', '.js-attachments img', (e) =>
@imageView(e)
)
@controllerBind('ui::ticket::load', =>
@showObjects(el)
)
imageView: (e) ->
e.preventDefault()