From cd96a95b684619a56a78de67c90970c6a0ae87d5 Mon Sep 17 00:00:00 2001 From: Martin Edenhofer Date: Thu, 14 Jul 2016 10:32:02 +0200 Subject: [PATCH] Closes #167 - reattach of same attachment was not possible because not change was triggered. --- .../javascripts/app/controllers/_ui_element/richtext.coffee | 2 ++ .../javascripts/app/controllers/ticket_zoom/article_new.coffee | 2 ++ 2 files changed, 4 insertions(+) diff --git a/app/assets/javascripts/app/controllers/_ui_element/richtext.coffee b/app/assets/javascripts/app/controllers/_ui_element/richtext.coffee index 594da948e..f3cba6f7b 100644 --- a/app/assets/javascripts/app/controllers/_ui_element/richtext.coffee +++ b/app/assets/javascripts/app/controllers/_ui_element/richtext.coffee @@ -79,6 +79,7 @@ class App.UiElement.richtext onAborted: => @attachmentPlaceholder.removeClass('hide') @attachmentUpload.addClass('hide') + item.find('input').val('') # Called after received response from the server onCompleted: (response) => @@ -93,6 +94,7 @@ class App.UiElement.richtext @progressText.text('') renderAttachment(response.data) + item.find('input').val('') App.Log.debug 'UiElement.richtext', 'upload complete', response.data diff --git a/app/assets/javascripts/app/controllers/ticket_zoom/article_new.coffee b/app/assets/javascripts/app/controllers/ticket_zoom/article_new.coffee index 07224d88d..533ebbd08 100644 --- a/app/assets/javascripts/app/controllers/ticket_zoom/article_new.coffee +++ b/app/assets/javascripts/app/controllers/ticket_zoom/article_new.coffee @@ -224,6 +224,7 @@ class App.TicketZoomArticleNew extends App.Controller onAborted: => @attachmentPlaceholder.removeClass('hide') @attachmentUpload.addClass('hide') + @$('.article-attachment input').val('') # Called after received response from the server onCompleted: (response) => @@ -239,6 +240,7 @@ class App.TicketZoomArticleNew extends App.Controller @progressText.text('') @renderAttachment(response.data) + @$('.article-attachment input').val('') # Called during upload progress, first parameter # is decimal value from 0 to 100.