Browse Source

Fix #825: Correct `fileimagesresized` event triggering

Kartik Visweswaran 8 years ago
parent
commit
f16933ae60
3 changed files with 3 additions and 2 deletions
  1. 1 0
      CHANGE.md
  2. 2 2
      js/fileinput.js
  3. 0 0
      js/fileinput.min.js

+ 1 - 0
CHANGE.md

@@ -11,6 +11,7 @@ Change Log: `bootstrap-fileinput`
 4. (enh #822): Enhancement for preventing upload when data is empty. New property `msgUploadEmpty` has been incorporated.
 4. (enh #822): Enhancement for preventing upload when data is empty. New property `msgUploadEmpty` has been incorporated.
 5. (enh #823): Correct file indices assignment during validation of images.
 5. (enh #823): Correct file indices assignment during validation of images.
 6. (enh #824): Add Korean Translations.
 6. (enh #824): Add Korean Translations.
+7. (bug #825): Correct `fileimagesresized` event triggering.
 
 
 ## version 4.3.6
 ## version 4.3.6
 
 

+ 2 - 2
js/fileinput.js

@@ -2535,7 +2535,7 @@
             });
             });
         },
         },
         _validateAllImages: function () {
         _validateAllImages: function () {
-            var self = this, i, config, $img, pid, ind, errFunc;
+            var self = this, i, config, $img, pid, ind, errFunc, ctr = {val: 0};
             if (self.loadedImages.length !== self.totalImagesCount) {
             if (self.loadedImages.length !== self.totalImagesCount) {
                 return;
                 return;
             }
             }
@@ -2549,7 +2549,7 @@
                 $img = config.img;
                 $img = config.img;
                 pid = config.pid;
                 pid = config.pid;
                 ind = config.ind;
                 ind = config.ind;
-                if (!self._getResizedImage($img[0], config.typ, pid, ind, {val: 0}, self.loadedImages.length)) {
+                if (!self._getResizedImage($img[0], config.typ, pid, ind, ctr, self.loadedImages.length)) {
                     errFunc(self.msgImageResizeError, {id: pid, 'index': ind}, 'fileimageresizeerror');
                     errFunc(self.msgImageResizeError, {id: pid, 'index': ind}, 'fileimageresizeerror');
                     self._setPreviewError(config.thumb, ind);
                     self._setPreviewError(config.thumb, ind);
                 }
                 }

File diff suppressed because it is too large
+ 0 - 0
js/fileinput.min.js


Some files were not shown because too many files changed in this diff