Browse Source

Fix #1706: Enhance reset of file caption title

Kartik Visweswaran 4 years ago
parent
commit
7ac03cf286
4 changed files with 4 additions and 1 deletions
  1. 1 0
      CHANGE.md
  2. 1 1
      README.md
  3. 2 0
      js/fileinput.js
  4. 0 0
      js/fileinput.min.js

+ 1 - 0
CHANGE.md

@@ -5,6 +5,7 @@ Change Log: `bootstrap-fileinput`
 
 **Date**: _under development_
 
+- (enh #1705): Enhance reset of file caption title.
 - (enh #1705): Corrections to image resizing.
 - (enh #1704): Enhance and fix CDN to use jsDelivr.
 

+ 1 - 1
README.md

@@ -80,7 +80,7 @@ Step 1: Load the following assets in your header.
 
 ```html
 <!-- bootstrap 5.x and 4.x is supported. You can also use the bootstrap css 3.3.x versions -->
-<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.6.0/css/bootstrap.min.css">
+<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css">
 <link href="https://cdn.jsdelivr.net/gh/kartik-v/[email protected]/css/fileinput.min.css" media="all" rel="stylesheet" type="text/css" />
 <!-- if using RTL (Right-To-Left) orientation, load the RTL CSS file after fileinput.css by uncommenting below -->
 <!-- link href="https://cdn.jsdelivr.net/gh/kartik-v/[email protected]/css/fileinput-rtl.min.css" media="all" rel="stylesheet" type="text/css" /-->

+ 2 - 0
js/fileinput.js

@@ -3480,6 +3480,7 @@
                         if (out === false) {
                             return;
                         }
+                        self.$caption.attr('title', '');
                         $thumb.fadeOut('slow', function () {
                             $thumb.remove();
                             if (!self.getFrames().length) {
@@ -4769,6 +4770,7 @@
                 icon = '<span class="' + self.msgValidationErrorClass + '">' + self.msgValidationErrorIcon + '</span>';
             } else {
                 if ($h.isEmpty(content)) {
+                    self.$caption.attr('title', '');
                     return;
                 }
                 title = $('<div>' + content + '</div>').text();

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