浏览代码

added modal and added support for the multiple-sort extension

NAME 5 年之前
父节点
当前提交
f5817dd341

+ 51 - 0
src/extensions/multiple-sort/bootstrap-table-multiple-sort.js

@@ -294,6 +294,53 @@ const bootstrap = {
       multipleSortButton: '<button class="button multi-sort" data-target="%s" title="%s">%s</button>',
       multipleSortButton: '<button class="button multi-sort" data-target="%s" title="%s">%s</button>',
       multipleSortSelect: '<select class="%s %s browser-default">'
       multipleSortSelect: '<select class="%s %s browser-default">'
     }
     }
+  },
+  'bootstrap-table': {
+    icons: {
+      'plus': 'icon-plus',
+      'minus': 'icon-minus',
+      'sort': 'icon-sort-amount-asc'
+    },
+    html: {
+      multipleSortModal: `
+        <div class="modal" id="%s" aria-labelledby="%sLabel" aria-hidden="true">
+          <div class="modal-background"></div>
+          <div class="modal-content" id="%sLabel">
+            <div class="box">
+            <h2>%s</h2>
+              <div class="bootstrap-table">
+                  <div class="fixed-table-toolbar">
+                      <div class="bars">
+                        <div id="toolbar" class="padding-bottom-2">
+                          <button id="add" type="button" class="btn">%s %s</button>
+                          <button id="delete" type="button" class="btn" disabled>%s %s</button>
+                        </div>
+                      </div>
+                  </div>
+                  <div class="fixed-table-container">
+                      <table id="multi-sort" class="table">
+                          <thead>
+                              <tr>
+                                  <th></th>
+                                  <th><div class="th-inner">%s</div></th>
+                                  <th><div class="th-inner">%s</div></th>
+                              </tr>
+                          </thead>
+                          <tbody></tbody>
+                      </table>
+                    </div>
+                </div>
+                <div class="mt-30">
+                    <button type="button" class="btn" data-close>%s</button>
+                    <button type="button" class="btn multi-sort-order-button" data-close>%s</button> 
+                </div>
+            </div>
+          </div>
+        </div>
+      `,
+      multipleSortButton: '<button class="btn multi-sort" data-target="%s" title="%s">%s</button>',
+      multipleSortSelect: '<select class="%s %s browser-default">'
+    }
   }
   }
 }[$.fn.bootstrapTable.theme]
 }[$.fn.bootstrapTable.theme]
 $.extend($.fn.bootstrapTable.defaults.icons, bootstrap.icons)
 $.extend($.fn.bootstrapTable.defaults.icons, bootstrap.icons)
@@ -518,6 +565,10 @@ BootstrapTable.prototype.initToolbar = function (...args) {
         this.$toolbar.find('.multi-sort').on('click', () => {
         this.$toolbar.find('.multi-sort').on('click', () => {
           $(sortModalId).modal()
           $(sortModalId).modal()
         })
         })
+      } else if ($.fn.bootstrapTable.theme === 'bootstrap-table') {
+        this.$toolbar.find('.multi-sort').on('click', () => {
+          $(sortModalId).addClass('show')
+        })
       } else if ($.fn.bootstrapTable.theme === 'foundation') {
       } else if ($.fn.bootstrapTable.theme === 'foundation') {
         this.$toolbar.find('.multi-sort').on('click', () => {
         this.$toolbar.find('.multi-sort').on('click', () => {
           if (!this.foundationModal) {
           if (!this.foundationModal) {

+ 8 - 5
src/themes/bootstrap-table/font.scss

@@ -1,10 +1,10 @@
 @font-face {
 @font-face {
   font-family: 'bootstrap-table';
   font-family: 'bootstrap-table';
-  src:  url('fonts/bootstrap-table.eot?gh2p5u');
-  src:  url('fonts/bootstrap-table.eot?gh2p5u#iefix') format('embedded-opentype'),
-  url('fonts/bootstrap-table.ttf?gh2p5u') format('truetype'),
-  url('fonts/bootstrap-table.woff?gh2p5u') format('woff'),
-  url('fonts/bootstrap-table.svg?gh2p5u#bootstrap-table') format('svg');
+  src:  url('fonts/bootstrap-table.eot?9p6kv0');
+  src:  url('fonts/bootstrap-table.eot?9p6kv0#iefix') format('embedded-opentype'),
+  url('fonts/bootstrap-table.ttf?9p6kv0') format('truetype'),
+  url('fonts/bootstrap-table.woff?9p6kv0') format('woff'),
+  url('fonts/bootstrap-table.svg?9p6kv0#bootstrap-table') format('svg');
   font-weight: normal;
   font-weight: normal;
   font-style: normal;
   font-style: normal;
   font-display: block;
   font-display: block;
@@ -63,4 +63,7 @@
 }
 }
 .icon-trash-2:before {
 .icon-trash-2:before {
   content: "\e906";
   content: "\e906";
+}
+.icon-sort-amount-asc:before {
+  content: "\ea4c";
 }
 }

二进制
src/themes/bootstrap-table/fonts/bootstrap-table.eot


文件差异内容过多而无法显示
+ 1 - 0
src/themes/bootstrap-table/fonts/bootstrap-table.svg


二进制
src/themes/bootstrap-table/fonts/bootstrap-table.ttf


二进制
src/themes/bootstrap-table/fonts/bootstrap-table.woff