Bladeren bron

Fix #310: Set missing caption icon on error

Kartik Visweswaran 10 jaren geleden
bovenliggende
commit
74a7976929
3 gewijzigde bestanden met toevoegingen van 5 en 4 verwijderingen
  1. 2 1
      CHANGE.md
  2. 3 3
      js/fileinput.js
  3. 0 0
      js/fileinput.min.js

+ 2 - 1
CHANGE.md

@@ -1,6 +1,6 @@
 version 4.2.1
 version 4.2.1
 =============
 =============
-**Date**: 03-Jun-2015
+**Date**: 05-Jun-2015
 
 
 1. (enh #279, #280): Fixed error for failed response types.
 1. (enh #279, #280): Fixed error for failed response types.
 2. (enh #287): Add Brazilian Portugese (pt-BR) translations.
 2. (enh #287): Add Brazilian Portugese (pt-BR) translations.
@@ -18,6 +18,7 @@ version 4.2.1
 10. (enh #307): Allow setting thumbnail frame css class and attributes via `initialPreviewConfig`.
 10. (enh #307): Allow setting thumbnail frame css class and attributes via `initialPreviewConfig`.
 11. (enh #308): Better check for `data.error` being empty.
 11. (enh #308): Better check for `data.error` being empty.
 12. (enh #309): Fixes for older browsers.
 12. (enh #309): Fixes for older browsers.
+13. (bug #310): Set missing caption icon on error.
 
 
 version 4.2.0
 version 4.2.0
 =============
 =============

+ 3 - 3
js/fileinput.js

@@ -1929,7 +1929,7 @@
                 msg = self.msgFilesTooMany.repl('{m}', self.maxFileCount).repl('{n}', total);
                 msg = self.msgFilesTooMany.repl('{m}', self.maxFileCount).repl('{n}', total);
                 self.isError = throwError(msg, null, null, null);
                 self.isError = throwError(msg, null, null, null);
                 self.$captionContainer.find('.kv-caption-icon').hide();
                 self.$captionContainer.find('.kv-caption-icon').hide();
-                self.$caption.html(self.msgValidationError);
+                self.setCaption('', true);
                 self.setEllipsis();
                 self.setEllipsis();
                 self.$container.removeClass('file-input-new file-input-ajax-new');
                 self.$container.removeClass('file-input-new file-input-ajax-new');
                 return;
                 return;
@@ -1993,8 +1993,8 @@
             return true;
             return true;
         },
         },
         setCaption: function (content, isError) {
         setCaption: function (content, isError) {
-            var self = this, err = isError || false, title, out;
-            if (err) {
+            var self = this, title, out;
+            if (isError) {
                 title = $('<div>' + self.msgValidationError + '</div>').text();
                 title = $('<div>' + self.msgValidationError + '</div>').text();
                 out = '<span class="' + self.msgValidationErrorClass + '">' +
                 out = '<span class="' + self.msgValidationErrorClass + '">' +
                 self.msgValidationErrorIcon + title + '</span>';
                 self.msgValidationErrorIcon + title + '</span>';

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