瀏覽代碼

升级bootstrap-fileinput到最新版本v5.2.4

RuoYi 3 年之前
父節點
當前提交
17afe54f6f

+ 5 - 5
ruoyi-admin/src/main/resources/static/ajax/libs/bootstrap-fileinput/fileinput.css

@@ -1,5 +1,5 @@
 /*!
- * bootstrap-fileinput v5.2.3
+ * bootstrap-fileinput v5.2.4
  * http://plugins.krajee.com/file-input
  *
  * Krajee default styling for bootstrap-fileinput.
@@ -179,15 +179,15 @@ input[type=file].file-loading {
 }
 
 .file-caption.icon-visible .file-caption-name {
-    padding-left: 1.875rem;
+    padding-left: 25px;
 }
 
 .file-caption.icon-visible > .input-group-lg .file-caption-name {
-    padding-left: 2.1rem;
+    padding-left: 30px;
 }
 
 .file-caption.icon-visible > .input-group-sm .file-caption-name {
-    padding-left: 1.5rem;
+    padding-left: 22px;
 }
 
 .file-caption-name:not(.file-caption-disabled) {
@@ -201,7 +201,7 @@ input[type=file].file-loading {
 }
 
 .file-caption-icon {
-    padding: 0.5rem;
+    padding: 7px 5px;
     left: 4px;
 }
 

+ 9 - 4
ruoyi-admin/src/main/resources/static/ajax/libs/bootstrap-fileinput/fileinput.js

@@ -1,5 +1,5 @@
 /*!
- * bootstrap-fileinput v5.2.3
+ * bootstrap-fileinput v5.2.4
  * http://plugins.krajee.com/file-input
  *
  * Author: Kartik Visweswaran
@@ -45,13 +45,17 @@
         };
     }
 
-    var $h, FileInput;
+    var $h, FileInput, getLoadingUrl = function () {
+        var src = document.currentScript.src, srcPath = src.substring(0, src.lastIndexOf("/"));
+        return srcPath + '/loading.gif'
+    };
 
     // fileinput helper object for all global variables and internal helper methods
     $h = {
         FRAMES: '.kv-preview-thumb',
         SORT_CSS: 'file-sortable',
         INIT_FLAG: 'init-',
+        ZOOM_VAR: getLoadingUrl() + '?kvTemp__2873389129__=', // used to prevent 404 errors in URL parsing
         OBJECT_PARAMS: '<param name="controller" value="true" />\n' +
             '<param name="allowFullScreen" value="true" />\n' +
             '<param name="allowScriptAccess" value="always" />\n' +
@@ -2972,7 +2976,7 @@
                 slideIn = 'slideIn' + dir, slideOut = 'slideOut' + dir, parsed, zoomData = $frame.data('zoom');
             if (zoomData) {
                 zoomData = decodeURIComponent(zoomData);
-                parsed = $zoomPreview.html().setTokens({zoomData: zoomData});
+                parsed = $zoomPreview.html().replace($h.ZOOM_VAR, '').setTokens({zoomData: zoomData});
                 $zoomPreview.html(parsed);
                 $frame.data('zoom', '');
                 $zoomPreview.attr('data-zoom', zoomData);
@@ -4231,7 +4235,8 @@
                     'fileid': fileId || '',
                     'typeCss': typeCss,
                     'footer': footer,
-                    'data': zoom && vZoomData ? '{zoomData}' : vData,
+                    'data': vData,
+//                    'data': zoom && vZoomData ? $h.ZOOM_VAR + '{zoomData}' : vData,
                     'template': templ || cat,
                     'style': styleAttribs ? 'style="' + styleAttribs + '"' : '',
                     'zoomData': vZoomData ? encodeURIComponent(vZoomData) : ''

File diff suppressed because it is too large
+ 1 - 1
ruoyi-admin/src/main/resources/static/ajax/libs/bootstrap-fileinput/fileinput.min.css


File diff suppressed because it is too large
+ 4 - 4
ruoyi-admin/src/main/resources/static/ajax/libs/bootstrap-fileinput/fileinput.min.js


+ 2 - 2
ruoyi-admin/src/main/resources/templates/include.html

@@ -108,10 +108,10 @@
 
 <!-- fileinput文件上传插件 -->
 <div th:fragment="bootstrap-fileinput-css">
-    <link th:href="@{/ajax/libs/bootstrap-fileinput/fileinput.min.css?v=5.2.3}" rel="stylesheet"/>
+    <link th:href="@{/ajax/libs/bootstrap-fileinput/fileinput.min.css?v=5.2.4}" rel="stylesheet"/>
 </div>
 <div th:fragment="bootstrap-fileinput-js">
-    <script th:src="@{/ajax/libs/bootstrap-fileinput/fileinput.min.js?v=5.2.3}"></script>
+    <script th:src="@{/ajax/libs/bootstrap-fileinput/fileinput.min.js?v=5.2.4}"></script>
 </div>
 
 <!-- duallistbox双列表框插件 -->

Some files were not shown because too many files changed in this diff