summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFelix Hammerl <fhammerl@thoughtworks.com>2016-02-04 11:02:15 +0100
committerFelix Hammerl <fhammerl@thoughtworks.com>2016-02-04 11:02:26 +0100
commit54932685e98f772041044f5a3181646e4f61a38f (patch)
tree2409daa2bc8184fbeb13f5e01f71bed7c84b936a
parent994c90088c51bc1014d4708c0be55216592bf6d9 (diff)
Detach upload abort listener
-rw-r--r--web-ui/app/js/mail_view/ui/attachment_list.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/web-ui/app/js/mail_view/ui/attachment_list.js b/web-ui/app/js/mail_view/ui/attachment_list.js
index 936b2e81..294a21a2 100644
--- a/web-ui/app/js/mail_view/ui/attachment_list.js
+++ b/web-ui/app/js/mail_view/ui/attachment_list.js
@@ -127,6 +127,10 @@ define(
});
};
+ this.detachUploadAbort = function() {
+ this.off(this.select('attachmentUploadItemAbort'), 'click');
+ };
+
this.addJqueryFileUploadConfig = function() {
var self = this;
@@ -146,10 +150,12 @@ define(
dataType: 'json',
done: function (e, response) {
self.hideUploadProgressBar();
+ self.detachUploadAbort();
self.trigger(document, events.mail.uploadedAttachment, response.result);
},
fail: function(e, data){
self.hideUploadProgressBar();
+ self.detachUploadAbort();
self.trigger(document, events.mail.failedUploadAttachment);
},
progressall: function (e, data) {