From 94154844416440c529e5479a6d98c6dee72ded63 Mon Sep 17 00:00:00 2001 From: Rolf Schmidt Date: Tue, 29 Jun 2021 15:16:07 +0100 Subject: [PATCH] Fixes #3584 - Attachment order is wrong. --- .../ticket_zoom/sidebar_article_attachments.coffee | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/assets/javascripts/app/controllers/ticket_zoom/sidebar_article_attachments.coffee b/app/assets/javascripts/app/controllers/ticket_zoom/sidebar_article_attachments.coffee index e478e2d17..2e7c561b8 100644 --- a/app/assets/javascripts/app/controllers/ticket_zoom/sidebar_article_attachments.coffee +++ b/app/assets/javascripts/app/controllers/ticket_zoom/sidebar_article_attachments.coffee @@ -17,12 +17,12 @@ class SidebarArticleAttachments extends App.Controller @el.html("
#{App.i18n.translateInline('none')}
") return 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) article = App.TicketArticle.find(ticket_article_id) attachments = App.TicketArticle.contentAttachments(article) 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.delegate('.js-attachments img', 'click', (e) => @imageView(e)