Przeglądaj źródła

Fix #273: Reset caption correctly after all initial preview is deleted

Kartik Visweswaran 10 lat temu
rodzic
commit
00bf2212c4
3 zmienionych plików z 5 dodań i 5 usunięć
  1. 3 2
      CHANGE.md
  2. 2 3
      js/fileinput.js
  3. 0 0
      js/fileinput.min.js

+ 3 - 2
CHANGE.md

@@ -1,6 +1,6 @@
 version 4.1.9
 =============
-**Date**: 30-Apr-2015
+**Date**: 02-May-2015
 
 1. (enh #232): Update docs to reflect updated bootstrap CDN domain.
 2. (enh #237): Better styling of file caption icon.
@@ -21,9 +21,10 @@ version 4.1.9
 17. (enh #259): Add Polish translations.
 18. (enh #263): Enhance parsing of file preview thumbnails and actions.
 19. (enh #264): Validate input type of file before initializing plugin.
-20. (enh #269): Add Turkish translations.
+20. (enh #269, #272): Add Turkish translations.
 21. (enh #270): Add Portugese translations.
 22. (enh #271): Add Dutch translations.
+23. (bug #273): Reset caption correctly after all initial preview is deleted.
 
 version 4.1.8
 =============

+ 2 - 3
js/fileinput.js

@@ -1929,12 +1929,11 @@
             });
         },
         initCaption: function () {
-            var self = this, cap;
-            if (self.overwriteInitial) {
+            var self = this, cap = self.initialCaption || '';
+            if (self.overwriteInitial || isEmpty(cap)) {
                 self.$caption.html('');
                 return false;
             }
-            cap = self.initialCaption || '';
             self.setCaption(cap);
             return true;
         },

Plik diff jest za duży
+ 0 - 0
js/fileinput.min.js


Niektóre pliki nie zostały wyświetlone z powodu dużej ilości zmienionych plików