bootstrap-table-rails 1.12.2 → 1.13.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (92) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +10 -12
  3. data/lib/bootstrap-table-rails/version.rb +1 -1
  4. data/vendor/assets/javascripts/bootstrap-table/bootstrap-table-locale-all.js +2534 -1841
  5. data/vendor/assets/javascripts/bootstrap-table/bootstrap-table.css +202 -283
  6. data/vendor/assets/javascripts/bootstrap-table/bootstrap-table.js +3114 -2555
  7. data/vendor/assets/javascripts/bootstrap-table/extensions/accent-neutralise/bootstrap-table-accent-neutralise.js +247 -152
  8. data/vendor/assets/javascripts/bootstrap-table/extensions/addrbar/bootstrap-table-addrbar.js +271 -0
  9. data/vendor/assets/javascripts/bootstrap-table/extensions/auto-refresh/bootstrap-table-auto-refresh.js +77 -68
  10. data/vendor/assets/javascripts/bootstrap-table/extensions/cookie/bootstrap-table-cookie.js +452 -315
  11. data/vendor/assets/javascripts/bootstrap-table/extensions/copy-rows/bootstrap-table-copy-rows.js +105 -86
  12. data/vendor/assets/javascripts/bootstrap-table/extensions/defer-url/bootstrap-table-defer-url.js +44 -27
  13. data/vendor/assets/javascripts/bootstrap-table/extensions/editable/bootstrap-table-editable.js +229 -115
  14. data/vendor/assets/javascripts/bootstrap-table/extensions/export/bootstrap-table-export.js +319 -162
  15. data/vendor/assets/javascripts/bootstrap-table/extensions/filter-control/bootstrap-table-filter-control.js +733 -566
  16. data/vendor/assets/javascripts/bootstrap-table/extensions/group-by-v2/bootstrap-table-group-by.js +175 -167
  17. data/vendor/assets/javascripts/bootstrap-table/extensions/group-by/bootstrap-table-group-by.js +227 -213
  18. data/vendor/assets/javascripts/bootstrap-table/extensions/i18n-enhance/bootstrap-table-i18n-enhance.js +44 -29
  19. data/vendor/assets/javascripts/bootstrap-table/extensions/key-events/bootstrap-table-key-events.js +92 -70
  20. data/vendor/assets/javascripts/bootstrap-table/extensions/mobile/bootstrap-table-mobile.js +134 -118
  21. data/vendor/assets/javascripts/bootstrap-table/extensions/multi-column-toggle/bootstrap-table-multi-toggle.js +92 -75
  22. data/vendor/assets/javascripts/bootstrap-table/extensions/multiple-search/bootstrap-table-multiple-search.js +72 -58
  23. data/vendor/assets/javascripts/bootstrap-table/extensions/multiple-selection-row/bootstrap-table-multiple-selection-row.js +129 -113
  24. data/vendor/assets/javascripts/bootstrap-table/extensions/multiple-sort/bootstrap-table-multiple-sort.js +362 -349
  25. data/vendor/assets/javascripts/bootstrap-table/extensions/natural-sorting/bootstrap-table-natural-sorting.js +66 -50
  26. data/vendor/assets/javascripts/bootstrap-table/extensions/{page-jumpto/bootstrap-table-jumpto.css → page-jump-to/bootstrap-table-page-jump-to.css} +0 -0
  27. data/vendor/assets/javascripts/bootstrap-table/extensions/page-jump-to/bootstrap-table-page-jump-to.js +58 -0
  28. data/vendor/assets/javascripts/bootstrap-table/extensions/pipeline/bootstrap-table-pipeline.js +341 -0
  29. data/vendor/assets/javascripts/bootstrap-table/extensions/print/bootstrap-table-print.js +122 -126
  30. data/vendor/assets/javascripts/bootstrap-table/extensions/reorder-columns/bootstrap-table-reorder-columns.js +183 -167
  31. data/vendor/assets/javascripts/bootstrap-table/extensions/reorder-rows/bootstrap-table-reorder-rows.js +124 -110
  32. data/vendor/assets/javascripts/bootstrap-table/extensions/resizable/bootstrap-table-resizable.js +66 -55
  33. data/vendor/assets/javascripts/bootstrap-table/extensions/select2-filter/bootstrap-table-select2-filter.js +281 -272
  34. data/vendor/assets/javascripts/bootstrap-table/extensions/sticky-header/bootstrap-table-sticky-header.css +13 -13
  35. data/vendor/assets/javascripts/bootstrap-table/extensions/sticky-header/bootstrap-table-sticky-header.js +182 -106
  36. data/vendor/assets/javascripts/bootstrap-table/extensions/toolbar/bootstrap-table-toolbar.js +324 -162
  37. data/vendor/assets/javascripts/bootstrap-table/extensions/tree-column/bootstrap-table-tree-column.js +127 -115
  38. data/vendor/assets/javascripts/bootstrap-table/extensions/treegrid/bootstrap-table-treegrid.js +106 -96
  39. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-af-ZA.js +48 -35
  40. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-ar-SA.js +49 -35
  41. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-ca-ES.js +52 -39
  42. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-cs-CZ.js +52 -39
  43. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-da-DK.js +60 -32
  44. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-de-DE.js +61 -48
  45. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-el-GR.js +36 -23
  46. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-en-US.js +57 -44
  47. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-es-AR.js +39 -26
  48. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-es-CL.js +54 -41
  49. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-es-CR.js +48 -35
  50. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-es-ES.js +103 -38
  51. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-es-MX.js +59 -46
  52. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-es-NI.js +48 -35
  53. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-es-SP.js +49 -36
  54. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-et-EE.js +51 -38
  55. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-eu-EU.js +51 -38
  56. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-fa-IR.js +51 -38
  57. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-fi-FI.js +62 -0
  58. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-fr-BE.js +36 -23
  59. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-fr-FR.js +103 -90
  60. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-he-IL.js +51 -38
  61. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-hr-HR.js +52 -39
  62. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-hu-HU.js +51 -38
  63. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-id-ID.js +57 -44
  64. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-it-IT.js +59 -47
  65. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-ja-JP.js +51 -38
  66. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-ka-GE.js +49 -36
  67. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-ko-KR.js +45 -32
  68. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-ms-MY.js +51 -38
  69. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-nb-NO.js +45 -32
  70. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-nl-NL.js +60 -47
  71. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-pl-PL.js +45 -32
  72. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-pt-BR.js +49 -36
  73. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-pt-PT.js +51 -38
  74. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-ro-RO.js +51 -38
  75. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-ru-RU.js +82 -68
  76. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-sk-SK.js +57 -44
  77. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-sv-SE.js +45 -32
  78. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-th-TH.js +45 -32
  79. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-tr-TR.js +49 -36
  80. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-uk-UA.js +82 -69
  81. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-ur-PK.js +45 -32
  82. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-uz-Latn-UZ.js +57 -44
  83. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-vi-VN.js +36 -23
  84. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-zh-CN.js +54 -41
  85. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-zh-TW.js +48 -35
  86. metadata +6 -8
  87. data/vendor/assets/javascripts/bootstrap-table/extensions/angular/bootstrap-table-angular.js +0 -107
  88. data/vendor/assets/javascripts/bootstrap-table/extensions/click-edit-row/bootstrap-table-click-edit-row.css +0 -21
  89. data/vendor/assets/javascripts/bootstrap-table/extensions/click-edit-row/bootstrap-table-click-edit-row.js +0 -142
  90. data/vendor/assets/javascripts/bootstrap-table/extensions/filter/bootstrap-table-filter.js +0 -67
  91. data/vendor/assets/javascripts/bootstrap-table/extensions/flat-json/bootstrap-table-flat-json.js +0 -62
  92. data/vendor/assets/javascripts/bootstrap-table/extensions/page-jumpto/bootstrap-table-jumpto.js +0 -50
