Browse Source

升级duallistbox到最新版本v3.0.9

RuoYi 3 years ago
parent
commit
e9f9fc4b92

+ 86 - 86
ruoyi-admin/src/main/resources/static/ajax/libs/duallistbox/bootstrap-duallistbox.css

@@ -1,86 +1,86 @@
-/*
- *  Bootstrap Duallistbox - v3.0.7
- *  A responsive dual listbox widget optimized for Twitter Bootstrap. It works on all modern browsers and on touch devices.
- *  https://www.virtuosoft.eu/code/bootstrap-duallistbox/
- *
- *  Made by István Ujj-Mészáros
- *  Under Apache License v2.0 License
- */
-.bootstrap-duallistbox-container .buttons {
-  width: 100%;
-  margin-bottom: -1px;
-}
-
-.bootstrap-duallistbox-container label {
-  display: block;
-}
-
-.bootstrap-duallistbox-container .info {
-  display: inline-block;
-  margin-bottom: 5px;
-  font-size: 11px;
-}
-
-.bootstrap-duallistbox-container .clear1,
-.bootstrap-duallistbox-container .clear2 {
-  display: none;
-  font-size: 10px;
-}
-
-.bootstrap-duallistbox-container .box1.filtered .clear1,
-.bootstrap-duallistbox-container .box2.filtered .clear2 {
-  display: inline-block;
-}
-
-.bootstrap-duallistbox-container .move,
-.bootstrap-duallistbox-container .remove {
-  width: 60%;
-}
-
-.bootstrap-duallistbox-container .btn-group .btn {
-  border-bottom-left-radius: 0;
-  border-bottom-right-radius: 0;
-}
-.bootstrap-duallistbox-container select {
-  border-top-left-radius: 0;
-  border-top-right-radius: 0;
-}
-
-.bootstrap-duallistbox-container .moveall,
-.bootstrap-duallistbox-container .removeall {
-  width: 40%;
-}
-
-.bootstrap-duallistbox-container.bs2compatible .btn-group > .btn + .btn {
-  margin-left: 0;
-}
-
-.bootstrap-duallistbox-container select {
-  width: 100%;
-  height: 300px;
-  padding: 0;
-}
-
-.bootstrap-duallistbox-container .filter {
-  display: inline-block;
-  width: 100%;
-  height: 31px;
-  margin: 0 0 5px 0;
-  -webkit-box-sizing: border-box;
-  -moz-box-sizing: border-box;
-  box-sizing: border-box;
-}
-
-.bootstrap-duallistbox-container .filter.placeholder {
-  color: #aaa;
-}
-
-.bootstrap-duallistbox-container.moveonselect .move,
-.bootstrap-duallistbox-container.moveonselect .remove {
-  display:none;
-}
-
-.bootstrap-duallistbox-container.moveonselect .moveall,
-.bootstrap-duallistbox-container.moveonselect .removeall {
-  width: 100%;
-}
+/*
+ *  Bootstrap Duallistbox - v3.0.9
+ *  A responsive dual listbox widget optimized for Twitter Bootstrap. It works on all modern browsers and on touch devices.
+ *  https://www.virtuosoft.eu/code/bootstrap-duallistbox/
+ *
+ *  Made by István Ujj-Mészáros
+ *  Under Apache License v2.0 License
+ */
+.bootstrap-duallistbox-container .buttons {
+  width: 100%;
+  margin-bottom: -1px;
+}
+
+.bootstrap-duallistbox-container label {
+  display: block;
+}
+
+.bootstrap-duallistbox-container .info {
+  display: inline-block;
+  margin-bottom: 5px;
+  font-size: 11px;
+}
+
+.bootstrap-duallistbox-container .clear1,
+.bootstrap-duallistbox-container .clear2 {
+  display: none;
+  font-size: 10px;
+}
+
+.bootstrap-duallistbox-container .box1.filtered .clear1,
+.bootstrap-duallistbox-container .box2.filtered .clear2 {
+  display: inline-block;
+}
+
+.bootstrap-duallistbox-container .move,
+.bootstrap-duallistbox-container .remove {
+  width: 60%;
+}
+
+.bootstrap-duallistbox-container .btn-group .btn {
+  border-bottom-left-radius: 0;
+  border-bottom-right-radius: 0;
+}
+.bootstrap-duallistbox-container select {
+  border-top-left-radius: 0;
+  border-top-right-radius: 0;
+}
+
+.bootstrap-duallistbox-container .moveall,
+.bootstrap-duallistbox-container .removeall {
+  width: 40%;
+}
+
+.bootstrap-duallistbox-container.bs2compatible .btn-group > .btn + .btn {
+  margin-left: 0;
+}
+
+.bootstrap-duallistbox-container select {
+  width: 100%;
+  height: 300px;
+  padding: 0;
+}
+
+.bootstrap-duallistbox-container .filter {
+  display: inline-block;
+  width: 100%;
+  height: 31px;
+  margin: 0 0 5px 0;
+  -webkit-box-sizing: border-box;
+  -moz-box-sizing: border-box;
+  box-sizing: border-box;
+}
+
+.bootstrap-duallistbox-container .filter.placeholder {
+  color: #aaa;
+}
+
+.bootstrap-duallistbox-container.moveonselect .move,
+.bootstrap-duallistbox-container.moveonselect .remove {
+  display:none;
+}
+
+.bootstrap-duallistbox-container.moveonselect .moveall,
+.bootstrap-duallistbox-container.moveonselect .removeall {
+  width: 100%;
+}

