summaryrefslogtreecommitdiff
path: root/www/js/importer.js
diff options
context:
space:
mode:
Diffstat (limited to 'www/js/importer.js')
-rw-r--r--www/js/importer.js11
1 files changed, 6 insertions, 5 deletions
diff --git a/www/js/importer.js b/www/js/importer.js
index fbf4955..405c7fd 100644
--- a/www/js/importer.js
+++ b/www/js/importer.js
@@ -72,7 +72,6 @@ Rivendell.Importer.prototype.openModal = function(group, groupView, createCart,
};
Rivendell.Importer.prototype.cancelAllUploads = function() {
- var self = this;
$.each(this.uploads, function(index, upload){
upload.cancel();
});
@@ -102,7 +101,8 @@ Rivendell.Upload = function(group, groupView, createCart, newCartNumber, useMeta
};
Rivendell.Upload.prototype.cancel = function() {
- this.dropzone.removeAllFiles();
+ this.dropzone.off(Dropzone.ERROR);
+ this.dropzone.removeAllFiles(true);
this.dropzone.disable();
var self = this;
@@ -127,10 +127,10 @@ Rivendell.Upload.prototype.import = function() {
this.dropzone.off('uploadprogress').on('uploadprogress', function(file) {
self.groupView.uploadProgress(self, file);
});
- this.dropzone.off('success').on('success', function(file) {
+ this.dropzone.off(Dropzone.SUCCESS).on(Dropzone.SUCCESS, function(file) {
self.importFileUploadSuccess();
});
- this.dropzone.off('error').on('error', function(file, msg, xhr) {
+ this.dropzone.off(Dropzone.ERROR).on(Dropzone.ERROR, function(file, msg, xhr) {
self.importFileUploadError(file, msg, xhr);
});
// debug
@@ -159,7 +159,8 @@ Rivendell.Upload.prototype.addCart = function(success) {
};
Rivendell.Upload.prototype.importFileUploadSuccess = function() {
- this.dropzone.removeAllFiles();
+ this.dropzone.off(Dropzone.ERROR);
+ this.dropzone.removeAllFiles(true);
this.dropzone.disable();
this.group.fetchCarts();