@@ -1,35 +1,50 @@
1
- /**
2
- * @author: Jewway
3
- * @version: v1.0.0
4
- */
5
-
6
- !function ($) {
1
+ (function (global, factory) {
2
+ if (typeof define === "function" && define.amd) {
3
+ define([], factory);
4
+ } else if (typeof exports !== "undefined") {
5
+ factory();
6
+ } else {
7
+ var mod = {
8
+ exports: {}
9
+ };
10
+ factory();
11
+ global.bootstrapTableI18nEnhance = mod.exports;
12
+ }
13
+ })(this, function () {
7
14
  'use strict';
8
15
 
9
- var BootstrapTable = $.fn.bootstrapTable.Constructor;
16
+ /**
17
+ * @author: Jewway
18
+ * @version: v1.0.0
19
+ */
10
20
 
11
- BootstrapTable.prototype.changeTitle = function (locale) {
12
- $.each(this.options.columns, function (idx, columnList) {
13
- $.each(columnList, function (idx, column) {
14
- if (column.field) {
15
- column.title = locale[column.field];
16
- }
17
- });
18
- });
19
- this.initHeader();
20
- this.initBody();
21
- this.initToolbar();
22
- };
21
+ !function ($) {
22
+ 'use strict';
23
23
 
24
- BootstrapTable.prototype.changeLocale = function (localeId) {
25
- this.options.locale = localeId;
26
- this.initLocale();
27
- this.initPagination();
28
- this.initBody();
29
- this.initToolbar();
30
- };
24
+ var BootstrapTable = $.fn.bootstrapTable.Constructor;
25
+
26
+ BootstrapTable.prototype.changeTitle = function (locale) {
27
+ $.each(this.options.columns, function (idx, columnList) {
28
+ $.each(columnList, function (idx, column) {
29
+ if (column.field) {
30
+ column.title = locale[column.field];
31
+ }
32
+ });
33
+ });
34
+ this.initHeader();
35
+ this.initBody();
36
+ this.initToolbar();
37
+ };
31
38
 
32
- $.fn.bootstrapTable.methods.push('changeTitle');
33
- $.fn.bootstrapTable.methods.push('changeLocale');
39
+ BootstrapTable.prototype.changeLocale = function (localeId) {
40
+ this.options.locale = localeId;
41
+ this.initLocale();
42
+ this.initPagination();
43
+ this.initBody();
44
+ this.initToolbar();
45
+ };
34
46
 
35
- }(jQuery);
47
+ $.fn.bootstrapTable.methods.push('changeTitle');
48
+ $.fn.bootstrapTable.methods.push('changeLocale');
49
+ }(jQuery);
50
+ });
@@ -1,80 +1,102 @@
1
- /**
2
- * @author: Dennis Hernández
3
- * @webSite: http://djhvscf.github.io/Blog
4
- * @version: v1.0.0
5
- *
6
- * @update zhixin wen <wenzhixin2010@gmail.com>
7
- */
1
+ (function (global, factory) {
2
+ if (typeof define === "function" && define.amd) {
3
+ define([], factory);
4
+ } else if (typeof exports !== "undefined") {
5
+ factory();
6
+ } else {
7
+ var mod = {
8
+ exports: {}
9
+ };
10
+ factory();
11
+ global.bootstrapTableKeyEvents = mod.exports;
12
+ }
13
+ })(this, function () {
14
+ 'use strict';
8
15
 
9
- !function ($) {
16
+ /**
17
+ * @author: Dennis Hernández
18
+ * @webSite: http://djhvscf.github.io/Blog
19
+ * @version: v1.0.0
20
+ *
21
+ * @update zhixin wen <wenzhixin2010@gmail.com>
22
+ */
10
23
 
11
- 'use strict';
24
+ !function ($) {
12
25
 
13
- $.extend($.fn.bootstrapTable.defaults, {
14
- keyEvents: false
15
- });
26
+ 'use strict';
16
27
 
17
- var BootstrapTable = $.fn.bootstrapTable.Constructor,
18
- _init = BootstrapTable.prototype.init;
28
+ $.extend($.fn.bootstrapTable.defaults, {
29
+ keyEvents: false
30
+ });
19
31
 
20
- BootstrapTable.prototype.init = function () {
21
- _init.apply(this, Array.prototype.slice.apply(arguments));
22
- this.initKeyEvents();
23
- };
32
+ var BootstrapTable = $.fn.bootstrapTable.Constructor,
33
+ _init = BootstrapTable.prototype.init;
24
34
 
25
- BootstrapTable.prototype.initKeyEvents = function () {
26
- if (this.options.keyEvents) {
27
- var that = this;
35
+ BootstrapTable.prototype.init = function () {
36
+ _init.apply(this, Array.prototype.slice.apply(arguments));
37
+ this.initKeyEvents();
38
+ };
28
39
 
29
- $(document).off('keydown').on('keydown', function (e) {
30
- var $search = that.$toolbar.find('.search input'),
31
- $refresh = that.$toolbar.find('button[name="refresh"]'),
32
- $toggle = that.$toolbar.find('button[name="toggle"]'),
33
- $paginationSwitch = that.$toolbar.find('button[name="paginationSwitch"]');
40
+ BootstrapTable.prototype.initKeyEvents = function () {
41
+ if (this.options.keyEvents) {
42
+ var that = this;
34
43
 
35
- if (document.activeElement === $search.get(0) || !$.contains(document.activeElement ,that.$toolbar.get(0))) {
36
- return true;
37
- }
44
+ $(document).off('keydown').on('keydown', function (e) {
45
+ var $search = that.$toolbar.find('.search input'),
46
+ $refresh = that.$toolbar.find('button[name="refresh"]'),
47
+ $toggle = that.$toolbar.find('button[name="toggle"]'),
48
+ $paginationSwitch = that.$toolbar.find('button[name="paginationSwitch"]');
38
49
 
39
- switch (e.keyCode) {
40
- case 83: //s
41
- if (!that.options.search) {
42
- return;
43
- }
44
- $search.focus();
45
- return false;
46
- case 82: //r
47
- if (!that.options.showRefresh) {
48
- return;
49
- }
50
- $refresh.click();
51
- return false;
52
- case 84: //t
53
- if (!that.options.showToggle) {
54
- return;
55
- }
56
- $toggle.click();
57
- return false;
58
- case 80: //p
59
- if (!that.options.showPaginationSwitch) {
60
- return;
61
- }
62
- $paginationSwitch.click();
63
- return false;
64
- case 37: // left
65
- if (!that.options.pagination) {
66
- return;
67
- }
68
- that.prevPage();
69
- return false;
70
- case 39: // right
71
- if (!that.options.pagination) {
50
+ if (document.activeElement === $search.get(0) || !$.contains(document.activeElement, that.$toolbar.get(0))) {
51
+ return true;
52
+ }
53
+
54
+ switch (e.keyCode) {
55
+ case 83:
56
+ //s
57
+ if (!that.options.search) {
58
+ return;
59
+ }
60
+ $search.focus();
61
+ return false;
62
+ case 82:
63
+ //r
64
+ if (!that.options.showRefresh) {
65
+ return;
66
+ }
67
+ $refresh.click();
68
+ return false;
69
+ case 84:
70
+ //t
71
+ if (!that.options.showToggle) {
72
+ return;
73
+ }
74
+ $toggle.click();
75
+ return false;
76
+ case 80:
77
+ //p
78
+ if (!that.options.showPaginationSwitch) {
79
+ return;
80
+ }
81
+ $paginationSwitch.click();
82
+ return false;
83
+ case 37:
84
+ // left
85
+ if (!that.options.pagination) {
86
+ return;
87
+ }
88
+ that.prevPage();
89
+ return false;
90
+ case 39:
91
+ // right
92
+ if (!that.options.pagination) {
93
+ return;
94
+ }
95
+ that.nextPage();
72
96
  return;
73
- }
74
- that.nextPage();
75
- return;
76
- }
77
- });
78
- }
79
- };
80
- }(jQuery);
97
+ }
98
+ });
99
+ }
100
+ };
101
+ }(jQuery);
102
+ });
@@ -1,136 +1,152 @@
1
- /**
2
- * @author: Dennis Hernández
3
- * @webSite: http://djhvscf.github.io/Blog
4
- * @version: v1.1.0
5
- */
1
+ (function (global, factory) {
2
+ if (typeof define === "function" && define.amd) {
3
+ define([], factory);
4
+ } else if (typeof exports !== "undefined") {
5
+ factory();
6
+ } else {
7
+ var mod = {
8
+ exports: {}
9
+ };
10
+ factory();
11
+ global.bootstrapTableMobile = mod.exports;
12
+ }
13
+ })(this, function () {
14
+ 'use strict';
6
15
 
7
- !function ($) {
16
+ /**
17
+ * @author: Dennis Hernández
18
+ * @webSite: http://djhvscf.github.io/Blog
19
+ * @version: v1.1.0
20
+ */
8
21
 
9
- 'use strict';
22
+ !function ($) {
10
23
 
11
- var showHideColumns = function (that, checked) {
12
- if (that.options.columnsHidden.length > 0 ) {
13
- $.each(that.columns, function (i, column) {
14
- if (that.options.columnsHidden.indexOf(column.field) !== -1) {
15
- if (column.visible !== checked) {
16
- that.toggleColumn(that.fieldsColumnsIndex[column.field], checked, true);
24
+ 'use strict';
25
+
26
+ var showHideColumns = function showHideColumns(that, checked) {
27
+ if (that.options.columnsHidden.length > 0) {
28
+ $.each(that.columns, function (i, column) {
29
+ if (that.options.columnsHidden.indexOf(column.field) !== -1) {
30
+ if (column.visible !== checked) {
31
+ that.toggleColumn(that.fieldsColumnsIndex[column.field], checked, true);
32
+ }
17
33
  }
18
- }
19
- });
20
- }
21
- };
22
-
23
- var resetView = function (that) {
24
- if (that.options.height || that.options.showFooter) {
25
- setTimeout(function(){
26
- that.resetView.call(that);
27
- }, 1);
28
- }
29
- };
30
-
31
- var changeView = function (that, width, height) {
32
- if (that.options.minHeight) {
33
- if ((width <= that.options.minWidth) && (height <= that.options.minHeight)) {
34
- conditionCardView(that);
35
- } else if ((width > that.options.minWidth) && (height > that.options.minHeight)) {
36
- conditionFullView(that);
34
+ });
37
35
  }
38
- } else {
39
- if (width <= that.options.minWidth) {
40
- conditionCardView(that);
41
- } else if (width > that.options.minWidth) {
42
- conditionFullView(that);
36
+ };
37
+
38
+ var resetView = function resetView(that) {
39
+ if (that.options.height || that.options.showFooter) {
40
+ setTimeout(function () {
41
+ that.resetView.call(that);
42
+ }, 1);
43
+ }
44
+ };
45
+
46
+ var changeView = function changeView(that, width, height) {
47
+ if (that.options.minHeight) {
48
+ if (width <= that.options.minWidth && height <= that.options.minHeight) {
49
+ conditionCardView(that);
50
+ } else if (width > that.options.minWidth && height > that.options.minHeight) {
51
+ conditionFullView(that);
52
+ }
53
+ } else {
54
+ if (width <= that.options.minWidth) {
55
+ conditionCardView(that);
56
+ } else if (width > that.options.minWidth) {
57
+ conditionFullView(that);
58
+ }
43
59
  }
44
- }
45
-
46
- resetView(that);
47
- };
48
-
49
- var conditionCardView = function (that) {
50
- changeTableView(that, false);
51
- showHideColumns(that, false);
52
- };
53
-
54
- var conditionFullView = function (that) {
55
- changeTableView(that, true);
56
- showHideColumns(that, true);
57
- };
58
-
59
- var changeTableView = function (that, cardViewState) {
60
- that.options.cardView = cardViewState;
61
- that.toggleView();
62
- };
63
-
64
- var debounce = function(func,wait) {
65
- var timeout;
66
- return function() {
67
- var context = this,
68
- args = arguments;
69
- var later = function() {
70
- timeout = null;
71
- func.apply(context,args);
60
+
61
+ resetView(that);
62
+ };
63
+
64
+ var conditionCardView = function conditionCardView(that) {
65
+ changeTableView(that, false);
66
+ showHideColumns(that, false);
67
+ };
68
+
69
+ var conditionFullView = function conditionFullView(that) {
70
+ changeTableView(that, true);
71
+ showHideColumns(that, true);
72
+ };
73
+
74
+ var changeTableView = function changeTableView(that, cardViewState) {
75
+ that.options.cardView = cardViewState;
76
+ that.toggleView();
77
+ };
78
+
79
+ var debounce = function debounce(func, wait) {
80
+ var timeout;
81
+ return function () {
82
+ var context = this,
83
+ args = arguments;
84
+ var later = function later() {
85
+ timeout = null;
86
+ func.apply(context, args);
87
+ };
88
+ clearTimeout(timeout);
89
+ timeout = setTimeout(later, wait);
72
90
  };
73
- clearTimeout(timeout);
74
- timeout = setTimeout(later, wait);
75
91
  };
76
- };
77
-
78
- $.extend($.fn.bootstrapTable.defaults, {
79
- mobileResponsive: false,
80
- minWidth: 562,
81
- minHeight: undefined,
82
- heightThreshold: 100, // just slightly larger than mobile chrome's auto-hiding toolbar
83
- checkOnInit: true,
84
- columnsHidden: []
85
- });
86
-
87
- var BootstrapTable = $.fn.bootstrapTable.Constructor,
88
- _init = BootstrapTable.prototype.init;
89
-
90
- BootstrapTable.prototype.init = function () {
91
- _init.apply(this, Array.prototype.slice.apply(arguments));
92
-
93
- if (!this.options.mobileResponsive) {
94
- return;
95
- }
96
-
97
- if (!this.options.minWidth) {
98
- return;
99
- }
100
-
101
- if (this.options.minWidth < 100 && this.options.resizable) {
102
- console.log("The minWidth when the resizable extension is active should be greater or equal than 100");
103
- this.options.minWidth = 100;
104
- }
105
-
106
- var that = this,
107
- old = {
92
+
93
+ $.extend($.fn.bootstrapTable.defaults, {
94
+ mobileResponsive: false,
95
+ minWidth: 562,
96
+ minHeight: undefined,
97
+ heightThreshold: 100, // just slightly larger than mobile chrome's auto-hiding toolbar
98
+ checkOnInit: true,
99
+ columnsHidden: []
100
+ });
101
+
102
+ var BootstrapTable = $.fn.bootstrapTable.Constructor,
103
+ _init = BootstrapTable.prototype.init;
104
+
105
+ BootstrapTable.prototype.init = function () {
106
+ _init.apply(this, Array.prototype.slice.apply(arguments));
107
+
108
+ if (!this.options.mobileResponsive) {
109
+ return;
110
+ }
111
+
112
+ if (!this.options.minWidth) {
113
+ return;
114
+ }
115
+
116
+ if (this.options.minWidth < 100 && this.options.resizable) {
117
+ console.log("The minWidth when the resizable extension is active should be greater or equal than 100");
118
+ this.options.minWidth = 100;
119
+ }
120
+
121
+ var that = this,
122
+ old = {
108
123
  width: $(window).width(),
109
124
  height: $(window).height()
110
125
  };
111
126
 
112
- $(window).on('resize orientationchange',debounce(function (evt) {
113
- // reset view if height has only changed by at least the threshold.
114
- var height = $(this).height(),
115
- width = $(this).width();
127
+ $(window).on('resize orientationchange', debounce(function (evt) {
128
+ // reset view if height has only changed by at least the threshold.
129
+ var height = $(this).height(),
130
+ width = $(this).width();
131
+
132
+ if (Math.abs(old.height - height) > that.options.heightThreshold || old.width != width) {
133
+ changeView(that, width, height);
134
+ old = {
135
+ width: width,
136
+ height: height
137
+ };
138
+ }
139
+ }, 200));
116
140
 
117
- if (Math.abs(old.height - height) > that.options.heightThreshold || old.width != width) {
118
- changeView(that, width, height);
141
+ if (this.options.checkOnInit) {
142
+ var height = $(window).height(),
143
+ width = $(window).width();
144
+ changeView(this, width, height);
119
145
  old = {
120
146
  width: width,
121
147
  height: height
122
148
  };
123
149
  }
124
- },200));
125
-
126
- if (this.options.checkOnInit) {
127
- var height = $(window).height(),
128
- width = $(window).width();
129
- changeView(this, width, height);
130
- old = {
131
- width: width,
132
- height: height
133
- };
134
- }
135
- };
136
- }(jQuery);
150
+ };
151
+ }(jQuery);
152
+ });