Bläddra i källkod

Exif & NPM module enhancements fix #1752 fix #1753

Kartik Visweswaran 3 år sedan
förälder
incheckning
774cdc1863
76 ändrade filer med 1255 tillägg och 715 borttagningar
  1. 3 1
      CHANGE.md
  2. 3 5
      README.md
  3. 1 1
      bower.json
  4. 1 1
      composer.json
  5. 4 4
      examples/index-bs3.html
  6. 2 2
      examples/index-bs4.html
  7. 2 2
      examples/index-bs5.html
  8. 8 10
      js/fileinput.js
  9. 0 0
      js/fileinput.min.js
  10. 11 2
      js/locales/LANG.js
  11. 11 2
      js/locales/ar.js
  12. 11 2
      js/locales/az.js
  13. 11 2
      js/locales/bg.js
  14. 11 2
      js/locales/ca.js
  15. 11 2
      js/locales/cr.js
  16. 11 2
      js/locales/cs.js
  17. 1 1
      js/locales/da.js
  18. 20 11
      js/locales/de.js
  19. 11 2
      js/locales/el.js
  20. 11 2
      js/locales/es.js
  21. 11 2
      js/locales/et.js
  22. 11 2
      js/locales/fa.js
  23. 11 2
      js/locales/fi.js
  24. 11 2
      js/locales/fr.js
  25. 11 2
      js/locales/gl.js
  26. 11 2
      js/locales/he.js
  27. 11 2
      js/locales/hu.js
  28. 11 2
      js/locales/id.js
  29. 11 2
      js/locales/it.js
  30. 11 2
      js/locales/ja.js
  31. 11 2
      js/locales/ka.js
  32. 11 2
      js/locales/kr.js
  33. 11 2
      js/locales/kz.js
  34. 11 2
      js/locales/lt.js
  35. 11 2
      js/locales/lv.js
  36. 11 2
      js/locales/nl.js
  37. 11 2
      js/locales/no.js
  38. 11 2
      js/locales/pl.js
  39. 11 2
      js/locales/pt-BR.js
  40. 11 2
      js/locales/pt.js
  41. 11 2
      js/locales/ro.js
  42. 11 2
      js/locales/ru.js
  43. 11 2
      js/locales/sk.js
  44. 11 2
      js/locales/sl.js
  45. 11 2
      js/locales/sr-latn.js
  46. 11 2
      js/locales/sv.js
  47. 11 2
      js/locales/th.js
  48. 11 2
      js/locales/tr.js
  49. 11 2
      js/locales/uk.js
  50. 11 2
      js/locales/uz-cyrl.js
  51. 11 2
      js/locales/uz.js
  52. 11 2
      js/locales/vi.js
  53. 11 2
      js/locales/zh-TW.js
  54. 11 2
      js/locales/zh.js
  55. 73 62
      js/plugins/piexif.js
  56. 0 0
      js/plugins/piexif.min.js
  57. 131 57
      js/plugins/sortable.js
  58. 0 1
      js/plugins/sortable.min.js
  59. 1 1
      package.json
  60. 110 110
      scss/fileinput-rtl.scss
  61. 170 170
      scss/themes/explorer-fa/theme.scss
  62. 170 170
      scss/themes/explorer/theme.scss
  63. 11 2
      themes/bs5/theme.js
  64. 1 1
      themes/bs5/theme.min.js
  65. 11 2
      themes/explorer-fa/theme.js
  66. 0 0
      themes/explorer-fa/theme.min.js
  67. 11 3
      themes/explorer-fas/theme.js
  68. 0 0
      themes/explorer-fas/theme.min.js
  69. 11 2
      themes/explorer/theme.js
  70. 1 1
      themes/explorer/theme.min.js
  71. 11 2
      themes/fa/theme.js
  72. 1 1
      themes/fa/theme.min.js
  73. 11 2
      themes/fas/theme.js
  74. 1 1
      themes/fas/theme.min.js
  75. 11 2
      themes/gly/theme.js
  76. 1 1
      themes/gly/theme.min.js

+ 3 - 1
CHANGE.md

@@ -3,8 +3,10 @@ Change Log: `bootstrap-fileinput`
 
 ## version 5.2.4
 
-**Date**: 03-Sep-2021
+**Date**: _under development_
 
+- (enh #1753): Enhance NPM module handling.
+- (enh #1752): Enhance exif properties validation .
 - (enh #1750): Enhancements to file caption icon and input group styling.
 - (enh #1744): Enhance zoom cache temporary url to use loader image.
 - (enh #1741): Fix zoom cache 404 console warnings.

+ 3 - 5
README.md

@@ -6,9 +6,7 @@
     bootstrap-fileinput
     <hr>
     <a href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=DTP3NZQ6G2AYU"
-       title="Donate via Paypal" target="_blank">
-        <img height="60" src="https://kartik-v.github.io/bootstrap-fileinput-samples/samples/donate.png" alt="Donate"/>
-    </a>
+       title="Donate via Paypal" target="_blank"><img height="60" src="https://kartik-v.github.io/bootstrap-fileinput-samples/samples/donate.png" alt="Donate"/></a>
     &nbsp; &nbsp; &nbsp;
     <a href="https://www.buymeacoffee.com/kartikv" title="Buy me a coffee" ><img src="https://cdn.buymeacoffee.com/buttons/v2/default-yellow.png" height="60" alt="kartikv" /></a>
 </h1>
@@ -42,7 +40,7 @@ View the [plugin documentation](http://plugins.krajee.com/file-input) and [plugi
 
 ## Pre-requisites  
 
-1. [Bootstrap 5.x, 4.x, or 3.x](http://getbootstrap.com/)
+1. [Bootstrap 5.x or 4.x, or 3.x](http://getbootstrap.com/)
 2. Latest [JQuery](http://jquery.com/)
 3. Most modern browsers supporting HTML5 (inputs and FileReader API) including CSS3 & JQuery. For Internet Explorer, one must use IE versions 10 and above. IE9 and below will work as a normal file input, and will not support multiple file selection or the HTML 5 FileReader API.
 4. With release 4.0, AJAX uploads are supported. AJAX uploads require that the browser support HTML5 FormData and XHR2 (XMLHttpRequest 2). Most modern browsers support FormData and XHR2. The plugin will automatically degrade to normal form based submission for browsers not supporting AJAX uploads
@@ -92,7 +90,7 @@ Step 1: Load the following assets on your page in the order mentioned.
 <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/font/bootstrap-icons.min.css" crossorigin="anonymous">
 
 <!-- alternatively you can use the font awesome icon library if using with `fas` theme (or Bootstrap 4.x) by uncommenting below. -->
-<!-- link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.15.3/css/all.css" crossorigin="anonymous" -->
+<!-- link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.15.4/css/all.css" crossorigin="anonymous" -->
 
 <!-- the fileinput plugin styling CSS file -->
 <link href="https://cdn.jsdelivr.net/gh/kartik-v/[email protected]/css/fileinput.min.css" media="all" rel="stylesheet" type="text/css" />

+ 1 - 1
bower.json

@@ -5,7 +5,7 @@
     "authors": [
         "Kartik Visweswaran <[email protected]>"
     ],
-    "description": "An enhanced HTML 5 file input for Bootstrap 3.x with file preview, multiple selection, ajax uploads, and more features.",
+    "description": "An enhanced HTML 5 file input for Bootstrap 5.x, 4.x, and 3.x with file preview, multiple selection, ajax uploads, and more features.",
     "main": [
         "./css/fileinput.min.css",
         "./js/fileinput.min.js"

+ 1 - 1
composer.json

@@ -1,6 +1,6 @@
 {
     "name": "kartik-v/bootstrap-fileinput",
-    "description": "An enhanced HTML 5 file input for Bootstrap 3.x with features for file preview for many file types, multiple selection, ajax uploads, and more.",
+    "description": "An enhanced HTML 5 file input for Bootstrap 5.x, 4.x, and 3.x with features for file preview for many file types, multiple selection, ajax uploads, and more.",
     "keywords": [
         "bootstrap",
         "jquery",

+ 4 - 4
examples/index-bs3.html

@@ -5,14 +5,14 @@
 <head>
     <meta charset="UTF-8"/>
     <title>Krajee JQuery Plugins - &copy; Kartik</title>
-    
-    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" crossorigin="anonymous">
+
+    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" crossorigin="anonymous">
     <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/font/bootstrap-icons.min.css" crossorigin="anonymous">
     <link href="../css/fileinput.css" media="all" rel="stylesheet" type="text/css"/>
-    <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.5.0/css/all.css" crossorigin="anonymous">
+    <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.15.4/css/all.css" crossorigin="anonymous">
     <link href="../themes/explorer-fas/theme.css" media="all" rel="stylesheet" type="text/css"/>
     <script src="https://code.jquery.com/jquery-3.6.0.min.js" crossorigin="anonymous"></script>
-    <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" crossorigin="anonymous"></script>
+    <script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.min.js" crossorigin="anonymous"></script>
     <script src="../js/plugins/piexif.js" type="text/javascript"></script>
     <script src="../js/plugins/sortable.js" type="text/javascript"></script>
     <script src="../js/fileinput.js" type="text/javascript"></script>

+ 2 - 2
examples/index-bs4.html

@@ -9,9 +9,9 @@
     <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" crossorigin="anonymous">
     <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/font/bootstrap-icons.min.css" crossorigin="anonymous">
     <link href="../css/fileinput.css" media="all" rel="stylesheet" type="text/css"/>
-    <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.5.0/css/all.css" crossorigin="anonymous">
+    <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.15.4/css/all.css" crossorigin="anonymous">
     <link href="../themes/explorer-fas/theme.css" media="all" rel="stylesheet" type="text/css"/>
-    <script src="https://code.jquery.com/jquery-3.5.1.min.js" crossorigin="anonymous"></script>
+    <script src="https://code.jquery.com/jquery-3.6.0.min.js" crossorigin="anonymous"></script>
     <script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js" crossorigin="anonymous"></script>
     <script src="../js/plugins/piexif.js" type="text/javascript"></script>
     <script src="../js/plugins/sortable.js" type="text/javascript"></script>

+ 2 - 2
examples/index-bs5.html

@@ -9,9 +9,9 @@
     <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" crossorigin="anonymous">
     <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/font/bootstrap-icons.min.css" crossorigin="anonymous">
     <link href="../css/fileinput.css" media="all" rel="stylesheet" type="text/css"/>
-    <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.5.0/css/all.css" crossorigin="anonymous">
+    <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.15.4/css/all.css" crossorigin="anonymous">
     <link href="../themes/explorer-fas/theme.css" media="all" rel="stylesheet" type="text/css"/>
-    <script src="https://code.jquery.com/jquery-3.5.1.min.js" crossorigin="anonymous"></script>
+    <script src="https://code.jquery.com/jquery-3.6.0.min.js" crossorigin="anonymous"></script>
     <script src="../js/plugins/piexif.js" type="text/javascript"></script>
     <script src="../js/plugins/sortable.js" type="text/javascript"></script>
 </head>

+ 8 - 10
js/fileinput.js

@@ -11,16 +11,13 @@
 (function (factory) {
     'use strict';
     if (typeof define === 'function' && define.amd) {
-        define(['jquery'], factory);
+        define(['jquery', 'window', 'document'], factory);
+    } else if (typeof module === 'object' && typeof module.exports === 'object') {
+        factory(require('jquery'), window, document);
     } else {
-        if (typeof module === 'object' && module.exports) {
-            //noinspection NpmUsedModulesInstalled
-            module.exports = factory(require('jquery'));
-        } else {
-            factory(window.jQuery);
-        }
+        factory(window.jQuery, window, document);
     }
-}(function ($) {
+}(function ($, window, document, undefined) {
     'use strict';
 
     $.fn.fileinputLocales = {};
@@ -4580,7 +4577,7 @@
                 exifObj = null;
                 error = err && err.message || '';
             }
-            if (!exifObj) {
+            if (!exifObj && self.showExifErrorLog) {
                 self._log($h.logMessages.badExifParser, {details: error});
             }
             return exifObj;
@@ -4636,13 +4633,13 @@
         },
         _validateImageOrientation: function ($img, file, previewId, fileId, caption, ftype, fsize, iData) {
             var self = this, exifObj = null, value, autoOrientImage = self.autoOrientImage, selector;
+            exifObj = self._getExifObj(iData);
             if (self.canOrientImage) {
                 $img.css('image-orientation', (autoOrientImage ? 'from-image' : 'none'));
                 self._validateImage(previewId, fileId, caption, ftype, fsize, iData, exifObj);
                 return;
             }
             selector = $h.getZoomSelector(previewId, ' img');
-            exifObj = autoOrientImage ? self._getExifObj(iData) : null;
             value = exifObj ? exifObj['0th'][piexif.ImageIFD.Orientation] : null; // jshint ignore:line
             if (!value) {
                 self._validateImage(previewId, fileId, caption, ftype, fsize, iData, exifObj);
@@ -6015,6 +6012,7 @@
             return !iOSSafari;
         },
         autoOrientImageInitial: true,
+        showExifErrorLog: false,
         required: false,
         rtl: false,
         hideThumbnailContent: false,

Filskillnaden har hållts tillbaka eftersom den är för stor
+ 0 - 0
js/fileinput.min.js


+ 11 - 2
js/locales/LANG.js

@@ -8,7 +8,16 @@
  *
  * NOTE: this file must be saved in UTF-8 encoding.
  */
-(function ($) {
+(function (factory) {
+    'use strict';
+    if (typeof define === 'function' && define.amd) {
+        define(['jquery', 'window', 'document'],factory);
+    } else if (typeof module === 'object' && typeof module.exports === 'object') {
+        factory(require('jquery'), window, document);
+    } else {
+        factory(window.jQuery, window, document);
+    }
+}(function ($, window, document, undefined) {
     "use strict";
 
     $.fn.fileinputLocales['_LANG_'] = {
@@ -112,4 +121,4 @@
             close: 'Close detailed preview'
         }
     };
-})(window.jQuery);
+}));

+ 11 - 2
js/locales/ar.js

@@ -9,7 +9,16 @@
  *
  * NOTE: this file must be saved in UTF-8 encoding.
  */
-(function ($) {
+(function (factory) {
+    'use strict';
+    if (typeof define === 'function' && define.amd) {
+        define(['jquery', 'window', 'document'],factory);
+    } else if (typeof module === 'object' && typeof module.exports === 'object') {
+        factory(require('jquery'), window, document);
+    } else {
+        factory(window.jQuery, window, document);
+    }
+}(function ($, window, document, undefined) {
     "use strict";
 
     $.fn.fileinputLocales['ar'] = {
@@ -113,4 +122,4 @@
             close: 'إغلاق المعاينة التفصيلية'
         }
     };
-})(window.jQuery);
+}));

+ 11 - 2
js/locales/az.js

@@ -9,7 +9,16 @@
  *
  * NOTE: this file must be saved in UTF-8 encoding.
  */
-(function ($) {
+(function (factory) {
+    'use strict';
+    if (typeof define === 'function' && define.amd) {
+        define(['jquery', 'window', 'document'],factory);
+    } else if (typeof module === 'object' && typeof module.exports === 'object') {
+        factory(require('jquery'), window, document);
+    } else {
+        factory(window.jQuery, window, document);
+    }
+}(function ($, window, document, undefined) {
     "use strict";
 
     $.fn.fileinputLocales['az'] = {
@@ -113,4 +122,4 @@
             close: 'Ətraflı baxışı bağla'
         }
     };
-})(window.jQuery);
+}));

+ 11 - 2
js/locales/bg.js

@@ -8,7 +8,16 @@
  *
  * NOTE: this file must be saved in UTF-8 encoding.
  */
-(function ($) {
+(function (factory) {
+    'use strict';
+    if (typeof define === 'function' && define.amd) {
+        define(['jquery', 'window', 'document'],factory);
+    } else if (typeof module === 'object' && typeof module.exports === 'object') {
+        factory(require('jquery'), window, document);
+    } else {
+        factory(window.jQuery, window, document);
+    }
+}(function ($, window, document, undefined) {
     "use strict";
 
     $.fn.fileinputLocales['bg'] = {
@@ -111,4 +120,4 @@
             close: 'Close detailed preview'
         }
     };
-})(window.jQuery);
+}));

+ 11 - 2
js/locales/ca.js

@@ -8,7 +8,16 @@
  *
  * NOTE: this file must be saved in UTF-8 encoding.
  */
-(function ($) {
+(function (factory) {
+    'use strict';
+    if (typeof define === 'function' && define.amd) {
+        define(['jquery', 'window', 'document'],factory);
+    } else if (typeof module === 'object' && typeof module.exports === 'object') {
+        factory(require('jquery'), window, document);
+    } else {
+        factory(window.jQuery, window, document);
+    }
+}(function ($, window, document, undefined) {
     "use strict";
 
     $.fn.fileinputLocales['ca'] = {
@@ -112,4 +121,4 @@
             close: 'Tancar detalls'
         }
     };
-})(window.jQuery);
+}));

+ 11 - 2
js/locales/cr.js

@@ -9,7 +9,16 @@
  *
  * NOTE: this file must be saved in UTF-8 encoding.
  */
-(function ($) {
+(function (factory) {
+    'use strict';
+    if (typeof define === 'function' && define.amd) {
+        define(['jquery', 'window', 'document'],factory);
+    } else if (typeof module === 'object' && typeof module.exports === 'object') {
+        factory(require('jquery'), window, document);
+    } else {
+        factory(window.jQuery, window, document);
+    }
+}(function ($, window, document, undefined) {
     "use strict";
 
     $.fn.fileinputLocales['cr'] = {
@@ -112,4 +121,4 @@
             close: 'Close detailed preview'
         }
     };
-})(window.jQuery);
+}));

+ 11 - 2
js/locales/cs.js

@@ -8,7 +8,16 @@
  *
  * NOTE: this file must be saved in UTF-8 encoding.
  */
-(function ($) {
+(function (factory) {
+    'use strict';
+    if (typeof define === 'function' && define.amd) {
+        define(['jquery', 'window', 'document'],factory);
+    } else if (typeof module === 'object' && typeof module.exports === 'object') {
+        factory(require('jquery'), window, document);
+    } else {
+        factory(window.jQuery, window, document);
+    }
+}(function ($, window, document, undefined) {
     "use strict";
 
     $.fn.fileinputLocales['cs'] = {
@@ -112,4 +121,4 @@
             close: 'Zavřít detailní náhled'
         }
     };
-})(window.jQuery);
+}));

+ 1 - 1
js/locales/da.js

@@ -112,4 +112,4 @@
             close: 'Luk detaljeret visning'
         }
     };
-})(window.jQuery);
+}));

+ 20 - 11
js/locales/de.js

@@ -6,7 +6,16 @@
  *
  * @see http://github.com/kartik-v/bootstrap-fileinput
  */
-(function ($) {
+(function (factory) {
+    'use strict';
+    if (typeof define === 'function' && define.amd) {
+        define(['jquery', 'window', 'document'],factory);
+    } else if (typeof module === 'object' && typeof module.exports === 'object') {
+        factory(require('jquery'), window, document);
+    } else {
+        factory(window.jQuery, window, document);
+    }
+}(function ($, window, document, undefined) {
     "use strict";
 
     $.fn.fileinputLocales['de'] = {
@@ -19,13 +28,13 @@
         removeTitle: 'Ausgewählte löschen',
         cancelLabel: 'Abbrechen',
         cancelTitle: 'Hochladen abbrechen',
-        pauseLabel: 'Pause',
-        pauseTitle: 'Pause ongoing upload',
+        pauseLabel: 'Pause',
+        pauseTitle: 'Pause ongoing upload',
         uploadLabel: 'Hochladen',
         uploadTitle: 'Hochladen der ausgewählten Dateien',
         msgNo: 'Keine',
         msgNoFilesSelected: 'Keine Dateien ausgewählt',
-        msgPaused: 'Paused',
+        msgPaused: 'Paused',
         msgCancelled: 'Abgebrochen',
         msgPlaceholder: '{files} auswählen ...',
         msgZoomModalHeading: 'ausführliche Vorschau',
@@ -34,7 +43,7 @@
         msgSizeTooLarge: 'Datei "{name}" (<b>{size} KB</b>) überschreitet maximal zulässige Upload-Größe von <b>{maxSize} KB</b>.',
         msgFilesTooLess: 'Sie müssen mindestens <b>{n}</b> {files} zum Hochladen auswählen.',
         msgFilesTooMany: 'Anzahl der zum Hochladen ausgewählten Dateien <b>({n})</b>, überschreitet maximal zulässige Grenze von <b>{m}</b> Stück.',
-        msgTotalFilesTooMany: 'You can upload a maximum of <b>{m}</b> files (<b>{n}</b> files detected).',
+        msgTotalFilesTooMany: 'You can upload a maximum of <b>{m}</b> files (<b>{n}</b> files detected).',
         msgFileNotFound: 'Datei "{name}" wurde nicht gefunden!',
         msgFileSecured: 'Sicherheitseinstellungen verhindern das Lesen der Datei "{name}".',
         msgFileNotReadable: 'Die Datei "{name}" ist nicht lesbar.',
@@ -57,7 +66,7 @@
         msgUploadThreshold: 'Wird bearbeitet &hellip;',
         msgUploadBegin: 'Wird initialisiert &hellip;',
         msgUploadEnd: 'Erledigt',
-        msgUploadResume: 'Resuming upload &hellip;',
+        msgUploadResume: 'Resuming upload &hellip;',
         msgUploadEmpty: 'Keine gültigen Daten zum Hochladen verfügbar.',
         msgUploadError: 'Upload Error',
         msgDeleteError: 'Delete Error',
@@ -76,10 +85,10 @@
         msgImageResizeException: 'Fehler beim Ändern der Größe des Bildes.<pre>{errors}</pre>',
         msgAjaxError: 'Bei der Aktion {operation} ist ein Fehler aufgetreten. Bitte versuche es später noch einmal!',
         msgAjaxProgressError: '{operation} fehlgeschlagen',
-        msgDuplicateFile: 'File "{name}" of same size "{size} KB" has already been selected earlier. Skipping duplicate selection.',
-        msgResumableUploadRetriesExceeded:  'Upload aborted beyond <b>{max}</b> retries for file <b>{file}</b>! Error Details: <pre>{error}</pre>',
-        msgPendingTime: '{time} remaining',
-        msgCalculatingTime: 'calculating time remaining',
+        msgDuplicateFile: 'File "{name}" of same size "{size} KB" has already been selected earlier. Skipping duplicate selection.',
+        msgResumableUploadRetriesExceeded:  'Upload aborted beyond <b>{max}</b> retries for file <b>{file}</b>! Error Details: <pre>{error}</pre>',
+        msgPendingTime: '{time} remaining',
+        msgCalculatingTime: 'calculating time remaining',
         ajaxOperations: {
             deleteThumb: 'Datei löschen',
             uploadThumb: 'Datei hochladen',
@@ -110,4 +119,4 @@
             close: 'Detailansicht schließen'
         }
     };
-})(window.jQuery);
+}));

+ 11 - 2
js/locales/el.js

@@ -8,7 +8,16 @@
  *
  * NOTE: this file must be saved in UTF-8 encoding.
  */
-(function ($) {
+(function (factory) {
+    'use strict';
+    if (typeof define === 'function' && define.amd) {
+        define(['jquery', 'window', 'document'],factory);
+    } else if (typeof module === 'object' && typeof module.exports === 'object') {
+        factory(require('jquery'), window, document);
+    } else {
+        factory(window.jQuery, window, document);
+    }
+}(function ($, window, document, undefined) {
     "use strict";
 
     $.fn.fileinputLocales['el'] = {
@@ -112,4 +121,4 @@
             close: 'Κλείσιμο προβολής'
         }
     };
-})(window.jQuery);
+}));

+ 11 - 2
js/locales/es.js

@@ -8,7 +8,16 @@
  *
  * NOTE: this file must be saved in UTF-8 encoding.
  */
-(function ($) {
+(function (factory) {
+    'use strict';
+    if (typeof define === 'function' && define.amd) {
+        define(['jquery', 'window', 'document'],factory);
+    } else if (typeof module === 'object' && typeof module.exports === 'object') {
+        factory(require('jquery'), window, document);
+    } else {
+        factory(window.jQuery, window, document);
+    }
+}(function ($, window, document, undefined) {
     "use strict";
 
     $.fn.fileinputLocales['es'] = {
@@ -112,4 +121,4 @@
             close: 'Cerrar vista detallada'
         }
     };
-})(window.jQuery);
+}));

