Pārlūkot izejas kodu

Update fileinput.js

fixed bug: can't show error message content
clq321 10 gadi atpakaļ
vecāks
revīzija
91fc6172d8
1 mainītis faili ar 4 papildinājumiem un 4 dzēšanām
  1. 4 4
      js/fileinput.js

+ 4 - 4
js/fileinput.js

@@ -1905,14 +1905,14 @@
         },
         setCaption: function (content, isError) {
             var self = this, err = isError || false, title, out;
-            if (isEmpty(content) || self.$caption.length === 0) {
-                return;
-            }
             if (err) {
                 title = $('<div>' + self.msgValidationError + '</div>').text();
                 out = '<span class="' + self.msgValidationErrorClass + '">' +
                 self.msgValidationErrorIcon + title + '</span>';
             } else {
+                if (isEmpty(content) || self.$caption.length === 0) {
+                    return;
+                }
                 title = $('<div>' + content + '</div>').text();
                 out = self.getLayoutTemplate('icon') + title;
             }
@@ -2134,4 +2134,4 @@
             $input.fileinput();
         }
     });
-})(window.jQuery);
+})(window.jQuery);