Follow up 92b7c39879
- Fixes #3930 - Make sidebar attachments unique.
This commit is contained in:
parent
c1d467aa3d
commit
c1ae526ac0
1 changed files with 8 additions and 3 deletions
|
@ -1,4 +1,12 @@
|
||||||
class SidebarArticleAttachments extends App.Controller
|
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: =>
|
sidebarItem: =>
|
||||||
return if !@Config.get('ui_ticket_zoom_sidebar_article_attachments')
|
return if !@Config.get('ui_ticket_zoom_sidebar_article_attachments')
|
||||||
@item = {
|
@item = {
|
||||||
|
@ -43,9 +51,6 @@ class SidebarArticleAttachments extends App.Controller
|
||||||
@el.on('click', '.js-attachments img', (e) =>
|
@el.on('click', '.js-attachments img', (e) =>
|
||||||
@imageView(e)
|
@imageView(e)
|
||||||
)
|
)
|
||||||
@controllerBind('ui::ticket::load', =>
|
|
||||||
@showObjects(el)
|
|
||||||
)
|
|
||||||
|
|
||||||
imageView: (e) ->
|
imageView: (e) ->
|
||||||
e.preventDefault()
|
e.preventDefault()
|
||||||
|
|
Loading…
Reference in a new issue