Jelajahi Sumber

Upgrade to release v4.1.3

Kartik Visweswaran 10 tahun lalu
induk
melakukan
2643016ccf
2 mengubah file dengan 9 tambahan dan 2 penghapusan
  1. 9 2
      js/fileinput.js
  2. 0 0
      js/fileinput.min.js

+ 9 - 2
js/fileinput.js

@@ -845,16 +845,20 @@
                     $indicator.html(config[icon]);
                     $indicator.attr('title', config[msg]);
                 },
-                updateProgress = function() {
+                checkAllUploaded = function() {
                     if (self.$preview.find('file-uploading').length == 0) {
                         self.unlock();
                         self.$element.trigger('filebatchuploadcomplete', [self.filestack, self.uploadExtraData]);
+                        self.setProgress(100);
                     }
+                },
+                updateProgress = function() {
+                    checkAllUploaded();
                     if (!allFiles) {
                         return;
                     }
-                    self.uploadPercent += total > 0 ? Math.ceil(self.uploadCount * 20/total) : 0;
                     self.uploadCount++;
+                    self.uploadPercent = 80 + (total > 0 ? Math.ceil(self.uploadCount * 20/total) : 0);
                     self.setProgress(self.uploadPercent);
                     self.initPreviewDeletes();
                 },
@@ -909,6 +913,9 @@
                     updateProgress();
                     resetActions();
                 },
+                complete: function() {
+                    checkAllUploaded();
+                },
                 error: function(jqXHR, textStatus, errorThrown) {
                     setIndicator('indicatorError', 'indicatorErrorTitle');
                     var outData = {

File diff ditekan karena terlalu besar
+ 0 - 0
js/fileinput.min.js


Beberapa file tidak ditampilkan karena terlalu banyak file yang berubah dalam diff ini