Skip to content

Commit

Permalink
Fix #825: Correct fileimagesresized event triggering
Browse files Browse the repository at this point in the history
  • Loading branch information
kartik-v committed Dec 28, 2016
1 parent 18b3f68 commit f16933a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGE.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
5. (enh #823): Correct file indices assignment during validation of images.
6. (enh #824): Add Korean Translations.
7. (bug #825): Correct `fileimagesresized` event triggering.

## version 4.3.6

Expand Down
4 changes: 2 additions & 2 deletions js/fileinput.js
Original file line number Diff line number Diff line change
Expand Up @@ -2535,7 +2535,7 @@
});
},
_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) {
return;
}
Expand All @@ -2549,7 +2549,7 @@
$img = config.img;
pid = config.pid;
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');
self._setPreviewError(config.thumb, ind);
}
Expand Down
Loading

0 comments on commit f16933a

Please sign in to comment.