Explorar o código

Thumb upload button and modal behavior update fixes #1671 fixes #1672

Kartik Visweswaran %!s(int64=4) %!d(string=hai) anos
pai
achega
8800bc4406

+ 2 - 0
CHANGE.md

@@ -5,6 +5,8 @@ Change Log: `bootstrap-fileinput`
 
 **Date**: _under development_
 
+- (enh #1672): Add namespace control on bootstrap modal show trigger to avoid interaction with other plugins.
+- (bug #1671): Correct upload button behavior in file thumbnail footer.
 - (enh #1664): Enhance upload stats and add bitrate update delay.
 - (enh #1663): Correct upload bitrate.
 - (enh #1657, #1659): Update Hungarian Translations.

+ 1 - 1
LICENSE.md

@@ -1,4 +1,4 @@
-Copyright (c) 2014 - 2020, Kartik Visweswaran  
+Copyright (c) 2014 - 2021, Kartik Visweswaran  
 Krajee.com  
 All rights reserved.  
 

+ 1 - 1
css/fileinput-rtl.css

@@ -5,7 +5,7 @@
  * Krajee RTL (Right To Left) default styling for bootstrap-fileinput.
  *
  * Author: Kartik Visweswaran
- * Copyright: 2014 - 2020, Kartik Visweswaran, Krajee.com
+ * Copyright: 2014 - 2021, Kartik Visweswaran, Krajee.com
  *
  * Licensed under the BSD-3-Clause
  * https://github.com/kartik-v/bootstrap-fileinput/blob/master/LICENSE.md

+ 1 - 1
css/fileinput-rtl.min.css

@@ -5,7 +5,7 @@
  * Krajee RTL (Right To Left) default styling for bootstrap-fileinput.
  *
  * Author: Kartik Visweswaran
- * Copyright: 2014 - 2020, Kartik Visweswaran, Krajee.com
+ * Copyright: 2014 - 2021, Kartik Visweswaran, Krajee.com
  *
  * Licensed under the BSD-3-Clause
  * https://github.com/kartik-v/bootstrap-fileinput/blob/master/LICENSE.md

+ 1 - 1
css/fileinput.css

@@ -5,7 +5,7 @@
  * Krajee default styling for bootstrap-fileinput.
  *
  * Author: Kartik Visweswaran
- * Copyright: 2014 - 2020, Kartik Visweswaran, Krajee.com
+ * Copyright: 2014 - 2021, Kartik Visweswaran, Krajee.com
  *
  * Licensed under the BSD-3-Clause
  * https://github.com/kartik-v/bootstrap-fileinput/blob/master/LICENSE.md

+ 1 - 1
css/fileinput.min.css

@@ -5,7 +5,7 @@
  * Krajee default styling for bootstrap-fileinput.
  *
  * Author: Kartik Visweswaran
- * Copyright: 2014 - 2020, Kartik Visweswaran, Krajee.com
+ * Copyright: 2014 - 2021, Kartik Visweswaran, Krajee.com
  *
  * Licensed under the BSD-3-Clause
  * https://github.com/kartik-v/bootstrap-fileinput/blob/master/LICENSE.md

+ 1 - 1
examples/index.html

@@ -1,5 +1,5 @@
 <!DOCTYPE html>
-<!-- release v5.1.4, copyright 2014 - 2020 Kartik Visweswaran -->
+<!-- release v5.1.4, copyright 2014 - 2021 Kartik Visweswaran -->
 <!--suppress JSUnresolvedLibraryURL -->
 <html lang="en">
 <head>

+ 12 - 10
js/fileinput.js

@@ -3,7 +3,7 @@
  * http://plugins.krajee.com/file-input
  *
  * Author: Kartik Visweswaran
- * Copyright: 2014 - 2020, Kartik Visweswaran, Krajee.com
+ * Copyright: 2014 - 2021, Kartik Visweswaran, Krajee.com
  *
  * Licensed under the BSD-3-Clause
  * https://github.com/kartik-v/bootstrap-fileinput/blob/master/LICENSE.md
@@ -1075,7 +1075,7 @@
                         return fm.totalSize;
                     }
                     fm.totalSize = 0;
-                    $.each(self.fileManager.stack, function (id, f) {
+                    $.each(self.getFileStack(), function (id, f) {
                         var size = parseFloat(f.size);
                         fm.totalSize += isNaN(size) ? 0 : size;
                     });
@@ -1124,7 +1124,7 @@
                 },
                 list: function () {
                     var files = [];
-                    $.each(self.fileManager.stack, function (k, v) {
+                    $.each(self.getFileStack(), function (k, v) {
                         if (v && v.file) {
                             files.push(v.file);
                         }
@@ -1136,7 +1136,7 @@
                 },
                 isProcessed: function () {
                     var filesProcessed = true, fm = self.fileManager;
-                    $.each(fm.stack, function (id) {
+                    $.each(self.getFileStack(), function (id) {
                         if (fm.isPending(id)) {
                             filesProcessed = false;
                         }
@@ -2800,7 +2800,9 @@
                 };
             };
             $modal.on(event + '.bs.modal', function (e) {
-                if (e.namespace!=='bs.modal') return;
+                if (e.namespace !== 'bs.modal') {
+                    return;
+                }
                 var $btnFull = $modal.find('.btn-fullscreen'), $btnBord = $modal.find('.btn-borderless');
                 if ($modal.data('fileinputPluginId') === self.$element.attr('id')) {
                     self._raise('filezoom' + event, getParams(e));
@@ -3066,7 +3068,7 @@
             }
             if (self.isAjaxUpload) {
                 if (self.fileManager.count() > 0) {
-                    files = $.extend(true, {}, self.fileManager.stack);
+                    files = $.extend(true, {}, self.getFileList());
                     self.fileManager.clear();
                     self._clearFileInput();
                 } else {
@@ -3495,7 +3497,7 @@
                 return;
             }
             if (self.showPreview) {
-                $thumb = self.fileManager.getThumb(id);
+                $thumb = fm.getThumb(id);
                 $prog = $thumb.find('.file-thumb-progress');
                 $btnUpload = $thumb.find('.kv-file-upload');
                 $btnDelete = $thumb.find('.kv-file-remove');
@@ -3906,7 +3908,7 @@
             self.getFrames(' .kv-file-upload').each(function () {
                 var $el = $(this);
                 self._handler($el, 'click', function () {
-                    var $frame = $el.closest($h.FRAMES), fileId = self._getThumbFile($frame);
+                    var $frame = $el.closest($h.FRAMES), fileId = self._getThumbFileId($frame);
                     self._hideProgress();
                     if ($frame.hasClass('file-preview-error') && !self.retryErrorUploads) {
                         return;
@@ -5689,7 +5691,7 @@
                 self._raise('filebatchpreupload', [outData]);
                 self.fileBatchCompleted = false;
                 self.uploadCache = [];
-                $.each(self.getFileStack(), function (id) {
+                $.each(self.getFileStack(), function (id, f) {
                     var previewId = self._getThumbId(id);
                     self.uploadCache.push({id: previewId, content: null, config: null, tags: null, append: true});
                 });
@@ -5700,7 +5702,7 @@
             self.hasInitData = false;
             if (self.uploadAsync) {
                 i = 0;
-                $.each(fm.stack, function (id) {
+                $.each(self.getFileStack(), function (id, f) {
                     self._uploadSingle(i, id, true);
                     i++;
                 });

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 1 - 1
js/fileinput.min.js


+ 1 - 1
nuget/Package.nuspec

@@ -12,7 +12,7 @@
     <requireLicenseAcceptance>false</requireLicenseAcceptance>
     <description>An enhanced HTML 5 file input for Bootstrap 3.x with file preview for various files, offers multiple selection, and more.</description>
     <releaseNotes>https://github.com/kartik-v/bootstrap-fileinput/blob/master/CHANGE.md</releaseNotes>
-    <copyright>Copyright 2014 - 2020</copyright>
+    <copyright>Copyright 2014 - 2021</copyright>
     <tags>bootstrap bootstrap-fileinput</tags>
     <dependencies>
       <dependency id="bootstrap" version="3.4.1" />

+ 1 - 1
scss/fileinput-rtl.scss

@@ -5,7 +5,7 @@
  * Krajee RTL (Right To Left) default styling for bootstrap-fileinput.
  *
  * Author: Kartik Visweswaran
- * Copyright: 2014 - 2020, Kartik Visweswaran, Krajee.com
+ * Copyright: 2014 - 2021, Kartik Visweswaran, Krajee.com
  *
  * Licensed under the BSD-3-Clause
  * https://github.com/kartik-v/bootstrap-fileinput/blob/master/LICENSE.md

+ 1 - 1
scss/fileinput.scss

@@ -5,7 +5,7 @@
  * Krajee default styling for bootstrap-fileinput.
  *
  * Author: Kartik Visweswaran
- * Copyright: 2014 - 2020, Kartik Visweswaran, Krajee.com
+ * Copyright: 2014 - 2021, Kartik Visweswaran, Krajee.com
  *
  * Licensed under the BSD-3-Clause
  * https://github.com/kartik-v/bootstrap-fileinput/blob/master/LICENSE.md

+ 1 - 1
scss/themes/explorer-fa/theme.scss

@@ -6,7 +6,7 @@
  * `fileinput.css`.
  *
  * Author: Kartik Visweswaran
- * Copyright: 2014 - 2020, Kartik Visweswaran, Krajee.com
+ * Copyright: 2014 - 2021, Kartik Visweswaran, Krajee.com
  *
  * Licensed under the BSD-3-Clause
  * https://github.com/kartik-v/bootstrap-fileinput/blob/master/LICENSE.md

+ 1 - 1
scss/themes/explorer-fas/theme.scss

@@ -6,7 +6,7 @@
  * `fileinput.css`.
  *
  * Author: Kartik Visweswaran
- * Copyright: 2014 - 2020, Kartik Visweswaran, Krajee.com
+ * Copyright: 2014 - 2021, Kartik Visweswaran, Krajee.com
  *
  * Licensed under the BSD-3-Clause
  * https://github.com/kartik-v/bootstrap-fileinput/blob/master/LICENSE.md

+ 1 - 1
scss/themes/explorer/theme.scss

@@ -5,7 +5,7 @@
  * Krajee Explorer theme style for bootstrap-fileinput. Load this theme file after loading `fileinput.css`.
  *
  * Author: Kartik Visweswaran
- * Copyright: 2014 - 2020, Kartik Visweswaran, Krajee.com
+ * Copyright: 2014 - 2021, Kartik Visweswaran, Krajee.com
  *
  * Licensed under the BSD-3-Clause
  * https://github.com/kartik-v/bootstrap-fileinput/blob/master/LICENSE.md

+ 1 - 1
themes/explorer-fa/theme.css

@@ -6,7 +6,7 @@
  * font awesome 4.x CSS and `fileinput.css`.
  *
  * Author: Kartik Visweswaran
- * Copyright: 2014 - 2020, Kartik Visweswaran, Krajee.com
+ * Copyright: 2014 - 2021, Kartik Visweswaran, Krajee.com
  *
  * Licensed under the BSD-3-Clause
  * https://github.com/kartik-v/bootstrap-fileinput/blob/master/LICENSE.md

+ 1 - 1
themes/explorer-fa/theme.js

@@ -7,7 +7,7 @@
  * font awesome assets and CSS are loaded on the page as well.
  *
  * Author: Kartik Visweswaran
- * Copyright: 2014 - 2020, Kartik Visweswaran, Krajee.com
+ * Copyright: 2014 - 2021, Kartik Visweswaran, Krajee.com
  *
  * Licensed under the BSD-3-Clause
  * https://github.com/kartik-v/bootstrap-fileinput/blob/master/LICENSE.md

+ 1 - 1
themes/explorer-fa/theme.min.css

@@ -6,7 +6,7 @@
  * font awesome 4.x CSS and `fileinput.css`.
  *
  * Author: Kartik Visweswaran
- * Copyright: 2014 - 2020, Kartik Visweswaran, Krajee.com
+ * Copyright: 2014 - 2021, Kartik Visweswaran, Krajee.com
  *
  * Licensed under the BSD-3-Clause
  * https://github.com/kartik-v/bootstrap-fileinput/blob/master/LICENSE.md

+ 1 - 1
themes/explorer-fa/theme.min.js

@@ -7,7 +7,7 @@
  * font awesome assets and CSS are loaded on the page as well.
  *
  * Author: Kartik Visweswaran
- * Copyright: 2014 - 2020, Kartik Visweswaran, Krajee.com
+ * Copyright: 2014 - 2021, Kartik Visweswaran, Krajee.com
  *
  * Licensed under the BSD-3-Clause
  * https://github.com/kartik-v/bootstrap-fileinput/blob/master/LICENSE.md

+ 1 - 1
themes/explorer-fas/theme.css

@@ -6,7 +6,7 @@
  * font awesome 5.x CSS and `fileinput.css`.
  *
  * Author: Kartik Visweswaran
- * Copyright: 2014 - 2020, Kartik Visweswaran, Krajee.com
+ * Copyright: 2014 - 2021, Kartik Visweswaran, Krajee.com
  *
  * Licensed under the BSD-3-Clause
  * https://github.com/kartik-v/bootstrap-fileinput/blob/master/LICENSE.md

+ 1 - 1
themes/explorer-fas/theme.js

@@ -7,7 +7,7 @@
  * font awesome assets and CSS are loaded on the page as well.
  *
  * Author: Kartik Visweswaran
- * Copyright: 2014 - 2020, Kartik Visweswaran, Krajee.com
+ * Copyright: 2014 - 2021, Kartik Visweswaran, Krajee.com
  *
  * Licensed under the BSD-3-Clause
  * https://github.com/kartik-v/bootstrap-fileinput/blob/master/LICENSE.md

+ 1 - 1
themes/explorer-fas/theme.min.css

@@ -6,7 +6,7 @@
  * font awesome 5.x CSS and `fileinput.css`.
  *
  * Author: Kartik Visweswaran
- * Copyright: 2014 - 2020, Kartik Visweswaran, Krajee.com
+ * Copyright: 2014 - 2021, Kartik Visweswaran, Krajee.com
  *
  * Licensed under the BSD-3-Clause
  * https://github.com/kartik-v/bootstrap-fileinput/blob/master/LICENSE.md

+ 1 - 1
themes/explorer-fas/theme.min.js

@@ -7,7 +7,7 @@
  * font awesome assets and CSS are loaded on the page as well.
  *
  * Author: Kartik Visweswaran
- * Copyright: 2014 - 2020, Kartik Visweswaran, Krajee.com
+ * Copyright: 2014 - 2021, Kartik Visweswaran, Krajee.com
  *
  * Licensed under the BSD-3-Clause
  * https://github.com/kartik-v/bootstrap-fileinput/blob/master/LICENSE.md

+ 1 - 1
themes/explorer/theme.css

@@ -5,7 +5,7 @@
  * Krajee Explorer theme style for bootstrap-fileinput. Load this theme file after loading `fileinput.css`.
  *
  * Author: Kartik Visweswaran
- * Copyright: 2014 - 2020, Kartik Visweswaran, Krajee.com
+ * Copyright: 2014 - 2021, Kartik Visweswaran, Krajee.com
  *
  * Licensed under the BSD-3-Clause
  * https://github.com/kartik-v/bootstrap-fileinput/blob/master/LICENSE.md

+ 1 - 1
themes/explorer/theme.js

@@ -5,7 +5,7 @@
  * Krajee Explorer theme configuration for bootstrap-fileinput. Load this theme file after loading `fileinput.js`.
  *
  * Author: Kartik Visweswaran
- * Copyright: 2014 - 2020, Kartik Visweswaran, Krajee.com
+ * Copyright: 2014 - 2021, Kartik Visweswaran, Krajee.com
  *
  * Licensed under the BSD-3-Clause
  * https://github.com/kartik-v/bootstrap-fileinput/blob/master/LICENSE.md

+ 1 - 1
themes/explorer/theme.min.css

@@ -5,7 +5,7 @@
  * Krajee Explorer theme style for bootstrap-fileinput. Load this theme file after loading `fileinput.css`.
  *
  * Author: Kartik Visweswaran
- * Copyright: 2014 - 2020, Kartik Visweswaran, Krajee.com
+ * Copyright: 2014 - 2021, Kartik Visweswaran, Krajee.com
  *
  * Licensed under the BSD-3-Clause
  * https://github.com/kartik-v/bootstrap-fileinput/blob/master/LICENSE.md

+ 1 - 1
themes/explorer/theme.min.js

@@ -5,7 +5,7 @@
  * Krajee Explorer theme configuration for bootstrap-fileinput. Load this theme file after loading `fileinput.js`.
  *
  * Author: Kartik Visweswaran
- * Copyright: 2014 - 2020, Kartik Visweswaran, Krajee.com
+ * Copyright: 2014 - 2021, Kartik Visweswaran, Krajee.com
  *
  * Licensed under the BSD-3-Clause
  * https://github.com/kartik-v/bootstrap-fileinput/blob/master/LICENSE.md

+ 1 - 1
themes/fa/theme.js

@@ -5,7 +5,7 @@
  * Font Awesome icon theme configuration for bootstrap-fileinput. Requires font awesome assets to be loaded.
  *
  * Author: Kartik Visweswaran
- * Copyright: 2014 - 2020, Kartik Visweswaran, Krajee.com
+ * Copyright: 2014 - 2021, Kartik Visweswaran, Krajee.com
  *
  * Licensed under the BSD-3-Clause
  * https://github.com/kartik-v/bootstrap-fileinput/blob/master/LICENSE.md

+ 1 - 1
themes/fa/theme.min.js

@@ -5,7 +5,7 @@
  * Font Awesome icon theme configuration for bootstrap-fileinput. Requires font awesome assets to be loaded.
  *
  * Author: Kartik Visweswaran
- * Copyright: 2014 - 2020, Kartik Visweswaran, Krajee.com
+ * Copyright: 2014 - 2021, Kartik Visweswaran, Krajee.com
  *
  * Licensed under the BSD-3-Clause
  * https://github.com/kartik-v/bootstrap-fileinput/blob/master/LICENSE.md

+ 1 - 1
themes/fas/theme.js

@@ -5,7 +5,7 @@
  * Font Awesome 5 icon theme configuration for bootstrap-fileinput. Requires font awesome 5 assets to be loaded.
  *
  * Author: Kartik Visweswaran
- * Copyright: 2014 - 2020, Kartik Visweswaran, Krajee.com
+ * Copyright: 2014 - 2021, Kartik Visweswaran, Krajee.com
  *
  * Licensed under the BSD-3-Clause
  * https://github.com/kartik-v/bootstrap-fileinput/blob/master/LICENSE.md

+ 1 - 1
themes/fas/theme.min.js

@@ -5,7 +5,7 @@
  * Font Awesome 5 icon theme configuration for bootstrap-fileinput. Requires font awesome 5 assets to be loaded.
  *
  * Author: Kartik Visweswaran
- * Copyright: 2014 - 2020, Kartik Visweswaran, Krajee.com
+ * Copyright: 2014 - 2021, Kartik Visweswaran, Krajee.com
  *
  * Licensed under the BSD-3-Clause
  * https://github.com/kartik-v/bootstrap-fileinput/blob/master/LICENSE.md

+ 1 - 1
themes/gly/theme.js

@@ -5,7 +5,7 @@
  * Glyphicon (default) theme configuration for bootstrap-fileinput.
  *
  * Author: Kartik Visweswaran
- * Copyright: 2014 - 2020, Kartik Visweswaran, Krajee.com
+ * Copyright: 2014 - 2021, Kartik Visweswaran, Krajee.com
  *
  * Licensed under the BSD-3-Clause
  * https://github.com/kartik-v/bootstrap-fileinput/blob/master/LICENSE.md

+ 1 - 1
themes/gly/theme.min.js

@@ -5,7 +5,7 @@
  * Glyphicon (default) theme configuration for bootstrap-fileinput.
  *
  * Author: Kartik Visweswaran
- * Copyright: 2014 - 2020, Kartik Visweswaran, Krajee.com
+ * Copyright: 2014 - 2021, Kartik Visweswaran, Krajee.com
  *
  * Licensed under the BSD-3-Clause
  * https://github.com/kartik-v/bootstrap-fileinput/blob/master/LICENSE.md

Algúns arquivos non se mostraron porque demasiados arquivos cambiaron neste cambio