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.
- checksums.yaml +4 -4
- data/README.md +10 -12
- data/lib/bootstrap-table-rails/version.rb +1 -1
- data/vendor/assets/javascripts/bootstrap-table/bootstrap-table-locale-all.js +2534 -1841
- data/vendor/assets/javascripts/bootstrap-table/bootstrap-table.css +202 -283
- data/vendor/assets/javascripts/bootstrap-table/bootstrap-table.js +3114 -2555
- data/vendor/assets/javascripts/bootstrap-table/extensions/accent-neutralise/bootstrap-table-accent-neutralise.js +247 -152
- data/vendor/assets/javascripts/bootstrap-table/extensions/addrbar/bootstrap-table-addrbar.js +271 -0
- data/vendor/assets/javascripts/bootstrap-table/extensions/auto-refresh/bootstrap-table-auto-refresh.js +77 -68
- data/vendor/assets/javascripts/bootstrap-table/extensions/cookie/bootstrap-table-cookie.js +452 -315
- data/vendor/assets/javascripts/bootstrap-table/extensions/copy-rows/bootstrap-table-copy-rows.js +105 -86
- data/vendor/assets/javascripts/bootstrap-table/extensions/defer-url/bootstrap-table-defer-url.js +44 -27
- data/vendor/assets/javascripts/bootstrap-table/extensions/editable/bootstrap-table-editable.js +229 -115
- data/vendor/assets/javascripts/bootstrap-table/extensions/export/bootstrap-table-export.js +319 -162
- data/vendor/assets/javascripts/bootstrap-table/extensions/filter-control/bootstrap-table-filter-control.js +733 -566
- data/vendor/assets/javascripts/bootstrap-table/extensions/group-by-v2/bootstrap-table-group-by.js +175 -167
- data/vendor/assets/javascripts/bootstrap-table/extensions/group-by/bootstrap-table-group-by.js +227 -213
- data/vendor/assets/javascripts/bootstrap-table/extensions/i18n-enhance/bootstrap-table-i18n-enhance.js +44 -29
- data/vendor/assets/javascripts/bootstrap-table/extensions/key-events/bootstrap-table-key-events.js +92 -70
- data/vendor/assets/javascripts/bootstrap-table/extensions/mobile/bootstrap-table-mobile.js +134 -118
- data/vendor/assets/javascripts/bootstrap-table/extensions/multi-column-toggle/bootstrap-table-multi-toggle.js +92 -75
- data/vendor/assets/javascripts/bootstrap-table/extensions/multiple-search/bootstrap-table-multiple-search.js +72 -58
- data/vendor/assets/javascripts/bootstrap-table/extensions/multiple-selection-row/bootstrap-table-multiple-selection-row.js +129 -113
- data/vendor/assets/javascripts/bootstrap-table/extensions/multiple-sort/bootstrap-table-multiple-sort.js +362 -349
- data/vendor/assets/javascripts/bootstrap-table/extensions/natural-sorting/bootstrap-table-natural-sorting.js +66 -50
- data/vendor/assets/javascripts/bootstrap-table/extensions/{page-jumpto/bootstrap-table-jumpto.css → page-jump-to/bootstrap-table-page-jump-to.css} +0 -0
- data/vendor/assets/javascripts/bootstrap-table/extensions/page-jump-to/bootstrap-table-page-jump-to.js +58 -0
- data/vendor/assets/javascripts/bootstrap-table/extensions/pipeline/bootstrap-table-pipeline.js +341 -0
- data/vendor/assets/javascripts/bootstrap-table/extensions/print/bootstrap-table-print.js +122 -126
- data/vendor/assets/javascripts/bootstrap-table/extensions/reorder-columns/bootstrap-table-reorder-columns.js +183 -167
- data/vendor/assets/javascripts/bootstrap-table/extensions/reorder-rows/bootstrap-table-reorder-rows.js +124 -110
- data/vendor/assets/javascripts/bootstrap-table/extensions/resizable/bootstrap-table-resizable.js +66 -55
- data/vendor/assets/javascripts/bootstrap-table/extensions/select2-filter/bootstrap-table-select2-filter.js +281 -272
- data/vendor/assets/javascripts/bootstrap-table/extensions/sticky-header/bootstrap-table-sticky-header.css +13 -13
- data/vendor/assets/javascripts/bootstrap-table/extensions/sticky-header/bootstrap-table-sticky-header.js +182 -106
- data/vendor/assets/javascripts/bootstrap-table/extensions/toolbar/bootstrap-table-toolbar.js +324 -162
- data/vendor/assets/javascripts/bootstrap-table/extensions/tree-column/bootstrap-table-tree-column.js +127 -115
- data/vendor/assets/javascripts/bootstrap-table/extensions/treegrid/bootstrap-table-treegrid.js +106 -96
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-af-ZA.js +48 -35
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-ar-SA.js +49 -35
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-ca-ES.js +52 -39
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-cs-CZ.js +52 -39
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-da-DK.js +60 -32
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-de-DE.js +61 -48
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-el-GR.js +36 -23
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-en-US.js +57 -44
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-es-AR.js +39 -26
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-es-CL.js +54 -41
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-es-CR.js +48 -35
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-es-ES.js +103 -38
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-es-MX.js +59 -46
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-es-NI.js +48 -35
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-es-SP.js +49 -36
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-et-EE.js +51 -38
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-eu-EU.js +51 -38
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-fa-IR.js +51 -38
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-fi-FI.js +62 -0
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-fr-BE.js +36 -23
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-fr-FR.js +103 -90
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-he-IL.js +51 -38
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-hr-HR.js +52 -39
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-hu-HU.js +51 -38
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-id-ID.js +57 -44
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-it-IT.js +59 -47
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-ja-JP.js +51 -38
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-ka-GE.js +49 -36
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-ko-KR.js +45 -32
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-ms-MY.js +51 -38
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-nb-NO.js +45 -32
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-nl-NL.js +60 -47
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-pl-PL.js +45 -32
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-pt-BR.js +49 -36
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-pt-PT.js +51 -38
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-ro-RO.js +51 -38
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-ru-RU.js +82 -68
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-sk-SK.js +57 -44
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-sv-SE.js +45 -32
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-th-TH.js +45 -32
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-tr-TR.js +49 -36
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-uk-UA.js +82 -69
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-ur-PK.js +45 -32
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-uz-Latn-UZ.js +57 -44
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-vi-VN.js +36 -23
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-zh-CN.js +54 -41
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-zh-TW.js +48 -35
- metadata +6 -8
- data/vendor/assets/javascripts/bootstrap-table/extensions/angular/bootstrap-table-angular.js +0 -107
- data/vendor/assets/javascripts/bootstrap-table/extensions/click-edit-row/bootstrap-table-click-edit-row.css +0 -21
- data/vendor/assets/javascripts/bootstrap-table/extensions/click-edit-row/bootstrap-table-click-edit-row.js +0 -142
- data/vendor/assets/javascripts/bootstrap-table/extensions/filter/bootstrap-table-filter.js +0 -67
- data/vendor/assets/javascripts/bootstrap-table/extensions/flat-json/bootstrap-table-flat-json.js +0 -62
- data/vendor/assets/javascripts/bootstrap-table/extensions/page-jumpto/bootstrap-table-jumpto.js +0 -50
@@ -1,35 +1,50 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
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
|
-
|
16
|
+
/**
|
17
|
+
* @author: Jewway
|
18
|
+
* @version: v1.0.0
|
19
|
+
*/
|
10
20
|
|
11
|
-
|
12
|
-
|
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
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
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
|
-
|
33
|
-
|
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
|
-
|
47
|
+
$.fn.bootstrapTable.methods.push('changeTitle');
|
48
|
+
$.fn.bootstrapTable.methods.push('changeLocale');
|
49
|
+
}(jQuery);
|
50
|
+
});
|
data/vendor/assets/javascripts/bootstrap-table/extensions/key-events/bootstrap-table-key-events.js
CHANGED
@@ -1,80 +1,102 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
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
|
-
|
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
|
-
|
24
|
+
!function ($) {
|
12
25
|
|
13
|
-
|
14
|
-
keyEvents: false
|
15
|
-
});
|
26
|
+
'use strict';
|
16
27
|
|
17
|
-
|
18
|
-
|
28
|
+
$.extend($.fn.bootstrapTable.defaults, {
|
29
|
+
keyEvents: false
|
30
|
+
});
|
19
31
|
|
20
|
-
|
21
|
-
|
22
|
-
this.initKeyEvents();
|
23
|
-
};
|
32
|
+
var BootstrapTable = $.fn.bootstrapTable.Constructor,
|
33
|
+
_init = BootstrapTable.prototype.init;
|
24
34
|
|
25
|
-
|
26
|
-
|
27
|
-
|
35
|
+
BootstrapTable.prototype.init = function () {
|
36
|
+
_init.apply(this, Array.prototype.slice.apply(arguments));
|
37
|
+
this.initKeyEvents();
|
38
|
+
};
|
28
39
|
|
29
|
-
|
30
|
-
|
31
|
-
|
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
|
-
|
36
|
-
|
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
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
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
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
};
|
80
|
-
}(jQuery);
|
97
|
+
}
|
98
|
+
});
|
99
|
+
}
|
100
|
+
};
|
101
|
+
}(jQuery);
|
102
|
+
});
|
@@ -1,136 +1,152 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
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
|
-
|
16
|
+
/**
|
17
|
+
* @author: Dennis Hernández
|
18
|
+
* @webSite: http://djhvscf.github.io/Blog
|
19
|
+
* @version: v1.1.0
|
20
|
+
*/
|
8
21
|
|
9
|
-
|
22
|
+
!function ($) {
|
10
23
|
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
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
|
-
}
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
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
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
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
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
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
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
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 (
|
118
|
-
|
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
|
-
}
|
125
|
-
|
126
|
-
|
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
|
+
});
|