浏览代码

Merge pull request #3652 from wenzhixin/develop

Release 1.2.0
文翼 7 年之前
父节点
当前提交
0e74413bf9
共有 100 个文件被更改,包括 1633 次插入675 次删除
  1. 3 0
      .github/ISSUE_TEMPLATE.md
  2. 0 3
      .travis.yml
  3. 42 0
      CHANGELOG.md
  4. 38 0
      CONTRIBUTING.md
  5. 51 28
      DONATORS.md
  6. 25 2
      README.md
  7. 1 1
      _config.yml
  8. 1 1
      bootstrap-table.jquery.json
  9. 144 6
      dist/bootstrap-table-locale-all.js
  10. 5 3
      dist/bootstrap-table-locale-all.min.js
  11. 11 6
      dist/bootstrap-table.css
  12. 348 147
      dist/bootstrap-table.js
  13. 1 1
      dist/bootstrap-table.min.css
  14. 5 4
      dist/bootstrap-table.min.js
  15. 1 1
      dist/extensions/accent-neutralise/bootstrap-table-accent-neutralise.js
  16. 3 3
      dist/extensions/accent-neutralise/bootstrap-table-accent-neutralise.min.js
  17. 2 2
      dist/extensions/angular/bootstrap-table-angular.min.js
  18. 1 1
      dist/extensions/auto-refresh/bootstrap-table-auto-refresh.css
  19. 62 62
      dist/extensions/auto-refresh/bootstrap-table-auto-refresh.js
  20. 2 2
      dist/extensions/auto-refresh/bootstrap-table-auto-refresh.min.js
  21. 2 2
      dist/extensions/click-edit-row/bootstrap-table-click-edit-row.min.js
  22. 48 69
      dist/extensions/cookie/bootstrap-table-cookie.js
  23. 3 3
      dist/extensions/cookie/bootstrap-table-cookie.min.js
  24. 2 2
      dist/extensions/copy-rows/bootstrap-table-copy-rows.min.js
  25. 32 0
      dist/extensions/defer-url/bootstrap-table-defer-url.js
  26. 7 0
      dist/extensions/defer-url/bootstrap-table-defer-url.min.js
  27. 2 2
      dist/extensions/editable/bootstrap-table-editable.min.js
  28. 56 8
      dist/extensions/export/bootstrap-table-export.js
  29. 3 3
      dist/extensions/export/bootstrap-table-export.min.js
  30. 93 46
      dist/extensions/filter-control/bootstrap-table-filter-control.js
  31. 3 3
      dist/extensions/filter-control/bootstrap-table-filter-control.min.js
  32. 2 2
      dist/extensions/filter/bootstrap-table-filter.min.js
  33. 2 2
      dist/extensions/flat-json/bootstrap-table-flat-json.min.js
  34. 2 2
      dist/extensions/group-by-v2/bootstrap-table-group-by.min.js
  35. 2 2
      dist/extensions/group-by/bootstrap-table-group-by.js
  36. 3 3
      dist/extensions/group-by/bootstrap-table-group-by.min.js
  37. 3 2
      dist/extensions/i18n-enhance/bootstrap-table-i18n-enhance.js
  38. 3 3
      dist/extensions/i18n-enhance/bootstrap-table-i18n-enhance.min.js
  39. 2 2
      dist/extensions/key-events/bootstrap-table-key-events.min.js
  40. 1 1
      dist/extensions/mobile/bootstrap-table-mobile.js
  41. 3 3
      dist/extensions/mobile/bootstrap-table-mobile.min.js
  42. 2 2
      dist/extensions/multi-column-toggle/bootstrap-table-multi-toggle.min.js
  43. 1 1
      dist/extensions/multiple-search/bootstrap-table-multiple-search.js
  44. 3 3
      dist/extensions/multiple-search/bootstrap-table-multiple-search.min.js
  45. 2 2
      dist/extensions/multiple-selection-row/bootstrap-table-multiple-selection-row.min.js
  46. 31 12
      dist/extensions/multiple-sort/bootstrap-table-multiple-sort.js
  47. 3 3
      dist/extensions/multiple-sort/bootstrap-table-multiple-sort.min.js
  48. 2 2
      dist/extensions/natural-sorting/bootstrap-table-natural-sorting.min.js
  49. 8 0
      dist/extensions/page-jumpto/bootstrap-table-jumpto.css
  50. 50 0
      dist/extensions/page-jumpto/bootstrap-table-jumpto.js
  51. 7 0
      dist/extensions/page-jumpto/bootstrap-table-jumpto.min.js
  52. 33 17
      dist/extensions/print/bootstrap-table-print.js
  53. 3 3
      dist/extensions/print/bootstrap-table-print.min.js
  54. 2 2
      dist/extensions/reorder-columns/bootstrap-table-reorder-columns.js
  55. 3 3
      dist/extensions/reorder-columns/bootstrap-table-reorder-columns.min.js
  56. 2 2
      dist/extensions/reorder-rows/bootstrap-table-reorder-rows.min.js
  57. 2 1
      dist/extensions/resizable/bootstrap-table-resizable.js
  58. 3 3
      dist/extensions/resizable/bootstrap-table-resizable.min.js
  59. 136 107
      dist/extensions/select2-filter/bootstrap-table-select2-filter.js
  60. 3 3
      dist/extensions/select2-filter/bootstrap-table-select2-filter.min.js
  61. 11 4
      dist/extensions/sticky-header/bootstrap-table-sticky-header.js
  62. 3 3
      dist/extensions/sticky-header/bootstrap-table-sticky-header.min.js
  63. 2 2
      dist/extensions/toolbar/bootstrap-table-toolbar.min.js
  64. 2 2
      dist/extensions/tree-column/bootstrap-table-tree-column.min.js
  65. 95 0
      dist/extensions/treegrid/bootstrap-table-treegrid.js
  66. 7 0
      dist/extensions/treegrid/bootstrap-table-treegrid.min.js
  67. 2 2
      dist/locale/bootstrap-table-af-ZA.min.js
  68. 2 2
      dist/locale/bootstrap-table-ar-SA.min.js
  69. 2 2
      dist/locale/bootstrap-table-ca-ES.min.js
  70. 2 2
      dist/locale/bootstrap-table-cs-CZ.min.js
  71. 2 2
      dist/locale/bootstrap-table-da-DK.min.js
  72. 14 5
      dist/locale/bootstrap-table-de-DE.js
  73. 3 3
      dist/locale/bootstrap-table-de-DE.min.js
  74. 2 2
      dist/locale/bootstrap-table-el-GR.min.js
  75. 2 2
      dist/locale/bootstrap-table-en-US.min.js
  76. 2 2
      dist/locale/bootstrap-table-es-AR.min.js
  77. 2 2
      dist/locale/bootstrap-table-es-CL.min.js
  78. 2 2
      dist/locale/bootstrap-table-es-CR.min.js
  79. 2 2
      dist/locale/bootstrap-table-es-ES.min.js
  80. 20 1
      dist/locale/bootstrap-table-es-MX.js
  81. 3 3
      dist/locale/bootstrap-table-es-MX.min.js
  82. 2 2
      dist/locale/bootstrap-table-es-NI.min.js
  83. 2 2
      dist/locale/bootstrap-table-es-SP.min.js
  84. 2 2
      dist/locale/bootstrap-table-et-EE.min.js
  85. 43 0
      dist/locale/bootstrap-table-eu-EU.js
  86. 7 0
      dist/locale/bootstrap-table-eu-EU.min.js
  87. 2 2
      dist/locale/bootstrap-table-fa-IR.min.js
  88. 2 2
      dist/locale/bootstrap-table-fr-BE.min.js
  89. 54 0
      dist/locale/bootstrap-table-fr-FR.js
  90. 3 3
      dist/locale/bootstrap-table-fr-FR.min.js
  91. 2 2
      dist/locale/bootstrap-table-he-IL.min.js
  92. 2 2
      dist/locale/bootstrap-table-hr-HR.min.js
  93. 2 2
      dist/locale/bootstrap-table-hu-HU.min.js
  94. 2 2
      dist/locale/bootstrap-table-id-ID.min.js
  95. 2 2
      dist/locale/bootstrap-table-it-IT.min.js
  96. 2 2
      dist/locale/bootstrap-table-ja-JP.min.js
  97. 2 2
      dist/locale/bootstrap-table-ka-GE.min.js
  98. 2 2
      dist/locale/bootstrap-table-ko-KR.min.js
  99. 2 2
      dist/locale/bootstrap-table-ms-MY.min.js
  100. 0 0
      dist/locale/bootstrap-table-nb-NO.min.js

+ 3 - 0
.github/ISSUE_TEMPLATE.md