+ 11 - 2
js/locales/et.js

@@ -8,7 +8,16 @@
  *
  * NOTE: this file must be saved in UTF-8 encoding.
  */
-(function ($) {
+(function (factory) {
+    'use strict';
+    if (typeof define === 'function' && define.amd) {
+        define(['jquery', 'window', 'document'],factory);
+    } else if (typeof module === 'object' && typeof module.exports === 'object') {
+        factory(require('jquery'), window, document);
+    } else {
+        factory(window.jQuery, window, document);
+    }
+}(function ($, window, document, undefined) {
     "use strict";
 
     $.fn.fileinputLocales['et'] = {
@@ -110,4 +119,4 @@
             close: 'Close detailed preview'
         }
     };
-})(window.jQuery);
+}));

+ 11 - 2
js/locales/fa.js

@@ -9,7 +9,16 @@
  *
  * NOTE: this file must be saved in UTF-8 encoding.
  */
-(function ($) {
+(function (factory) {
+    'use strict';
+    if (typeof define === 'function' && define.amd) {
+        define(['jquery', 'window', 'document'],factory);
+    } else if (typeof module === 'object' && typeof module.exports === 'object') {
+        factory(require('jquery'), window, document);
+    } else {
+        factory(window.jQuery, window, document);
+    }
+}(function ($, window, document, undefined) {
     "use strict";
 
     $.fn.fileinputLocales['fa'] = {
@@ -113,4 +122,4 @@
             close: 'بستن نمایش با جزییات'
         }
     };
-})(window.jQuery);
+}));

+ 11 - 2
js/locales/fi.js

@@ -8,7 +8,16 @@
  *
  * NOTE: this file must be saved in UTF-8 encoding.
  */
-(function ($) {
+(function (factory) {
+    'use strict';
+    if (typeof define === 'function' && define.amd) {
+        define(['jquery', 'window', 'document'],factory);
+    } else if (typeof module === 'object' && typeof module.exports === 'object') {
+        factory(require('jquery'), window, document);
+    } else {
+        factory(window.jQuery, window, document);
+    }
+}(function ($, window, document, undefined) {
     "use strict";
 
     $.fn.fileinputLocales.fi = {
@@ -101,4 +110,4 @@
     };
 
     $.extend($.fn.fileinput.defaults, $.fn.fileinputLocales.fi);
-})(window.jQuery);
+}));

+ 11 - 2
js/locales/fr.js

@@ -8,7 +8,16 @@
  *
  * NOTE: this file must be saved in UTF-8 encoding.
  */
-(function ($) {
+(function (factory) {
+    'use strict';
+    if (typeof define === 'function' && define.amd) {
+        define(['jquery', 'window', 'document'],factory);
+    } else if (typeof module === 'object' && typeof module.exports === 'object') {
+        factory(require('jquery'), window, document);
+    } else {
+        factory(window.jQuery, window, document);
+    }
+}(function ($, window, document, undefined) {
     "use strict";
 
     $.fn.fileinputLocales['fr'] = {
@@ -112,4 +121,4 @@
             close: "Fermer l'aperçu"
         }
     };
-})(window.jQuery);
+}));

+ 11 - 2
js/locales/gl.js

@@ -8,7 +8,16 @@
  *
  * NOTE: this file must be saved in UTF-8 encoding.
  */
-(function ($) {
+(function (factory) {
+    'use strict';
+    if (typeof define === 'function' && define.amd) {
+        define(['jquery', 'window', 'document'],factory);
+    } else if (typeof module === 'object' && typeof module.exports === 'object') {
+        factory(require('jquery'), window, document);
+    } else {
+        factory(window.jQuery, window, document);
+    }
+}(function ($, window, document, undefined) {
     "use strict";
 
     $.fn.fileinputLocales['gl'] = {
@@ -112,4 +121,4 @@
             close: 'Cerrar vista detallada'
         }
     };
-})(window.jQuery);
+}));

+ 11 - 2
js/locales/he.js

@@ -9,7 +9,16 @@
  *
  * NOTE: this file must be saved in UTF-8 encoding.
  */
-(function ($) {
+(function (factory) {
+    'use strict';
+    if (typeof define === 'function' && define.amd) {
+        define(['jquery', 'window', 'document'],factory);
+    } else if (typeof module === 'object' && typeof module.exports === 'object') {
+        factory(require('jquery'), window, document);
+    } else {
+        factory(window.jQuery, window, document);
+    }
+}(function ($, window, document, undefined) {
     "use strict";
 
     $.fn.fileinputLocales['he'] = {
@@ -107,4 +116,4 @@
             close: 'סגירת תצוגה מקדימה מפורטת'
         }
     };
-})(window.jQuery);
+}));

+ 11 - 2
js/locales/hu.js

@@ -8,7 +8,16 @@
  *
  * NOTE: this file must be saved in UTF-8 encoding.
  */
-(function ($) {
+(function (factory) {
+    'use strict';
+    if (typeof define === 'function' && define.amd) {
+        define(['jquery', 'window', 'document'],factory);
+    } else if (typeof module === 'object' && typeof module.exports === 'object') {
+        factory(require('jquery'), window, document);
+    } else {
+        factory(window.jQuery, window, document);
+    }
+}(function ($, window, document, undefined) {
     "use strict";
 
     $.fn.fileinputLocales['hu'] = {
@@ -112,4 +121,4 @@
             close: 'Részletes előnézet bezárása'
         }
     };
-})(window.jQuery);
+}));

+ 11 - 2
js/locales/id.js

@@ -9,7 +9,16 @@
  *
  * NOTE: this file must be saved in UTF-8 encoding.
  */
-(function ($) {
+(function (factory) {
+    'use strict';
+    if (typeof define === 'function' && define.amd) {
+        define(['jquery', 'window', 'document'],factory);
+    } else if (typeof module === 'object' && typeof module.exports === 'object') {
+        factory(require('jquery'), window, document);
+    } else {
+        factory(window.jQuery, window, document);
+    }
+}(function ($, window, document, undefined) {
     "use strict";
 
     $.fn.fileinputLocales['id'] = {
@@ -113,4 +122,4 @@
             close: 'Tutup pratinjau terperinci'
         }
     };
-})(window.jQuery);
+}));

+ 11 - 2
js/locales/it.js

@@ -10,7 +10,16 @@
  *
  * NOTE: this file must be saved in UTF-8 encoding.
  */
-(function ($) {
+(function (factory) {
+    'use strict';
+    if (typeof define === 'function' && define.amd) {
+        define(['jquery', 'window', 'document'],factory);
+    } else if (typeof module === 'object' && typeof module.exports === 'object') {
+        factory(require('jquery'), window, document);
+    } else {
+        factory(window.jQuery, window, document);
+    }
+}(function ($, window, document, undefined) {
     "use strict";
 
     $.fn.fileinputLocales['it'] = {
@@ -114,4 +123,4 @@
             close: 'Chiudi'
         }
     };
-})(window.jQuery);
+}));

+ 11 - 2
js/locales/ja.js

@@ -15,7 +15,16 @@
  *    \u3200-\u32ff : Enclosed CJK Letters and Months
  *    \uff00-\uffef : Halfwidth and Fullwidth Forms
  */
