Fixes #3584 - Attachment order is wrong.
This commit is contained in:
parent
cd8f74729b
commit
9415484441
1 changed files with 2 additions and 2 deletions
|
@ -17,12 +17,12 @@ class SidebarArticleAttachments extends App.Controller
|
||||||
@el.html("<div>#{App.i18n.translateInline('none')}</div>")
|
@el.html("<div>#{App.i18n.translateInline('none')}</div>")
|
||||||
return
|
return
|
||||||
html = ''
|
html = ''
|
||||||
for ticket_article_id, index in @ticket.article_ids
|
for ticket_article_id in @ticket.article_ids.sort((a, b) -> a - b)
|
||||||
if App.TicketArticle.exists(ticket_article_id)
|
if App.TicketArticle.exists(ticket_article_id)
|
||||||
article = App.TicketArticle.find(ticket_article_id)
|
article = App.TicketArticle.find(ticket_article_id)
|
||||||
attachments = App.TicketArticle.contentAttachments(article)
|
attachments = App.TicketArticle.contentAttachments(article)
|
||||||
if !_.isEmpty(attachments)
|
if !_.isEmpty(attachments)
|
||||||
html = App.view('ticket_zoom/sidebar_article_attachment')(article: article, attachments: attachments) + html
|
html += App.view('ticket_zoom/sidebar_article_attachment')(article: article, attachments: attachments)
|
||||||
@el.html(html)
|
@el.html(html)
|
||||||
@el.delegate('.js-attachments img', 'click', (e) =>
|
@el.delegate('.js-attachments img', 'click', (e) =>
|
||||||
@imageView(e)
|
@imageView(e)
|
||||||
|
|
Loading…
Reference in a new issue