@@ -12,3 +12,6 @@ Further steps, etc.
 [jsfiddle]() - a link to the reduced test case([fiddle template](https://github.com/wenzhixin/bootstrap-table/issues/1765)).
 
 Any other information you want to share that is relevant to the issue being reported. This might include the lines of code that you have identified as causing the bug, and potential solutions (and your opinions on their merits).
+
+<!-- Love bootstrap-table? Please consider supporting our collective:
+👉  https://opencollective.com/bootstrap-table/donate -->

+ 0 - 3
.travis.yml

@@ -2,6 +2,3 @@ language: node_js
 
 node_js:
     - "0.10"
-
-before_install:
-    - npm install grunt-cli -g

+ 42 - 0
CHANGELOG.md

@@ -1,6 +1,47 @@
 ChangeLog
 ---------
 
+### 1.12.0
+
+- fix(js): fix zoom header width bug
+- fix(js): fix #3452, reset the table data when url loaded error
+- fix(js): fix #3380, check-all was wrong with the sub-table
+- fix(js): fix #2963, singleSelect, maintainSelected and pagination bug
+- fix(js): fix #3342, remove limit when it is 0
+- fix(js): fix #3472, group header style bug
+- fix(js): fix #3310, searchText causes two requests
+- fix(js): fix #3029, IE8 does not support getOwnPropertyNames
+- fix(js): fix #3204, sortName cannot work in server side pagination
+- fix(js): fix #3163, `showToolbar` bug when using extensions
+- fix(js): fix #3087, only send pagination parameters when `sidePagination` is `server`
+- fix(export extension): fix #3477, server pagination mode cannot export all data
+- fix(filter-control extension): fix #3271, duplicate select option with fixed header and client pagination
+- feat(js): add `detailFilter` option
+- feat(js): add `rememberOrder` option
+- feat(js): improve pageList `All` option locale independent
+- feat(js): add `Bootstrap v4.0` support
+- feat(js): add `row` data to sorter function
+- feat(js): add `ignoreClickToSelectOn` option
+- feat(js): add `onScrollBody` / `scroll-body.bs.table` event
+- feat(js): add `showFullscreen` option
+- feat(js): add `showSelectTitle` column option
+- feat(js): add `$el` to collapse-row
+- feat(locale): add `eu-EU` locale
+- feat(export extension): add `exportFooter` option
+- feat(multiple-sort extension): add `showMultiSortButton` option
+- feat(filter-control extension): add `searchOnEnterKey` option
+- feat(page-jumpto extension): add `page-jumpto` extension
+- feat(resizable extension): add `resizeMode` option
+- feat(sticky-header extension): add `Bootstrap v4.0` support
+- feat(treegrid extension): add `treegrid` extension
+- feat(print extension): add support to print complex table
+- feat(extension): add cookie in combination with filter-control and strict search
+
+#### Breaking changes in 1.12.0
+
+- feat(js): add `toggleOn` and `toggleOff` icons instead `toggle` icon
+
+
 ### 1.11.1
 
 - fix(js): fix #2439, `filterBy` cannot filter array keys
@@ -36,6 +77,7 @@ ChangeLog
 - feat(tree-column extension): add tree column extension
 
 #### Breaking changes in 1.11.1
+
 - **Filter-Control extension**: deleted the inline-style and now this extension is using a separated css file.
 
 

+ 38 - 0
CONTRIBUTING.md

@@ -211,3 +211,41 @@ includes code changes) and under the terms of the
 
 By contributing your code, you agree to license your contribution under the [MIT License](LICENSE).
 By contributing to the documentation, you agree to license your contribution under the [Creative Commons Attribution 3.0 Unported License](docs/LICENSE).
+
+
+## Financial contributions
+
+We also welcome financial contributions in full transparency on our [open collective](https://opencollective.com/bootstrap-table).
+Anyone can file an expense. If the expense makes sense for the development of the community, it will be "merged" in the ledger of our open collective by the core contributors and the person who filed the expense will be reimbursed.
+
+
+## Credits
+
+
+### Contributors
+
+Thank you to all the people who have already contributed to bootstrap-table!
+<a href="graphs/contributors"><img src="https://opencollective.com/bootstrap-table/contributors.svg?width=890" /></a>
+
+
+### Backers
+
+Thank you to all our backers! [[Become a backer](https://opencollective.com/bootstrap-table#backer)]
+
+<a href="https://opencollective.com/bootstrap-table#backers" target="_blank"><img src="https://opencollective.com/bootstrap-table/backers.svg?width=890"></a>
+
+
+### Sponsors
+
+Thank you to all our sponsors! (please ask your company to also support this open source project by [becoming a sponsor](https://opencollective.com/bootstrap-table#sponsor))
+
+<a href="https://opencollective.com/bootstrap-table/sponsor/0/website" target="_blank"><img src="https://opencollective.com/bootstrap-table/sponsor/0/avatar.svg"></a>
+<a href="https://opencollective.com/bootstrap-table/sponsor/1/website" target="_blank"><img src="https://opencollective.com/bootstrap-table/sponsor/1/avatar.svg"></a>
+<a href="https://opencollective.com/bootstrap-table/sponsor/2/website" target="_blank"><img src="https://opencollective.com/bootstrap-table/sponsor/2/avatar.svg"></a>
+<a href="https://opencollective.com/bootstrap-table/sponsor/3/website" target="_blank"><img src="https://opencollective.com/bootstrap-table/sponsor/3/avatar.svg"></a>
+<a href="https://opencollective.com/bootstrap-table/sponsor/4/website" target="_blank"><img src="https://opencollective.com/bootstrap-table/sponsor/4/avatar.svg"></a>
+<a href="https://opencollective.com/bootstrap-table/sponsor/5/website" target="_blank"><img src="https://opencollective.com/bootstrap-table/sponsor/5/avatar.svg"></a>
+<a href="https://opencollective.com/bootstrap-table/sponsor/6/website" target="_blank"><img src="https://opencollective.com/bootstrap-table/sponsor/6/avatar.svg"></a>
+<a href="https://opencollective.com/bootstrap-table/sponsor/7/website" target="_blank"><img src="https://opencollective.com/bootstrap-table/sponsor/7/avatar.svg"></a>
+<a href="https://opencollective.com/bootstrap-table/sponsor/8/website" target="_blank"><img src="https://opencollective.com/bootstrap-table/sponsor/8/avatar.svg"></a>
+<a href="https://opencollective.com/bootstrap-table/sponsor/9/website" target="_blank"><img src="https://opencollective.com/bootstrap-table/sponsor/9/avatar.svg"></a>

+ 51 - 28
DONATORS.md

@@ -2,34 +2,53 @@
 
 * Richard C Jordan - $35
 * Janet Moery - $5
-* Rene Halskov - $10
-* Angel Arambula Garcia - $5
-* David Graham - $5
-* Paul Abbott - $20
-* Philip Tepfer - $10
-* Marcus Eddy - $5
-* Keith Rockhold - $50
-* Ramon Sosa Diaz - $10
-* Goncalo Cordeiro - $25
-* Marzena Wspanialy - $10
-* Nicolas Pascual - $10
-* Hassan Ejaz - $10
-* Frank Hines - $100
-* Luis Triana Vega - $10
-* PROMOTUX DI FRANCESCO MELONI E C. S.N.C. - $15
-* Emmanuel Kielichowski - $15
-* 우공이산 우공이산 - $50
-* Empirica srl - $15
-* Hassan Gareballa - $10
-* 지황 이 - $10
-* Onur Kose - $15
-* Александр Вейсов - $30
-* Anton Blinov - $30
-* THARAKESH PULIKONDA - $10
-* Linear Design Group, LLC - $20
-* Alon Feldman - $100
-* Fabian de Rosa - $5
-* Zhe Wang - $35
+* Halskov Rene - $10.00
+* Arambula Garcia Angel - $5.00
+* Graham David - $5.00
+* Abbott Paul - $20.00
+* Philip Tepfer - $10.00
+* Eddy Marcus - $5.00
+* Rockhold Keith - $50.00
+* Sosa Diaz Ramon - $10.00
+* Cordeiro Goncalo - $25.00
+* Wspanialy Marzena - $10.00
+* Pascual Nicolas - $10.00
+* Ejaz Hassan - $10.00
+* Hines Frank - $100.00
+* Triana Vega Luis - $10.00
+* PROMOTUX DI FRANCESCO MELONI E C. S.N.C. - $15.00
+* Emmanuel Kielichowski - $15.00
+* 우공이산​우공이산 - $50.00
+* Empirica srl - $15.00
+* Gareballa Hassan - $10.00
+* Yi Jihwang - $10.00
+* Kose Onur - $15.00
+* Вейсов​Александр - $30.00
+* Blinov Anton - $30.00
+* Pulikonda Tharakesh - $10.00
+* Linear Design Group, LLC - $20.00
+* Feldman Alon - $100.00
+* De Rosa Fabian - $5.00
+* Wang Zhe - $35.00
+* Schaefer Daniel - $10.00
+* Burch Martin - $25.00
+* Макогон​Виталий - $10.00
+* avappstore - $2.50
+* Burch Martin - $10.00
+* Mazdrashki Kamen - $20.00
+* Hilker Daniel - $3.00
+* Grokability, Inc. - $100.00
+* Zweimüller Boris - $10.00
+* Chen Qiurong - $5.00
+* Mirkarimov Dmitriy - $10.00
+* Cruz Ambrocio Jose - $5.00
+* Brinkmeier Dirk - $20.00
+* Kennelly James - $100.00
+* Barreiro Lionel - $25.00
+* Toh Alvin - $10.00
+* ERIKAUSKAS - $100.00
+* Miqueles Pino Jonatan - $100.00
+* Wacker Jonathan - $1.00
 
 ## 支付宝
 
@@ -44,6 +63,8 @@
 * IO芒果:7元
 * 醉、千秋:18.88元
 * 路人甲:5.27元
+* 小阿吉:20元
+* FastAdmin - F4NNIU:88.88元
 
 ## 微信
 
@@ -58,3 +79,5 @@
 * 无心向你:9.9元
 * 指间沙:9.9元
 * 董琛:9.9元
+
+注:由于支付宝和微信使用匿名的方式,导致无法查询捐助者,麻烦发送邮件告知捐助信息,谢谢。

+ 25 - 2
README.md

@@ -1,9 +1,14 @@
 # [Bootstrap Table](http://bootstrap-table.wenzhixin.net.cn)
 
-[![Build Status](https://travis-ci.org/wenzhixin/bootstrap-table.svg)](https://travis-ci.org/wenzhixin/bootstrap-table) 
+[![Build Status](https://travis-ci.org/wenzhixin/bootstrap-table.svg)](https://travis-ci.org/wenzhixin/bootstrap-table)
 [![GitHub version](https://badge.fury.io/gh/wenzhixin%2Fbootstrap-table.svg)](http://badge.fury.io/gh/wenzhixin%2Fbootstrap-table)
 [![Bower version](https://badge.fury.io/bo/bootstrap-table.svg)](http://badge.fury.io/bo/bootstrap-table)
+[![jsDelivr Hits](https://data.jsdelivr.com/v1/package/npm/bootstrap-table/badge?style=rounded)](https://www.jsdelivr.com/package/npm/bootstrap-table)
 [![Donate](https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=ZDHP676FQDUT6)
+[![Backers on Open Collective](https://opencollective.com/bootstrap-table/backers/badge.svg)](#backers)
+[![Sponsors on Open Collective](https://opencollective.com/bootstrap-table/sponsors/badge.svg)](#sponsors)
+
+[![](https://graphs.waffle.io/wenzhixin/bootstrap-table/throughput.svg)](https://graphs.waffle.io/wenzhixin/bootstrap-table/throughput.svg)
 
 An extended Bootstrap table with radio, checkbox, sort, pagination, extensions and other added features.
 
@@ -87,6 +92,8 @@ Your feedback is very appreciated!
 ## Acknowledgements
 
 Thanks to everyone who have given feedback and submitted pull requests. A list of all the contributors can be found [here](https://github.com/wenzhixin/bootstrap-table/graphs/contributors).
+This project exists thanks to all the people who contribute. [[Contribute](CONTRIBUTING.md)].
+<a href="graphs/contributors"><img src="https://opencollective.com/bootstrap-table/contributors.svg?width=890" /></a>
 
 ## Release History
 
@@ -97,7 +104,23 @@ Look at the [Change Log](https://github.com/wenzhixin/bootstrap-table/blob/maste
 To build bootstrap-table locally please run:
 
 ```
-grunt build
+npm run grunt
 ```
 
 Result will appear in `dist` directory.
+
+## Backers
+
+Thank you to all our backers! 🙏 [[Become a backer](https://opencollective.com/bootstrap-table#backer)]
+
+<a href="https://opencollective.com/bootstrap-table#backers" target="_blank"><img src="https://opencollective.com/bootstrap-table/backers.svg?width=890"></a>
+
+## Sponsors
+
+Support this project by becoming a sponsor. Your logo will show up here with a link to your website. [[Become a sponsor](https://opencollective.com/bootstrap-table#sponsor)]
+
+<a href="https://opencollective.com/bootstrap-table/sponsor/0/website" target="_blank"><img src="https://opencollective.com/bootstrap-table/sponsor/0/avatar.svg"></a>
+<a href="https://opencollective.com/bootstrap-table/sponsor/1/website" target="_blank"><img src="https://opencollective.com/bootstrap-table/sponsor/1/avatar.svg"></a>
+<a href="https://opencollective.com/bootstrap-table/sponsor/2/website" target="_blank"><img src="https://opencollective.com/bootstrap-table/sponsor/2/avatar.svg"></a>
+<a href="https://opencollective.com/bootstrap-table/sponsor/3/website" target="_blank"><img src="https://opencollective.com/bootstrap-table/sponsor/3/avatar.svg"></a>
+<a href="https://opencollective.com/bootstrap-table/sponsor/4/website" target="_blank"><img src="https://opencollective.com/bootstrap-table/sponsor/4/avatar.svg"></a>

+ 1 - 1
_config.yml

@@ -23,7 +23,7 @@ languages: ["en", "zh-cn", "es"]
 languages_string: ["English", "简体中文", "Español"]
 
 # Custom vars
-current_version: 1.11.1
+current_version: 1.12.0
 repo: https://github.com/wenzhixin/bootstrap-table
 website: http://wenzhixin.net.cn
 repos: http://repos.wenzhixin.net.cn

+ 1 - 1
bootstrap-table.jquery.json

@@ -1,6 +1,6 @@
 {
   "name": "bootstrap-table",
-  "version": "1.11.1",
+  "version": "1.12.0",
   "title": "Bootstrap Table",
   "description": "An extended Bootstrap table with radio, checkbox, sort, pagination, and other added features.",
   "author": {

+ 144 - 6
dist/bootstrap-table-locale-all.js

@@ -219,19 +219,22 @@
       return 'Lade, bitte warten...';
     },
     formatRecordsPerPage: function (pageNumber) {
-      return pageNumber + ' Einträge pro Seite.';
+      return pageNumber + ' Zeilen pro Seite.';
     },
     formatShowingRows: function (pageFrom, pageTo, totalRows) {
-      return 'Zeige Zeile ' + pageFrom + ' bis ' + pageTo + ' von ' + totalRows + ' Zeile' + ((totalRows > 1) ? "n" : "")+".";
+      return 'Zeige Zeile ' + pageFrom + ' bis ' + pageTo + ' von ' + totalRows + ' Zeilen' + ((totalRows > 1) ? "n" : "")+".";
     },
     formatDetailPagination: function (totalRows) {
       return 'Zeige ' + totalRows + ' Zeile' + ((totalRows > 1) ? "n" : "")+".";
     },
     formatSearch: function () {
-      return 'Suchen ...';
+      return 'Suchen';
     },
     formatNoMatches: function () {
-      return 'Keine passenden Ergebnisse gefunden.';
+      return 'Keine passenden Ergebnisse gefunden';
+    },
+    formatPaginationSwitch: function () {
+      return 'Verstecke/Zeige Nummerierung';
     },
     formatRefresh: function () {
       return 'Neu laden';
@@ -244,7 +247,13 @@
     },
     formatAllRows: function () {
       return 'Alle';
-    }
+    },
+    formatExport: function () {
+      return 'Datenexport';
+    },
+    formatClearFilters: function () {
+      return 'Lösche Filter';
+     }
   };
 
     $.extend($.fn.bootstrapTable.defaults, $.fn.bootstrapTable.locales['de-DE']);
@@ -495,6 +504,7 @@
  * Bootstrap Table Spanish (México) translation (Obtenido de traducción de Argentina)
  * Author: Felix Vera (felix.vera@gmail.com) 
  * Copiado: Mauricio Vera (mauricioa.vera@gmail.com)
+ * Revisión: J Manuel Corona (jmcg92@gmail.com) (13/Feb/2018).
  */
 (function ($) {
     'use strict';
@@ -509,11 +519,29 @@
         formatShowingRows: function (pageFrom, pageTo, totalRows) {
             return 'Mostrando ' + pageFrom + ' a ' + pageTo + ' de ' + totalRows + ' filas';
         },
+        formatDetailPagination: function (totalRows) {
+            return 'Mostrando ' + totalRows + ' filas';
+        },
         formatSearch: function () {
             return 'Buscar';
         },
         formatNoMatches: function () {
-            return 'No se encontraron registros';
+            return 'No se encontraron registros que coincidan';
+        },
+        formatPaginationSwitch: function () {
+            return 'Mostrar/ocultar paginación';
+        },
+        formatRefresh: function () {
+            return 'Actualizar';
+        },
+        formatToggle: function () {
+            return 'Cambiar vista';
+        },
+        formatFullscreen: function () {
+            return 'Pantalla completa';
+        },
+        formatColumns: function () {
+            return 'Columnas';
         },
         formatAllRows: function () {
             return 'Todo';
@@ -649,6 +677,50 @@
 
 })(jQuery);
 /**
+ * Bootstrap Table Basque (Basque Country) translation
+ * Author: Iker Ibarguren Berasaluze<ikerib@gmail.com>
+ */
+(function ($) {
+    'use strict';
+
+    $.fn.bootstrapTable.locales['eu-EU'] = {
+        formatLoadingMessage: function () {
+            return 'Itxaron mesedez...';
+        },
+        formatRecordsPerPage: function (pageNumber) {
+            return pageNumber + ' emaitza orriko.';
+        },
+        formatShowingRows: function (pageFrom, pageTo, totalRows) {
+            return totalRows + ' erregistroetatik ' + pageFrom + 'etik ' + pageTo +'erakoak erakusten.';
+        },
+        formatSearch: function () {
+            return 'Bilatu';
+        },
+        formatNoMatches: function () {
+            return 'Ez da emaitzarik aurkitu';
+        },
+        formatPaginationSwitch: function () {
+            return 'Ezkutatu/Erakutsi orrikatzea';
+        },
+        formatRefresh: function () {
+            return 'Eguneratu';
+        },
+        formatToggle: function () {
+            return 'Ezkutatu/Erakutsi';
+        },
+        formatColumns: function () {
+            return 'Zutabeak';
+        },
+        formatAllRows: function () {
+            return 'Guztiak';
+        }
+    };
+
+    $.extend($.fn.bootstrapTable.defaults, $.fn.bootstrapTable.locales['eu-EU']);
+
+})(jQuery);
+
+/**
  * Bootstrap Table Persian translation
  * Author: MJ Vakili <mjv.1989@Gmail.com>
  */
@@ -744,6 +816,9 @@
         formatNoMatches: function () {
             return 'Aucun résultat trouvé';
         },
+        formatPaginationSwitch: function () {
+            return 'Montrer/Masquer pagination';
+        },
         formatRefresh: function () {
             return 'Rafraîchir';
         },
@@ -755,6 +830,57 @@
         },
         formatAllRows: function () {
             return 'Tous';
+        },
+        formatExport: function () {
+            return 'Exporter les données';
+        },
+        formatClearFilters: function () {
+            return 'Vider les filtres';
+        },
+        formatMultipleSort: function() {
+            return 'Tri avancé';
+        },
+        formatAddLevel: function() {
+            return 'Ajouter un niveau';
+        },
+        formatDeleteLevel: function() {
+            return 'Supprimer un niveau';
+        },
+        formatColumn: function() {
+            return 'Colonne';
+        },
+        formatOrder: function() {
+            return 'Ordre';
+        },
+        formatSortBy: function() {
+            return 'Trier par';
+        },
+        formatThenBy: function() {
+            return 'Puis par';
+        },
+        formatSort: function() {
+            return 'Trier';
+        },
+        formatCancel: function() {
+            return 'Annuler';
+        },
+        formatDuplicateAlertTitle: function() {
+            return 'Doublon(s) détecté(s)!';
+        },
+        formatDuplicateAlertDescription: function() {
+            return 'Supprimez ou changez les colonnes dupliquées.';
+        },
+        formatSortOrders: function() {
+            return {
+                asc: 'Croissant',
+                desc: 'Décroissant'
+            };
+        },
+        formatAdvancedSearch: function() {
+            return 'Recherche avancée';
+        },
+        formatAdvancedCloseButton: function() {
+            return "Fermer";
         }
     };
 
@@ -1516,6 +1642,9 @@
         formatNoMatches: function () {
             return 'Nenájdená žiadna vyhovujúca položka';
         },
+        formatPaginationSwitch: function () {
+            return 'Skry/Zobraz stránkovanie';
+        },
         formatRefresh: function () {
             return 'Obnoviť';
         },
@@ -1524,6 +1653,15 @@
         },
         formatColumns: function () {
             return 'Stĺpce';
+        },
+        formatAllRows: function () {
+            return 'Všetky';
+        },
+        formatExport: function () {
+            return 'Exportuj dáta';
+        },
+        formatClearFilters: function () {
+            return 'Odstráň filtre';
         }
     };
 

文件差异内容过多而无法显示
+ 5 - 3
dist/bootstrap-table-locale-all.min.js


+ 11 - 6
dist/bootstrap-table.css

@@ -1,6 +1,6 @@
 /**
  * @author zhixin wen <wenzhixin2010@gmail.com>
- * version: 1.11.1
+ * version: 1.12.0
  * https://github.com/wenzhixin/bootstrap-table/
  */
 
@@ -72,7 +72,7 @@
     outline: 0 solid transparent;
 }
 
-.fixed-table-container thead th:first-child {
+.fixed-table-container thead th:first-child:not([data-not-first-th]) {
     border-left: none;
     border-top-left-radius: 4px;
     -webkit-border-top-left-radius: 4px;
@@ -133,10 +133,6 @@
     text-align: center;
 }
 
-.fixed-table-container .bs-checkbox .th-inner {
-    padding: 8px 0;
-}
-
 .fixed-table-container input[type="radio"],
 .fixed-table-container input[type="checkbox"] {
     margin: 0 auto !important;
@@ -311,3 +307,12 @@ div.fixed-table-scroll-outer {
     display: block;
     clear: both;
 }
+
+.fullscreen {
+    position: fixed;
+    top: 0;
+    left: 0;
+    z-index: 1050;
+    width: 100%!important;
+    background: #FFF;
+}

文件差异内容过多而无法显示
+ 348 - 147
dist/bootstrap-table.js


文件差异内容过多而无法显示
+ 1 - 1
dist/bootstrap-table.min.css


文件差异内容过多而无法显示
+ 5 - 4
dist/bootstrap-table.min.js


+ 1 - 1
dist/extensions/accent-neutralise/bootstrap-table-accent-neutralise.js

@@ -149,7 +149,7 @@
                 for (var key in item) {
                     key = $.isNumeric(key) ? parseInt(key, 10) : key;
                     var value = item[key],
-                        column = that.columns[$.fn.bootstrapTable.utils.getFieldIndex(that.columns, key)],
+                        column = that.columns[that.fieldsColumnsIndex[key]],
                         j = $.inArray(key, that.header.fields);
 
                     if (column && column.searchFormatter) {

文件差异内容过多而无法显示
+ 3 - 3
dist/extensions/accent-neutralise/bootstrap-table-accent-neutralise.min.js


文件差异内容过多而无法显示
+ 2 - 2
dist/extensions/angular/bootstrap-table-angular.min.js


+ 1 - 1
dist/extensions/auto-refresh/bootstrap-table-auto-refresh.css

@@ -1,3 +1,3 @@
 .btn.enabled {
-  background-color: #5bc0de;
+    background-color: #5bc0de;
 }

+ 62 - 62
dist/extensions/auto-refresh/bootstrap-table-auto-refresh.js

@@ -6,79 +6,79 @@
 
 (function ($) {
 
-  'use strict';
+    'use strict';
 
-  $.extend($.fn.bootstrapTable.defaults, {
-    autoRefresh: false,
-    autoRefreshInterval: 60,
-    autoRefreshSilent: true,
-    autoRefreshStatus: true,
-    autoRefreshFunction: null
-  });
+    $.extend($.fn.bootstrapTable.defaults, {
+        autoRefresh: false,
+        autoRefreshInterval: 60,
+        autoRefreshSilent: true,
+        autoRefreshStatus: true,
+        autoRefreshFunction: null
+    });
 
-  $.extend($.fn.bootstrapTable.defaults.icons, {
-    autoRefresh: 'glyphicon-time icon-time'
-  });
+    $.extend($.fn.bootstrapTable.defaults.icons, {
+        autoRefresh: 'glyphicon-time icon-time'
+    });
 
-  $.extend($.fn.bootstrapTable.locales, {
-    formatAutoRefresh: function() {
-      return 'Auto Refresh';
-    }
-  });
+    $.extend($.fn.bootstrapTable.locales, {
+        formatAutoRefresh: function() {
+            return 'Auto Refresh';
+        }
+    });
 
-  $.extend($.fn.bootstrapTable.defaults, $.fn.bootstrapTable.locales);
+    $.extend($.fn.bootstrapTable.defaults, $.fn.bootstrapTable.locales);
 
-  var BootstrapTable = $.fn.bootstrapTable.Constructor;
-  var _init = BootstrapTable.prototype.init;
-  var _initToolbar = BootstrapTable.prototype.initToolbar;
-  var sprintf = $.fn.bootstrapTable.utils.sprintf;
+    var BootstrapTable = $.fn.bootstrapTable.Constructor;
+    var _init = BootstrapTable.prototype.init;
+    var _initToolbar = BootstrapTable.prototype.initToolbar;
+    var sprintf = $.fn.bootstrapTable.utils.sprintf;
 
-  BootstrapTable.prototype.init = function () {
-    _init.apply(this, Array.prototype.slice.apply(arguments));
+    BootstrapTable.prototype.init = function () {
+        _init.apply(this, Array.prototype.slice.apply(arguments));
 
-    if (this.options.autoRefresh && this.options.autoRefreshStatus) {
-      var that = this;
-      this.options.autoRefreshFunction = setInterval(function () {
-        that.refresh({silent: that.options.autoRefreshSilent});
-      }, this.options.autoRefreshInterval*1000);
-    }
-  };
+        if (this.options.autoRefresh && this.options.autoRefreshStatus) {
+            var that = this;
+            this.options.autoRefreshFunction = setInterval(function () {
+                that.refresh({silent: that.options.autoRefreshSilent});
+            }, this.options.autoRefreshInterval*1000);
+        }
+    };
 
-  BootstrapTable.prototype.initToolbar = function() {
-    _initToolbar.apply(this, Array.prototype.slice.apply(arguments));
+    BootstrapTable.prototype.initToolbar = function() {
+        _initToolbar.apply(this, Array.prototype.slice.apply(arguments));
 
-    if (this.options.autoRefresh) {
-      var $btnGroup = this.$toolbar.find('>.btn-group');
-      var $btnAutoRefresh = $btnGroup.find('.auto-refresh');
+        if (this.options.autoRefresh) {
+            var $btnGroup = this.$toolbar.find('>.btn-group');
+            var $btnAutoRefresh = $btnGroup.find('.auto-refresh');
 
-      if (!$btnAutoRefresh.length) {
-        $btnAutoRefresh = $([
-          sprintf('<button class="btn btn-default auto-refresh %s" ', this.options.autoRefreshStatus ? 'enabled' : ''),
-          'type="button" ',
-          sprintf('title="%s">', this.options.formatAutoRefresh()),
-          sprintf('<i class="%s %s"></i>', this.options.iconsPrefix, this.options.icons.autoRefresh),
-          '</button>'
-        ].join('')).appendTo($btnGroup);
+            if (!$btnAutoRefresh.length) {
+                $btnAutoRefresh = $([
+                    sprintf('<button class="btn btn-default auto-refresh %s" ', this.options.autoRefreshStatus ? 'enabled' : ''),
+                    'type="button" ',
+                    sprintf('title="%s">', this.options.formatAutoRefresh()),
+                    sprintf('<i class="%s %s"></i>', this.options.iconsPrefix, this.options.icons.autoRefresh),
+                    '</button>'
+                ].join('')).appendTo($btnGroup);
 
-        $btnAutoRefresh.on('click', $.proxy(this.toggleAutoRefresh, this));
-      }
-    }
-  };
+                $btnAutoRefresh.on('click', $.proxy(this.toggleAutoRefresh, this));
+            }
+        }
+    };
 
-  BootstrapTable.prototype.toggleAutoRefresh = function() {
-    if (this.options.autoRefresh) {
-      if (this.options.autoRefreshStatus) {
-        clearInterval(this.options.autoRefreshFunction);
-        this.$toolbar.find('>.btn-group').find('.auto-refresh').removeClass('enabled');
-      } else {
-        var that = this;
-        this.options.autoRefreshFunction = setInterval(function () {
-          that.refresh({silent: that.options.autoRefreshSilent});
-        }, this.options.autoRefreshInterval*1000);
-        this.$toolbar.find('>.btn-group').find('.auto-refresh').addClass('enabled');
-      }
-      this.options.autoRefreshStatus = !this.options.autoRefreshStatus;
-    }
-  };
+    BootstrapTable.prototype.toggleAutoRefresh = function() {
+        if (this.options.autoRefresh) {
+            if (this.options.autoRefreshStatus) {
+                clearInterval(this.options.autoRefreshFunction);
+                this.$toolbar.find('>.btn-group').find('.auto-refresh').removeClass('enabled');
+            } else {
+                var that = this;
+                this.options.autoRefreshFunction = setInterval(function () {
+                    that.refresh({silent: that.options.autoRefreshSilent});
+                }, this.options.autoRefreshInterval*1000);
+                this.$toolbar.find('>.btn-group').find('.auto-refresh').addClass('enabled');
+            }
+            this.options.autoRefreshStatus = !this.options.autoRefreshStatus;
+        }
+    };
 
 })(jQuery);

文件差异内容过多而无法显示
+ 2 - 2
dist/extensions/auto-refresh/bootstrap-table-auto-refresh.min.js


文件差异内容过多而无法显示
+ 2 - 2
dist/extensions/click-edit-row/bootstrap-table-click-edit-row.min.js


+ 48 - 69
dist/extensions/cookie/bootstrap-table-cookie.js

@@ -1,7 +1,7 @@
 /**
  * @author: Dennis Hernández
  * @webSite: http://djhvscf.github.io/Blog
- * @version: v1.2.2
+ * @version: v1.2.3
  *
  * @update zhixin wen <wenzhixin2010@gmail.com>
  */
@@ -68,19 +68,18 @@
         switch(that.options.cookieStorage) {
             case 'cookieStorage':
                 document.cookie = [
-                        cookieName, '=', cookieValue,
-                        '; expires=' + that.options.cookieExpire,
-                        that.options.cookiePath ? '; path=' + that.options.cookiePath : '',
-                        that.options.cookieDomain ? '; domain=' + that.options.cookieDomain : '',
-                        that.options.cookieSecure ? '; secure' : ''
-                    ].join('');
-            break;
+                    cookieName, '=', cookieValue,
+                    '; expires=' + calculateExpiration(that.options.cookieExpire),
+                    that.options.cookiePath ? '; path=' + that.options.cookiePath : '',
+                    that.options.cookieDomain ? '; domain=' + that.options.cookieDomain : '',
+                    that.options.cookieSecure ? '; secure' : ''
+                ].join('');
             case 'localStorage':
                 localStorage.setItem(cookieName, cookieValue);
-            break;
+                break;
             case 'sessionStorage':
                 sessionStorage.setItem(cookieName, cookieValue);
-            break;
+                break;
             default:
                 return false;
         }
@@ -101,7 +100,9 @@
 
         switch(that.options.cookieStorage) {
             case 'cookieStorage':
-                return decodeURIComponent(document.cookie.replace(new RegExp('(?:(?:^|.*;)\\s*' + encodeURIComponent(cookieName).replace(/[\-\.\+\*]/g, '\\$&') + '\\s*\\=\\s*([^;]*).*$)|^.*$'), '$1')) || null;
+                var value = '; ' + document.cookie;
+                var parts = value.split('; ' + cookieName + '=');
+                return parts.length === 2 ? parts.pop().split(';').shift() : null;
             case 'localStorage':
                 return localStorage.getItem(cookieName);
             case 'sessionStorage':
@@ -113,22 +114,22 @@
 
     var deleteCookie = function (that, tableName, cookieName) {
         cookieName = tableName + '.' + cookieName;
-        
+
         switch(that.options.cookieStorage) {
             case 'cookieStorage':
                 document.cookie = [
-                        encodeURIComponent(cookieName), '=',
-                        '; expires=Thu, 01 Jan 1970 00:00:00 GMT',
-                        that.options.cookiePath ? '; path=' + that.options.cookiePath : '',
-                        that.options.cookieDomain ? '; domain=' + that.options.cookieDomain : '',
-                    ].join('');
+                    encodeURIComponent(cookieName), '=',
+                    '; expires=Thu, 01 Jan 1970 00:00:00 GMT',
+                    that.options.cookiePath ? '; path=' + that.options.cookiePath : '',
+                    that.options.cookieDomain ? '; domain=' + that.options.cookieDomain : '',
+                ].join('');
                 break;
             case 'localStorage':
                 localStorage.removeItem(cookieName);
-            break;
+                break;
             case 'sessionStorage':
                 sessionStorage.removeItem(cookieName);
-            break;
+                break;
 
         }
         return true;
@@ -136,7 +137,7 @@
 
     var calculateExpiration = function(cookieExpire) {
         var time = cookieExpire.replace(/[0-9]*/, ''); //s,mi,h,d,m,y
-        cookieExpire = cookieExpire.replace(/[A-Za-z]{1,2}}/, ''); //number
+        cookieExpire = cookieExpire.replace(/[A-Za-z]{1,2}/, ''); //number
 
         switch (time.toLowerCase()) {
             case 's':
@@ -161,8 +162,12 @@
                 cookieExpire = undefined;
                 break;
         }
-
-        return cookieExpire === undefined ? '' : '; max-age=' + cookieExpire;
+        if (!cookieExpire) {
+            return '';
+        }
+        var d = new Date();
+        d.setTime(d.getTime() + cookieExpire * 1000);
+        return d.toGMTString();
     };
 
     var initCookieFilters = function (bootstrapTable) {
@@ -170,7 +175,6 @@
             var parsedCookieFilters = JSON.parse(getCookie(bootstrapTable, bootstrapTable.options.cookieIdTable, cookieIds.filterControl));
 
             if (!bootstrapTable.options.filterControlValuesLoaded && parsedCookieFilters) {
-                bootstrapTable.options.filterControlValuesLoaded = true;
 
                 var cachedFilters = {},
                     header = getCurrentHeader(bootstrapTable),
@@ -178,8 +182,10 @@
 
                     applyCookieFilters = function (element, filteredCookies) {
                         $(filteredCookies).each(function (i, cookie) {
-                            $(element).val(cookie.text);
-                            cachedFilters[cookie.field] = cookie.text;
+                            if (cookie.text !== '') {
+                                $(element).val(cookie.text);
+                                cachedFilters[cookie.field] = cookie.text;
+                            }
                         });
                     };
 
@@ -193,6 +199,8 @@
                 });
 
                 bootstrapTable.initColumnSearch(cachedFilters);
+                bootstrapTable.options.filterControlValuesLoaded = true;
+                bootstrapTable.initServer();
             }
         }, 250);
     };
@@ -231,23 +239,20 @@
         _onSort = BootstrapTable.prototype.onSort,
         _onPageNumber = BootstrapTable.prototype.onPageNumber,
         _onPageListChange = BootstrapTable.prototype.onPageListChange,
-        _onPageFirst = BootstrapTable.prototype.onPageFirst,
         _onPagePre = BootstrapTable.prototype.onPagePre,
         _onPageNext = BootstrapTable.prototype.onPageNext,
-        _onPageLast = BootstrapTable.prototype.onPageLast,
         _toggleColumn = BootstrapTable.prototype.toggleColumn,
         _selectPage = BootstrapTable.prototype.selectPage,
         _onSearch = BootstrapTable.prototype.onSearch;
 
     BootstrapTable.prototype.init = function () {
-        var timeoutId = 0;
         this.options.filterControls = [];
         this.options.filterControlValuesLoaded = false;
 
         this.options.cookiesEnabled = typeof this.options.cookiesEnabled === 'string' ?
             this.options.cookiesEnabled.replace('[', '').replace(']', '')
                 .replace(/ /g, '').toLowerCase().split(',') :
-                this.options.cookiesEnabled;
+            this.options.cookiesEnabled;
 
         if (this.options.filterControl) {
             var that = this;
@@ -275,36 +280,12 @@
     };
 
     BootstrapTable.prototype.initServer = function () {
-        var bootstrapTable = this,
-            selectsWithoutDefaults = [],
-
-            columnHasSelectControl = function (column) {
-                return column.filterControl && column.filterControl === 'select';
-            },
-
-            columnHasDefaultSelectValues = function (column) {
-                return column.filterData && column.filterData !== 'column';
-            },
-
-            cookiesPresent = function() {
-                var cookie = JSON.parse(getCookie(bootstrapTable, bootstrapTable.options.cookieIdTable, cookieIds.filterControl));
-                return bootstrapTable.options.cookie && cookie;
-            };
-
-        selectsWithoutDefaults = $.grep(bootstrapTable.columns, function(column) {
-            return columnHasSelectControl(column) && !columnHasDefaultSelectValues(column);
-        });
-
-        // reset variable to original initServer function, so that future calls to initServer
-        // use the original function from this point on.
-        BootstrapTable.prototype.initServer = _initServer;
-
-        // early return if we don't need to populate any select values with cookie values
-        if (this.options.filterControl && cookiesPresent() && selectsWithoutDefaults.length === 0) {
-            return;
+        var bootstrapTable = this;
+        if (bootstrapTable.options.cookie && bootstrapTable.options.filterControl && !bootstrapTable.options.filterControlValuesLoaded) {
+            var cookie = JSON.parse(getCookie(bootstrapTable, bootstrapTable.options.cookieIdTable, cookieIds.filterControl));
+            if (cookie)
+                return;
         }
-
-        // call BootstrapTable.prototype.initServer
         _initServer.apply(this, Array.prototype.slice.apply(arguments));
     };
 
@@ -320,7 +301,9 @@
         }
 
         if ((this.options.cookieIdTable === '') || (this.options.cookieExpire === '') || (!cookieEnabled())) {
-            throw new Error("Configuration error. Please review the cookieIdTable, cookieExpire properties, if those properties are ok, then this browser does not support the cookies");
+            console.error("Configuration error. Please review the cookieIdTable, cookieExpire properties, if those properties are ok, then this browser does not support the cookies");
+            this.options.cookie = false; //Make sure that the cookie extension is disabled
+            return;
         }
 
         var sortOrderCookie = getCookie(this, this.options.cookieIdTable, cookieIds.sortOrder),
@@ -357,31 +340,26 @@
     BootstrapTable.prototype.onPageNumber = function () {
         _onPageNumber.apply(this, Array.prototype.slice.apply(arguments));
         setCookie(this, cookieIds.pageNumber, this.options.pageNumber);
+        return false;
     };
 
     BootstrapTable.prototype.onPageListChange = function () {
         _onPageListChange.apply(this, Array.prototype.slice.apply(arguments));
         setCookie(this, cookieIds.pageList, this.options.pageSize);
-    };
-
-    BootstrapTable.prototype.onPageFirst = function () {
-        _onPageFirst.apply(this, Array.prototype.slice.apply(arguments));
         setCookie(this, cookieIds.pageNumber, this.options.pageNumber);
+        return false;
     };
 
     BootstrapTable.prototype.onPagePre = function () {
         _onPagePre.apply(this, Array.prototype.slice.apply(arguments));
         setCookie(this, cookieIds.pageNumber, this.options.pageNumber);
+        return false;
     };
 
     BootstrapTable.prototype.onPageNext = function () {
         _onPageNext.apply(this, Array.prototype.slice.apply(arguments));
         setCookie(this, cookieIds.pageNumber, this.options.pageNumber);
-    };
-
-    BootstrapTable.prototype.onPageLast = function () {
-        _onPageLast.apply(this, Array.prototype.slice.apply(arguments));
-        setCookie(this, cookieIds.pageNumber, this.options.pageNumber);
+        return false;
     };
 
     BootstrapTable.prototype.toggleColumn = function () {
@@ -408,8 +386,9 @@
         _onSearch.apply(this, target);
 
         if ($(target[0].currentTarget).parent().hasClass('search')) {
-          setCookie(this, cookieIds.searchText, this.searchText);
+            setCookie(this, cookieIds.searchText, this.searchText);
         }
+        setCookie(this, cookieIds.pageNumber, this.options.pageNumber);
     };
 
     BootstrapTable.prototype.getCookies = function () {

文件差异内容过多而无法显示
+ 3 - 3
dist/extensions/cookie/bootstrap-table-cookie.min.js


文件差异内容过多而无法显示
+ 2 - 2
dist/extensions/copy-rows/bootstrap-table-copy-rows.min.js


+ 32 - 0
dist/extensions/defer-url/bootstrap-table-defer-url.js

@@ -0,0 +1,32 @@
+/**
+ * When using server-side processing, the default mode of operation for
+ * bootstrap-table is to simply throw away any data that currently exists in the
+ * table and make a request to the server to get the first page of data to
+ * display. This is fine for an empty table, but if you already have the first
+ * page of data displayed in the plain HTML, it is a waste of resources. As
+ * such, you can use data-defer-url instead of data-url to allow you to instruct
+ * bootstrap-table to not make that initial request, rather it will use the data
+ * already on the page.
+ *
+ * @author: Ruben Suarez
+ * @webSite: http://rubensa.eu.org
+ * @version: v1.0.0
+ */
+
+(function($) {
+    'use strict';
+
+    $.extend($.fn.bootstrapTable.defaults, {
+        deferUrl : undefined
+    });
+
+    var BootstrapTable = $.fn.bootstrapTable.Constructor, _init = BootstrapTable.prototype.init;
+
+    BootstrapTable.prototype.init = function() {
+        _init.apply(this, Array.prototype.slice.apply(arguments));
+
+        if (this.options.deferUrl) {
+            this.options.url = this.options.deferUrl;
+        }
+    }
+})(jQuery);

+ 7 - 0
dist/extensions/defer-url/bootstrap-table-defer-url.min.js

@@ -0,0 +1,7 @@
+/*
+* bootstrap-table - v1.12.0 - 2018-03-11
+* https://github.com/wenzhixin/bootstrap-table
+* Copyright (c) 2018 zhixin wen
+* Licensed MIT License
+*/
+!function(a){"use strict";a.extend(a.fn.bootstrapTable.defaults,{deferUrl:void 0});var b=a.fn.bootstrapTable.Constructor,c=b.prototype.init;b.prototype.init=function(){c.apply(this,Array.prototype.slice.apply(arguments)),this.options.deferUrl&&(this.options.url=this.options.deferUrl)}}(jQuery);

文件差异内容过多而无法显示
+ 2 - 2
dist/extensions/editable/bootstrap-table-editable.min.js


+ 56 - 8
dist/extensions/export/bootstrap-table-export.js

@@ -44,7 +44,7 @@
         _initToolbar = BootstrapTable.prototype.initToolbar;
 
     BootstrapTable.prototype.initToolbar = function () {
-        this.showToolbar = this.options.showExport;
+        this.showToolbar = this.showToolbar || this.options.showExport;
 
         _initToolbar.apply(this, Array.prototype.slice.apply(arguments));
 
@@ -93,37 +93,85 @@
                 $menu.find('li').click(function () {
                     var type = $(this).data('type'),
                         doExport = function () {
+
+                            if (!!that.options.exportFooter) {
+                                var data = that.getData();
+                                var $footerRow = that.$tableFooter.find("tr").first();
+
+                                var footerData = { };
+                                var footerHtml = [];
+
+                                $.each($footerRow.children(), function (index, footerCell) {
+
+                                    var footerCellHtml = $(footerCell).children(".th-inner").first().html();
+                                    footerData[that.columns[index].field] = footerCellHtml == '&nbsp;' ? null : footerCellHtml;
+
+                                    // grab footer cell text into cell index-based array
+                                    footerHtml.push(footerCellHtml);
+                                });
+
+                                that.append(footerData);
+
+                                var $lastTableRow = that.$body.children().last();
+
+                                $.each($lastTableRow.children(), function (index, lastTableRowCell) {
+
+                                    $(lastTableRowCell).html(footerHtml[index]);
+                                });
+                            }
+
                             that.$el.tableExport($.extend({}, that.options.exportOptions, {
                                 type: type,
                                 escape: false
                             }));
+
+                            if (!!that.options.exportFooter) {
+                                that.load(data);
+                            }
                         };
 
+                    var stateField = that.header.stateField;
+
                     if (that.options.exportDataType === 'all' && that.options.pagination) {
                         that.$el.one(that.options.sidePagination === 'server' ? 'post-body.bs.table' : 'page-change.bs.table', function () {
+                            if (stateField) {
+                                that.hideColumn(stateField);
+                            }
                             doExport();
                             that.togglePagination();
                         });
                         that.togglePagination();
                     } else if (that.options.exportDataType === 'selected') {
                         var data = that.getData(),
-                            selectedData = that.getAllSelections();
+                            selectedData = that.getSelections();
+                        if (!selectedData.length) {
+                            return;
+                        }
 
-                        // Quick fix #2220
                         if (that.options.sidePagination === 'server') {
-                            data = {total: that.options.totalRows};
-                            data[that.options.dataField] = that.getData();
-
-                            selectedData = {total: that.options.totalRows};
-                            selectedData[that.options.dataField] = that.getAllSelections();
+                            var dataServer = {total: that.options.totalRows};
+                            dataServer[that.options.dataField] = data;
+                            data = dataServer;
+                            var selectedDataServer = {total: selectedData.length};
+                            selectedDataServer[that.options.dataField] = selectedData;
+                            selectedData = selectedDataServer;
                         }
 
                         that.load(selectedData);
+                        if (stateField) {
+                            that.hideColumn(stateField);
+                        }
                         doExport();
                         that.load(data);
                     } else {
+                        if (stateField) {
+                            that.hideColumn(stateField);
+                        }
                         doExport();
                     }
+                    if (stateField) {
+                        that.showColumn(stateField);
+                    }
                 });
             }
         }

文件差异内容过多而无法显示
+ 3 - 3
dist/extensions/export/bootstrap-table-export.min.js


+ 93 - 46
dist/extensions/filter-control/bootstrap-table-filter-control.js

@@ -1,7 +1,7 @@
 /**
  * @author: Dennis Hernández
  * @webSite: http://djhvscf.github.io/Blog
- * @version: v2.1.1
+ * @version: v2.1.2
  */
 
 (function ($) {
@@ -40,7 +40,9 @@
     };
 
     var sortSelectControl = function (selectControl) {
+            selectControl = $(selectControl.get(selectControl.length - 1));
             var $opts = selectControl.find('option:gt(0)');
+
             $opts.sort(function (a, b) {
                 a = $(a).text().toLowerCase();
                 b = $(b).text().toLowerCase();
@@ -93,7 +95,7 @@
 
     var getCursorPosition = function(el) {
         if ($.fn.bootstrapTable.utils.isIEBrowser()) {
-            if ($(el).is('input')) {
+            if ($(el).is('input[type=text]')) {
                 var pos = 0;
                 if ('selectionStart' in el) {
                     pos = el.selectionStart;
@@ -113,14 +115,8 @@
         }
     };
 
-    var setCursorPosition = function (el, index) {
-        if ($.fn.bootstrapTable.utils.isIEBrowser()) {
-            if(el.setSelectionRange !== undefined) {
-                el.setSelectionRange(index, index);
-            } else {
-                $(el).val(el.value);
-            }
-        }
+    var setCursorPosition = function (el) {
+        $(el).val(el.value);
     };
 
     var copyValues = function (that) {
@@ -199,7 +195,7 @@
             that.pageTo;
 
         $.each(that.header.fields, function (j, field) {
-            var column = that.columns[$.fn.bootstrapTable.utils.getFieldIndex(that.columns, field)],
+            var column = that.columns[that.fieldsColumnsIndex[field]],
                 selectControl = $('.bootstrap-table-filter-control-' + escapeID(column.field));
 
             if (isColumnSearchableViaSelect(column) && isFilterDataNotGiven(column) && hasSelectControlElement(selectControl)) {
@@ -237,8 +233,7 @@
     var createControls = function (that, header) {
         var addedFilterControl = false,
             isVisible,
-            html,
-            timeoutId = 0;
+            html;
 
         $.each(that.columns, function (i, column) {
             isVisible = 'hidden';
@@ -257,7 +252,7 @@
                 if (column.searchable && that.options.filterTemplate[nameControl]) {
                     addedFilterControl = true;
                     isVisible = 'visible';
-                    html.push(that.options.filterTemplate[nameControl](that, column.field, isVisible, column.filterControlPlaceholder));
+                    html.push(that.options.filterTemplate[nameControl](that, column.field, isVisible, column.filterControlPlaceholder ? column.filterControlPlaceholder : "", "filter-control-" + i));
                 }
             }
 
@@ -317,15 +312,31 @@
 
         if (addedFilterControl) {
             header.off('keyup', 'input').on('keyup', 'input', function (event) {
-                clearTimeout(timeoutId);
-                timeoutId = setTimeout(function () {
+                if (that.options.searchOnEnterKey && event.keyCode !== 13) {
+                    return;
+                }
+
+                if ($.inArray(event.keyCode, [37, 38, 39, 40]) > -1) {
+                    return;
+                }
+
+                clearTimeout(event.currentTarget.timeoutId || 0);
+                event.currentTarget.timeoutId = setTimeout(function () {
                     that.onColumnSearch(event);
                 }, that.options.searchTimeOut);
             });
 
             header.off('change', 'select').on('change', 'select', function (event) {
-                clearTimeout(timeoutId);
-                timeoutId = setTimeout(function () {
+                if (that.options.searchOnEnterKey && event.keyCode !== 13) {
+                    return;
+                }
+
+                if ($.inArray(event.keyCode, [37, 38, 39, 40]) > -1) {
+                    return;
+                }
+
+                clearTimeout(event.currentTarget.timeoutId || 0);
+                event.currentTarget.timeoutId = setTimeout(function () {
                     that.onColumnSearch(event);
                 }, that.options.searchTimeOut);
             });
@@ -342,8 +353,8 @@
                     var newValue = $input.val();
 
                     if (newValue === "") {
-                        clearTimeout(timeoutId);
-                        timeoutId = setTimeout(function () {
+                        clearTimeout(event.currentTarget.timeoutId || 0);
+                        event.currentTarget.timeoutId = setTimeout(function () {
                             that.onColumnSearch(event);
                         }, that.options.searchTimeOut);
                     }
@@ -355,7 +366,7 @@
                     if (column.filterControl !== undefined && column.filterControl.toLowerCase() === 'datepicker') {
                         header.find('.date-filter-control.bootstrap-table-filter-control-' + column.field).datepicker(column.filterDatepickerOptions)
                             .on('changeDate', function (e) {
-                                $(sprintf(".%s", e.currentTarget.classList.toString().split(" ").join("."))).val(e.currentTarget.value);
+                                $(sprintf("#%s", e.currentTarget.id)).val(e.currentTarget.value);
                                 //Fired the keyup event
                                 $(e.currentTarget).keyup();
                             });
@@ -441,11 +452,13 @@
                 return sprintf('<input type="text" class="form-control date-filter-control bootstrap-table-filter-control-%s" style="width: 100%; visibility: %s">', field, isVisible);
             }
         },
+        disableControlWhenSearch: false,
+        searchOnEnterKey: false,
         //internal variables
         valuesFilterControl: []
     });
 
-    $.extend($.fn.bootstrapTable.COLUMN_DEFAULTS, {
+    $.extend($.fn.bootstrapTable.columnDefaults, {
         filterControl: undefined,
         filterData: undefined,
         filterDatepickerOptions: undefined,
@@ -467,8 +480,11 @@
             return 'Clear Filters';
         }
     });
+
     $.extend($.fn.bootstrapTable.defaults, $.fn.bootstrapTable.locales);
 
+    $.fn.bootstrapTable.methods.push('triggerSearch');
+
     var BootstrapTable = $.fn.bootstrapTable.Constructor,
         _init = BootstrapTable.prototype.init,
         _initToolbar = BootstrapTable.prototype.initToolbar,
@@ -509,13 +525,17 @@
                 }
             }).on('column-switch.bs.table', function() {
                 setValues(that);
+            }).on('load-success.bs.table', function() {
+                that.EnableControls(true);
+            }).on('load-error.bs.table', function() {
+                that.EnableControls(true);
             });
         }
         _init.apply(this, Array.prototype.slice.apply(arguments));
     };
 
     BootstrapTable.prototype.initToolbar = function () {
-        this.showToolbar = this.options.filterControl && this.options.filterShowClear;
+        this.showToolbar = this.showToolbar || this.options.filterControl && this.options.filterShowClear;
 
         _initToolbar.apply(this, Array.prototype.slice.apply(arguments));
 
@@ -525,7 +545,7 @@
 
             if (!$btnClear.length) {
                 $btnClear = $([
-                    '<button class="btn btn-default filter-show-clear" ',
+                    sprintf('<button class="btn btn-%s filter-show-clear" ', this.options.buttonsClass),
                     sprintf('type="button" title="%s">', this.options.formatClearFilters()),
                     sprintf('<i class="%s %s"></i> ', this.options.iconsPrefix, this.options.icons.clear),
                     '</button>'
@@ -559,12 +579,12 @@
         }
 
         var that = this;
-        var fp = $.isEmptyObject(this.filterColumnsPartial) ? null : this.filterColumnsPartial;
+        var fp = $.isEmptyObject(that.filterColumnsPartial) ? null : that.filterColumnsPartial;
 
         //Check partial column filter
-        this.data = fp ? $.grep(this.data, function (item, i) {
+        that.data = fp ? $.grep(that.data, function (item, i) {
             for (var key in fp) {
-                var thisColumn = that.columns[$.fn.bootstrapTable.utils.getFieldIndex(that.columns, key)];
+                var thisColumn = that.columns[that.fieldsColumnsIndex[key]];
                 var fval = fp[key].toLowerCase();
                 var value = item[key];
 
@@ -575,28 +595,27 @@
                     [value, item, i], value);
                 }
 
-                if (thisColumn.filterStrictSearch) {
-                    if (!($.inArray(key, that.header.fields) !== -1 &&
-                        (typeof value === 'string' || typeof value === 'number') &&
-                        value.toString().toLowerCase() === fval.toString().toLowerCase())) {
-                        return false;
-                    }
-                } else if (thisColumn.filterStartsWithSearch) {
-                  if (!($.inArray(key, that.header.fields) !== -1 &&
-                      (typeof value === 'string' || typeof value === 'number') &&
-                      (value + '').toLowerCase().indexOf(fval) === 0)) {
-                      return false;
-                  }
-                } else {
-                    if (!($.inArray(key, that.header.fields) !== -1 &&
-                        (typeof value === 'string' || typeof value === 'number') &&
-                        (value + '').toLowerCase().indexOf(fval) !== -1)) {
-                        return false;
+                if($.inArray(key, that.header.fields) !== -1 ) {
+                    if(typeof value === 'string' || typeof value === 'number') {
+                        if (thisColumn.filterStrictSearch) {
+                            if(value.toString().toLowerCase() === fval.toString().toLowerCase()) {
+                                return true;
+                            }
+                        } else if (thisColumn.filterStartsWithSearch) {
+                            if((value + '').toLowerCase().indexOf(fval) === 0) {
+                                return true;
+                            }
+                        } else {
+                            if((value + '').toLowerCase().indexOf(fval) !== -1) {
+                                return true;
+                            }
+                        }
                     }
                 }
             }
-            return true;
-        }) : this.data;
+
+            return false;
+        }) : that.data;
     };
 
     BootstrapTable.prototype.initColumnSearch = function(filterColumnsDefaults) {
@@ -638,6 +657,7 @@
         this.searchText += "randomText";
 
         this.options.pageNumber = 1;
+        this.EnableControls(false);
         this.onSearch(event);
         this.trigger('column-search', $field, text);
     };
@@ -694,4 +714,31 @@
             }, that.options.searchTimeOut);
         }
     };
+
+    BootstrapTable.prototype.triggerSearch = function () {
+        var header = getCurrentHeader(this),
+            searchControls = getCurrentSearchControls(this);
+
+        header.find(searchControls).each(function () {
+            var el = $(this);
+            if(el.is('select')) {
+                el.change();
+            } else {
+                el.keyup();
+            }
+        });
+    };
+
+    BootstrapTable.prototype.EnableControls = function(enable) {
+        if((this.options.disableControlWhenSearch) && (this.options.sidePagination === 'server')) {
+            var header = getCurrentHeader(this),
+            searchControls = getCurrentSearchControls(this);
+
+            if(!enable) {
+                header.find(searchControls).prop('disabled', 'disabled');
+            } else {
+                header.find(searchControls).removeProp('disabled');
+            }
+        }
+    };
 })(jQuery);

文件差异内容过多而无法显示
+ 3 - 3
dist/extensions/filter-control/bootstrap-table-filter-control.min.js


文件差异内容过多而无法显示
+ 2 - 2
dist/extensions/filter/bootstrap-table-filter.min.js


文件差异内容过多而无法显示
+ 2 - 2
dist/extensions/flat-json/bootstrap-table-flat-json.min.js


文件差异内容过多而无法显示
+ 2 - 2
dist/extensions/group-by-v2/bootstrap-table-group-by.min.js


+ 2 - 2
dist/extensions/group-by/bootstrap-table-group-by.js

@@ -32,7 +32,7 @@
             if (!row.IsParent) {
                 for (var prop in row) {
                     if (!isNaN(parseFloat(row[prop]))) {
-                        if (that.columns[$.fn.bootstrapTable.utils.getFieldIndex(that.columns, prop)].groupBySumGroup) {
+                        if (that.columns[that.fieldsColumnsIndex[prop]].groupBySumGroup) {
                             if (sumRow[prop] === undefined) {
                                 sumRow[prop] = 0;
                             }
@@ -176,7 +176,7 @@
 
                 originalRowAttr = this.options.rowAttributes;
                 this.options.rowAttributes = rowAttr;
-                this.$el.on('post-body.bs.table', function () {
+                this.$el.off('post-body.bs.table').on('post-body.bs.table', function () {
                     that.$el.treetable({
                         expandable: true,
                         onNodeExpand: function () {

文件差异内容过多而无法显示
+ 3 - 3
dist/extensions/group-by/bootstrap-table-group-by.min.js


+ 3 - 2
dist/extensions/i18n-enhance/bootstrap-table-i18n-enhance.js

@@ -16,7 +16,6 @@
         }
       });
     });
-
     this.initHeader();
     this.initBody();
     this.initToolbar();
@@ -26,9 +25,11 @@
     this.options.locale = localeId;
     this.initLocale();
     this.initPagination();
+    this.initBody();
+    this.initToolbar();
   };
 
   $.fn.bootstrapTable.methods.push('changeTitle');
   $.fn.bootstrapTable.methods.push('changeLocale');
 
-}(jQuery);
+}(jQuery);

+ 3 - 3
dist/extensions/i18n-enhance/bootstrap-table-i18n-enhance.min.js

@@ -1,7 +1,7 @@
 /*
-* bootstrap-table - v1.11.1 - 2017-02-22
+* bootstrap-table - v1.12.0 - 2018-03-11
 * https://github.com/wenzhixin/bootstrap-table
-* Copyright (c) 2017 zhixin wen
+* Copyright (c) 2018 zhixin wen
 * Licensed MIT License
 */
-!function(a){"use strict";var b=a.fn.bootstrapTable.Constructor;b.prototype.changeTitle=function(b){a.each(this.options.columns,function(c,d){a.each(d,function(a,c){c.field&&(c.title=b[c.field])})}),this.initHeader(),this.initBody(),this.initToolbar()},b.prototype.changeLocale=function(a){this.options.locale=a,this.initLocale(),this.initPagination()},a.fn.bootstrapTable.methods.push("changeTitle"),a.fn.bootstrapTable.methods.push("changeLocale")}(jQuery);
+!function(a){"use strict";var b=a.fn.bootstrapTable.Constructor;b.prototype.changeTitle=function(b){a.each(this.options.columns,function(c,d){a.each(d,function(a,c){c.field&&(c.title=b[c.field])})}),this.initHeader(),this.initBody(),this.initToolbar()},b.prototype.changeLocale=function(a){this.options.locale=a,this.initLocale(),this.initPagination(),this.initBody(),this.initToolbar()},a.fn.bootstrapTable.methods.push("changeTitle"),a.fn.bootstrapTable.methods.push("changeLocale")}(jQuery);

文件差异内容过多而无法显示
+ 2 - 2
dist/extensions/key-events/bootstrap-table-key-events.min.js


+ 1 - 1
dist/extensions/mobile/bootstrap-table-mobile.js

@@ -13,7 +13,7 @@
             $.each(that.columns, function (i, column) {
                 if (that.options.columnsHidden.indexOf(column.field) !== -1) {
                     if (column.visible !== checked) {
-                        that.toggleColumn($.fn.bootstrapTable.utils.getFieldIndex(that.columns, column.field), checked, true);
+                        that.toggleColumn(that.fieldsColumnsIndex[column.field], checked, true);
                     }
                 }
             });

文件差异内容过多而无法显示
+ 3 - 3
dist/extensions/mobile/bootstrap-table-mobile.min.js


文件差异内容过多而无法显示
+ 2 - 2
dist/extensions/multi-column-toggle/bootstrap-table-multi-toggle.min.js


+ 1 - 1
dist/extensions/multiple-search/bootstrap-table-multiple-search.js

@@ -35,7 +35,7 @@
                         for (var key in item) {
                             key = $.isNumeric(key) ? parseInt(key, 10) : key;
                             var value = item[key],
-                                column = that.columns[$.fn.bootstrapTable.utils.getFieldIndex(that.columns, key)],
+                                column = that.columns[that.fieldsColumnsIndex[key]],
                                 j = $.inArray(key, that.header.fields);
 
                             // Fix #142: search use formated data

文件差异内容过多而无法显示
+ 3 - 3
dist/extensions/multiple-search/bootstrap-table-multiple-search.min.js


文件差异内容过多而无法显示
+ 2 - 2
dist/extensions/multiple-selection-row/bootstrap-table-multiple-selection-row.min.js


+ 31 - 12
dist/extensions/multiple-sort/bootstrap-table-multiple-sort.js

@@ -11,16 +11,16 @@
     var isSingleSort = false;
 
     var showSortModal = function(that) {
-        var _selector = that.$sortModal.selector,
-            _id = _selector.substr(1);
+        var _selector = that.sortModalSelector,
+            _id = '#' + _selector;
 
         if (!$(_id).hasClass("modal")) {
-            var sModal = '  <div class="modal fade" id="' + _id + '" tabindex="-1" role="dialog" aria-labelledby="' + _id + 'Label" aria-hidden="true">';
+            var sModal = '  <div class="modal fade" id="' + _selector + '" tabindex="-1" role="dialog" aria-labelledby="' + _selector + 'Label" aria-hidden="true">';
             sModal += '         <div class="modal-dialog">';
             sModal += '             <div class="modal-content">';
             sModal += '                 <div class="modal-header">';
             sModal += '                     <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>';
-            sModal += '                     <h4 class="modal-title" id="' + _id + 'Label">' + that.options.formatMultipleSort() + '</h4>';
+            sModal += '                     <h4 class="modal-title" id="' + _selector + 'Label">' + that.options.formatMultipleSort() + '</h4>';
             sModal += '                 </div>';
             sModal += '                 <div class="modal-body">';
             sModal += '                     <div class="bootstrap-table">';
@@ -56,7 +56,7 @@
 
             $('body').append($(sModal));
 
-            that.$sortModal = $(_selector);
+            that.$sortModal = $(_id);
             var $rows = that.$sortModal.find('tbody > tr');
 
             that.$sortModal.off('click', '#add').on('click', '#add', function() {
@@ -123,16 +123,15 @@
                     that.options.sortName = '';
 
                     if (that.options.sidePagination === 'server') {
-
+                        var t = that.options.queryParams;
                         that.options.queryParams = function(params) {
                             params.multiSort = that.options.sortPriority;
-                            return params;
+                            return t(params);
                         };
-
+                        isSingleSort=false;
                         that.initServer(that.options.silentSort);
                         return;
                     }
-
                     that.onMultipleSort();
 
                 }
@@ -161,8 +160,11 @@
         }
     };
 
+    $.fn.bootstrapTable.methods.push('multipleSort');
+
     $.extend($.fn.bootstrapTable.defaults, {
         showMultiSort: false,
+        showMultiSortButton: true,
         sortPriority: null,
         onMultipleSort: function() {
             return false;
@@ -227,18 +229,28 @@
         _initToolbar = BootstrapTable.prototype.initToolbar;
 
     BootstrapTable.prototype.initToolbar = function() {
-        this.showToolbar = true;
+        this.showToolbar = this.showToolbar || this.options.showMultiSort;
         var that = this,
-            sortModalId = '#sortModal_' + this.$el.attr('id');
+            sortModalSelector = 'sortModal_' + this.$el.attr('id'),
+            sortModalId = '#' + sortModalSelector;
         this.$sortModal = $(sortModalId);
+        this.sortModalSelector = sortModalSelector;
 
         _initToolbar.apply(this, Array.prototype.slice.apply(arguments));
 
+        if (that.options.sidePagination === 'server' && !isSingleSort && that.options.sortPriority !== null){
+            var t = that.options.queryParams;
+            that.options.queryParams = function(params) {
+                params.multiSort = that.options.sortPriority;
+                return t(params);
+            };
+        }
+
         if (this.options.showMultiSort) {
             var $btnGroup = this.$toolbar.find('>.btn-group').first(),
                 $multiSortBtn = this.$toolbar.find('div.multi-sort');
 
-            if (!$multiSortBtn.length) {
+            if (!$multiSortBtn.length && this.options.showMultiSortButton) {
                 $multiSortBtn = '  <button class="multi-sort btn btn-default' + (this.options.iconSize === undefined ? '' : ' btn-' + this.options.iconSize) + '" type="button" data-toggle="modal" data-target="' + sortModalId + '" title="' + this.options.formatMultipleSort() + '">';
                 $multiSortBtn += '     <i class="' + this.options.iconsPrefix + ' ' + this.options.icons.sort + '"></i>';
                 $multiSortBtn += '</button>';
@@ -282,6 +294,13 @@
         }
     };
 
+    BootstrapTable.prototype.multipleSort = function() {
+        var that = this;
+        if (!isSingleSort && that.options.sortPriority !== null && typeof that.options.sortPriority === 'object' && that.options.sidePagination !== 'server') {
+            that.onMultipleSort();
+        }
+    };
+
     BootstrapTable.prototype.onMultipleSort = function() {
         var that = this;
 

文件差异内容过多而无法显示
+ 3 - 3
dist/extensions/multiple-sort/bootstrap-table-multiple-sort.min.js


文件差异内容过多而无法显示
+ 2 - 2
dist/extensions/natural-sorting/bootstrap-table-natural-sorting.min.js


+ 8 - 0
dist/extensions/page-jumpto/bootstrap-table-jumpto.css

@@ -0,0 +1,8 @@
+.jumpto input {
+    height: 31px;
+    width: 50px;
+    margin-left: 5px;
+    margin-right: 5px;
+    text-align: center;
+    display: inline-block;
+}

+ 50 - 0
dist/extensions/page-jumpto/bootstrap-table-jumpto.js

@@ -0,0 +1,50 @@
+/**
+ * @author Jay <jwang@dizsoft.com>
+ */
+
+(function ($) {
+    'use strict';
+    var sprintf = $.fn.bootstrapTable.utils.sprintf;
+
+    $.extend($.fn.bootstrapTable.defaults, {
+        showJumpto: false,
+        exportOptions: {}
+    });
+
+    $.extend($.fn.bootstrapTable.locales, {
+        formatJumpto: function () {
+            return 'GO';
+        }
+    });
+    $.extend($.fn.bootstrapTable.defaults, $.fn.bootstrapTable.locales);
+
+    var BootstrapTable = $.fn.bootstrapTable.Constructor,
+        _initPagination = BootstrapTable.prototype.initPagination;
+
+    BootstrapTable.prototype.initPagination = function () {
+        _initPagination.apply(this, Array.prototype.slice.apply(arguments));
+
+        if (this.options.showJumpto) {
+            var that = this,
+                $pageGroup = this.$pagination.find('ul.pagination'),
+                $jumpto = $pageGroup.find('li.jumpto');
+
+            if (!$jumpto.length) {
+                $jumpto = $([
+                    '<li class="jumpto">',
+                        '<input type="text" class="form-control">',
+                        '<button class="btn' +
+                            sprintf(' btn-%s', this.options.buttonsClass) +
+                            sprintf(' btn-%s', this.options.iconSize) +
+                            '" title="' + this.options.formatJumpto() + '" ' +
+                            ' type="button">'+this.options.formatJumpto(),
+                        '</button>',
+                    '</li>'].join('')).appendTo($pageGroup);
+
+                $jumpto.find('button').click(function () {
+                    that.selectPage(parseInt($jumpto.find('input').val()));
+                });
+            }
+        }
+    };
+})(jQuery);

文件差异内容过多而无法显示
+ 7 - 0
dist/extensions/page-jumpto/bootstrap-table-jumpto.min.js


+ 33 - 17
dist/extensions/print/bootstrap-table-print.js

@@ -24,6 +24,7 @@
         printAsFilteredAndSortedOnUI: true, //boolean, when true - print table as sorted and filtered on UI.
                                             //Please note that if true is set, along with explicit predefined print options for filtering and sorting (printFilter, printSortOrder, printSortColumn)- then they will be applied on data already filtered and sorted by UI controls.
                                             //For printing data as filtered and sorted on UI - do not set these 3 options:printFilter, printSortOrder, printSortColumn
+
         printSortColumn: undefined  , //String, set column field name to be sorted by
         printSortOrder: 'asc', //String: 'asc' , 'desc'  - relevant only if printSortColumn is set
         printPageBuilder: function(table){return printPageBuilderDefault(table)} // function, receive html <table> element as string, returns html string for printing. by default delegates to function printPageBuilderDefault(table). used for styling and adding header or footer
@@ -32,6 +33,7 @@
         printFilter: undefined, //set value to filter by in print page
         printIgnore: false, //boolean, set true to ignore this column in the print page
         printFormatter:undefined //function(value, row, index), formats the cell value for this column in the printed table. Function behaviour is similar to the 'formatter' column option
+
     });
     $.extend($.fn.bootstrapTable.defaults.icons, {
         print: 'glyphicon-print icon-share'
@@ -41,7 +43,7 @@
         _initToolbar = BootstrapTable.prototype.initToolbar;
 
     BootstrapTable.prototype.initToolbar = function () {
-        this.showToolbar = this.options.showPrint;
+        this.showToolbar = this.showToolbar || this.options.showPrint;
 
         _initToolbar.apply(this, Array.prototype.slice.apply(arguments));
 
@@ -63,28 +65,42 @@
                             return  column.printFormatter.apply(column, [value, row, i]);
                         }
                         else {
-                            return  value || "-";
+                            return  typeof value === 'undefined' ? "-" : value;
                         }
                     }
-                    function buildTable(data,columns) {
-                        var out = "<table><thead><tr>";
-                        for(var h = 0; h < columns.length; h++) {
-                            if(!columns[h].printIgnore) {
-                                out += ("<th>"+columns[h].title+"</th>");
+
+                    function buildTable(data, columnsArray) {
+                        var html = ['<table><thead>'];
+                        for (var k = 0; k < columnsArray.length; k++) {
+                            var columns = columnsArray[k];
+                            html.push('<tr>');
+                            for (var h = 0; h < columns.length; h++) {
+                                if (!columns[h].printIgnore) {
+                                    html.push(
+                                        '<th',
+                                        sprintf(' rowspan="%s"', columns[h].rowspan),
+                                        sprintf(' colspan="%s"', columns[h].colspan),
+                                        sprintf('>%s</th>', columns[h].title)
+                                    );
+                                }
                             }
+                            html.push('</tr>');
                         }
-                        out += "</tr></thead><tbody>";
-                        for(var i = 0; i < data.length; i++) {
-                            out += "<tr>";
-                            for(var j = 0; j < columns.length; j++) {
-                                if(!columns[j].printIgnore) {
-                                    out += ("<td>"+ formatValue(data[i], i, columns[j])+"</td>");
+                        html.push('</thead><tbody>');
+                        for (var i = 0; i < data.length; i++) {
+                            html.push('<tr>');
+                            for(var l = 0; l < columnsArray.length; l++) {
+                                var columns = columnsArray[l];
+                                for(var j = 0; j < columns.length; j++) {
+                                    if (!columns[j].printIgnore && columns[j].field) {
+                                        html.push('<td>', formatValue(data[i], i, columns[j]), '</td>');
+                                    }
                                 }
                             }
-                            out += "</tr>";
+                            html.push('</tr>');
                         }
-                        out += "</tbody></table>";
-                        return out;
+                        html.push('</tbody></table>');
+                        return html.join('');
                     }
                     function sortRows(data,colName,sortOrder) {
                         if(!colName){
@@ -119,7 +135,7 @@
                     var doPrint = function (data) {
                         data=filterRows(data,getColumnFilters(that.options.columns));
                         data=sortRows(data,that.options.printSortColumn,that.options.printSortOrder);
-                        var table=buildTable(data,that.options.columns[0]);
+                        var table=buildTable(data,that.options.columns);
                         var newWin = window.open("");
                         newWin.document.write(that.options.printPageBuilder.call(this, table));
                         newWin.print();

文件差异内容过多而无法显示
+ 3 - 3
dist/extensions/print/bootstrap-table-print.min.js


+ 2 - 2
dist/extensions/reorder-columns/bootstrap-table-reorder-columns.js

@@ -141,8 +141,8 @@
                     }
                 }
 
-                for (var i = 0; i < ths.length; i++ ) {
-                    columnIndex = $.fn.bootstrapTable.utils.getFieldIndex(that.columns, ths[i]);
+                for (var i = 0; i < this.length; i++ ) {
+                    columnIndex = that.fieldsColumnsIndex[ths[i]];
                     if (columnIndex !== -1) {
                         that.columns[columnIndex].fieldIndex = i;
                         columns.push(that.columns[columnIndex]);

文件差异内容过多而无法显示
+ 3 - 3
dist/extensions/reorder-columns/bootstrap-table-reorder-columns.min.js


文件差异内容过多而无法显示
+ 2 - 2
dist/extensions/reorder-rows/bootstrap-table-reorder-rows.min.js


+ 2 - 1
dist/extensions/resizable/bootstrap-table-resizable.js

@@ -20,7 +20,8 @@
             hoverCursor: that.options.hoverCursor,
             dragCursor: that.options.dragCursor,
             onResize: that.onResize,
-            onDrag: that.options.onResizableDrag
+            onDrag: that.options.onResizableDrag,
+            resizeMode: that.options.resizeMode
         });
     };
 

文件差异内容过多而无法显示
+ 3 - 3
dist/extensions/resizable/bootstrap-table-resizable.min.js


+ 136 - 107
dist/extensions/select2-filter/bootstrap-table-select2-filter.js

@@ -1,9 +1,9 @@
 /**
  * @author: Jewway
- * @version: v1.0.0
+ * @version: v1.1.1
  */
 
-!function ($) {
+! function ($) {
   'use strict';
 
   function getCurrentHeader(that) {
@@ -15,23 +15,26 @@
     return header;
   }
 
-  function getFilterFields(that) {
-    return getCurrentHeader(that).find('[data-filter-field]');
-  }
-
-  function setFilterValues(that) {
-    var $filterElms = getFilterFields(that);
+  function initFilterValues(that) {
     if (!$.isEmptyObject(that.filterColumnsPartial)) {
-      $filterElms.each(function (index, ele) {
-        var $ele = $(ele),
-            field = $ele.attr('data-filter-field'),
-            value = that.filterColumnsPartial[field];
+      var $header = getCurrentHeader(that);
 
-        if ($ele.is("select")) {
-          $ele.val(value).trigger('change');
-        }
-        else {
-          $ele.val(value);
+      $.each(that.columns, function (idx, column) {
+        var value = that.filterColumnsPartial[column.field];
+
+        if (column.filter) {
+          if (column.filter.setFilterValue) {
+            var $filter = $header.find('[data-field=' + column.field + '] .filter');
+            column.filter.setFilterValue($filter, column.field, value);
+          } else {
+            var $ele = $header.find('[data-filter-field=' + column.field + ']');
+            switch (column.filter.type) {
+              case 'input':
+                $ele.val(value);
+              case 'select':
+                $ele.val(value).trigger('change');
+            }
+          }
         }
       });
     }
@@ -39,89 +42,109 @@
 
   function createFilter(that, header) {
     var enableFilter = false,
-        isVisible,
-        html,
-        timeoutId = 0;
+      isVisible,
+      html,
+      timeoutId = 0;
 
     $.each(that.columns, function (i, column) {
       isVisible = 'hidden';
-      html = [];
+      html = null;
 
       if (!column.visible) {
         return;
       }
 
       if (!column.filter) {
-        html.push('<div class="no-filter"></div>');
+        html = $('<div class="no-filter"></div>');
       } else {
         var filterClass = column.filter.class ? ' ' + column.filter.class : '';
-        html.push('<div style="margin: 0px 2px 2px 2px;" class="filter' + filterClass + '">');
+        html = $('<div style="margin: 0px 2px 2px 2px;" class="filter' + filterClass + '">');
 
         if (column.searchable) {
           enableFilter = true;
           isVisible = 'visible'
         }
 
-        switch (column.filter.type.toLowerCase()) {
-          case 'input' :
-            html.push('<input type="text" data-filter-field="' + column.field + '" style="width: 100%; visibility:' + isVisible + '">');
-            break;
-          case 'select':
-            html.push('<select data-filter-field="' + column.field + '" style="width: 100%; visibility:' + isVisible + '"></select>');
-            break;
+        if (column.filter.template) {
+          html.append(column.filter.template(that, column, isVisible));
+        } else {
+          var $filter = $(that.options.filterTemplate[column.filter.type.toLowerCase()](that, column, isVisible));
+
+          switch (column.filter.type) {
+            case 'input':
+              var cpLock = true;
+              $filter.off('compositionstart').on('compositionstart', function (event) {
+                cpLock = false;
+              });
+
+              $filter.off('compositionend').on('compositionend', function (event) {
+                cpLock = true;
+                var $input = $(this);
+                clearTimeout(timeoutId);
+                timeoutId = setTimeout(function () {
+                  that.onColumnSearch(event, column.field, $input.val());
+                }, that.options.searchTimeOut);
+              });
+
+              $filter.off('keyup').on('keyup', function (event) {
+                if (cpLock) {
+                  var $input = $(this);
+                  clearTimeout(timeoutId);
+                  timeoutId = setTimeout(function () {
+                    that.onColumnSearch(event, column.field, $input.val());
+                  }, that.options.searchTimeOut);
+                }
+              });
+
+              $filter.off('mouseup').on('mouseup', function (event) {
+                var $input = $(this),
+                  oldValue = $input.val();
+
+                if (oldValue === "") {
+                  return;
+                }
+
+                setTimeout(function () {
+                  var newValue = $input.val();
+
+                  if (newValue === "") {
+                    clearTimeout(timeoutId);
+                    timeoutId = setTimeout(function () {
+                      that.onColumnSearch(event, column.field, newValue);
+                    }, that.options.searchTimeOut);
+                  }
+                }, 1);
+              });
+              break;
+            case 'select':
+              $filter.on('select2:select', function (event) {
+                that.onColumnSearch(event, column.field, $(this).val());
+              });
+
+              $filter.on("select2:unselecting", function (event) {
+                var $select2 = $(this);
+                event.preventDefault();
+                $select2.val(null).trigger('change');
+                that.searchText = undefined;
+                that.onColumnSearch(event, column.field, $select2.val());
+              });
+              break;
+          }
+
+          html.append($filter);
         }
       }
 
       $.each(header.children().children(), function (i, tr) {
         tr = $(tr);
         if (tr.data('field') === column.field) {
-          tr.find('.fht-cell').append(html.join(''));
+          tr.find('.fht-cell').append(html);
           return false;
         }
       });
     });
 
-    if (enableFilter) {
-      var $inputs = header.find('input'),
-          $selects = header.find('select');
-
-
-      if ($inputs.length > 0) {
-        $inputs.off('keyup').on('keyup', function (event) {
-          clearTimeout(timeoutId);
-          timeoutId = setTimeout(function () {
-            that.onColumnSearch(event);
-          }, that.options.searchTimeOut);
-        });
-
-
-        $inputs.off('mouseup').on('mouseup', function (event) {
-          var $input = $(this),
-              oldValue = $input.val();
-
-          if (oldValue === "") {
-            return;
-          }
-
-          setTimeout(function () {
-            var newValue = $input.val();
-
-            if (newValue === "") {
-              clearTimeout(timeoutId);
-              timeoutId = setTimeout(function () {
-                that.onColumnSearch(event);
-              }, that.options.searchTimeOut);
-            }
-          }, 1);
-        });
-      }
-
-      if ($selects.length > 0) {
-        $selects.on('select2:select', function (event) {
-          that.onColumnSearch(event);
-        });
-      }
-    } else {
+    if (!enableFilter) {
       header.find('.filter').hide();
     }
   }
@@ -131,11 +154,9 @@
 
     $.each(that.columns, function (idx, column) {
       if (column.filter && column.filter.type === 'select') {
-        var $selectEle = $header.find('select[data-filter-field=' + column.field + ']');
+        var $selectEle = $header.find('select[data-filter-field="' + column.field + '"]');
 
         if ($selectEle.length > 0 && !$selectEle.data().select2) {
-          column.filter.data.unshift("");
-
           var select2Opts = {
             placeholder: "",
             allowClear: true,
@@ -144,12 +165,6 @@
           };
 
           $selectEle.select2(select2Opts);
-          $selectEle.on("select2:unselecting", function (event) {
-            event.preventDefault();
-            $selectEle.val(null).trigger('change');
-            that.searchText = undefined;
-            that.onColumnSearch(event);
-          });
         }
       }
     });
@@ -157,23 +172,42 @@
 
   $.extend($.fn.bootstrapTable.defaults, {
     filter: false,
-    filterValues: {}
+    filterValues: {},
+    filterTemplate: {
+      input: function (instance, column, isVisible) {
+        return '<input type="text" class="form-control" data-filter-field="' + column.field + '" style="width: 100%; visibility:' + isVisible + '">';
+      },
+      select: function (instance, column, isVisible) {
+        return '<select data-filter-field="' + column.field + '" style="width: 100%; visibility:' + isVisible + '"></select>';
+      }
+    },
+    onColumnSearch: function (field, text) {
+      return false;
+    }
   });
 
   $.extend($.fn.bootstrapTable.COLUMN_DEFAULTS, {
     filter: undefined
   });
 
+  $.extend($.fn.bootstrapTable.Constructor.EVENTS, {
+    'column-search.bs.table': 'onColumnSearch'
+  });
+
   var BootstrapTable = $.fn.bootstrapTable.Constructor,
-      _init = BootstrapTable.prototype.init,
-      _initHeader = BootstrapTable.prototype.initHeader,
-      _initSearch = BootstrapTable.prototype.initSearch;
+    _init = BootstrapTable.prototype.init,
+    _initHeader = BootstrapTable.prototype.initHeader,
+    _initSearch = BootstrapTable.prototype.initSearch;
 
   BootstrapTable.prototype.init = function () {
     //Make sure that the filtercontrol option is set
     if (this.options.filter) {
       var that = this;
 
+      if (that.options.filterTemplate) {
+        that.options.filterTemplate = $.extend({}, $.fn.bootstrapTable.defaults.filterTemplate, that.options.filterTemplate);
+      }
+
       if (!$.isEmptyObject(that.options.filterValues)) {
         that.filterColumnsPartial = that.options.filterValues;
         that.options.filterValues = {};
@@ -197,10 +231,10 @@
         initSelect2(that);
         clearTimeout(timeoutId);
         timeoutId = setTimeout(function () {
-          setFilterValues(that);
+          initFilterValues(that);
         }, that.options.searchTimeOut - 1000);
       }).on('column-switch.bs.table', function (field, checked) {
-        setFilterValues(that);
+        initFilterValues(that);
       });
     }
 
@@ -215,23 +249,20 @@
   };
 
   BootstrapTable.prototype.initSearch = function () {
-    _initSearch.apply(this, Array.prototype.slice.apply(arguments));
-
     var that = this,
-        filterValues = that.filterColumnsPartial;
+      filterValues = that.filterColumnsPartial;
 
     // Filter for client
     if (that.options.sidePagination === 'client') {
       this.data = $.grep(this.data, function (row, idx) {
         for (var field in filterValues) {
-          var column = that.columns[$.fn.bootstrapTable.utils.getFieldIndex(that.columns, field)],
-              filterValue = filterValues[field].toLowerCase(),
-              rowValue = row[field];
+          var column = that.columns[that.fieldsColumnsIndex[field]],
+            filterValue = filterValues[field].toLowerCase(),
+            rowValue = row[field];
 
           rowValue = $.fn.bootstrapTable.utils.calculateObjectValue(
-              that.header,
-              that.header.formatters[$.inArray(field, that.header.fields)],
-              [rowValue, row, idx], rowValue);
+            that.header,
+            that.header.formatters[$.inArray(field, that.header.fields)], [rowValue, row, idx], rowValue);
 
           if (column.filterStrictSearch) {
             if (!($.inArray(field, that.header.fields) !== -1 &&
@@ -251,12 +282,11 @@
         return true;
       });
     }
-  };
 
-  BootstrapTable.prototype.onColumnSearch = function (event) {
-    var field = $(event.currentTarget).attr('data-filter-field'),
-        value = $.trim($(event.currentTarget).val());
+    _initSearch.apply(this, Array.prototype.slice.apply(arguments));
+  };
 
+  BootstrapTable.prototype.onColumnSearch = function (event, field, value) {
     if ($.isEmptyObject(this.filterColumnsPartial)) {
       this.filterColumnsPartial = {};
     }
@@ -269,14 +299,13 @@
 
     this.options.pageNumber = 1;
     this.onSearch(event);
+    this.trigger('column-search', field, value);
   };
 
-  BootstrapTable.prototype.setFilterData = function (field, data) {
+  BootstrapTable.prototype.setSelect2Data = function (field, data) {
     var that = this,
-        $header = getCurrentHeader(that),
-        $selectEle = $header.find('select[data-filter-field=\"' + field + '\"]');
-
-    data.unshift("");
+      $header = getCurrentHeader(that),
+      $selectEle = $header.find('select[data-filter-field=\"' + field + '\"]');
     $selectEle.empty();
     $selectEle.select2({
       data: data,
@@ -297,7 +326,7 @@
     this.filterColumnsPartial = values;
   };
 
-  $.fn.bootstrapTable.methods.push('setFilterData');
+  $.fn.bootstrapTable.methods.push('setSelect2Data');
   $.fn.bootstrapTable.methods.push('setFilterValues');
 
-}(jQuery);
+}(jQuery);

文件差异内容过多而无法显示
+ 3 - 3
dist/extensions/select2-filter/bootstrap-table-select2-filter.min.js


+ 11 - 4
dist/extensions/sticky-header/bootstrap-table-sticky-header.js

@@ -1,8 +1,9 @@
 /**
  * @author vincent loh <vincent.ml@gmail.com>
- * @version: v1.0.0
+ * @version: v1.1.0
  * https://github.com/vinzloh/bootstrap-table/
  * Sticky header for bootstrap-table
+ * @update J Manuel Corona <jmcg92@gmail.com>
  */
 
 (function ($) {
@@ -12,6 +13,12 @@
     $.extend($.fn.bootstrapTable.defaults, {
         stickyHeader: false
     });
+    
+    var bootstrapVersion = 3;
+    try {
+        bootstrapVersion = parseInt($.fn.dropdown.Constructor.VERSION, 10);
+    } catch (e) { }
+    var hidden_class = bootstrapVersion > 3 ? 'd-none' : 'hidden';
 
     var BootstrapTable = $.fn.bootstrapTable.Constructor,
         _initHeader = BootstrapTable.prototype.initHeader;
@@ -32,7 +39,7 @@
             anchor_end_id = header_id +'_sticky_anchor_end';
         // add begin and end anchors to track table position
 
-        table.before(sprintf('<div id="%s" class="hidden"></div>', sticky_header_container_id));
+        table.before(sprintf('<div id="%s" class="%s"></div>', sticky_header_container_id, hidden_class));
         table.before(sprintf('<div id="%s"></div>', anchor_begin_id));
         table.after(sprintf('<div id="%s"></div>', anchor_end_id));
 
@@ -82,7 +89,7 @@
                     $(item).css('min-width', $('#'+table_header_id+' tr').eq(0).find('th').eq(index).css('width'));
                 });
                 // match bootstrap table style
-                $("#"+sticky_header_container_id).removeClass('hidden').addClass("fix-sticky fixed-table-container") ;
+                $("#"+sticky_header_container_id).removeClass(hidden_class).addClass("fix-sticky fixed-table-container") ;
                 // stick it in position
                 $("#"+sticky_header_container_id).css('top', header_height + 'px');
                 // create scrollable container for header
@@ -93,7 +100,7 @@
                 match_position_x(event);
             } else {
                 // hide sticky
-                $("#"+sticky_header_container_id).removeClass("fix-sticky").addClass('hidden');
+                $("#"+sticky_header_container_id).removeClass("fix-sticky").addClass(hidden_class);
             }
 
         }

文件差异内容过多而无法显示
+ 3 - 3
dist/extensions/sticky-header/bootstrap-table-sticky-header.min.js


文件差异内容过多而无法显示
+ 2 - 2
dist/extensions/toolbar/bootstrap-table-toolbar.min.js


文件差异内容过多而无法显示
+ 2 - 2
dist/extensions/tree-column/bootstrap-table-tree-column.min.js


+ 95 - 0
dist/extensions/treegrid/bootstrap-table-treegrid.js

@@ -0,0 +1,95 @@
+/**
+ * @author: YL
+ * @version: v1.0.0
+ */
+!function ($) {
+    'use strict';
+    $.extend($.fn.bootstrapTable.defaults, {
+        treeShowField: null,
+        idField: 'id',
+        parentIdField: 'pid',
+        onGetNodes: function (row, data) {
+            var that = this;
+            var nodes = [];
+            $.each(data, function (i, item) {
+                if (row[that.options.idField] === item[that.options.parentIdField]) {
+                    nodes.push(item);
+                }
+            });
+            return nodes;
+        },
+        onCheckRoot: function (row, data) {
+            var that = this;
+            return !row[that.options.parentIdField];
+        }
+    });
+
+    var BootstrapTable = $.fn.bootstrapTable.Constructor,
+        _initRow = BootstrapTable.prototype.initRow,
+        _initHeader = BootstrapTable.prototype.initHeader;
+
+    // td
+    BootstrapTable.prototype.initHeader = function () {
+        var that = this;
+        _initHeader.apply(that, Array.prototype.slice.apply(arguments));
+        var treeShowField = that.options.treeShowField;
+        if (treeShowField) {
+            $.each(this.header.fields, function (i, field) {
+                if (treeShowField === field) {
+                    that.treeEnable = true;
+                    return false;
+                }
+            });
+        }
+    };
+
+    var initTr = function (item, idx, data, parentDom) {
+        var that = this;
+        var nodes = that.options.onGetNodes.apply(that, [item, data]);
+        item._nodes = nodes;
+        parentDom.append(_initRow.apply(that, [item, idx, data, parentDom]));
+
+        // init sub node
+        var len = nodes.length - 1;
+        for (var i = 0; i <= len; i++) {
+            var node = nodes[i];
+            node._level = item._level + 1;
+            node._parent = item;
+            if (i === len)
+                node._last = 1;
+            // jquery.treegrid.js
+            that.options.rowStyle = function (item, idx) {
+                var id = item[that.options.idField] ? item[that.options.idField] : 0;
+                var pid = item[that.options.parentIdField] ? item[that.options.parentIdField] : 0;
+                return {
+                    classes: 'treegrid-' + id + ' treegrid-parent-' + pid
+                };
+            };
+            initTr.apply(that, [node, $.inArray(node, data), data, parentDom]);
+        }
+    };
+
+    // tr
+    BootstrapTable.prototype.initRow = function (item, idx, data, parentDom) {
+        var that = this;
+        if (that.treeEnable) {
+            // init root node
+            if (that.options.onCheckRoot.apply(that, [item, data])) {
+                if (item._level === undefined) {
+                    item._level = 0;
+                }
+                // jquery.treegrid.js
+                that.options.rowStyle = function (item, idx) {
+                    var x = item[that.options.idField] ? item[that.options.idField] : 0;
+                    return {
+                        classes: 'treegrid-' + x
+                    };
+                };
+                initTr.apply(that, [item, idx, data, parentDom]);
+                return true;
+            }
+            return false;
+        }
+        return _initRow.apply(that, Array.prototype.slice.apply(arguments));
+    };
+}(jQuery);

文件差异内容过多而无法显示
+ 7 - 0
dist/extensions/treegrid/bootstrap-table-treegrid.min.js


文件差异内容过多而无法显示
+ 2 - 2
dist/locale/bootstrap-table-af-ZA.min.js


文件差异内容过多而无法显示
+ 2 - 2
dist/locale/bootstrap-table-ar-SA.min.js


文件差异内容过多而无法显示
+ 2 - 2
dist/locale/bootstrap-table-ca-ES.min.js


文件差异内容过多而无法显示
+ 2 - 2
dist/locale/bootstrap-table-cs-CZ.min.js


文件差异内容过多而无法显示
+ 2 - 2
dist/locale/bootstrap-table-da-DK.min.js


+ 14 - 5
dist/locale/bootstrap-table-de-DE.js

@@ -10,19 +10,22 @@
       return 'Lade, bitte warten...';
     },
     formatRecordsPerPage: function (pageNumber) {
-      return pageNumber + ' Einträge pro Seite.';
+      return pageNumber + ' Zeilen pro Seite.';
     },
     formatShowingRows: function (pageFrom, pageTo, totalRows) {
-      return 'Zeige Zeile ' + pageFrom + ' bis ' + pageTo + ' von ' + totalRows + ' Zeile' + ((totalRows > 1) ? "n" : "")+".";
+      return 'Zeige Zeile ' + pageFrom + ' bis ' + pageTo + ' von ' + totalRows + ' Zeilen' + ((totalRows > 1) ? "n" : "")+".";
     },
     formatDetailPagination: function (totalRows) {
       return 'Zeige ' + totalRows + ' Zeile' + ((totalRows > 1) ? "n" : "")+".";
     },
     formatSearch: function () {
-      return 'Suchen ...';
+      return 'Suchen';
     },
     formatNoMatches: function () {
-      return 'Keine passenden Ergebnisse gefunden.';
+      return 'Keine passenden Ergebnisse gefunden';
+    },
+    formatPaginationSwitch: function () {
+      return 'Verstecke/Zeige Nummerierung';
     },
     formatRefresh: function () {
       return 'Neu laden';
@@ -35,7 +38,13 @@
     },
     formatAllRows: function () {
       return 'Alle';
-    }
+    },
+    formatExport: function () {
+      return 'Datenexport';
+    },
+    formatClearFilters: function () {
+      return 'Lösche Filter';
+     }
   };
 
     $.extend($.fn.bootstrapTable.defaults, $.fn.bootstrapTable.locales['de-DE']);

文件差异内容过多而无法显示
+ 3 - 3
dist/locale/bootstrap-table-de-DE.min.js


文件差异内容过多而无法显示
+ 2 - 2
dist/locale/bootstrap-table-el-GR.min.js


文件差异内容过多而无法显示
+ 2 - 2
dist/locale/bootstrap-table-en-US.min.js


文件差异内容过多而无法显示
+ 2 - 2
dist/locale/bootstrap-table-es-AR.min.js


文件差异内容过多而无法显示
+ 2 - 2
dist/locale/bootstrap-table-es-CL.min.js


文件差异内容过多而无法显示
+ 2 - 2
dist/locale/bootstrap-table-es-CR.min.js


文件差异内容过多而无法显示
+ 2 - 2
dist/locale/bootstrap-table-es-ES.min.js


+ 20 - 1
dist/locale/bootstrap-table-es-MX.js

@@ -2,6 +2,7 @@
  * Bootstrap Table Spanish (México) translation (Obtenido de traducción de Argentina)
  * Author: Felix Vera (felix.vera@gmail.com) 
  * Copiado: Mauricio Vera (mauricioa.vera@gmail.com)
+ * Revisión: J Manuel Corona (jmcg92@gmail.com) (13/Feb/2018).
  */
 (function ($) {
     'use strict';
@@ -16,11 +17,29 @@
         formatShowingRows: function (pageFrom, pageTo, totalRows) {
             return 'Mostrando ' + pageFrom + ' a ' + pageTo + ' de ' + totalRows + ' filas';
         },
+        formatDetailPagination: function (totalRows) {
+            return 'Mostrando ' + totalRows + ' filas';
+        },
         formatSearch: function () {
             return 'Buscar';
         },
         formatNoMatches: function () {
-            return 'No se encontraron registros';
+            return 'No se encontraron registros que coincidan';
+        },
+        formatPaginationSwitch: function () {
+            return 'Mostrar/ocultar paginación';
+        },
+        formatRefresh: function () {
+            return 'Actualizar';
+        },
+        formatToggle: function () {
+            return 'Cambiar vista';
+        },
+        formatFullscreen: function () {
+            return 'Pantalla completa';
+        },
+        formatColumns: function () {
+            return 'Columnas';
         },
         formatAllRows: function () {
             return 'Todo';

文件差异内容过多而无法显示
+ 3 - 3
dist/locale/bootstrap-table-es-MX.min.js


文件差异内容过多而无法显示
+ 2 - 2
dist/locale/bootstrap-table-es-NI.min.js


文件差异内容过多而无法显示
+ 2 - 2
dist/locale/bootstrap-table-es-SP.min.js


文件差异内容过多而无法显示
+ 2 - 2
dist/locale/bootstrap-table-et-EE.min.js


+ 43 - 0
dist/locale/bootstrap-table-eu-EU.js

@@ -0,0 +1,43 @@
+/**
+ * Bootstrap Table Basque (Basque Country) translation
+ * Author: Iker Ibarguren Berasaluze<ikerib@gmail.com>
+ */
+(function ($) {
+    'use strict';
+
+    $.fn.bootstrapTable.locales['eu-EU'] = {
+        formatLoadingMessage: function () {
+            return 'Itxaron mesedez...';
+        },
+        formatRecordsPerPage: function (pageNumber) {
+            return pageNumber + ' emaitza orriko.';
+        },
+        formatShowingRows: function (pageFrom, pageTo, totalRows) {
+            return totalRows + ' erregistroetatik ' + pageFrom + 'etik ' + pageTo +'erakoak erakusten.';
+        },
+        formatSearch: function () {
+            return 'Bilatu';
+        },
+        formatNoMatches: function () {
+            return 'Ez da emaitzarik aurkitu';
+        },
+        formatPaginationSwitch: function () {
+            return 'Ezkutatu/Erakutsi orrikatzea';
+        },
+        formatRefresh: function () {
+            return 'Eguneratu';
+        },
+        formatToggle: function () {
+            return 'Ezkutatu/Erakutsi';
+        },
+        formatColumns: function () {
+            return 'Zutabeak';
+        },
+        formatAllRows: function () {
+            return 'Guztiak';
+        }
+    };
+
+    $.extend($.fn.bootstrapTable.defaults, $.fn.bootstrapTable.locales['eu-EU']);
+
+})(jQuery);

文件差异内容过多而无法显示
+ 7 - 0
dist/locale/bootstrap-table-eu-EU.min.js


文件差异内容过多而无法显示
+ 2 - 2
dist/locale/bootstrap-table-fa-IR.min.js


+ 2 - 2
dist/locale/bootstrap-table-fr-BE.min.js

@@ -1,7 +1,7 @@
 /*
-* bootstrap-table - v1.11.1 - 2017-02-22
+* bootstrap-table - v1.12.0 - 2018-03-11
 * https://github.com/wenzhixin/bootstrap-table
-* Copyright (c) 2017 zhixin wen
+* Copyright (c) 2018 zhixin wen
 * Licensed MIT License
 */
 !function(a){"use strict";a.fn.bootstrapTable.locales["fr-BE"]={formatLoadingMessage:function(){return"Chargement en cours..."},formatRecordsPerPage:function(a){return a+" entrées par page"},formatShowingRows:function(a,b,c){return"Affiche de"+a+" à "+b+" sur "+c+" lignes"},formatSearch:function(){return"Recherche"},formatNoMatches:function(){return"Pas de fichiers trouvés"}},a.extend(a.fn.bootstrapTable.defaults,a.fn.bootstrapTable.locales["fr-BE"])}(jQuery);

+ 54 - 0
dist/locale/bootstrap-table-fr-FR.js

@@ -22,6 +22,9 @@
         formatNoMatches: function () {
             return 'Aucun résultat trouvé';
         },
+        formatPaginationSwitch: function () {
+            return 'Montrer/Masquer pagination';
+        },
         formatRefresh: function () {
             return 'Rafraîchir';
         },
@@ -33,6 +36,57 @@
         },
         formatAllRows: function () {
             return 'Tous';
+        },
+        formatExport: function () {
+            return 'Exporter les données';
+        },
+        formatClearFilters: function () {
+            return 'Vider les filtres';
+        },
+        formatMultipleSort: function() {
+            return 'Tri avancé';
+        },
+        formatAddLevel: function() {
+            return 'Ajouter un niveau';
+        },
+        formatDeleteLevel: function() {
+            return 'Supprimer un niveau';
+        },
+        formatColumn: function() {
+            return 'Colonne';
+        },
+        formatOrder: function() {
+            return 'Ordre';
+        },
+        formatSortBy: function() {
+            return 'Trier par';
+        },
+        formatThenBy: function() {
+            return 'Puis par';
+        },
+        formatSort: function() {
+            return 'Trier';
+        },
+        formatCancel: function() {
+            return 'Annuler';
+        },
+        formatDuplicateAlertTitle: function() {
+            return 'Doublon(s) détecté(s)!';
+        },
+        formatDuplicateAlertDescription: function() {
+            return 'Supprimez ou changez les colonnes dupliquées.';
+        },
+        formatSortOrders: function() {
+            return {
+                asc: 'Croissant',
+                desc: 'Décroissant'
+            };
+        },
+        formatAdvancedSearch: function() {
+            return 'Recherche avancée';
+        },
+        formatAdvancedCloseButton: function() {
+            return "Fermer";
         }
     };
 

文件差异内容过多而无法显示
+ 3 - 3
dist/locale/bootstrap-table-fr-FR.min.js


文件差异内容过多而无法显示
+ 2 - 2
dist/locale/bootstrap-table-he-IL.min.js


文件差异内容过多而无法显示
+ 2 - 2
dist/locale/bootstrap-table-hr-HR.min.js


文件差异内容过多而无法显示
+ 2 - 2
dist/locale/bootstrap-table-hu-HU.min.js


文件差异内容过多而无法显示
+ 2 - 2
dist/locale/bootstrap-table-id-ID.min.js


文件差异内容过多而无法显示
+ 2 - 2
dist/locale/bootstrap-table-it-IT.min.js


文件差异内容过多而无法显示
+ 2 - 2
dist/locale/bootstrap-table-ja-JP.min.js


文件差异内容过多而无法显示
+ 2 - 2
dist/locale/bootstrap-table-ka-GE.min.js


文件差异内容过多而无法显示
+ 2 - 2
dist/locale/bootstrap-table-ko-KR.min.js


文件差异内容过多而无法显示
+ 2 - 2
dist/locale/bootstrap-table-ms-MY.min.js


+ 0 - 0
dist/locale/bootstrap-table-nb-NO.min.js


部分文件因为文件数量过多而无法显示