-(function ($) {
+(function (factory) {
+    'use strict';
+    if (typeof define === 'function' && define.amd) {
+        define(['jquery', 'window', 'document'],factory);
+    } else if (typeof module === 'object' && typeof module.exports === 'object') {
+        factory(require('jquery'), window, document);
+    } else {
+        factory(window.jQuery, window, document);
+    }
+}(function ($, window, document, undefined) {
     "use strict";
 
     $.fn.fileinputLocales['ja'] = {
@@ -120,4 +129,4 @@
             close: 'プレビューを閉じる'
         }
     };
-})(window.jQuery);
+}));

+ 11 - 2
js/locales/ka.js

@@ -9,7 +9,16 @@
  *
  * NOTE: this file must be saved in UTF-8 encoding.
  */
-(function ($) {
+(function (factory) {
+    'use strict';
+    if (typeof define === 'function' && define.amd) {
+        define(['jquery', 'window', 'document'],factory);
+    } else if (typeof module === 'object' && typeof module.exports === 'object') {
+        factory(require('jquery'), window, document);
+    } else {
+        factory(window.jQuery, window, document);
+    }
+}(function ($, window, document, undefined) {
     "use strict";
 
     $.fn.fileinputLocales['ka'] = {
@@ -113,4 +122,4 @@
             close: 'დახურვა'
         }
     };
-})(window.jQuery);
+}));

+ 11 - 2
js/locales/kr.js

@@ -8,7 +8,16 @@
  *
  * NOTE: this file must be saved in UTF-8 encoding.
  */
-(function ($) {
+(function (factory) {
+    'use strict';
+    if (typeof define === 'function' && define.amd) {
+        define(['jquery', 'window', 'document'],factory);
+    } else if (typeof module === 'object' && typeof module.exports === 'object') {
+        factory(require('jquery'), window, document);
+    } else {
+        factory(window.jQuery, window, document);
+    }
+}(function ($, window, document, undefined) {
     "use strict";
 
     $.fn.fileinputLocales['kr'] = {
@@ -111,4 +120,4 @@
             close: '세부 정보 닫기'
         }
     };
-})(window.jQuery);
+}));

+ 11 - 2
js/locales/kz.js

@@ -9,7 +9,16 @@
  *
  * NOTE: this file must be saved in UTF-8 encoding.
  */
-(function ($) {
+(function (factory) {
+    'use strict';
+    if (typeof define === 'function' && define.amd) {
+        define(['jquery', 'window', 'document'],factory);
+    } else if (typeof module === 'object' && typeof module.exports === 'object') {
+        factory(require('jquery'), window, document);
+    } else {
+        factory(window.jQuery, window, document);
+    }
+}(function ($, window, document, undefined) {
     "use strict";
 
     $.fn.fileinputLocales['kz'] = {
@@ -99,4 +108,4 @@
             close: 'Толық көрінісін жабу'
         }
     };
-})(window.jQuery);
+}));

+ 11 - 2
js/locales/lt.js

@@ -9,7 +9,16 @@
  *
  * NOTE: this file must be saved in UTF-8 encoding.
  */
-(function ($) {
+(function (factory) {
+    'use strict';
+    if (typeof define === 'function' && define.amd) {
+        define(['jquery', 'window', 'document'],factory);
+    } else if (typeof module === 'object' && typeof module.exports === 'object') {
+        factory(require('jquery'), window, document);
+    } else {
+        factory(window.jQuery, window, document);
+    }
+}(function ($, window, document, undefined) {
     "use strict";
 
     $.fn.fileinputLocales['lt'] = {
@@ -111,4 +120,4 @@
             close: 'Uždaryti detalią peržiūrą'
         }
     };
-})(window.jQuery);
+}));

+ 11 - 2
js/locales/lv.js

@@ -9,7 +9,16 @@
  *
  * NOTE: this file must be saved in UTF-8 encoding.
  */
-(function ($) {
+(function (factory) {
+    'use strict';
+    if (typeof define === 'function' && define.amd) {
+        define(['jquery', 'window', 'document'],factory);
+    } else if (typeof module === 'object' && typeof module.exports === 'object') {
+        factory(require('jquery'), window, document);
+    } else {
+        factory(window.jQuery, window, document);
+    }
+}(function ($, window, document, undefined) {
     "use strict";
 
     $.fn.fileinputLocales['lv'] = {
@@ -101,4 +110,4 @@
             close: 'Aizveriet detalizētu priekšskatījumu'
         }
     };
-})(window.jQuery);
+}));

+ 11 - 2
js/locales/nl.js

@@ -8,7 +8,16 @@
  *
  * NOTE: this file must be saved in UTF-8 encoding.
  */
-(function ($) {
+(function (factory) {
+    'use strict';
+    if (typeof define === 'function' && define.amd) {
+        define(['jquery', 'window', 'document'],factory);
+    } else if (typeof module === 'object' && typeof module.exports === 'object') {
+        factory(require('jquery'), window, document);
+    } else {
+        factory(window.jQuery, window, document);
+    }
+}(function ($, window, document, undefined) {
     "use strict";
 
     $.fn.fileinputLocales['nl'] = {
@@ -112,4 +121,4 @@
             close: 'Sluit gedetailleerde weergave'
         }
     };
-})(window.jQuery);
+}));

+ 11 - 2
js/locales/no.js

@@ -8,7 +8,16 @@
  *
  * NOTE: this file must be saved in UTF-8 encoding.
  */
-(function ($) {
+(function (factory) {
+    'use strict';
+    if (typeof define === 'function' && define.amd) {
+        define(['jquery', 'window', 'document'],factory);
+    } else if (typeof module === 'object' && typeof module.exports === 'object') {
+        factory(require('jquery'), window, document);
+    } else {
+        factory(window.jQuery, window, document);
+    }
+}(function ($, window, document, undefined) {
     "use strict";
 
     $.fn.fileinputLocales['no'] = {
@@ -110,4 +119,4 @@
             close: 'Lukk detaljer'
         }
     };
-})(window.jQuery);
+}));

+ 11 - 2
js/locales/pl.js

@@ -8,7 +8,16 @@
  *
  * NOTE: this file must be saved in UTF-8 encoding.
  */
-(function ($) {
+(function (factory) {
+    'use strict';
+    if (typeof define === 'function' && define.amd) {
+        define(['jquery', 'window', 'document'],factory);
+    } else if (typeof module === 'object' && typeof module.exports === 'object') {
+        factory(require('jquery'), window, document);
+    } else {
+        factory(window.jQuery, window, document);
+    }
+}(function ($, window, document, undefined) {
     "use strict";
 
     $.fn.fileinputLocales['pl'] = {
@@ -102,4 +111,4 @@
             close: 'Zamknij szczegółowy widok'
         }
     };
-})(window.jQuery);
+}));

+ 11 - 2
js/locales/pt-BR.js

@@ -8,7 +8,16 @@
  *
  * NOTE: this file must be saved in UTF-8 encoding.
  */
-(function ($) {
+(function (factory) {
+    'use strict';
+    if (typeof define === 'function' && define.amd) {
+        define(['jquery', 'window', 'document'],factory);
+    } else if (typeof module === 'object' && typeof module.exports === 'object') {
+        factory(require('jquery'), window, document);
+    } else {
+        factory(window.jQuery, window, document);
+    }
+}(function ($, window, document, undefined) {
     "use strict";
 
     $.fn.fileinputLocales['pt-BR'] = {
@@ -112,4 +121,4 @@
             close: 'Fechar pré-visualização detalhada'
         }
     };
-})(window.jQuery);
+}));

+ 11 - 2
js/locales/pt.js

@@ -8,7 +8,16 @@
  *
  * NOTE: this file must be saved in UTF-8 encoding.
  */
-(function ($) {
+(function (factory) {
+    'use strict';
+    if (typeof define === 'function' && define.amd) {
+        define(['jquery', 'window', 'document'],factory);
+    } else if (typeof module === 'object' && typeof module.exports === 'object') {
+        factory(require('jquery'), window, document);
+    } else {
+        factory(window.jQuery, window, document);
+    }
+}(function ($, window, document, undefined) {
     "use strict";
 
     $.fn.fileinputLocales['pt'] = {
@@ -112,4 +121,4 @@
             close: 'Fechar pré-visualização detalhada'
         }
     };
-})(window.jQuery);
+}));

+ 11 - 2
js/locales/ro.js

@@ -9,7 +9,16 @@
  *
  * NOTE: this file must be saved in UTF-8 encoding.
  */
-(function ($) {
+(function (factory) {
+    'use strict';
+    if (typeof define === 'function' && define.amd) {
+        define(['jquery', 'window', 'document'],factory);
+    } else if (typeof module === 'object' && typeof module.exports === 'object') {
+        factory(require('jquery'), window, document);
+    } else {
+        factory(window.jQuery, window, document);
+    }
+}(function ($, window, document, undefined) {
     "use strict";
 
     $.fn.fileinputLocales['ro'] = {
@@ -112,4 +121,4 @@
             close: 'Close detailed preview'
         }
     };
-})(window.jQuery);
+}));

+ 11 - 2
js/locales/ru.js

@@ -9,7 +9,16 @@
  *
  * NOTE: this file must be saved in UTF-8 encoding.
  */
-(function ($) {
+(function (factory) {
+    'use strict';
+    if (typeof define === 'function' && define.amd) {
+        define(['jquery', 'window', 'document'],factory);
+    } else if (typeof module === 'object' && typeof module.exports === 'object') {
+        factory(require('jquery'), window, document);
+    } else {
+        factory(window.jQuery, window, document);
+    }
+}(function ($, window, document, undefined) {
     "use strict";
 
     $.fn.fileinputLocales['ru'] = {
@@ -113,4 +122,4 @@
             close: 'Закрыть подробный предпросмотр'
         }
     };
-})(window.jQuery);
+}));

+ 11 - 2
js/locales/sk.js

@@ -8,7 +8,16 @@
  *
  * NOTE: this file must be saved in UTF-8 encoding.
  */
-(function ($) {
+(function (factory) {
+    'use strict';
+    if (typeof define === 'function' && define.amd) {
+        define(['jquery', 'window', 'document'],factory);
+    } else if (typeof module === 'object' && typeof module.exports === 'object') {
+        factory(require('jquery'), window, document);
+    } else {
+        factory(window.jQuery, window, document);
+    }
+}(function ($, window, document, undefined) {
     "use strict";
 
     $.fn.fileinputLocales['sk'] = {
@@ -112,4 +121,4 @@
             close: 'Zatvoriť detailný náhľad'
         }
     };
-})(window.jQuery);
+}));

+ 11 - 2
js/locales/sl.js

@@ -9,7 +9,16 @@
  *
  * NOTE: this file must be saved in UTF-8 encoding.
  */
-(function ($) {
+(function (factory) {
+    'use strict';
+    if (typeof define === 'function' && define.amd) {
+        define(['jquery', 'window', 'document'],factory);
+    } else if (typeof module === 'object' && typeof module.exports === 'object') {
+        factory(require('jquery'), window, document);
+    } else {
+        factory(window.jQuery, window, document);
+    }
+}(function ($, window, document, undefined) {
     "use strict";
 
     $.fn.fileinputLocales['sl'] = {
@@ -109,4 +118,4 @@
             close: 'Zapri predogled podrobnosti'
         }
     };
-})(window.jQuery);
+}));

+ 11 - 2
js/locales/sr-latn.js

@@ -8,7 +8,16 @@
  *
  * NOTE: this file must be saved in UTF-8 encoding.
  */
-(function ($) {
+(function (factory) {
+    'use strict';
+    if (typeof define === 'function' && define.amd) {
+        define(['jquery', 'window', 'document'],factory);
+    } else if (typeof module === 'object' && typeof module.exports === 'object') {
+        factory(require('jquery'), window, document);
+    } else {
+        factory(window.jQuery, window, document);
+    }
+}(function ($, window, document, undefined) {
     "use strict";
 
     $.fn.fileinputLocales['sr-latn'] = {
@@ -112,4 +121,4 @@
             close: 'Zatvori pregled detalja'
         }
     };
-})(window.jQuery);
+}));

+ 11 - 2
js/locales/sv.js

@@ -8,7 +8,16 @@
  *
  * NOTE: this file must be saved in UTF-8 encoding.
  */
-(function ($) {
+(function (factory) {
+    'use strict';
+    if (typeof define === 'function' && define.amd) {
+        define(['jquery', 'window', 'document'],factory);
+    } else if (typeof module === 'object' && typeof module.exports === 'object') {
+        factory(require('jquery'), window, document);
+    } else {
+        factory(window.jQuery, window, document);
+    }
+}(function ($, window, document, undefined) {
     "use strict";
 
     $.fn.fileinputLocales['sv'] = {
@@ -110,4 +119,4 @@
             close: 'Stäng detaljerad förhandsgranskning'
         }
     };
-})(window.jQuery);
+}));

+ 11 - 2
js/locales/th.js

@@ -8,7 +8,16 @@
  *
  * NOTE: this file must be saved in UTF-8 encoding.
  */
-(function ($) {
+(function (factory) {
+    'use strict';
+    if (typeof define === 'function' && define.amd) {
+        define(['jquery', 'window', 'document'],factory);
+    } else if (typeof module === 'object' && typeof module.exports === 'object') {
+        factory(require('jquery'), window, document);
+    } else {
+        factory(window.jQuery, window, document);
+    }
+}(function ($, window, document, undefined) {
     "use strict";
 
     $.fn.fileinputLocales['th'] = {
@@ -111,4 +120,4 @@
             close: 'Close detailed preview'
         }
     };
-})(window.jQuery);
+}));

+ 11 - 2
js/locales/tr.js

@@ -8,7 +8,16 @@
  *
  * NOTE: this file must be saved in UTF-8 encoding.
  */
-(function ($) {
+(function (factory) {
+    'use strict';
+    if (typeof define === 'function' && define.amd) {
+        define(['jquery', 'window', 'document'],factory);
+    } else if (typeof module === 'object' && typeof module.exports === 'object') {
+        factory(require('jquery'), window, document);
+    } else {
+        factory(window.jQuery, window, document);
+    }
+}(function ($, window, document, undefined) {
     "use strict";
 
     $.fn.fileinputLocales['tr'] = {
@@ -111,4 +120,4 @@
             close: 'Detaylı önizlemeyi kapat'
         }
     };
-})(window.jQuery);
+}));

+ 11 - 2
js/locales/uk.js

@@ -9,7 +9,16 @@
  *
  * NOTE: this file must be saved in UTF-8 encoding.
  */
-(function ($) {
+(function (factory) {
+    'use strict';
+    if (typeof define === 'function' && define.amd) {
+        define(['jquery', 'window', 'document'],factory);
+    } else if (typeof module === 'object' && typeof module.exports === 'object') {
+        factory(require('jquery'), window, document);
+    } else {
+        factory(window.jQuery, window, document);
+    }
+}(function ($, window, document, undefined) {
     "use strict";
 
     $.fn.fileinputLocales['uk'] = {
@@ -113,4 +122,4 @@
             close: 'Закрити детальний перегляд'
         }
     };
-})(window.jQuery);
+}));

+ 11 - 2
js/locales/uz-cyrl.js

@@ -7,7 +7,16 @@
  * @see http://github.com/kartik-v/bootstrap-fileinput
  * @author CyanoFresh <[email protected]>
  */
-(function ($) {
+(function (factory) {
+    'use strict';
+    if (typeof define === 'function' && define.amd) {
+        define(['jquery', 'window', 'document'],factory);
+    } else if (typeof module === 'object' && typeof module.exports === 'object') {
+        factory(require('jquery'), window, document);
+    } else {
+        factory(window.jQuery, window, document);
+    }
+}(function ($, window, document, undefined) {
     "use strict";
 
     $.fn.fileinputLocales['uz-cyrl'] = {
@@ -111,4 +120,4 @@
             close: 'Батафсил кўришни ёпиш'
         }
     };
-})(window.jQuery);
+}));

