diff options
Diffstat (limited to 'www/js/importer.js')
-rw-r--r-- | www/js/importer.js | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/www/js/importer.js b/www/js/importer.js index c5b48df..5f7db6f 100644 --- a/www/js/importer.js +++ b/www/js/importer.js @@ -86,6 +86,16 @@ Rivendell.Importer.prototype.openModal = function(group, groupView, createCart, this.$el.modal({keyboard: true}); }; +Rivendell.Importer.prototype.isUploading = function() { + var $result = false; + $.each(this.uploads, function(index, upload) { + if (upload && upload.isUploading()) { + $result = true; + } + }); + return $result; +}; + Rivendell.Importer.prototype.cancelAllUploads = function() { $.each(this.uploads, function(index, upload){ if (upload) { @@ -117,6 +127,11 @@ Rivendell.Upload = function(group, groupView, createCart, newCartNumber, useMeta this.import(); }; +Rivendell.Upload.prototype.isUploading = function() { + var files = this.dropzone.getUploadingFiles(); + return files.length > 0; +}; + Rivendell.Upload.prototype.cancel = function() { this.dropzone.off(Dropzone.ERROR); this.dropzone.removeAllFiles(true); |