+ 11 - 8
ruoyi-admin/src/main/resources/static/ajax/libs/duallistbox/bootstrap-duallistbox.js

@@ -1,5 +1,5 @@
 /*
- *  Bootstrap Duallistbox - v3.0.7
+ *  Bootstrap Duallistbox - v3.0.9
  *  A responsive dual listbox widget optimized for Twitter Bootstrap. It works on all modern browsers and on touch devices.
  *  https://www.virtuosoft.eu/code/bootstrap-duallistbox/
  *
@@ -206,10 +206,13 @@
     selectopt.detach().appendTo(select);
   }
 
-  function sortOptions(select) {
+  function sortOptions(select, dualListbox) {
     select.find('option').sort(function(a, b) {
       return ($(a).data('original-index') > $(b).data('original-index')) ? 1 : -1;
     }).appendTo(select);
+
+    // workaround for chromium bug: https://bugs.chromium.org/p/chromium/issues/detail?id=1072475
+    refreshSelects(dualListbox);
   }
 
   function clearSelections(dualListbox) {
@@ -238,7 +241,7 @@
     if(dualListbox.settings.sortByInputOrder){
         sortOptionsByInputOrder(dualListbox.elements.select2);
     } else {
-        sortOptions(dualListbox.elements.select2);
+        sortOptions(dualListbox.elements.select2, dualListbox);
     }
   }
 
@@ -259,7 +262,7 @@
 
     refreshSelects(dualListbox);
     triggerChangeEvent(dualListbox);
-    sortOptions(dualListbox.elements.select1);
+    sortOptions(dualListbox.elements.select1, dualListbox);
     if(dualListbox.settings.sortByInputOrder){
         sortOptionsByInputOrder(dualListbox.elements.select2);
     }
@@ -484,17 +487,17 @@
       if (value) {
         this.container.removeClass('row').addClass('row-fluid bs2compatible');
         this.container.find('.box1, .box2').removeClass('col-md-6').addClass('span6');
-        this.container.find('.clear1, .clear2').removeClass('btn-white btn-xs').addClass('btn-mini');
+        this.container.find('.clear1, .clear2').removeClass('btn-default btn-xs').addClass('btn-mini');
         this.container.find('input, select').removeClass('form-control');
-        this.container.find('.btn').removeClass('btn-white');
+        this.container.find('.btn').removeClass('btn-default');
         this.container.find('.moveall > i, .move > i').removeClass('glyphicon glyphicon-arrow-right').addClass('icon-arrow-right');
         this.container.find('.removeall > i, .remove > i').removeClass('glyphicon glyphicon-arrow-left').addClass('icon-arrow-left');
       } else {
         this.container.removeClass('row-fluid bs2compatible').addClass('row');
         this.container.find('.box1, .box2').removeClass('span6').addClass('col-md-6');
-        this.container.find('.clear1, .clear2').removeClass('btn-mini').addClass('btn-white btn-xs');
+        this.container.find('.clear1, .clear2').removeClass('btn-mini').addClass('btn-default btn-xs');
         this.container.find('input, select').addClass('form-control');
-        this.container.find('.btn').addClass('btn-white');
+        this.container.find('.btn').addClass('btn-default');
         this.container.find('.moveall > i, .move > i').removeClass('icon-arrow-right').addClass('glyphicon glyphicon-arrow-right');
         this.container.find('.removeall > i, .remove > i').removeClass('icon-arrow-left').addClass('glyphicon glyphicon-arrow-left');
       }

+ 8 - 0
ruoyi-admin/src/main/resources/static/ajax/libs/duallistbox/bootstrap-duallistbox.min.css

@@ -1 +1,9 @@
+/*
+ *  Bootstrap Duallistbox - v3.0.9
+ *  A responsive dual listbox widget optimized for Twitter Bootstrap. It works on all modern browsers and on touch devices.
+ *  https://www.virtuosoft.eu/code/bootstrap-duallistbox/
+ *
+ *  Made by István Ujj-Mészáros
+ *  Under Apache License v2.0 License
+ */
 .bootstrap-duallistbox-container .buttons{width:100%;margin-bottom:-1px}.bootstrap-duallistbox-container label{display:block}.bootstrap-duallistbox-container .info{display:inline-block;margin-bottom:5px;font-size:11px}.bootstrap-duallistbox-container .clear1,.bootstrap-duallistbox-container .clear2{display:none;font-size:10px}.bootstrap-duallistbox-container .box1.filtered .clear1,.bootstrap-duallistbox-container .box2.filtered .clear2{display:inline-block}.bootstrap-duallistbox-container .move,.bootstrap-duallistbox-container .remove{width:60%}.bootstrap-duallistbox-container .btn-group .btn{border-bottom-left-radius:0;border-bottom-right-radius:0}.bootstrap-duallistbox-container select{border-top-left-radius:0;border-top-right-radius:0}.bootstrap-duallistbox-container .moveall,.bootstrap-duallistbox-container .removeall{width:40%}.bootstrap-duallistbox-container.bs2compatible .btn-group>.btn+.btn{margin-left:0}.bootstrap-duallistbox-container select{width:100%;height:300px;padding:0}.bootstrap-duallistbox-container .filter{display:inline-block;width:100%;height:31px;margin:0 0 5px 0;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.bootstrap-duallistbox-container .filter.placeholder{color:#aaa}.bootstrap-duallistbox-container.moveonselect .move,.bootstrap-duallistbox-container.moveonselect .remove{display:none}.bootstrap-duallistbox-container.moveonselect .moveall,.bootstrap-duallistbox-container.moveonselect .removeall{width:100%}

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


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

@@ -116,10 +116,10 @@
 
 <!-- duallistbox双列表框插件 -->
 <div th:fragment="bootstrap-duallistbox-css">
-    <link th:href="@{/ajax/libs/duallistbox/bootstrap-duallistbox.min.css}" rel="stylesheet"/>
+    <link th:href="@{/ajax/libs/duallistbox/bootstrap-duallistbox.min.css?v=3.0.9}" rel="stylesheet"/>
 </div>
 <div th:fragment="bootstrap-duallistbox-js">
-    <script th:src="@{/ajax/libs/duallistbox/bootstrap-duallistbox.min.js}"></script>
+    <script th:src="@{/ajax/libs/duallistbox/bootstrap-duallistbox.min.js?v=3.0.9}"></script>
 </div>
 
 <!-- suggest搜索自动补全 -->

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