+ 11 - 2
js/locales/uz.js

@@ -9,7 +9,16 @@
  * @Modified by Doston Usmonov <[email protected]> 20.09.2019
  * NOTE: this file must be saved in UTF-8 encoding.
  */
-(function ($) {
+(function (factory) {
+    'use strict';
+    if (typeof define === 'function' && define.amd) {
+        define(['jquery', 'window', 'document'],factory);
+    } else if (typeof module === 'object' && typeof module.exports === 'object') {
+        factory(require('jquery'), window, document);
+    } else {
+        factory(window.jQuery, window, document);
+    }
+}(function ($, window, document, undefined) {
     "use strict";
 
     $.fn.fileinputLocales.uz = {
@@ -113,4 +122,4 @@
             close: 'Batafsil ko‘rishni yopish'
         }
     };
-})(window.jQuery);
+}));

+ 11 - 2
js/locales/vi.js

@@ -9,7 +9,16 @@
  * NOTE: this file must be saved in UTF-8 encoding.
  */
  
-(function ($) {
+(function (factory) {
+    'use strict';
+    if (typeof define === 'function' && define.amd) {
+        define(['jquery', 'window', 'document'],factory);
+    } else if (typeof module === 'object' && typeof module.exports === 'object') {
+        factory(require('jquery'), window, document);
+    } else {
+        factory(window.jQuery, window, document);
+    }
+}(function ($, window, document, undefined) {
     "use strict";
 
     $.fn.fileinputLocales['vi'] = {
@@ -112,4 +121,4 @@
             close: 'Đóng'
         }
     };
-})(window.jQuery);
+}));

+ 11 - 2
js/locales/zh-TW.js

@@ -9,7 +9,16 @@
  *
  * NOTE: this file must be saved in UTF-8 encoding.
  */
-(function ($) {
+(function (factory) {
+    'use strict';
+    if (typeof define === 'function' && define.amd) {
+        define(['jquery', 'window', 'document'],factory);
+    } else if (typeof module === 'object' && typeof module.exports === 'object') {
+        factory(require('jquery'), window, document);
+    } else {
+        factory(window.jQuery, window, document);
+    }
+}(function ($, window, document, undefined) {
     "use strict";
 
     $.fn.fileinputLocales['zh-TW'] = {
@@ -114,4 +123,4 @@
             close: '關閉當前預覽'
         }
     };
-})(window.jQuery);
+}));

+ 11 - 2
js/locales/zh.js

@@ -9,7 +9,16 @@
  *
  * NOTE: this file must be saved in UTF-8 encoding.
  */
-(function ($) {
+(function (factory) {
+    'use strict';
+    if (typeof define === 'function' && define.amd) {
+        define(['jquery', 'window', 'document'],factory);
+    } else if (typeof module === 'object' && typeof module.exports === 'object') {
+        factory(require('jquery'), window, document);
+    } else {
+        factory(window.jQuery, window, document);
+    }
+}(function ($, window, document, undefined) {
     "use strict";
 
     $.fn.fileinputLocales['zh'] = {
@@ -113,4 +122,4 @@
             close: '关闭当前预览'
         }
     };
-})(window.jQuery);
+}));

+ 73 - 62
js/plugins/piexif.js

@@ -26,7 +26,7 @@ SOFTWARE.
 (function () {
     "use strict";
     var that = {};
-    that.version = "1.03";
+    that.version = "1.0.4";
 
     that.remove = function (jpeg) {
         var b64 = false;
@@ -35,21 +35,16 @@ SOFTWARE.
             jpeg = atob(jpeg.split(",")[1]);
             b64 = true;
         } else {
-            throw ("Given data is not jpeg.");
+            throw new Error("Given data is not jpeg.");
         }
         
         var segments = splitIntoSegments(jpeg);
-        if (segments[1].slice(0, 2) == "\xff\xe1" && 
-               segments[1].slice(4, 10) == "Exif\x00\x00") {
-            segments = [segments[0]].concat(segments.slice(2));
-        } else if (segments[2].slice(0, 2) == "\xff\xe1" &&
-                   segments[2].slice(4, 10) == "Exif\x00\x00") {
-            segments = segments.slice(0, 2).concat(segments.slice(3));
-        } else {
-            throw("Exif not found.");
-        }
+        var newSegments = segments.filter(function(seg){
+          return  !(seg.slice(0, 2) == "\xff\xe1" &&
+                   seg.slice(4, 10) == "Exif\x00\x00"); 
+        });
         
-        var new_data = segments.join("");
+        var new_data = newSegments.join("");
         if (b64) {
             new_data = "data:image/jpeg;base64," + btoa(new_data);
         }
@@ -61,14 +56,14 @@ SOFTWARE.
     that.insert = function (exif, jpeg) {
         var b64 = false;
         if (exif.slice(0, 6) != "\x45\x78\x69\x66\x00\x00") {
-            throw ("Given data is not exif.");
+            throw new Error("Given data is not exif.");
         }
         if (jpeg.slice(0, 2) == "\xff\xd8") {
         } else if (jpeg.slice(0, 23) == "data:image/jpeg;base64," || jpeg.slice(0, 22) == "data:image/jpg;base64,") {
             jpeg = atob(jpeg.split(",")[1]);
             b64 = true;
         } else {
-            throw ("Given data is not jpeg.");
+            throw new Error("Given data is not jpeg.");
         }
 
         var exifStr = "\xff\xe1" + pack(">H", [exif.length + 2]) + exif;
@@ -92,10 +87,10 @@ SOFTWARE.
             } else if (data.slice(0, 4) == "Exif") {
                 input_data = data.slice(6);
             } else {
-                throw ("'load' gots invalid file data.");
+                throw new Error("'load' gots invalid file data.");
             }
         } else {
-            throw ("'load' gots invalid type argument.");
+            throw new Error("'load' gots invalid type argument.");
         }
 
         var exifDict = {};
@@ -243,7 +238,7 @@ SOFTWARE.
             first_set = _dict_to_bytes(first_ifd, "1st", offset);
             thumbnail = _get_thumbnail(exif_dict["thumbnail"]);
             if (thumbnail.length > 64000) {
-                throw ("Given thumbnail is too large. max 64kB");
+                throw new Error("Given thumbnail is too large. max 64kB");
             }
         }
 
@@ -493,7 +488,7 @@ SOFTWARE.
         } else if (data.slice(0, 4) == "Exif") { // Exif
             this.tiftag = data.slice(6);
         } else {
-            throw ("Given file is neither JPEG nor TIFF.");
+            throw new Error("Given file is neither JPEG nor TIFF.");
         }
     }
 
@@ -599,6 +594,15 @@ SOFTWARE.
                 } else {
                     data = value.slice(0, length);
                 }
+            } else if (t == 9) { // SLONG
+                if (length > 1) {
+                    pointer = unpack(this.endian_mark + "L", value)[0];
+                    data = unpack(this.endian_mark + nStr("l", length),
+                        this.tiftag.slice(pointer, pointer + length * 4));
+                } else {
+                    data = unpack(this.endian_mark + nStr("l", length),
+                        value);
+                }
             } else if (t == 10) { // SRATIONAL
                 pointer = unpack(this.endian_mark + "L", value)[0];
                 if (length > 1) {
@@ -618,7 +622,7 @@ SOFTWARE.
                            ];
                 }
             } else {
-                throw ("Exif might be wrong. Got incorrect value " +
+                throw new Error("Exif might be wrong. Got incorrect value " +
                     "type to decode. type:" + t);
             }
 
@@ -729,10 +733,10 @@ SOFTWARE.
 
     function pack(mark, array) {
         if (!(array instanceof Array)) {
-            throw ("'pack' error. Got invalid type argument.");
+            throw new Error("'pack' error. Got invalid type argument.");
         }
         if ((mark.length - 1) != array.length) {
-            throw ("'pack' error. " + (mark.length - 1) + " marks, " + array.length + " elements.");
+            throw new Error("'pack' error. " + (mark.length - 1) + " marks, " + array.length + " elements.");
         }
 
         var littleEndian;
@@ -741,7 +745,7 @@ SOFTWARE.
         } else if (mark[0] == ">") {
             littleEndian = false;
         } else {
-            throw ("");
+            throw new Error("");
         }
         var packed = "";
         var p = 1;
@@ -756,14 +760,14 @@ SOFTWARE.
                     val += 0x100;
                 }
                 if ((val > 0xff) || (val < 0)) {
-                    throw ("'pack' error.");
+                    throw new Error("'pack' error.");
                 } else {
                     valStr = String.fromCharCode(val);
                 }
             } else if (c == "H") {
                 val = array[p - 1];
                 if ((val > 0xffff) || (val < 0)) {
-                    throw ("'pack' error.");
+                    throw new Error("'pack' error.");
                 } else {
                     valStr = String.fromCharCode(Math.floor((val % 0x10000) / 0x100)) +
                         String.fromCharCode(val % 0x100);
@@ -777,7 +781,7 @@ SOFTWARE.
                     val += 0x100000000;
                 }
                 if ((val > 0xffffffff) || (val < 0)) {
-                    throw ("'pack' error.");
+                    throw new Error("'pack' error.");
                 } else {
                     valStr = String.fromCharCode(Math.floor(val / 0x1000000)) +
                         String.fromCharCode(Math.floor((val % 0x1000000) / 0x10000)) +
@@ -788,7 +792,7 @@ SOFTWARE.
                     }
                 }
             } else {
-                throw ("'pack' error.");
+                throw new Error("'pack' error.");
             }
 
             packed += valStr;
@@ -800,7 +804,7 @@ SOFTWARE.
 
     function unpack(mark, str) {
         if (typeof (str) != "string") {
-            throw ("'unpack' error. Got invalid type argument.");
+            throw new Error("'unpack' error. Got invalid type argument.");
         }
         var l = 0;
         for (var markPointer = 1; markPointer < mark.length; markPointer++) {
@@ -811,12 +815,12 @@ SOFTWARE.
             } else if (mark[markPointer].toLowerCase() == "l") {
                 l += 4;
             } else {
-                throw ("'unpack' error. Got invalid mark.");
+                throw new Error("'unpack' error. Got invalid mark.");
             }
         }
 
         if (l != str.length) {
-            throw ("'unpack' error. Mismatch between symbol and string length. " + l + ":" + str.length);
+            throw new Error("'unpack' error. Mismatch between symbol and string length. " + l + ":" + str.length);
         }
 
         var littleEndian;
@@ -825,7 +829,7 @@ SOFTWARE.
         } else if (mark[0] == ">") {
             littleEndian = false;
         } else {
-            throw ("'unpack' error.");
+            throw new Error("'unpack' error.");
         }
         var unpacked = [];
         var strPointer = 0;
@@ -865,7 +869,7 @@ SOFTWARE.
                     val -= 0x100000000;
                 }
             } else {
-                throw ("'unpack' error. " + c);
+                throw new Error("'unpack' error. " + c);
             }
 
             unpacked.push(val);
@@ -886,7 +890,7 @@ SOFTWARE.
 
     function splitIntoSegments(data) {
         if (data.slice(0, 2) != "\xff\xd8") {
-            throw ("Given data isn't JPEG.");
+            throw new Error("Given data isn't JPEG.");
         }
 
         var head = 2;
@@ -903,7 +907,7 @@ SOFTWARE.
             }
 
             if (head >= data.length) {
-                throw ("Wrong JPEG data.");
+                throw new Error("Wrong JPEG data.");
             }
         }
         return segments;
@@ -924,35 +928,32 @@ SOFTWARE.
 
 
     function mergeSegments(segments, exif) {
-        
-        if (segments[1].slice(0, 2) == "\xff\xe0" &&
-            (segments[2].slice(0, 2) == "\xff\xe1" &&
-             segments[2].slice(4, 10) == "Exif\x00\x00")) {
-            if (exif) {
-                segments[2] = exif;
-                segments = ["\xff\xd8"].concat(segments.slice(2));
-            } else if (exif == null) {
-                segments = segments.slice(0, 2).concat(segments.slice(3));
-            } else {
-                segments = segments.slice(0).concat(segments.slice(2));
-            }
-        } else if (segments[1].slice(0, 2) == "\xff\xe0") {
-            if (exif) {
-                segments[1] = exif;
-            }
-        } else if (segments[1].slice(0, 2) == "\xff\xe1" &&
-                   segments[1].slice(4, 10) == "Exif\x00\x00") {
-            if (exif) {
-                segments[1] = exif;
-            } else if (exif == null) {
-                segments = segments.slice(0).concat(segments.slice(2));
-            }
-        } else {
-            if (exif) {
-                segments = [segments[0], exif].concat(segments.slice(1));
+        var hasExifSegment = false;
+        var additionalAPP1ExifSegments = [];
+
+        segments.forEach(function(segment, i) {
+            // Replace first occurence of APP1:Exif segment
+            if (segment.slice(0, 2) == "\xff\xe1" &&
+                segment.slice(4, 10) == "Exif\x00\x00"
+            ) {
+                if (!hasExifSegment) {
+                    segments[i] = exif;
+                    hasExifSegment = true;
+                } else {
+                    additionalAPP1ExifSegments.unshift(i);
+                }
             }
+        });
+
+        // Remove additional occurences of APP1:Exif segment
+        additionalAPP1ExifSegments.forEach(function(segmentIndex) {
+            segments.splice(segmentIndex, 1);
+        });
+
+        if (!hasExifSegment && exif) {
+            segments = [segments[0], exif].concat(segments.slice(1));
         }
-        
+
         return segments.join("");
     }
 
@@ -2448,13 +2449,23 @@ SOFTWARE.
 
     that.GPSHelper = {
         degToDmsRational:function (degFloat) {
-            var minFloat = degFloat % 1 * 60;
+            var degAbs = Math.abs(degFloat);
+            var minFloat = degAbs % 1 * 60;
             var secFloat = minFloat % 1 * 60;
-            var deg = Math.floor(degFloat);
+            var deg = Math.floor(degAbs);
             var min = Math.floor(minFloat);
             var sec = Math.round(secFloat * 100);
 
             return [[deg, 1], [min, 1], [sec, 100]];
+        },
+
+        dmsRationalToDeg:function (dmsArray, ref) {
+            var sign = (ref === 'S' || ref === 'W') ? -1.0 : 1.0;
+            var deg = dmsArray[0][0] / dmsArray[0][1] +
+                      dmsArray[1][0] / dmsArray[1][1] / 60.0 +
+                      dmsArray[2][0] / dmsArray[2][1] / 3600.0;
+
+            return deg * sign;
         }
     };
     

Filskillnaden har hållts tillbaka eftersom den är för stor
+ 0 - 0
js/plugins/piexif.min.js


+ 131 - 57
js/plugins/sortable.js

@@ -1,5 +1,5 @@
 /**!
- * Sortable 1.10.2
+ * Sortable 1.14.0
  * @author	RubaXa   <[email protected]>
  * @author	owenm    <[email protected]>
  * @license MIT
@@ -8,9 +8,49 @@
   typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
   typeof define === 'function' && define.amd ? define(factory) :
   (global = global || self, global.Sortable = factory());
-}(this, function () { 'use strict';
+}(this, (function () { 'use strict';
+
+  function ownKeys(object, enumerableOnly) {
+    var keys = Object.keys(object);
+
+    if (Object.getOwnPropertySymbols) {
+      var symbols = Object.getOwnPropertySymbols(object);
+
+      if (enumerableOnly) {
+        symbols = symbols.filter(function (sym) {
+          return Object.getOwnPropertyDescriptor(object, sym).enumerable;
+        });
+      }
+
+      keys.push.apply(keys, symbols);
+    }
+
+    return keys;
+  }
+
+  function _objectSpread2(target) {
+    for (var i = 1; i < arguments.length; i++) {
+      var source = arguments[i] != null ? arguments[i] : {};
+
+      if (i % 2) {
+        ownKeys(Object(source), true).forEach(function (key) {
+          _defineProperty(target, key, source[key]);
+        });
+      } else if (Object.getOwnPropertyDescriptors) {
+        Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
+      } else {
+        ownKeys(Object(source)).forEach(function (key) {
+          Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
+        });
+      }
+    }
+
+    return target;
+  }
 
   function _typeof(obj) {
+    "@babel/helpers - typeof";
+
     if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
       _typeof = function (obj) {
         return typeof obj;
@@ -57,25 +97,6 @@
     return _extends.apply(this, arguments);
   }
 
-  function _objectSpread(target) {
-    for (var i = 1; i < arguments.length; i++) {
-      var source = arguments[i] != null ? arguments[i] : {};
-      var ownKeys = Object.keys(source);
-
-      if (typeof Object.getOwnPropertySymbols === 'function') {
-        ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) {
-          return Object.getOwnPropertyDescriptor(source, sym).enumerable;
-        }));
-      }
-
-      ownKeys.forEach(function (key) {
-        _defineProperty(target, key, source[key]);
-      });
-    }
-
-    return target;
-  }
-
   function _objectWithoutPropertiesLoose(source, excluded) {
     if (source == null) return {};
     var target = {};
@@ -113,32 +134,43 @@
   }
 
   function _toConsumableArray(arr) {
-    return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread();
+    return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
   }
 
   function _arrayWithoutHoles(arr) {
-    if (Array.isArray(arr)) {
-      for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) arr2[i] = arr[i];
-
-      return arr2;
-    }
+    if (Array.isArray(arr)) return _arrayLikeToArray(arr);
   }
 
   function _iterableToArray(iter) {
-    if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter);
+    if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
+  }
+
+  function _unsupportedIterableToArray(o, minLen) {
+    if (!o) return;
+    if (typeof o === "string") return _arrayLikeToArray(o, minLen);
+    var n = Object.prototype.toString.call(o).slice(8, -1);
+    if (n === "Object" && o.constructor) n = o.constructor.name;
+    if (n === "Map" || n === "Set") return Array.from(o);
+    if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
+  }
+
+  function _arrayLikeToArray(arr, len) {
+    if (len == null || len > arr.length) len = arr.length;
+
+    for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
+
+    return arr2;
   }
 
   function _nonIterableSpread() {
-    throw new TypeError("Invalid attempt to spread non-iterable instance");
+    throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
   }
 
-  var version = "1.10.2";
+  var version = "1.14.0";
 
   function userAgent(pattern) {
     if (typeof window !== 'undefined' && window.navigator) {
-      return !!
-      /*@__PURE__*/
-      navigator.userAgent.match(pattern);
+      return !! /*@__PURE__*/navigator.userAgent.match(pattern);
     }
   }
 
@@ -314,7 +346,7 @@
     if (!el.getBoundingClientRect && el !== window) return;
     var elRect, top, left, bottom, right, height, width;
 
-    if (el !== window && el !== getWindowScrollingElement()) {
+    if (el !== window && el.parentNode && el !== getWindowScrollingElement()) {
       elRect = el.getBoundingClientRect();
       top = elRect.top;
       left = elRect.left;
@@ -419,13 +451,13 @@
    */
 
 
-  function getChild(el, childNum, options) {
+  function getChild(el, childNum, options, includeDragEl) {
     var currentChild = 0,
         i = 0,
         children = el.children;
 
     while (i < children.length) {
-      if (children[i].style.display !== 'none' && children[i] !== Sortable.ghost && children[i] !== Sortable.dragged && closest(children[i], options.draggable, el, false)) {
+      if (children[i].style.display !== 'none' && children[i] !== Sortable.ghost && (includeDragEl || children[i] !== Sortable.dragged) && closest(children[i], options.draggable, el, false)) {
         if (currentChild === childNum) {
           return children[i];
         }
@@ -643,7 +675,7 @@
             rect: getRect(child)
           });
 
-          var fromRect = _objectSpread({}, animationStates[animationStates.length - 1].rect); // If animating: compensate for current animation
+          var fromRect = _objectSpread2({}, animationStates[animationStates.length - 1].rect); // If animating: compensate for current animation
 
 
           if (child.thisAnimationDuration) {
@@ -754,7 +786,7 @@
           target.animatingX = !!translateX;
           target.animatingY = !!translateY;
           css(target, 'transform', 'translate3d(' + translateX + 'px,' + translateY + 'px,0)');
-          repaint(target); // repaint
+          this.forRepaintDummy = repaint(target); // repaint
 
           css(target, 'transition', 'transform ' + duration + 'ms' + (this.options.easing ? ' ' + this.options.easing : ''));
           css(target, 'transform', 'translate3d(0,0,0)');
@@ -792,6 +824,11 @@
         }
       }
 
+      plugins.forEach(function (p) {
+        if (p.pluginName === plugin.pluginName) {
+          throw "Sortable: Cannot mount plugin ".concat(plugin.pluginName, " more than once");
+        }
+      });
       plugins.push(plugin);
     },
     pluginEvent: function pluginEvent(eventName, sortable, evt) {
@@ -808,7 +845,7 @@
         if (!sortable[plugin.pluginName]) return; // Fire global events if it exists in this sortable
 
         if (sortable[plugin.pluginName][eventNameGlobal]) {
-          sortable[plugin.pluginName][eventNameGlobal](_objectSpread({
+          sortable[plugin.pluginName][eventNameGlobal](_objectSpread2({
             sortable: sortable
           }, evt));
         } // Only fire plugin event if plugin is enabled in this sortable,
@@ -816,7 +853,7 @@
 
 
         if (sortable.options[plugin.pluginName] && sortable[plugin.pluginName][eventName]) {
-          sortable[plugin.pluginName][eventName](_objectSpread({
+          sortable[plugin.pluginName][eventName](_objectSpread2({
             sortable: sortable
           }, evt));
         }
@@ -908,7 +945,7 @@
     evt.originalEvent = originalEvent;
     evt.pullMode = putSortable ? putSortable.lastPutMode : undefined;
 
-    var allEventProperties = _objectSpread({}, extraEventProperties, PluginManager.getEventProperties(name, sortable));
+    var allEventProperties = _objectSpread2(_objectSpread2({}, extraEventProperties), PluginManager.getEventProperties(name, sortable));
 
     for (var option in allEventProperties) {
       evt[option] = allEventProperties[option];
@@ -923,12 +960,14 @@
     }
   }
 
+  var _excluded = ["evt"];
+
   var pluginEvent = function pluginEvent(eventName, sortable) {
     var _ref = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {},
         originalEvent = _ref.evt,
-        data = _objectWithoutProperties(_ref, ["evt"]);
+        data = _objectWithoutProperties(_ref, _excluded);
 
-    PluginManager.pluginEvent.bind(Sortable)(eventName, sortable, _objectSpread({
+    PluginManager.pluginEvent.bind(Sortable)(eventName, sortable, _objectSpread2({
       dragEl: dragEl,
       parentEl: parentEl,
       ghostEl: ghostEl,
@@ -964,7 +1003,7 @@
   };
 
   function _dispatchEvent(info) {
-    dispatchEvent(_objectSpread({
+    dispatchEvent(_objectSpread2({
       putSortable: putSortable,
       cloneEl: cloneEl,
       targetEl: dragEl,
@@ -1073,13 +1112,13 @@
   _detectNearestEmptySortable = function _detectNearestEmptySortable(x, y) {
     var ret;
     sortables.some(function (sortable) {
-      if (lastChild(sortable)) return;
+      var threshold = sortable[expando].options.emptyInsertThreshold;
+      if (!threshold || lastChild(sortable)) return;
       var rect = getRect(sortable),
-          threshold = sortable[expando].options.emptyInsertThreshold,
           insideHorizontally = x >= rect.left - threshold && x <= rect.right + threshold,
           insideVertically = y >= rect.top - threshold && y <= rect.bottom + threshold;
 
-      if (threshold && insideHorizontally && insideVertically) {
+      if (insideHorizontally && insideVertically) {
         return ret = sortable;
       }
     });
@@ -1235,7 +1274,7 @@
         x: 0,
         y: 0
       },
-      supportPointer: Sortable.supportPointer !== false && 'PointerEvent' in window,
+      supportPointer: Sortable.supportPointer !== false && 'PointerEvent' in window && !Safari,
       emptyInsertThreshold: 5
     };
     PluginManager.initializePlugins(this, el, defaults); // Set default options
@@ -1322,6 +1361,11 @@
 
       if (originalTarget.isContentEditable) {
         return;
+      } // Safari ignores further event handling after mousedown
+
+
+      if (!this.nativeDraggable && Safari && target && target.tagName.toUpperCase() === 'SELECT') {
+        return;
       }
 
       target = closest(target, options.draggable, el, false);
@@ -1825,7 +1869,7 @@
       if (_silent) return;
 
       function dragOverEvent(name, extra) {
-        pluginEvent(name, _this, _objectSpread({
+        pluginEvent(name, _this, _objectSpread2({
           evt: evt,
           isOwner: isOwner,
           axis: vertical ? 'vertical' : 'horizontal',
@@ -1942,7 +1986,7 @@
 
       ignoreNextClick = false;
 
-      if (activeSortable && !options.disabled && (isOwner ? canSort || (revert = !rootEl.contains(dragEl)) // Reverting item into the original list
+      if (activeSortable && !options.disabled && (isOwner ? canSort || (revert = parentEl !== rootEl) // Reverting item into the original list
       : putSortable === this || (this.lastPutMode = activeGroup.checkPull(this, activeSortable, dragEl, evt)) && group.checkPut(this, activeSortable, dragEl, evt))) {
         vertical = this._getDirection(evt, target) === 'vertical';
         dragRect = getRect(dragEl);
@@ -1972,10 +2016,11 @@
         var elLastChild = lastChild(el, options.draggable);
 
         if (!elLastChild || _ghostIsLast(evt, vertical, this) && !elLastChild.animated) {
+          // Insert to end of list
           // If already at end of list: Do not insert
           if (elLastChild === dragEl) {
             return completed(false);
-          } // assign target only if condition is true
+          } // if there is a last element, it is the target
 
 
           if (elLastChild && el === evt.target) {
@@ -1991,6 +2036,25 @@
             el.appendChild(dragEl);
             parentEl = el; // actualization
 
+            changed();
+            return completed(true);
+          }
+        } else if (elLastChild && _ghostIsFirst(evt, vertical, this)) {
+          // Insert to start of list
+          var firstChild = getChild(el, 0, options, true);
+
+          if (firstChild === dragEl) {
+            return completed(false);
+          }
+
+          target = firstChild;
+          targetRect = getRect(target);
+
+          if (_onMove(rootEl, el, dragEl, dragRect, target, targetRect, evt, false) !== false) {
+            capture();
+            el.insertBefore(dragEl, firstChild);
+            parentEl = el; // actualization
+
             changed();
             return completed(true);
           }
@@ -2319,7 +2383,7 @@
      * Sorts the elements according to the array.
      * @param  {String[]}  order  order of the items
      */
-    sort: function sort(order) {
+    sort: function sort(order, useAnimation) {
       var items = {},
           rootEl = this.el;
       this.toArray().forEach(function (id, i) {
@@ -2329,12 +2393,14 @@
           items[id] = el;
         }
       }, this);
+      useAnimation && this.captureAnimationState();
       order.forEach(function (id) {
         if (items[id]) {
           rootEl.removeChild(items[id]);
           rootEl.appendChild(items[id]);
         }
       });
+      useAnimation && this.animateAll();
     },
 
     /**
@@ -2433,7 +2499,7 @@
         pluginEvent('showClone', this);
         if (Sortable.eventCanceled) return; // show clone at dragEl or original position
 
-        if (rootEl.contains(dragEl) && !this.options.group.revertClone) {
+        if (dragEl.parentNode == rootEl && !this.options.group.revertClone) {
           rootEl.insertBefore(cloneEl, dragEl);
         } else if (nextEl) {
           rootEl.insertBefore(cloneEl, nextEl);
@@ -2502,6 +2568,12 @@
     _silent = false;
   }
 
+  function _ghostIsFirst(evt, vertical, sortable) {
+    var rect = getRect(getChild(sortable.el, 0, sortable.options, true));
+    var spacer = 10;
+    return vertical ? evt.clientX < rect.left - spacer || evt.clientY < rect.top && evt.clientX < rect.right : evt.clientY < rect.top - spacer || evt.clientY < rect.bottom && evt.clientX < rect.left;
+  }
+
   function _ghostIsLast(evt, vertical, sortable) {
     var rect = getRect(lastChild(sortable.el, sortable.options.draggable));
     var spacer = 10;
@@ -2662,7 +2734,7 @@
         throw "Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(plugin));
       }
 
-      if (plugin.utils) Sortable.utils = _objectSpread({}, Sortable.utils, plugin.utils);
+      if (plugin.utils) Sortable.utils = _objectSpread2(_objectSpread2({}, Sortable.utils), plugin.utils);
       PluginManager.mount(plugin);
     });
   };
@@ -2693,6 +2765,7 @@
     function AutoScroll() {
       this.defaults = {
         scroll: true,
+        forceAutoScrollFallback: false,
         scrollSensitivity: 30,
         scrollSpeed: 10,
         bubbleScroll: true
@@ -2760,7 +2833,7 @@
         // MACOS Safari does not have autoscroll,
         // Firefox and Chrome are good
 
-        if (fallback || Edge || IE11OrLess || Safari) {
+        if (fallback || this.options.forceAutoScrollFallback || Edge || IE11OrLess || Safari) {
           autoScroll(evt, this.options, elem, fallback); // Listener for pointer element change
 
           var ogElemScroller = getParentAutoScrollElement(elem, true);
@@ -3460,7 +3533,8 @@
 
 
         if (dragStarted && this.isMultiDrag) {
-          // Do not "unfold" after around dragEl if reverted
+          folding = false; // Do not "unfold" after around dragEl if reverted
+
           if ((parentEl[expando].options.sort || parentEl !== rootEl) && multiDragElements.length > 1) {
             var dragRect = getRect(dragEl$1),
                 multiDragIndex = index(dragEl$1, ':not(.' + this.options.selectedClass + ')');
@@ -3706,4 +3780,4 @@
 
   return Sortable;
 
-}));
+})));

Filskillnaden har hållts tillbaka eftersom den är för stor
+ 0 - 1
js/plugins/sortable.min.js


+ 1 - 1
package.json

@@ -5,7 +5,7 @@
     "authors": [
         "Kartik Visweswaran <[email protected]>"
     ],
-    "description": "An enhanced HTML 5 file input for Bootstrap 3.x with file preview, multiple selection, ajax uploads, and more features.",
+    "description": "An enhanced HTML 5 file input for Bootstrap 5.x, 4.x, and 3.x with file preview, multiple selection, ajax uploads, and more features.",
     "repository": {
         "type": "git",
         "url": "https://github.com/kartik-v/bootstrap-fileinput.git"

+ 110 - 110
scss/fileinput-rtl.scss

@@ -22,163 +22,163 @@ $border: 1px !default;
 
 //operations
 @function multiply($pixels, $multiplier) {
-    @return $pixels * $multiplier;
+  @return $pixels * $multiplier;
 }
 
 //@extend-elements
 %set_float_left {
-    float: left;
+  float: left;
 }
 
 %set_float_right {
-    float: right;
+  float: right;
 }
 
 %set_text_right {
-    text-align: right;
+  text-align: right;
 }
 
 .kv-rtl {
-    direction: rtl;
+  direction: rtl;
 
-    .floating-buttons {
-        left: multiply($pad, 2);
-        right: auto;
+  .floating-buttons {
+    left: multiply($pad, 2);
+    right: auto;
 
-        .btn-kv {
-            margin-left: 0;
-            margin-right: multiply($pad, 0.6);
-        }
+    .btn-kv {
+      margin-left: 0;
+      margin-right: multiply($pad, 0.6);
     }
+  }
 
-    .file-caption-icon {
-        left: auto;
-        right: multiply($pad, 1.6);
-    }
+  .file-caption-icon {
+    left: auto;
+    right: multiply($pad, 1.6);
+  }
 
-    .close {
-        @extend %set_float_left;
-    }
+  .close {
+    @extend %set_float_left;
+  }
 
-    .file-zoom-dialog {
-        @extend %set_text_right;
+  .file-zoom-dialog {
+    @extend %set_text_right;
+  }
+
+  .kv-desc-hide {
+    float: left;
+  }
+
+  .file-error-message {
+    pre {
+      @extend %set_text_right;
     }
 
-    .kv-desc-hide {
-        float: left;
+    ul {
+      @extend %set_text_right;
     }
+  }
 
-    .file-error-message {
-        pre {
-            @extend %set_text_right;
-        }
+  .file-drop-zone {
+    margin: multiply($pad, 2.4) multiply($pad, 2.4) multiply($pad, 2.4) multiply($pad, 3);
+  }
 
-        ul {
-            @extend %set_text_right;
-        }
-    }
+  .btn-kv-prev {
+    right: 0;
+    left: auto;
+  }
 
-    .file-drop-zone {
-        margin: multiply($pad, 2.4) multiply($pad, 2.4) multiply($pad, 2.4) multiply($pad, 3);
-    }
+  .btn-kv-next {
+    left: 0;
+    right: auto;
+  }
 
-    .btn-kv-prev {
-        right: 0;
-        left: auto;
-    }
+  .pull-right {
+    float: left !important;
+  }
 
-    .btn-kv-next {
-        left: 0;
-        right: auto;
-    }
+  .pull-left {
+    float: right !important;
+  }
 
-    .pull-right {
-        float: left !important;
-    }
+  .float-right {
+    @extend .pull-right;
+  }
 
-    .pull-left {
-        float: right !important;
-    }
+  .float-left {
+    @extend .pull-left;
+  }
 
-    .float-right {
-        @extend .pull-right;
-    }
+  .kv-zoom-title {
+    direction: ltr;
+  }
+
+  .krajee-default {
+    &.file-preview-frame {
+      @extend %set_float_right;
+      box-shadow: (-$border) $border multiply($border, 5) 0 $zorba;
 
-    .float-left {
-        @extend .pull-left;
+      &:not(.file-preview-error):hover {
+        box-shadow: multiply($border, -3) multiply($border, 3) multiply($border, 5) 0 $mine-shaft;
+      }
     }
 
-    .kv-zoom-title {
-        direction: ltr;
+    .file-actions {
+      @extend %set_float_left;
     }
 
-    .krajee-default {
-        &.file-preview-frame {
-            @extend %set_float_right;
-            box-shadow: (-$border) $border multiply($border, 5) 0 $zorba;
+    .file-other-error {
+      @extend %set_float_left;
+    }
 
-            &:not(.file-preview-error):hover {
-                box-shadow: multiply($border, -3) multiply($border, 3) multiply($border, 5) 0 $mine-shaft;
-            }
-        }
+    .file-drag-handle {
+      @extend %set_float_right;
+    }
 
-        .file-actions {
-            @extend %set_float_left;
-        }
+    .file-upload-indicator {
+      @extend %set_float_right;
+    }
+  }
 
-        .file-other-error {
-            @extend %set_float_left;
-        }
+  .kv-zoom-actions .btn-kv {
+    margin-left: 0;
+    margin-right: multiply($pad, 0.6);
+  }
 
-        .file-drag-handle {
-            @extend %set_float_right;
-        }
+  .file-caption.icon-visible .file-caption-name {
+    padding-left: 0;
+    padding-right: multiply($pad, 3);
+  }
 
-        .file-upload-indicator {
-            @extend %set_float_right;
-        }
+  .input-group {
+    > .input-group-btn:last-child > .btn:last-child {
+      border-radius: 4px 0 0 4px !important;
     }
 
-    .kv-zoom-actions .btn-kv {
-        margin-left: 0;
-        margin-right: multiply($pad, 0.6);
+    > .input-group-btn:first-child > .btn:first-child {
+      border-radius: 0 4px 4px 0 !important;
     }
 
-    .file-caption.icon-visible .file-caption-name {
-        padding-left: 0;
-        padding-right: multiply($pad, 3);
+    > .input-group-append:last-child > .btn:last-child,
+    > .btn:last-child,
+    > .form-control:last-child {
+      border-radius: 0.25rem 0 0 0.25rem !important;
     }
 
-    .input-group {
-        > .input-group-btn:last-child > .btn:last-child {
-            border-radius: 4px 0 0 4px !important;
-        }
-
-        > .input-group-btn:first-child > .btn:first-child {
-            border-radius: 0 4px 4px 0 !important;
-        }
-
-        > .input-group-append:last-child > .btn:last-child,
-        > .btn:last-child,
-        > .form-control:last-child {
-            border-radius: 0.25rem 0 0 0.25rem !important;
-        }
-
-        > .input-group-prepend:first-child > .btn:first-child,
-        > .input-group > .btn:first-child,
-        > .form-control:first-child {
-            border-radius: 0 0.25rem 0.25rem 0 !important;
-        }
-
-        .file-caption-icon:first-child ~ .form-control:last-child {
-            border-radius: 0.25rem !important;
-        }
+    > .input-group-prepend:first-child > .btn:first-child,
+    > .input-group > .btn:first-child,
+    > .form-control:first-child {
+      border-radius: 0 0.25rem 0.25rem 0 !important;
     }
 
-    .btn-file input[type=file] {
-        left: auto;
-        right: 0;
-        text-align: left;
-        background: none repeat scroll 100% 0 transparent;
+    .file-caption-icon:first-child ~ .form-control:last-child {
+      border-radius: 0.25rem !important;
     }
+  }
+
+  .btn-file input[type=file] {
+    left: auto;
+    right: 0;
+    text-align: left;
+    background: none repeat scroll 100% 0 transparent;
+  }
 }

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

@@ -27,200 +27,200 @@ $pad: 5px !default;
 
 //operations
 @function multiply($pixels, $multiplier) {
-    @return $pixels * $multiplier;
+  @return $pixels * $multiplier;
 }
 
 .theme-explorer-fa {
-    .file-preview-frame {
-        border: multiply($pad, 0.2) solid $alto;
-        margin: multiply($pad, 0.4) 0;
-        width: 100%;
-        display: flex;
-        justify-content: space-between;
-        align-items: center;
-
-        samp {
-            font-size: 0.9rem;
-        }
-    }
-
-    .file-actions {
-        text-align: center;
-    }
-
-    .file-upload-indicator,
-    .file-drag-handle {
-        text-align: center;
-        position: absolute;
-        display: inline-block;
-        bottom: multiply($pad, 1.6);
-        right: multiply($pad, 0.8);
-        width: multiply($pad, 3.2);
-        height: multiply($pad, 3.2);
-        font-size: multiply($pad, 3.2);
-    }
-
-    .explorer-frame {
-        .kv-file-content {
-            width: multiply($pad, 32);
-            height: multiply($pad, 16);
-            padding: $pad;
-            text-align: left;
-        }
-    }
-
-    .file-thumb-progress {
-        .progress {
-            display: block;
-            white-space: nowrap;
-            text-overflow: ellipsis;
-            overflow: hidden;
-            margin-top: 5px;
-        }
-    }
-
-    .explorer-caption {
-        display: block;
-        white-space: nowrap;
-        text-overflow: ellipsis;
-        overflow: hidden;
-        padding: 5px;
-        color: $tapa;
-    }
-
-    .file-footer-buttons {
-        padding: 5px;
-        text-align: right;
-    }
-
-    .kvsortable-ghost {
-        opacity: 0.6;
-        background: $mystic;
-        border: multiply($pad, 0.4) solid $perano;
-    }
-
-    .file-preview {
-        .table {
-            margin: 0;
-        }
-    }
-
-    .file-error-message {
-        ul {
-            padding: 5px 0 0 20px;
-        }
-    }
-
-    .file-details-cell {
-        width: 60%;
-        font-size: 0.95rem;
-        text-align: left;
-        margin-right: auto;
-    }
-
-    .file-actions-cell {
-        position: relative;
-        height: multiply($pad, 16);
-        width: multiply($pad, 40);
-    }
+  .file-preview-frame {
+    border: multiply($pad, 0.2) solid $alto;
+    margin: multiply($pad, 0.4) 0;
+    width: 100%;
+    display: flex;
+    justify-content: space-between;
+    align-items: center;
+
+    samp {
+      font-size: 0.9rem;
+    }
+  }
+
+  .file-actions {
+    text-align: center;
+  }
+
+  .file-upload-indicator,
+  .file-drag-handle {
+    text-align: center;
+    position: absolute;
+    display: inline-block;
+    bottom: multiply($pad, 1.6);
+    right: multiply($pad, 0.8);
+    width: multiply($pad, 3.2);
+    height: multiply($pad, 3.2);
+    font-size: multiply($pad, 3.2);
+  }
+
+  .explorer-frame {
+    .kv-file-content {
+      width: multiply($pad, 32);
+      height: multiply($pad, 16);
+      padding: $pad;
+      text-align: left;
+    }
+  }
+
+  .file-thumb-progress {
+    .progress {
+      display: block;
+      white-space: nowrap;
+      text-overflow: ellipsis;
+      overflow: hidden;
+      margin-top: 5px;
+    }
+  }
+
+  .explorer-caption {
+    display: block;
+    white-space: nowrap;
+    text-overflow: ellipsis;
+    overflow: hidden;
+    padding: 5px;
+    color: $tapa;
+  }
+
+  .file-footer-buttons {
+    padding: 5px;
+    text-align: right;
+  }
+
+  .kvsortable-ghost {
+    opacity: 0.6;
+    background: $mystic;
+    border: multiply($pad, 0.4) solid $perano;
+  }
+
+  .file-preview {
+    .table {
+      margin: 0;
+    }
+  }
+
+  .file-error-message {
+    ul {
+      padding: 5px 0 0 20px;
+    }
+  }
+
+  .file-details-cell {
+    width: 60%;
+    font-size: 0.95rem;
+    text-align: left;
+    margin-right: auto;
+  }
+
+  .file-actions-cell {
+    position: relative;
+    height: multiply($pad, 16);
+    width: multiply($pad, 40);
+  }
 }
 
 .explorer-frame {
-    .file-preview-other {
-        text-align: center;
-    }
-
-    .file-preview-text {
-        display: inline-block;
-        color: $boston-blue;
-        border: 1px solid $alto;
-        font-family: $font;
-        outline: none;
-        padding: multiply($pad, 1.6);
-        resize: none;
-    }
-
-    .file-preview-html {
-        display: inline-block;
-        border: 1px solid $alto;
-        padding: multiply($pad, 1.6);
-        overflow: auto;
-    }
-
-    .file-other-icon {
-        font-size: 2.6em;
-    }
-
-    &:hover {
-        background-color: $white-smoke;
-    }
+  .file-preview-other {
+    text-align: center;
+  }
+
+  .file-preview-text {
+    display: inline-block;
+    color: $boston-blue;
+    border: 1px solid $alto;
+    font-family: $font;
+    outline: none;
+    padding: multiply($pad, 1.6);
+    resize: none;
+  }
+
+  .file-preview-html {
+    display: inline-block;
+    border: 1px solid $alto;
+    padding: multiply($pad, 1.6);
+    overflow: auto;
+  }
+
+  .file-other-icon {
+    font-size: 2.6em;
+  }
+
+  &:hover {
+    background-color: $white-smoke;
+  }
 }
 
 .file-zoom-dialog {
-    .explorer-frame {
-        .file-other-icon {
-            //noinspection CssOverwrittenProperties
-            font-size: 22em;
-            //noinspection CssOverwrittenProperties
-            font-size: 50vmin;
-        }
+  .explorer-frame {
+    .file-other-icon {
+      //noinspection CssOverwrittenProperties
+      font-size: 22em;
+      //noinspection CssOverwrittenProperties
+      font-size: 50vmin;
     }
+  }
 }
 
 @media only screen and (max-width: 1249px) {
-    .theme-explorer-fa {
-        .file-preview-frame {
-            .file-details-cell {
-                width: 40%;
-            }
-        }
+  .theme-explorer-fa {
+    .file-preview-frame {
+      .file-details-cell {
+        width: 40%;
+      }
     }
+  }
 }
 
 @media only screen and (max-width: 1023px) {
-    .theme-explorer-fa {
-        .file-preview-frame {
-            .file-details-cell {
-                width: 30%;
-            }
-        }
+  .theme-explorer-fa {
+    .file-preview-frame {
+      .file-details-cell {
+        width: 30%;
+      }
     }
+  }
 }
 
 @media only screen and (max-width: 767px) {
-    .theme-explorer-fa {
-        .file-preview-frame {
-            .file-details-cell {
-                width: multiply($pad, 40);
-            }
-        }
+  .theme-explorer-fa {
+    .file-preview-frame {
+      .file-details-cell {
+        width: multiply($pad, 40);
+      }
     }
+  }
 }
 
 @media only screen and (max-width: 575px) {
-    .theme-explorer-fa {
-        .file-preview-frame {
-            flex-direction: column;
-
-            .kv-file-content {
-                width: auto;
-                text-align: center;
-            }
-        }
-
-        .file-details-cell {
-            width: multiply($pad, 20);
-            text-align: center;
-            margin-right: 0;
-        }
-
-        .file-actions-cell {
-            width: 100%;
-            height: auto;
-        }
-
-        .file-footer-buttons {
-            text-align: left;
-        }
+  .theme-explorer-fa {
+    .file-preview-frame {
+      flex-direction: column;
+
+      .kv-file-content {
+        width: auto;
+        text-align: center;
+      }
+    }
+
+    .file-details-cell {
+      width: multiply($pad, 20);
+      text-align: center;
+      margin-right: 0;
+    }
+
+    .file-actions-cell {
+      width: 100%;
+      height: auto;
+    }
+
+    .file-footer-buttons {
+      text-align: left;
     }
+  }
 }

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

@@ -26,200 +26,200 @@ $pad: 5px !default;
 
 //operations
 @function multiply($pixels, $multiplier) {
-    @return $pixels * $multiplier;
+  @return $pixels * $multiplier;
 }
 
 .theme-explorer {
-    .file-preview-frame {
-        border: multiply($pad, 0.2) solid $alto;
-        margin: multiply($pad, 0.4) 0;
-        width: 100%;
-        display: flex;
-        justify-content: space-between;
-        align-items: center;
-
-        samp {
-            font-size: 0.9rem;
-        }
-    }
-
-    .file-actions {
-        text-align: center;
-    }
-
-    .file-upload-indicator,
-    .file-drag-handle {
-        text-align: center;
-        position: absolute;
-        display: inline-block;
-        bottom: multiply($pad, 1.6);
-        right: multiply($pad, 0.8);
-        width: multiply($pad, 3.2);
-        height: multiply($pad, 3.2);
-        font-size: multiply($pad, 3.2);
-    }
-
-    .explorer-frame {
-        .kv-file-content {
-            width: multiply($pad, 32);
-            height: multiply($pad, 16);
-            padding: $pad;
-            text-align: left;
-        }
-    }
-
-    .file-thumb-progress {
-        .progress {
-            display: block;
-            white-space: nowrap;
-            text-overflow: ellipsis;
-            overflow: hidden;
-            margin-top: 5px;
-        }
-    }
-
-    .explorer-caption {
-        display: block;
-        white-space: nowrap;
-        text-overflow: ellipsis;
-        overflow: hidden;
-        padding: 5px;
-        color: $tapa;
-    }
-
-    .file-footer-buttons {
-        padding: 5px;
-        text-align: right;
-    }
-
-    .kvsortable-ghost {
-        opacity: 0.6;
-        background: $mystic;
-        border: multiply($pad, 0.4) solid $perano;
-    }
-
-    .file-preview {
-        .table {
-            margin: 0;
-        }
-    }
-
-    .file-error-message {
-        ul {
-            padding: 5px 0 0 20px;
-        }
-    }
-
-    .file-details-cell {
-        width: 60%;
-        font-size: 0.95rem;
-        text-align: left;
-        margin-right: auto;
-    }
-
-    .file-actions-cell {
-        position: relative;
-        height: multiply($pad, 16);
-        width: multiply($pad, 40);
-    }
+  .file-preview-frame {
+    border: multiply($pad, 0.2) solid $alto;
+    margin: multiply($pad, 0.4) 0;
+    width: 100%;
+    display: flex;
+    justify-content: space-between;
+    align-items: center;
+
+    samp {
+      font-size: 0.9rem;
+    }
+  }
+
+  .file-actions {
+    text-align: center;
+  }
+
+  .file-upload-indicator,
+  .file-drag-handle {
+    text-align: center;
+    position: absolute;
+    display: inline-block;
+    bottom: multiply($pad, 1.6);
+    right: multiply($pad, 0.8);
+    width: multiply($pad, 3.2);
+    height: multiply($pad, 3.2);
+    font-size: multiply($pad, 3.2);
+  }
+
+  .explorer-frame {
+    .kv-file-content {
+      width: multiply($pad, 32);
+      height: multiply($pad, 16);
+      padding: $pad;
+      text-align: left;
+    }
+  }
+
+  .file-thumb-progress {
+    .progress {
+      display: block;
+      white-space: nowrap;
+      text-overflow: ellipsis;
+      overflow: hidden;
+      margin-top: 5px;
+    }
+  }
+
+  .explorer-caption {
+    display: block;
+    white-space: nowrap;
+    text-overflow: ellipsis;
+    overflow: hidden;
+    padding: 5px;
+    color: $tapa;
+  }
+
+  .file-footer-buttons {
+    padding: 5px;
+    text-align: right;
+  }
+
+  .kvsortable-ghost {
+    opacity: 0.6;
+    background: $mystic;
+    border: multiply($pad, 0.4) solid $perano;
+  }
+
+  .file-preview {
+    .table {
+      margin: 0;
+    }
+  }
+
+  .file-error-message {
+    ul {
+      padding: 5px 0 0 20px;
+    }
+  }
+
+  .file-details-cell {
+    width: 60%;
+    font-size: 0.95rem;
+    text-align: left;
+    margin-right: auto;
+  }
+
+  .file-actions-cell {
+    position: relative;
+    height: multiply($pad, 16);
+    width: multiply($pad, 40);
+  }
 }
 
 .explorer-frame {
-    .file-preview-other {
-        text-align: center;
-    }
-
-    .file-preview-text {
-        display: inline-block;
-        color: $boston-blue;
-        border: 1px solid $alto;
-        font-family: $font;
-        outline: none;
-        padding: multiply($pad, 1.6);
-        resize: none;
-    }
-
-    .file-preview-html {
-        display: inline-block;
-        border: 1px solid $alto;
-        padding: multiply($pad, 1.6);
-        overflow: auto;
-    }
-
-    .file-other-icon {
-        font-size: 2.6em;
-    }
-
-    &:hover {
-        background-color: $white-smoke;
-    }
+  .file-preview-other {
+    text-align: center;
+  }
+
+  .file-preview-text {
+    display: inline-block;
+    color: $boston-blue;
+    border: 1px solid $alto;
+    font-family: $font;
+    outline: none;
+    padding: multiply($pad, 1.6);
+    resize: none;
+  }
+
+  .file-preview-html {
+    display: inline-block;
+    border: 1px solid $alto;
+    padding: multiply($pad, 1.6);
+    overflow: auto;
+  }
+
+  .file-other-icon {
+    font-size: 2.6em;
+  }
+
+  &:hover {
+    background-color: $white-smoke;
+  }
 }
 
 .file-zoom-dialog {
-    .explorer-frame {
-        .file-other-icon {
-            //noinspection CssOverwrittenProperties
-            font-size: 22em;
-            //noinspection CssOverwrittenProperties
-            font-size: 50vmin;
-        }
+  .explorer-frame {
+    .file-other-icon {
+      //noinspection CssOverwrittenProperties
+      font-size: 22em;
+      //noinspection CssOverwrittenProperties
+      font-size: 50vmin;
     }
+  }
 }
 
 @media only screen and (max-width: 1249px) {
-    .theme-explorer {
-        .file-preview-frame {
-            .file-details-cell {
-                width: 40%;
-            }
-        }
+  .theme-explorer {
+    .file-preview-frame {
+      .file-details-cell {
+        width: 40%;
+      }
     }
+  }
 }
 
 @media only screen and (max-width: 1023px) {
-    .theme-explorer {
-        .file-preview-frame {
-            .file-details-cell {
-                width: 30%;
-            }
-        }
+  .theme-explorer {
+    .file-preview-frame {
+      .file-details-cell {
+        width: 30%;
+      }
     }
+  }
 }
 
 @media only screen and (max-width: 767px) {
-    .theme-explorer {
-        .file-preview-frame {
-            .file-details-cell {
-                width: multiply($pad, 40);
-            }
-        }
+  .theme-explorer {
+    .file-preview-frame {
+      .file-details-cell {
+        width: multiply($pad, 40);
+      }
     }
+  }
 }
 
 @media only screen and (max-width: 575px) {
-    .theme-explorer {
-        .file-preview-frame {
-            flex-direction: column;
-
-            .kv-file-content {
-                width: auto;
-                text-align: center;
-            }
-        }
-
-        .file-details-cell {
-            width: multiply($pad, 20);
-            text-align: center;
-            margin-right: 0;
-        }
-
-        .file-actions-cell {
-            width: 100%;
-            height: auto;
-        }
-
-        .file-footer-buttons {
-            text-align: left;
-        }
+  .theme-explorer {
+    .file-preview-frame {
+      flex-direction: column;
+
+      .kv-file-content {
+        width: auto;
+        text-align: center;
+      }
+    }
+
+    .file-details-cell {
+      width: multiply($pad, 20);
+      text-align: center;
+      margin-right: 0;
+    }
+
+    .file-actions-cell {
+      width: 100%;
+      height: auto;
+    }
+
+    .file-footer-buttons {
+      text-align: left;
     }
+  }
 }

+ 11 - 2
themes/bs5/theme.js

@@ -11,7 +11,16 @@
  * Licensed under the BSD-3-Clause
  * https://github.com/kartik-v/bootstrap-fileinput/blob/master/LICENSE.md
  */
-(function ($) {
+(function (factory) {
+    'use strict';
+    if (typeof define === 'function' && define.amd) {
+        define(['jquery', 'window', 'document'],factory);
+    } else if (typeof module === 'object' && typeof module.exports === 'object') {
+        factory(require('jquery'), window, document);
+    } else {
+        factory(window.jQuery, window, document);
+    }
+}(function ($, window, document, undefined) {
     'use strict';
     $.fn.fileinputBsVersion = '5.x.x';
     $.fn.fileinputThemes.bs5 = {
@@ -47,4 +56,4 @@
         uploadIcon: '<i class="bi-upload"></i>',
         msgValidationErrorIcon: '<i class="bi-exclamation-circle-fill"></i> '
     };
-})(window.jQuery);
+}));

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

@@ -10,4 +10,4 @@
  *
  * Licensed under the BSD-3-Clause
  * https://github.com/kartik-v/bootstrap-fileinput/blob/master/LICENSE.md
- */!function(i){"use strict";i.fn.fileinputBsVersion="5.x.x",i.fn.fileinputThemes.bs5={fileActionSettings:{removeIcon:'<i class="bi-trash"></i>',uploadIcon:'<i class="bi-upload"></i>',uploadRetryIcon:'<i class="bi-arrow-clockwise"></i>',downloadIcon:'<i class="bi-download"></i>',zoomIcon:'<i class="bi-zoom-in"></i>',dragIcon:'<i class="bi-arrows-move"></i>',indicatorNew:'<i class="bi-plus-lg text-warning"></i>',indicatorSuccess:'<i class="bi-check-lg-fill text-success"></i>',indicatorError:'<i class="bi-exclamation-lg text-danger"></i>',indicatorLoading:'<i class="bi-hourglass-bottom text-muted"></i>',indicatorPaused:'<i class="bi-pause-fill text-primary"></i>'},layoutTemplates:{fileIcon:'<i class="bi-file-earmark-arrow-up"></i>'},previewZoomButtonIcons:{prev:'<i class="bi-chevron-left"></i>',next:'<i class="bi-chevron-right"></i>',toggleheader:'<i class="bi-arrows-expand"></i>',fullscreen:'<i class="bi-arrows-fullscreen"></i>',borderless:'<i class="bi-arrows-angle-expand"></i>',close:'<i class="bi-x-lg"></i>'},previewFileIcon:'<i class="bi-file-earmark-fill"></i>',browseIcon:'<i class="bi-folder2-open"></i> ',removeIcon:'<i class="bi-trash"></i>',cancelIcon:'<i class="bi-slash-circle"></i>',pauseIcon:'<i class="bi-pause-fill"></i>',uploadIcon:'<i class="bi-upload"></i>',msgValidationErrorIcon:'<i class="bi-exclamation-circle-fill"></i> '}}(window.jQuery);
+ */!function(i){"use strict";"function"==typeof define&&define.amd?define(["jquery","window","document"],i):"object"==typeof module&&"object"==typeof module.exports?i(require("jquery"),window,document):i(window.jQuery,window,document)}(function(i){"use strict";i.fn.fileinputBsVersion="5.x.x",i.fn.fileinputThemes.bs5={fileActionSettings:{removeIcon:'<i class="bi-trash"></i>',uploadIcon:'<i class="bi-upload"></i>',uploadRetryIcon:'<i class="bi-arrow-clockwise"></i>',downloadIcon:'<i class="bi-download"></i>',zoomIcon:'<i class="bi-zoom-in"></i>',dragIcon:'<i class="bi-arrows-move"></i>',indicatorNew:'<i class="bi-plus-lg text-warning"></i>',indicatorSuccess:'<i class="bi-check-lg-fill text-success"></i>',indicatorError:'<i class="bi-exclamation-lg text-danger"></i>',indicatorLoading:'<i class="bi-hourglass-bottom text-muted"></i>',indicatorPaused:'<i class="bi-pause-fill text-primary"></i>'},layoutTemplates:{fileIcon:'<i class="bi-file-earmark-arrow-up"></i>'},previewZoomButtonIcons:{prev:'<i class="bi-chevron-left"></i>',next:'<i class="bi-chevron-right"></i>',toggleheader:'<i class="bi-arrows-expand"></i>',fullscreen:'<i class="bi-arrows-fullscreen"></i>',borderless:'<i class="bi-arrows-angle-expand"></i>',close:'<i class="bi-x-lg"></i>'},previewFileIcon:'<i class="bi-file-earmark-fill"></i>',browseIcon:'<i class="bi-folder2-open"></i> ',removeIcon:'<i class="bi-trash"></i>',cancelIcon:'<i class="bi-slash-circle"></i>',pauseIcon:'<i class="bi-pause-fill"></i>',uploadIcon:'<i class="bi-upload"></i>',msgValidationErrorIcon:'<i class="bi-exclamation-circle-fill"></i> '}});

+ 11 - 2
themes/explorer-fa/theme.js

@@ -12,7 +12,16 @@
  * Licensed under the BSD-3-Clause
  * https://github.com/kartik-v/bootstrap-fileinput/blob/master/LICENSE.md
  */
-(function ($) {
+(function (factory) {
+    'use strict';
+    if (typeof define === 'function' && define.amd) {
+        define(['jquery', 'window', 'document'],factory);
+    } else if (typeof module === 'object' && typeof module.exports === 'object') {
+        factory(require('jquery'), window, document);
+    } else {
+        factory(window.jQuery, window, document);
+    }
+}(function ($, window, document, undefined) {
     'use strict';
     $.fn.fileinputThemes['explorer-fa'] = {
         layoutTemplates: {
@@ -68,4 +77,4 @@
         uploadIcon: '<i class="fa fa-upload"></i>',
         msgValidationErrorIcon: '<i class="fa fa-exclamation-circle"></i> '
     };
-})(window.jQuery);
+}));

Filskillnaden har hållts tillbaka eftersom den är för stor
+ 0 - 0
themes/explorer-fa/theme.min.js


+ 11 - 3
themes/explorer-fas/theme.js

@@ -12,9 +12,17 @@
  * Licensed under the BSD-3-Clause
  * https://github.com/kartik-v/bootstrap-fileinput/blob/master/LICENSE.md
  */
-(function ($) {
+(function (factory) {
+    'use strict';
+    if (typeof define === 'function' && define.amd) {
+        define(['jquery', 'window', 'document'],factory);
+    } else if (typeof module === 'object' && typeof module.exports === 'object') {
+        factory(require('jquery'), window, document);
+    } else {
+        factory(window.jQuery, window, document);
+    }
+}(function ($, window, document, undefined) {
     'use strict';
-    $.fn.fileinput.defaults.theme = 'explorer-fas';
     $.fn.fileinputThemes['explorer-fas'] = {
         layoutTemplates: {
             footer: '<div class="file-details-cell">' +
@@ -69,4 +77,4 @@
         uploadIcon: '<i class="fas fa-upload"></i>',
         msgValidationErrorIcon: '<i class="fas fa-exclamation-circle"></i> '
     };
-})(window.jQuery);
+}));

Filskillnaden har hållts tillbaka eftersom den är för stor
+ 0 - 0
themes/explorer-fas/theme.min.js


+ 11 - 2
themes/explorer/theme.js

@@ -10,7 +10,16 @@
  * Licensed under the BSD-3-Clause
  * https://github.com/kartik-v/bootstrap-fileinput/blob/master/LICENSE.md
  */
-(function ($) {
+(function (factory) {
+    'use strict';
+    if (typeof define === 'function' && define.amd) {
+        define(['jquery', 'window', 'document'],factory);
+    } else if (typeof module === 'object' && typeof module.exports === 'object') {
+        factory(require('jquery'), window, document);
+    } else {
+        factory(window.jQuery, window, document);
+    }
+}(function ($, window, document, undefined) {
     "use strict";
     $.fn.fileinputThemes.explorer = {
         layoutTemplates: {
@@ -37,4 +46,4 @@
         },
         frameClass: 'explorer-frame'
     };
-})(window.jQuery);
+}));

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

@@ -9,4 +9,4 @@
  *
  * Licensed under the BSD-3-Clause
  * https://github.com/kartik-v/bootstrap-fileinput/blob/master/LICENSE.md
- */!function(i){"use strict";i.fn.fileinputThemes.explorer={layoutTemplates:{footer:'<div class="file-details-cell"><div class="explorer-caption" title="{caption}">{caption}</div> {size}{progress}</div><div class="file-actions-cell">{indicator} {actions}</div>',actions:'{drag}\n<div class="file-actions">\n    <div class="file-footer-buttons">\n        {upload} {download} {delete} {zoom} {other}     </div>\n</div>'},previewSettings:{html:{width:"100px",height:"60px"},text:{width:"100px",height:"60px"},video:{width:"auto",height:"60px"},audio:{width:"auto",height:"60px"},flash:{width:"100%",height:"60px"},object:{width:"100%",height:"60px"},pdf:{width:"100px",height:"60px"},other:{width:"100%",height:"60px"}},frameClass:"explorer-frame"}}(window.jQuery);
+ */!function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery","window","document"],e):"object"==typeof module&&"object"==typeof module.exports?e(require("jquery"),window,document):e(window.jQuery,window,document)}(function(e){"use strict";e.fn.fileinputThemes.explorer={layoutTemplates:{footer:'<div class="file-details-cell"><div class="explorer-caption" title="{caption}">{caption}</div> {size}{progress}</div><div class="file-actions-cell">{indicator} {actions}</div>',actions:'{drag}\n<div class="file-actions">\n    <div class="file-footer-buttons">\n        {upload} {download} {delete} {zoom} {other}     </div>\n</div>'},previewSettings:{html:{width:"100px",height:"60px"},text:{width:"100px",height:"60px"},video:{width:"auto",height:"60px"},audio:{width:"auto",height:"60px"},flash:{width:"100%",height:"60px"},object:{width:"100%",height:"60px"},pdf:{width:"100px",height:"60px"},other:{width:"100%",height:"60px"}},frameClass:"explorer-frame"}});

+ 11 - 2
themes/fa/theme.js

@@ -10,7 +10,16 @@
  * Licensed under the BSD-3-Clause
  * https://github.com/kartik-v/bootstrap-fileinput/blob/master/LICENSE.md
  */
-(function ($) {
+(function (factory) {
+    'use strict';
+    if (typeof define === 'function' && define.amd) {
+        define(['jquery', 'window', 'document'],factory);
+    } else if (typeof module === 'object' && typeof module.exports === 'object') {
+        factory(require('jquery'), window, document);
+    } else {
+        factory(window.jQuery, window, document);
+    }
+}(function ($, window, document, undefined) {
     "use strict";
 
     $.fn.fileinputThemes.fa = {
@@ -46,4 +55,4 @@
         uploadIcon: '<i class="fa fa-upload"></i>',
         msgValidationErrorIcon: '<i class="fa fa-exclamation-circle"></i> '
     };
-})(window.jQuery);
+}));

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

@@ -9,4 +9,4 @@
  *
  * Licensed under the BSD-3-Clause
  * https://github.com/kartik-v/bootstrap-fileinput/blob/master/LICENSE.md
- */!function(a){"use strict";a.fn.fileinputThemes.fa={fileActionSettings:{removeIcon:'<i class="fa fa-trash"></i>',uploadIcon:'<i class="fa fa-upload"></i>',uploadRetryIcon:'<i class="fa fa-repeat"></i>',downloadIcon:'<i class="fa fa-download"></i>',zoomIcon:'<i class="fa fa-search-plus"></i>',dragIcon:'<i class="fa fa-arrows"></i>',indicatorNew:'<i class="fa fa-plus-circle text-warning"></i>',indicatorSuccess:'<i class="fa fa-check-circle text-success"></i>',indicatorError:'<i class="fa fa-exclamation-circle text-danger"></i>',indicatorLoading:'<i class="fa fa-hourglass text-muted"></i>',indicatorPaused:'<i class="fa fa-pause text-info"></i>'},layoutTemplates:{fileIcon:'<i class="fa fa-file kv-caption-icon"></i> '},previewZoomButtonIcons:{prev:'<i class="fa fa-chevron-left"></i>',next:'<i class="fa fa-chevron-right"></i>',toggleheader:'<i class="fa fa-fw fa-arrows-v"></i>',fullscreen:'<i class="fa fa-fw fa-arrows-alt"></i>',borderless:'<i class="fa fa-fw fa-external-link"></i>',close:'<i class="fa fa-fw fa-remove"></i>'},previewFileIcon:'<i class="fa fa-file"></i>',browseIcon:'<i class="fa fa-folder-open"></i>',removeIcon:'<i class="fa fa-trash"></i>',cancelIcon:'<i class="fa fa-ban"></i>',pauseIcon:'<i class="fa fa-pause"></i>',uploadIcon:'<i class="fa fa-upload"></i>',msgValidationErrorIcon:'<i class="fa fa-exclamation-circle"></i> '}}(window.jQuery);
+ */!function(a){"use strict";"function"==typeof define&&define.amd?define(["jquery","window","document"],a):"object"==typeof module&&"object"==typeof module.exports?a(require("jquery"),window,document):a(window.jQuery,window,document)}(function(a){"use strict";a.fn.fileinputThemes.fa={fileActionSettings:{removeIcon:'<i class="fa fa-trash"></i>',uploadIcon:'<i class="fa fa-upload"></i>',uploadRetryIcon:'<i class="fa fa-repeat"></i>',downloadIcon:'<i class="fa fa-download"></i>',zoomIcon:'<i class="fa fa-search-plus"></i>',dragIcon:'<i class="fa fa-arrows"></i>',indicatorNew:'<i class="fa fa-plus-circle text-warning"></i>',indicatorSuccess:'<i class="fa fa-check-circle text-success"></i>',indicatorError:'<i class="fa fa-exclamation-circle text-danger"></i>',indicatorLoading:'<i class="fa fa-hourglass text-muted"></i>',indicatorPaused:'<i class="fa fa-pause text-info"></i>'},layoutTemplates:{fileIcon:'<i class="fa fa-file kv-caption-icon"></i> '},previewZoomButtonIcons:{prev:'<i class="fa fa-chevron-left"></i>',next:'<i class="fa fa-chevron-right"></i>',toggleheader:'<i class="fa fa-fw fa-arrows-v"></i>',fullscreen:'<i class="fa fa-fw fa-arrows-alt"></i>',borderless:'<i class="fa fa-fw fa-external-link"></i>',close:'<i class="fa fa-fw fa-remove"></i>'},previewFileIcon:'<i class="fa fa-file"></i>',browseIcon:'<i class="fa fa-folder-open"></i>',removeIcon:'<i class="fa fa-trash"></i>',cancelIcon:'<i class="fa fa-ban"></i>',pauseIcon:'<i class="fa fa-pause"></i>',uploadIcon:'<i class="fa fa-upload"></i>',msgValidationErrorIcon:'<i class="fa fa-exclamation-circle"></i> '}});

+ 11 - 2
themes/fas/theme.js

@@ -10,7 +10,16 @@
  * Licensed under the BSD-3-Clause
  * https://github.com/kartik-v/bootstrap-fileinput/blob/master/LICENSE.md
  */
-(function ($) {
+(function (factory) {
+    'use strict';
+    if (typeof define === 'function' && define.amd) {
+        define(['jquery', 'window', 'document'],factory);
+    } else if (typeof module === 'object' && typeof module.exports === 'object') {
+        factory(require('jquery'), window, document);
+    } else {
+        factory(window.jQuery, window, document);
+    }
+}(function ($, window, document, undefined) {
     "use strict";
 
     $.fn.fileinputThemes.fas = {
@@ -46,4 +55,4 @@
         uploadIcon: '<i class="fas fa-upload"></i>',
         msgValidationErrorIcon: '<i class="fas fa-exclamation-circle"></i> '
     };
-})(window.jQuery);
+}));

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

@@ -9,4 +9,4 @@
  *
  * Licensed under the BSD-3-Clause
  * https://github.com/kartik-v/bootstrap-fileinput/blob/master/LICENSE.md
- */!function(a){"use strict";a.fn.fileinputThemes.fas={fileActionSettings:{removeIcon:'<i class="fas fa-trash-alt"></i>',uploadIcon:'<i class="fas fa-upload"></i>',uploadRetryIcon:'<i class="fas fa-redo-alt"></i>',downloadIcon:'<i class="fas fa-download"></i>',zoomIcon:'<i class="fas fa-search-plus"></i>',dragIcon:'<i class="fas fa-arrows-alt"></i>',indicatorNew:'<i class="fas fa-plus-circle text-warning"></i>',indicatorSuccess:'<i class="fas fa-check-circle text-success"></i>',indicatorError:'<i class="fas fa-exclamation-circle text-danger"></i>',indicatorLoading:'<i class="fas fa-hourglass text-muted"></i>',indicatorPaused:'<i class="fa fa-pause text-info"></i>'},layoutTemplates:{fileIcon:'<i class="fas fa-file kv-caption-icon"></i> '},previewZoomButtonIcons:{prev:'<i class="fas fa-chevron-left"></i>',next:'<i class="fas fa-chevron-right"></i>',toggleheader:'<i class="fas fa-fw fa-arrows-alt-v"></i>',fullscreen:'<i class="fas fa-fw fa-arrows-alt"></i>',borderless:'<i class="fas fa-fw fa-external-link-alt"></i>',close:'<i class="fas fa-fw fa-times"></i>'},previewFileIcon:'<i class="fas fa-file"></i>',browseIcon:'<i class="fas fa-folder-open"></i>',removeIcon:'<i class="fas fa-trash-alt"></i>',cancelIcon:'<i class="fas fa-ban"></i>',pauseIcon:'<i class="fas fa-pause"></i>',uploadIcon:'<i class="fas fa-upload"></i>',msgValidationErrorIcon:'<i class="fas fa-exclamation-circle"></i> '}}(window.jQuery);
+ */!function(a){"use strict";"function"==typeof define&&define.amd?define(["jquery","window","document"],a):"object"==typeof module&&"object"==typeof module.exports?a(require("jquery"),window,document):a(window.jQuery,window,document)}(function(a){"use strict";a.fn.fileinputThemes.fas={fileActionSettings:{removeIcon:'<i class="fas fa-trash-alt"></i>',uploadIcon:'<i class="fas fa-upload"></i>',uploadRetryIcon:'<i class="fas fa-redo-alt"></i>',downloadIcon:'<i class="fas fa-download"></i>',zoomIcon:'<i class="fas fa-search-plus"></i>',dragIcon:'<i class="fas fa-arrows-alt"></i>',indicatorNew:'<i class="fas fa-plus-circle text-warning"></i>',indicatorSuccess:'<i class="fas fa-check-circle text-success"></i>',indicatorError:'<i class="fas fa-exclamation-circle text-danger"></i>',indicatorLoading:'<i class="fas fa-hourglass text-muted"></i>',indicatorPaused:'<i class="fa fa-pause text-info"></i>'},layoutTemplates:{fileIcon:'<i class="fas fa-file kv-caption-icon"></i> '},previewZoomButtonIcons:{prev:'<i class="fas fa-chevron-left"></i>',next:'<i class="fas fa-chevron-right"></i>',toggleheader:'<i class="fas fa-fw fa-arrows-alt-v"></i>',fullscreen:'<i class="fas fa-fw fa-arrows-alt"></i>',borderless:'<i class="fas fa-fw fa-external-link-alt"></i>',close:'<i class="fas fa-fw fa-times"></i>'},previewFileIcon:'<i class="fas fa-file"></i>',browseIcon:'<i class="fas fa-folder-open"></i>',removeIcon:'<i class="fas fa-trash-alt"></i>',cancelIcon:'<i class="fas fa-ban"></i>',pauseIcon:'<i class="fas fa-pause"></i>',uploadIcon:'<i class="fas fa-upload"></i>',msgValidationErrorIcon:'<i class="fas fa-exclamation-circle"></i> '}});

+ 11 - 2
themes/gly/theme.js

@@ -10,7 +10,16 @@
  * Licensed under the BSD-3-Clause
  * https://github.com/kartik-v/bootstrap-fileinput/blob/master/LICENSE.md
  */
-(function ($) {
+(function (factory) {
+    'use strict';
+    if (typeof define === 'function' && define.amd) {
+        define(['jquery', 'window', 'document'],factory);
+    } else if (typeof module === 'object' && typeof module.exports === 'object') {
+        factory(require('jquery'), window, document);
+    } else {
+        factory(window.jQuery, window, document);
+    }
+}(function ($, window, document, undefined) {
     "use strict";
 
     $.fn.fileinputThemes.gly = {
@@ -43,4 +52,4 @@
         uploadIcon: '<i class="glyphicon glyphicon-upload"></i>',
         msgValidationErrorIcon: '<i class="glyphicon glyphicon-exclamation-sign"></i> '
     };
-})(window.jQuery);
+}));

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

@@ -9,4 +9,4 @@
  *
  * Licensed under the BSD-3-Clause
  * https://github.com/kartik-v/bootstrap-fileinput/blob/master/LICENSE.md
- */!function(i){"use strict";i.fn.fileinputThemes.gly={fileActionSettings:{removeIcon:'<i class="glyphicon glyphicon-trash"></i>',uploadIcon:'<i class="glyphicon glyphicon-upload"></i>',zoomIcon:'<i class="glyphicon glyphicon-zoom-in"></i>',dragIcon:'<i class="glyphicon glyphicon-move"></i>',indicatorNew:'<i class="glyphicon glyphicon-plus-sign text-warning"></i>',indicatorSuccess:'<i class="glyphicon glyphicon-ok-sign text-success"></i>',indicatorError:'<i class="glyphicon glyphicon-exclamation-sign text-danger"></i>',indicatorLoading:'<i class="glyphicon glyphicon-hourglass text-muted"></i>'},layoutTemplates:{fileIcon:'<i class="glyphicon glyphicon-file kv-caption-icon"></i>'},previewZoomButtonIcons:{prev:'<i class="glyphicon glyphicon-menu-left"></i>',next:'<i class="glyphicon glyphicon-menu-right"></i>',toggleheader:'<i class="glyphicon glyphicon-resize-vertical"></i>',fullscreen:'<i class="glyphicon glyphicon-fullscreen"></i>',borderless:'<i class="glyphicon glyphicon-resize-full"></i>',close:'<i class="glyphicon glyphicon-remove"></i>'},previewFileIcon:'<i class="glyphicon glyphicon-file"></i>',browseIcon:'<i class="glyphicon glyphicon-folder-open"></i>&nbsp;',removeIcon:'<i class="glyphicon glyphicon-trash"></i>',cancelIcon:'<i class="glyphicon glyphicon-ban-circle"></i>',pauseIcon:'<i class="glyphicon glyphicon-pause"></i>',uploadIcon:'<i class="glyphicon glyphicon-upload"></i>',msgValidationErrorIcon:'<i class="glyphicon glyphicon-exclamation-sign"></i> '}}(window.jQuery);
+ */!function(i){"use strict";"function"==typeof define&&define.amd?define(["jquery","window","document"],i):"object"==typeof module&&"object"==typeof module.exports?i(require("jquery"),window,document):i(window.jQuery,window,document)}(function(i){"use strict";i.fn.fileinputThemes.gly={fileActionSettings:{removeIcon:'<i class="glyphicon glyphicon-trash"></i>',uploadIcon:'<i class="glyphicon glyphicon-upload"></i>',zoomIcon:'<i class="glyphicon glyphicon-zoom-in"></i>',dragIcon:'<i class="glyphicon glyphicon-move"></i>',indicatorNew:'<i class="glyphicon glyphicon-plus-sign text-warning"></i>',indicatorSuccess:'<i class="glyphicon glyphicon-ok-sign text-success"></i>',indicatorError:'<i class="glyphicon glyphicon-exclamation-sign text-danger"></i>',indicatorLoading:'<i class="glyphicon glyphicon-hourglass text-muted"></i>'},layoutTemplates:{fileIcon:'<i class="glyphicon glyphicon-file kv-caption-icon"></i>'},previewZoomButtonIcons:{prev:'<i class="glyphicon glyphicon-menu-left"></i>',next:'<i class="glyphicon glyphicon-menu-right"></i>',toggleheader:'<i class="glyphicon glyphicon-resize-vertical"></i>',fullscreen:'<i class="glyphicon glyphicon-fullscreen"></i>',borderless:'<i class="glyphicon glyphicon-resize-full"></i>',close:'<i class="glyphicon glyphicon-remove"></i>'},previewFileIcon:'<i class="glyphicon glyphicon-file"></i>',browseIcon:'<i class="glyphicon glyphicon-folder-open"></i>&nbsp;',removeIcon:'<i class="glyphicon glyphicon-trash"></i>',cancelIcon:'<i class="glyphicon glyphicon-ban-circle"></i>',pauseIcon:'<i class="glyphicon glyphicon-pause"></i>',uploadIcon:'<i class="glyphicon glyphicon-upload"></i>',msgValidationErrorIcon:'<i class="glyphicon glyphicon-exclamation-sign"></i> '}});

Vissa filer visades inte eftersom för många filer har ändrats