bootstrap-table-rails 1.18.0 → 1.18.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (75) hide show
  1. checksums.yaml +4 -4
  2. data/lib/bootstrap-table-rails/version.rb +1 -1
  3. data/vendor/assets/javascripts/bootstrap-table/bootstrap-table-locale-all.js +132 -131
  4. data/vendor/assets/javascripts/bootstrap-table/bootstrap-table.css +9 -6
  5. data/vendor/assets/javascripts/bootstrap-table/bootstrap-table.js +96 -99
  6. data/vendor/assets/javascripts/bootstrap-table/extensions/addrbar/bootstrap-table-addrbar.js +5 -1
  7. data/vendor/assets/javascripts/bootstrap-table/extensions/auto-refresh/bootstrap-table-auto-refresh.js +2 -2
  8. data/vendor/assets/javascripts/bootstrap-table/extensions/cookie/bootstrap-table-cookie.js +1 -1
  9. data/vendor/assets/javascripts/bootstrap-table/extensions/copy-rows/bootstrap-table-copy-rows.js +6 -6
  10. data/vendor/assets/javascripts/bootstrap-table/extensions/custom-view/bootstrap-table-custom-view.js +5 -5
  11. data/vendor/assets/javascripts/bootstrap-table/extensions/editable/bootstrap-table-editable.js +2 -0
  12. data/vendor/assets/javascripts/bootstrap-table/extensions/export/bootstrap-table-export.js +4 -11
  13. data/vendor/assets/javascripts/bootstrap-table/extensions/filter-control/bootstrap-table-filter-control.js +31 -19
  14. data/vendor/assets/javascripts/bootstrap-table/extensions/filter-control/utils.js +21 -10
  15. data/vendor/assets/javascripts/bootstrap-table/extensions/fixed-columns/bootstrap-table-fixed-columns.js +8 -0
  16. data/vendor/assets/javascripts/bootstrap-table/extensions/group-by-v2/bootstrap-table-group-by.js +14 -10
  17. data/vendor/assets/javascripts/bootstrap-table/extensions/mobile/bootstrap-table-mobile.js +5 -7
  18. data/vendor/assets/javascripts/bootstrap-table/extensions/multiple-sort/bootstrap-table-multiple-sort.js +43 -47
  19. data/vendor/assets/javascripts/bootstrap-table/extensions/page-jump-to/bootstrap-table-page-jump-to.js +26 -3
  20. data/vendor/assets/javascripts/bootstrap-table/extensions/pipeline/bootstrap-table-pipeline.js +8 -9
  21. data/vendor/assets/javascripts/bootstrap-table/extensions/print/bootstrap-table-print.js +87 -57
  22. data/vendor/assets/javascripts/bootstrap-table/extensions/reorder-columns/bootstrap-table-reorder-columns.js +13 -4
  23. data/vendor/assets/javascripts/bootstrap-table/extensions/reorder-rows/bootstrap-table-reorder-rows.js +3 -0
  24. data/vendor/assets/javascripts/bootstrap-table/extensions/sticky-header/bootstrap-table-sticky-header.js +2 -2
  25. data/vendor/assets/javascripts/bootstrap-table/extensions/toolbar/bootstrap-table-toolbar.js +10 -9
  26. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-af-ZA.js +1 -1
  27. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-ar-SA.js +1 -1
  28. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-bg-BG.js +1 -1
  29. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-ca-ES.js +1 -1
  30. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-cs-CZ.js +1 -1
  31. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-da-DK.js +1 -1
  32. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-de-DE.js +2 -2
  33. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-el-GR.js +1 -1
  34. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-en-US.js +1 -1
  35. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-es-AR.js +2 -2
  36. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-es-CL.js +19 -19
  37. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-es-ES.js +17 -17
  38. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-et-EE.js +1 -1
  39. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-eu-EU.js +1 -1
  40. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-fa-IR.js +1 -1
  41. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-fi-FI.js +1 -1
  42. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-fr-FR.js +14 -14
  43. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-he-IL.js +1 -1
  44. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-hr-HR.js +1 -1
  45. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-hu-HU.js +1 -1
  46. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-id-ID.js +1 -1
  47. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-it-IT.js +1 -1
  48. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-ja-JP.js +1 -1
  49. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-ka-GE.js +1 -1
  50. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-ko-KR.js +1 -1
  51. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-ms-MY.js +1 -1
  52. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-nb-NO.js +1 -1
  53. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-nl-NL.js +1 -1
  54. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-pl-PL.js +23 -22
  55. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-pt-PT.js +1 -1
  56. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-ro-RO.js +1 -1
  57. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-ru-RU.js +1 -1
  58. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-sk-SK.js +20 -20
  59. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-sr-Cyrl-RS.js +1 -1
  60. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-sv-SE.js +1 -1
  61. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-th-TH.js +1 -1
  62. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-tr-TR.js +1 -1
  63. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-uk-UA.js +1 -1
  64. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-ur-PK.js +1 -1
  65. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-uz-Latn-UZ.js +1 -1
  66. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-vi-VN.js +1 -1
  67. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-zh-CN.js +1 -1
  68. data/vendor/assets/javascripts/bootstrap-table/themes/bootstrap-table/bootstrap-table.css +10 -5
  69. data/vendor/assets/javascripts/bootstrap-table/themes/bulma/bootstrap-table-bulma.css +8 -5
  70. data/vendor/assets/javascripts/bootstrap-table/themes/foundation/bootstrap-table-foundation.css +13 -5
  71. data/vendor/assets/javascripts/bootstrap-table/themes/foundation/bootstrap-table-foundation.js +8 -2
  72. data/vendor/assets/javascripts/bootstrap-table/themes/materialize/bootstrap-table-materialize.css +13 -5
  73. data/vendor/assets/javascripts/bootstrap-table/themes/materialize/bootstrap-table-materialize.js +8 -2
  74. data/vendor/assets/javascripts/bootstrap-table/themes/semantic/bootstrap-table-semantic.css +8 -5
  75. metadata +1 -1
@@ -2005,7 +2005,7 @@
2005
2005
  var options = getOptionsFromSelectControl(selectControl);
2006
2006
 
2007
2007
  for (var i = 0; i < options.length; i++) {
2008
- if (options[i].value === value.toString()) {
2008
+ if (options[i].value === Utils.unescapeHTML(value.toString())) {
2009
2009
  // The value is not valid to add
2010
2010
  return true;
2011
2011
  }
@@ -2101,8 +2101,8 @@
2101
2101
  if (that.options.valuesFilterControl.length > 0) {
2102
2102
  // Callback to apply after settings fields values
2103
2103
  var fieldToFocusCallback = null;
2104
- searchControls.each(function (index, ele) {
2105
- var $this = $(this);
2104
+ searchControls.each(function (i, el) {
2105
+ var $this = $(el);
2106
2106
  field = $this.closest('[data-field]').data('field');
2107
2107
  result = that.options.valuesFilterControl.filter(function (valueObj) {
2108
2108
  return valueObj.field === field;
@@ -2222,7 +2222,8 @@
2222
2222
  addOptionToSelectControl(selectControl, value, value, column.filterDefault);
2223
2223
  });
2224
2224
  continue;
2225
- }
2225
+ } // eslint-disable-next-line guard-for-in
2226
+
2226
2227
 
2227
2228
  for (var key in uniqueValues) {
2228
2229
  addOptionToSelectControl(selectControl, uniqueValues[key], key, column.filterDefault);
@@ -2357,7 +2358,7 @@
2357
2358
 
2358
2359
  if (value && value.length > 0 && value.trim()) {
2359
2360
  $select.find('option[selected]').removeAttr('selected');
2360
- $select.find('option[value="' + value + '"]').attr('selected', true);
2361
+ $select.find("option[value=\"".concat(value, "\"]")).attr('selected', true);
2361
2362
  } else {
2362
2363
  $select.find('option[selected]').removeAttr('selected');
2363
2364
  }
@@ -2410,12 +2411,20 @@
2410
2411
 
2411
2412
  if (header.find('.date-filter-control').length > 0) {
2412
2413
  $.each(that.columns, function (i, _ref8) {
2413
- var filterControl = _ref8.filterControl,
2414
+ var filterDefault = _ref8.filterDefault,
2415
+ filterControl = _ref8.filterControl,
2414
2416
  field = _ref8.field,
2415
2417
  filterDatepickerOptions = _ref8.filterDatepickerOptions;
2416
2418
 
2417
2419
  if (filterControl !== undefined && filterControl.toLowerCase() === 'datepicker') {
2418
- header.find(".date-filter-control.bootstrap-table-filter-control-".concat(field)).datepicker(filterDatepickerOptions).on('changeDate', function (_ref9) {
2420
+ var $datepicker = header.find(".date-filter-control.bootstrap-table-filter-control-".concat(field));
2421
+ $datepicker.datepicker(filterDatepickerOptions);
2422
+
2423
+ if (filterDefault) {
2424
+ $datepicker.datepicker('setDate', filterDefault);
2425
+ }
2426
+
2427
+ $datepicker.on('changeDate', function (_ref9) {
2419
2428
  var currentTarget = _ref9.currentTarget,
2420
2429
  keyCode = _ref9.keyCode;
2421
2430
  clearTimeout(currentTarget.timeoutId || 0);
@@ -2487,7 +2496,7 @@
2487
2496
  }
2488
2497
  var filterDataMethods = {
2489
2498
  func: function func(filterDataSource, selectControl, filterOrderBy, selected) {
2490
- var variableValues = window[filterDataSource].apply();
2499
+ var variableValues = window[filterDataSource].apply(); // eslint-disable-next-line guard-for-in
2491
2500
 
2492
2501
  for (var key in variableValues) {
2493
2502
  addOptionToSelectControl(selectControl, key, variableValues[key], selected);
@@ -2504,7 +2513,8 @@
2504
2513
  objectKeys.forEach(function (key) {
2505
2514
  variableValues = variableValues[key];
2506
2515
  });
2507
- }
2516
+ } // eslint-disable-next-line guard-for-in
2517
+
2508
2518
 
2509
2519
  for (var key in variableValues) {
2510
2520
  addOptionToSelectControl(selectControl, key, variableValues[key], selected);
@@ -2531,6 +2541,7 @@
2531
2541
  url: filterDataSource,
2532
2542
  dataType: 'json',
2533
2543
  success: function success(data) {
2544
+ // eslint-disable-next-line guard-for-in
2534
2545
  for (var key in data) {
2535
2546
  addOptionToSelectControl(selectControl, key, data[key], selected);
2536
2547
  }
@@ -2540,7 +2551,7 @@
2540
2551
  });
2541
2552
  },
2542
2553
  json: function json(filterDataSource, selectControl, filterOrderBy, selected) {
2543
- var variableValues = JSON.parse(filterDataSource);
2554
+ var variableValues = JSON.parse(filterDataSource); // eslint-disable-next-line guard-for-in
2544
2555
 
2545
2556
  for (var key in variableValues) {
2546
2557
  addOptionToSelectControl(selectControl, key, variableValues[key], selected);
@@ -2554,6 +2565,7 @@
2554
2565
  $.extend($.fn.bootstrapTable.defaults, {
2555
2566
  filterControl: false,
2556
2567
  filterControlVisible: true,
2568
+ // eslint-disable-next-line no-unused-vars
2557
2569
  onColumnSearch: function onColumnSearch(field, text) {
2558
2570
  return false;
2559
2571
  },
@@ -2584,7 +2596,7 @@
2584
2596
  // input, select, datepicker
2585
2597
  filterDataCollector: undefined,
2586
2598
  filterData: undefined,
2587
- filterDatepickerOptions: undefined,
2599
+ filterDatepickerOptions: {},
2588
2600
  filterStrictSearch: false,
2589
2601
  filterStartsWithSearch: false,
2590
2602
  filterControlPlaceholder: '',
@@ -2727,7 +2739,7 @@
2727
2739
  keys.forEach(function (key) {
2728
2740
  var thisColumn = that.columns[that.fieldsColumnsIndex[key]];
2729
2741
  var fval = (fp[key] || '').toLowerCase();
2730
- var value = Utils$1.getItemField(item, key, false);
2742
+ var value = Utils$1.unescapeHTML(Utils$1.getItemField(item, key, false));
2731
2743
  var tmpItemIsExpected;
2732
2744
 
2733
2745
  if (fval === '') {
@@ -2835,7 +2847,7 @@
2835
2847
 
2836
2848
  if (filterColumnsDefaults) {
2837
2849
  this.filterColumnsPartial = filterColumnsDefaults;
2838
- this.updatePagination();
2850
+ this.updatePagination(); // eslint-disable-next-line guard-for-in
2839
2851
 
2840
2852
  for (var filter in filterColumnsDefaults) {
2841
2853
  this.trigger('column-search', filter, filterColumnsDefaults[filter]);
@@ -2882,12 +2894,12 @@
2882
2894
  if (this.options.showFilterControlSwitch) {
2883
2895
  this.buttons = Object.assign(this.buttons, {
2884
2896
  filterControlSwitch: {
2885
- 'text': this.options.filterControlVisible ? this.options.formatFilterControlSwitchHide() : this.options.formatFilterControlSwitchShow(),
2886
- 'icon': this.options.filterControlVisible ? this.options.icons.filterControlSwitchHide : this.options.icons.filterControlSwitchShow,
2887
- 'event': this.toggleFilterControl,
2888
- 'attributes': {
2897
+ text: this.options.filterControlVisible ? this.options.formatFilterControlSwitchHide() : this.options.formatFilterControlSwitchShow(),
2898
+ icon: this.options.filterControlVisible ? this.options.icons.filterControlSwitchHide : this.options.icons.filterControlSwitchShow,
2899
+ event: this.toggleFilterControl,
2900
+ attributes: {
2889
2901
  'aria-label': this.options.formatFilterControlSwitch(),
2890
- 'title': this.options.formatFilterControlSwitch()
2902
+ title: this.options.formatFilterControlSwitch()
2891
2903
  }
2892
2904
  }
2893
2905
  });
@@ -3011,7 +3023,7 @@
3011
3023
 
3012
3024
  var icon = this.options.showButtonIcons ? this.options.filterControlVisible ? this.options.icons.filterControlSwitchHide : this.options.icons.filterControlSwitchShow : '';
3013
3025
  var text = this.options.showButtonText ? this.options.filterControlVisible ? this.options.formatFilterControlSwitchHide() : this.options.formatFilterControlSwitchShow() : '';
3014
- this.$toolbar.find('>.columns').find('.filter-control-switch').html(Utils$1.sprintf(this.constants.html.icon, this.options.iconsPrefix, icon) + ' ' + text);
3026
+ this.$toolbar.find('>.columns').find('.filter-control-switch').html("".concat(Utils$1.sprintf(this.constants.html.icon, this.options.iconsPrefix, icon), " ").concat(text));
3015
3027
  }
3016
3028
  }]);
3017
3029
 
@@ -1787,7 +1787,7 @@
1787
1787
  var options = getOptionsFromSelectControl(selectControl);
1788
1788
 
1789
1789
  for (var i = 0; i < options.length; i++) {
1790
- if (options[i].value === value.toString()) {
1790
+ if (options[i].value === Utils.unescapeHTML(value.toString())) {
1791
1791
  // The value is not valid to add
1792
1792
  return true;
1793
1793
  }
@@ -1883,8 +1883,8 @@
1883
1883
  if (that.options.valuesFilterControl.length > 0) {
1884
1884
  // Callback to apply after settings fields values
1885
1885
  var fieldToFocusCallback = null;
1886
- searchControls.each(function (index, ele) {
1887
- var $this = $(this);
1886
+ searchControls.each(function (i, el) {
1887
+ var $this = $(el);
1888
1888
  field = $this.closest('[data-field]').data('field');
1889
1889
  result = that.options.valuesFilterControl.filter(function (valueObj) {
1890
1890
  return valueObj.field === field;
@@ -2004,7 +2004,8 @@
2004
2004
  addOptionToSelectControl(selectControl, value, value, column.filterDefault);
2005
2005
  });
2006
2006
  continue;
2007
- }
2007
+ } // eslint-disable-next-line guard-for-in
2008
+
2008
2009
 
2009
2010
  for (var key in uniqueValues) {
2010
2011
  addOptionToSelectControl(selectControl, uniqueValues[key], key, column.filterDefault);
@@ -2139,7 +2140,7 @@
2139
2140
 
2140
2141
  if (value && value.length > 0 && value.trim()) {
2141
2142
  $select.find('option[selected]').removeAttr('selected');
2142
- $select.find('option[value="' + value + '"]').attr('selected', true);
2143
+ $select.find("option[value=\"".concat(value, "\"]")).attr('selected', true);
2143
2144
  } else {
2144
2145
  $select.find('option[selected]').removeAttr('selected');
2145
2146
  }
@@ -2192,12 +2193,20 @@
2192
2193
 
2193
2194
  if (header.find('.date-filter-control').length > 0) {
2194
2195
  $.each(that.columns, function (i, _ref8) {
2195
- var filterControl = _ref8.filterControl,
2196
+ var filterDefault = _ref8.filterDefault,
2197
+ filterControl = _ref8.filterControl,
2196
2198
  field = _ref8.field,
2197
2199
  filterDatepickerOptions = _ref8.filterDatepickerOptions;
2198
2200
 
2199
2201
  if (filterControl !== undefined && filterControl.toLowerCase() === 'datepicker') {
2200
- header.find(".date-filter-control.bootstrap-table-filter-control-".concat(field)).datepicker(filterDatepickerOptions).on('changeDate', function (_ref9) {
2202
+ var $datepicker = header.find(".date-filter-control.bootstrap-table-filter-control-".concat(field));
2203
+ $datepicker.datepicker(filterDatepickerOptions);
2204
+
2205
+ if (filterDefault) {
2206
+ $datepicker.datepicker('setDate', filterDefault);
2207
+ }
2208
+
2209
+ $datepicker.on('changeDate', function (_ref9) {
2201
2210
  var currentTarget = _ref9.currentTarget,
2202
2211
  keyCode = _ref9.keyCode;
2203
2212
  clearTimeout(currentTarget.timeoutId || 0);
@@ -2269,7 +2278,7 @@
2269
2278
  }
2270
2279
  var filterDataMethods = {
2271
2280
  func: function func(filterDataSource, selectControl, filterOrderBy, selected) {
2272
- var variableValues = window[filterDataSource].apply();
2281
+ var variableValues = window[filterDataSource].apply(); // eslint-disable-next-line guard-for-in
2273
2282
 
2274
2283
  for (var key in variableValues) {
2275
2284
  addOptionToSelectControl(selectControl, key, variableValues[key], selected);
@@ -2286,7 +2295,8 @@
2286
2295
  objectKeys.forEach(function (key) {
2287
2296
  variableValues = variableValues[key];
2288
2297
  });
2289
- }
2298
+ } // eslint-disable-next-line guard-for-in
2299
+
2290
2300
 
2291
2301
  for (var key in variableValues) {
2292
2302
  addOptionToSelectControl(selectControl, key, variableValues[key], selected);
@@ -2313,6 +2323,7 @@
2313
2323
  url: filterDataSource,
2314
2324
  dataType: 'json',
2315
2325
  success: function success(data) {
2326
+ // eslint-disable-next-line guard-for-in
2316
2327
  for (var key in data) {
2317
2328
  addOptionToSelectControl(selectControl, key, data[key], selected);
2318
2329
  }
@@ -2322,7 +2333,7 @@
2322
2333
  });
2323
2334
  },
2324
2335
  json: function json(filterDataSource, selectControl, filterOrderBy, selected) {
2325
- var variableValues = JSON.parse(filterDataSource);
2336
+ var variableValues = JSON.parse(filterDataSource); // eslint-disable-next-line guard-for-in
2326
2337
 
2327
2338
  for (var key in variableValues) {
2328
2339
  addOptionToSelectControl(selectControl, key, variableValues[key], selected);
@@ -1224,6 +1224,14 @@
1224
1224
 
1225
1225
  (_get2 = _get(_getPrototypeOf(_class.prototype), "initBody", this)).call.apply(_get2, [this].concat(args));
1226
1226
 
1227
+ if (this.$fixedColumns && this.$fixedColumns.length) {
1228
+ this.$fixedColumns.toggle(this.fixedColumnsSupported());
1229
+ }
1230
+
1231
+ if (this.$fixedColumnsRight && this.$fixedColumnsRight.length) {
1232
+ this.$fixedColumnsRight.toggle(this.fixedColumnsSupported());
1233
+ }
1234
+
1227
1235
  if (!this.fixedColumnsSupported()) {
1228
1236
  return;
1229
1237
  }
@@ -1285,7 +1285,7 @@
1285
1285
  if (this.options.customSort) {
1286
1286
  Utils.calculateObjectValue(this.options, this.options.customSort, [this.options.sortName, this.options.sortOrder, this.data]);
1287
1287
  } else {
1288
- this.data.sort(function (a, b) {
1288
+ this.options.data.sort(function (a, b) {
1289
1289
  var groupByFields = _this.getGroupByFields();
1290
1290
 
1291
1291
  var fieldValuesA = [];
@@ -1354,10 +1354,8 @@
1354
1354
  this.columns.forEach(function (column) {
1355
1355
  if (column.checkbox) {
1356
1356
  checkBox = true;
1357
- } else {
1358
- if (column.visible) {
1359
- visibleColumns += 1;
1360
- }
1357
+ } else if (column.visible) {
1358
+ visibleColumns += 1;
1361
1359
  }
1362
1360
  });
1363
1361
 
@@ -1379,8 +1377,8 @@
1379
1377
 
1380
1378
  var formattedValue = item.name;
1381
1379
 
1382
- if (typeof that.options.groupByFormatter === 'function') {
1383
- formattedValue = that.options.groupByFormatter(item.name, item.id, item.data);
1380
+ if (that.options.groupByFormatter !== undefined) {
1381
+ formattedValue = Utils.calculateObjectValue(that.options, that.options.groupByFormatter, [item.name, item.id, item.data]);
1384
1382
  }
1385
1383
 
1386
1384
  html.push('<td', Utils.sprintf(' colspan="%s"', visibleColumns), '>', formattedValue);
@@ -1410,9 +1408,15 @@
1410
1408
 
1411
1409
  if (this.options.groupByToggle) {
1412
1410
  this.$container.off('click', '.groupBy').on('click', '.groupBy', function () {
1413
- $(this).toggleClass('expanded collapsed');
1414
- $(this).find('span').toggleClass("".concat(that.options.icons.collapseGroup, " ").concat(that.options.icons.expandGroup));
1415
- that.$body.find("tr[data-parent-index=".concat($(this).closest('tr').data('group-index'), "]")).toggleClass('hidden');
1411
+ var $this = $(this);
1412
+ var groupIndex = $this.closest('tr').data('group-index');
1413
+ var $groupRows = that.$body.find("tr[data-parent-index=".concat(groupIndex, "]"));
1414
+ $this.toggleClass('expanded collapsed');
1415
+ $this.find('span').toggleClass("".concat(that.options.icons.collapseGroup, " ").concat(that.options.icons.expandGroup));
1416
+ $groupRows.toggleClass('hidden');
1417
+ $groupRows.each(function (i, element) {
1418
+ return that.collapseRow($(element).data('index'));
1419
+ });
1416
1420
  });
1417
1421
  }
1418
1422
 
@@ -1141,7 +1141,7 @@
1141
1141
  }
1142
1142
 
1143
1143
  if (this.options.minWidth < 100 && this.options.resizable) {
1144
- console.info('The minWidth when the resizable extension is active should be greater or equal than 100');
1144
+ console.warn('The minWidth when the resizable extension is active should be greater or equal than 100');
1145
1145
  this.options.minWidth = 100;
1146
1146
  }
1147
1147
 
@@ -1221,12 +1221,10 @@
1221
1221
  } else if (width > this.options.minWidth && height > this.options.minHeight) {
1222
1222
  this.conditionFullView();
1223
1223
  }
1224
- } else {
1225
- if (width <= this.options.minWidth) {
1226
- this.conditionCardView();
1227
- } else if (width > this.options.minWidth) {
1228
- this.conditionFullView();
1229
- }
1224
+ } else if (width <= this.options.minWidth) {
1225
+ this.conditionCardView();
1226
+ } else if (width > this.options.minWidth) {
1227
+ this.conditionFullView();
1230
1228
  }
1231
1229
 
1232
1230
  this.resetView();
@@ -1248,13 +1248,40 @@
1248
1248
 
1249
1249
  var isSingleSort = false;
1250
1250
  var Utils = $.fn.bootstrapTable.utils;
1251
+ $.extend($.fn.bootstrapTable.defaults.icons, {
1252
+ plus: {
1253
+ bootstrap3: 'glyphicon-plus',
1254
+ bootstrap4: 'fa-plus',
1255
+ bootstrap5: 'fa-plus',
1256
+ semantic: 'fa-plus',
1257
+ materialize: 'plus',
1258
+ foundation: 'fa-plus',
1259
+ bulma: 'fa-plus',
1260
+ 'bootstrap-table': 'icon-plus'
1261
+ }[$.fn.bootstrapTable.theme] || 'fa-clock',
1262
+ minus: {
1263
+ bootstrap3: 'glyphicon-minus',
1264
+ bootstrap4: 'fa-minus',
1265
+ bootstrap5: 'fa-minus',
1266
+ semantic: 'fa-minus',
1267
+ materialize: 'minus',
1268
+ foundation: 'fa-minus',
1269
+ bulma: 'fa-minus',
1270
+ 'bootstrap-table': 'icon-minus'
1271
+ }[$.fn.bootstrapTable.theme] || 'fa-clock',
1272
+ sort: {
1273
+ bootstrap3: 'glyphicon-sort',
1274
+ bootstrap4: 'fa-sort',
1275
+ bootstrap5: 'fa-sort',
1276
+ semantic: 'fa-sort',
1277
+ materialize: 'sort',
1278
+ foundation: 'fa-sort',
1279
+ bulma: 'fa-sort',
1280
+ 'bootstrap-table': 'icon-sort-amount-asc'
1281
+ }[$.fn.bootstrapTable.theme] || 'fa-clock'
1282
+ });
1251
1283
  var theme = {
1252
1284
  bootstrap3: {
1253
- icons: {
1254
- plus: 'glyphicon-plus',
1255
- minus: 'glyphicon-minus',
1256
- sort: 'glyphicon-sort'
1257
- },
1258
1285
  html: {
1259
1286
  multipleSortModal: "\n <div class=\"modal fade\" id=\"%s\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"%sLabel\" aria-hidden=\"true\">\n <div class=\"modal-dialog\">\n <div class=\"modal-content\">\n <div class=\"modal-header\">\n <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\"><span aria-hidden=\"true\">&times;</span></button>\n <h4 class=\"modal-title\" id=\"%sLabel\">%s</h4>\n </div>\n <div class=\"modal-body\">\n <div class=\"bootstrap-table\">\n <div class=\"fixed-table-toolbar\">\n <div class=\"bars\">\n <div id=\"toolbar\">\n <button id=\"add\" type=\"button\" class=\"btn btn-default\">%s %s</button>\n <button id=\"delete\" type=\"button\" class=\"btn btn-default\" disabled>%s %s</button>\n </div>\n </div>\n </div>\n <div class=\"fixed-table-container\">\n <table id=\"multi-sort\" class=\"table\">\n <thead>\n <tr>\n <th></th>\n <th><div class=\"th-inner\">%s</div></th>\n <th><div class=\"th-inner\">%s</div></th>\n </tr>\n </thead>\n <tbody></tbody>\n </table>\n </div>\n </div>\n </div>\n <div class=\"modal-footer\">\n <button type=\"button\" class=\"btn btn-default\" data-dismiss=\"modal\">%s</button>\n <button type=\"button\" class=\"btn btn-primary multi-sort-order-button\">%s</button>\n </div>\n </div>\n </div>\n </div>\n ",
1260
1287
  multipleSortButton: '<button class="multi-sort btn btn-default" type="button" data-toggle="modal" data-target="#%s" title="%s">%s</button>',
@@ -1262,11 +1289,6 @@
1262
1289
  }
1263
1290
  },
1264
1291
  bootstrap4: {
1265
- icons: {
1266
- 'plus': 'fa-plus',
1267
- 'minus': 'fa-minus',
1268
- 'sort': 'fa-sort'
1269
- },
1270
1292
  html: {
1271
1293
  multipleSortModal: "\n <div class=\"modal fade\" id=\"%s\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"%sLabel\" aria-hidden=\"true\">\n <div class=\"modal-dialog\" role=\"document\">\n <div class=\"modal-content\">\n <div class=\"modal-header\">\n <h5 class=\"modal-title\" id=\"%sLabel\">%s</h5>\n <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\">\n <span aria-hidden=\"true\">&times;</span>\n </button>\n </div>\n <div class=\"modal-body\">\n <div class=\"bootstrap-table\">\n <div class=\"fixed-table-toolbar\">\n <div class=\"bars\">\n <div id=\"toolbar\" class=\"pb-3\">\n <button id=\"add\" type=\"button\" class=\"btn btn-secondary\">%s %s</button>\n <button id=\"delete\" type=\"button\" class=\"btn btn-secondary\" disabled>%s %s</button>\n </div>\n </div>\n </div>\n <div class=\"fixed-table-container\">\n <table id=\"multi-sort\" class=\"table\">\n <thead>\n <tr>\n <th></th>\n <th><div class=\"th-inner\">%s</div></th>\n <th><div class=\"th-inner\">%s</div></th>\n </tr>\n </thead>\n <tbody></tbody>\n </table>\n </div>\n </div>\n </div>\n <div class=\"modal-footer\">\n <button type=\"button\" class=\"btn btn-secondary\" data-dismiss=\"modal\">%s</button>\n <button type=\"button\" class=\"btn btn-primary multi-sort-order-button\">%s</button>\n </div>\n </div>\n </div>\n </div>\n ",
1272
1294
  multipleSortButton: '<button class="multi-sort btn btn-secondary" type="button" data-toggle="modal" data-target="#%s" title="%s">%s</button>',
@@ -1274,11 +1296,6 @@
1274
1296
  }
1275
1297
  },
1276
1298
  bootstrap5: {
1277
- icons: {
1278
- 'plus': 'fa-plus',
1279
- 'minus': 'fa-minus',
1280
- 'sort': 'fa-sort'
1281
- },
1282
1299
  html: {
1283
1300
  multipleSortModal: "\n <div class=\"modal fade\" id=\"%s\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"%sLabel\" aria-hidden=\"true\">\n <div class=\"modal-dialog\" role=\"document\">\n <div class=\"modal-content\">\n <div class=\"modal-header\">\n <h5 class=\"modal-title\" id=\"%sLabel\">%s</h5>\n <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\">\n <span aria-hidden=\"true\">&times;</span>\n </button>\n </div>\n <div class=\"modal-body\">\n <div class=\"bootstrap-table\">\n <div class=\"fixed-table-toolbar\">\n <div class=\"bars\">\n <div id=\"toolbar\" class=\"pb-3\">\n <button id=\"add\" type=\"button\" class=\"btn btn-secondary\">%s %s</button>\n <button id=\"delete\" type=\"button\" class=\"btn btn-secondary\" disabled>%s %s</button>\n </div>\n </div>\n </div>\n <div class=\"fixed-table-container\">\n <table id=\"multi-sort\" class=\"table\">\n <thead>\n <tr>\n <th></th>\n <th><div class=\"th-inner\">%s</div></th>\n <th><div class=\"th-inner\">%s</div></th>\n </tr>\n </thead>\n <tbody></tbody>\n </table>\n </div>\n </div>\n </div>\n <div class=\"modal-footer\">\n <button type=\"button\" class=\"btn btn-secondary\" data-dismiss=\"modal\">%s</button>\n <button type=\"button\" class=\"btn btn-primary multi-sort-order-button\">%s</button>\n </div>\n </div>\n </div>\n </div>\n ",
1284
1301
  multipleSortButton: '<button class="multi-sort btn btn-secondary" type="button" data-toggle="modal" data-target="#%s" title="%s">%s</button>',
@@ -1286,11 +1303,6 @@
1286
1303
  }
1287
1304
  },
1288
1305
  semantic: {
1289
- icons: {
1290
- 'plus': 'fa-plus',
1291
- 'minus': 'fa-minus',
1292
- 'sort': 'fa-sort'
1293
- },
1294
1306
  html: {
1295
1307
  multipleSortModal: "\n <div class=\"ui modal tiny\" id=\"%s\" aria-labelledby=\"%sLabel\" aria-hidden=\"true\">\n <i class=\"close icon\"></i>\n <div class=\"header\" id=\"%sLabel\">\n %s\n </div>\n <div class=\"image content\">\n <div class=\"bootstrap-table\">\n <div class=\"fixed-table-toolbar\">\n <div class=\"bars\">\n <div id=\"toolbar\" class=\"pb-3\">\n <button id=\"add\" type=\"button\" class=\"ui button\">%s %s</button>\n <button id=\"delete\" type=\"button\" class=\"ui button\" disabled>%s %s</button>\n </div>\n </div>\n </div>\n <div class=\"fixed-table-container\">\n <table id=\"multi-sort\" class=\"table\">\n <thead>\n <tr>\n <th></th>\n <th><div class=\"th-inner\">%s</div></th>\n <th><div class=\"th-inner\">%s</div></th>\n </tr>\n </thead>\n <tbody></tbody>\n </table>\n </div>\n </div>\n </div>\n <div class=\"actions\">\n <div class=\"ui button deny\">%s</div>\n <div class=\"ui button approve multi-sort-order-button\">%s</div>\n </div>\n </div>\n ",
1296
1308
  multipleSortButton: '<button class="multi-sort ui button" type="button" data-toggle="modal" data-target="#%s" title="%s">%s</button>',
@@ -1298,11 +1310,6 @@
1298
1310
  }
1299
1311
  },
1300
1312
  materialize: {
1301
- icons: {
1302
- 'plus': 'plus',
1303
- 'minus': 'minus',
1304
- 'sort': 'sort'
1305
- },
1306
1313
  html: {
1307
1314
  multipleSortModal: "\n <div id=\"%s\" class=\"modal\" aria-labelledby=\"%sLabel\" aria-hidden=\"true\">\n <div class=\"modal-content\" id=\"%sLabel\">\n <h4>%s</h4>\n <div class=\"bootstrap-table\">\n <div class=\"fixed-table-toolbar\">\n <div class=\"bars\">\n <div id=\"toolbar\" class=\"pb-3\">\n <button id=\"add\" type=\"button\" class=\"waves-effect waves-light btn\">%s %s</button>\n <button id=\"delete\" type=\"button\" class=\"waves-effect waves-light btn\" disabled>%s %s</button>\n </div>\n </div>\n </div>\n <div class=\"fixed-table-container\">\n <table id=\"multi-sort\" class=\"table\">\n <thead>\n <tr>\n <th></th>\n <th><div class=\"th-inner\">%s</div></th>\n <th><div class=\"th-inner\">%s</div></th>\n </tr>\n </thead>\n <tbody></tbody>\n </table>\n </div>\n </div>\n <div class=\"modal-footer\">\n <a href=\"javascript:void(0)\" class=\"modal-close waves-effect waves-light btn\">%s</a>\n <a href=\"javascript:void(0)\" class=\"modal-close waves-effect waves-light btn multi-sort-order-button\">%s</a>\n </div>\n </div>\n </div>\n ",
1308
1315
  multipleSortButton: '<a href="#%s" class="multi-sort waves-effect waves-light btn modal-trigger" type="button" data-toggle="modal" title="%s">%s</a>',
@@ -1310,11 +1317,6 @@
1310
1317
  }
1311
1318
  },
1312
1319
  foundation: {
1313
- icons: {
1314
- 'plus': 'fa-plus',
1315
- 'minus': 'fa-minus',
1316
- 'sort': 'fa-sort'
1317
- },
1318
1320
  html: {
1319
1321
  multipleSortModal: "\n <div class=\"reveal\" id=\"%s\" data-reveal aria-labelledby=\"%sLabel\" aria-hidden=\"true\">\n <div id=\"%sLabel\">\n <h1>%s</h1>\n <div class=\"bootstrap-table\">\n <div class=\"fixed-table-toolbar\">\n <div class=\"bars\">\n <div id=\"toolbar\" class=\"padding-bottom-2\">\n <button id=\"add\" type=\"button\" class=\"waves-effect waves-light button\">%s %s</button>\n <button id=\"delete\" type=\"button\" class=\"waves-effect waves-light button\" disabled>%s %s</button>\n </div>\n </div>\n </div>\n <div class=\"fixed-table-container\">\n <table id=\"multi-sort\" class=\"table\">\n <thead>\n <tr>\n <th></th>\n <th><div class=\"th-inner\">%s</div></th>\n <th><div class=\"th-inner\">%s</div></th>\n </tr>\n </thead>\n <tbody></tbody>\n </table>\n </div>\n </div>\n\n <button class=\"waves-effect waves-light button\" data-close aria-label=\"Close modal\" type=\"button\">\n <span aria-hidden=\"true\">%s</span>\n </button>\n <button class=\"waves-effect waves-light button multi-sort-order-button\" data-close aria-label=\"Order\" type=\"button\">\n <span aria-hidden=\"true\">%s</span>\n </button>\n </div>\n </div>\n ",
1320
1322
  multipleSortButton: '<button class="button multi-sort" data-open="%s" title="%s">%s</button>',
@@ -1322,11 +1324,6 @@
1322
1324
  }
1323
1325
  },
1324
1326
  bulma: {
1325
- icons: {
1326
- 'plus': 'fa-plus',
1327
- 'minus': 'fa-minus',
1328
- 'sort': 'fa-sort'
1329
- },
1330
1327
  html: {
1331
1328
  multipleSortModal: "\n <div class=\"modal\" id=\"%s\" aria-labelledby=\"%sLabel\" aria-hidden=\"true\">\n <div class=\"modal-background\"></div>\n <div class=\"modal-content\" id=\"%sLabel\">\n <div class=\"box\">\n <h2>%s</h2>\n <div class=\"bootstrap-table\">\n <div class=\"fixed-table-toolbar\">\n <div class=\"bars\">\n <div id=\"toolbar\" class=\"padding-bottom-2\">\n <button id=\"add\" type=\"button\" class=\"waves-effect waves-light button\">%s %s</button>\n <button id=\"delete\" type=\"button\" class=\"waves-effect waves-light button\" disabled>%s %s</button>\n </div>\n </div>\n </div>\n <div class=\"fixed-table-container\">\n <table id=\"multi-sort\" class=\"table\">\n <thead>\n <tr>\n <th></th>\n <th><div class=\"th-inner\">%s</div></th>\n <th><div class=\"th-inner\">%s</div></th>\n </tr>\n </thead>\n <tbody></tbody>\n </table>\n </div>\n </div>\n <button type=\"button\" class=\"waves-effect waves-light button\" data-close>%s</button>\n <button type=\"button\" class=\"waves-effect waves-light button multi-sort-order-button\" data-close>%s</button>\n </div>\n </div>\n </div>\n ",
1332
1329
  multipleSortButton: '<button class="button multi-sort" data-target="%s" title="%s">%s</button>',
@@ -1334,11 +1331,6 @@
1334
1331
  }
1335
1332
  },
1336
1333
  'bootstrap-table': {
1337
- icons: {
1338
- 'plus': 'icon-plus',
1339
- 'minus': 'icon-minus',
1340
- 'sort': 'icon-sort-amount-asc'
1341
- },
1342
1334
  html: {
1343
1335
  multipleSortModal: "\n <div class=\"modal\" id=\"%s\" aria-labelledby=\"%sLabel\" aria-hidden=\"true\">\n <div class=\"modal-background\"></div>\n <div class=\"modal-content\" id=\"%sLabel\">\n <div class=\"box\">\n <h2>%s</h2>\n <div class=\"bootstrap-table\">\n <div class=\"fixed-table-toolbar\">\n <div class=\"bars\">\n <div id=\"toolbar\" class=\"padding-bottom-2\">\n <button id=\"add\" type=\"button\" class=\"btn\">%s %s</button>\n <button id=\"delete\" type=\"button\" class=\"btn\" disabled>%s %s</button>\n </div>\n </div>\n </div>\n <div class=\"fixed-table-container\">\n <table id=\"multi-sort\" class=\"table\">\n <thead>\n <tr>\n <th></th>\n <th><div class=\"th-inner\">%s</div></th>\n <th><div class=\"th-inner\">%s</div></th>\n </tr>\n </thead>\n <tbody></tbody>\n </table>\n </div>\n </div>\n <div class=\"mt-30\">\n <button type=\"button\" class=\"btn\" data-close>%s</button>\n <button type=\"button\" class=\"btn multi-sort-order-button\" data-close>%s</button>\n </div>\n </div>\n </div>\n </div>\n ",
1344
1336
  multipleSortButton: '<button class="btn multi-sort" data-target="%s" title="%s">%s</button>',
@@ -1355,7 +1347,7 @@
1355
1347
  var o = that.options;
1356
1348
 
1357
1349
  if (!$(_id).hasClass('modal')) {
1358
- var sModal = Utils.sprintf(theme.html.multipleSortModal, _selector, _selector, _selector, that.options.formatMultipleSort(), Utils.sprintf(that.constants.html.icon, o.iconsPrefix, theme.icons.plus), that.options.formatAddLevel(), Utils.sprintf(that.constants.html.icon, o.iconsPrefix, theme.icons.minus), that.options.formatDeleteLevel(), that.options.formatColumn(), that.options.formatOrder(), that.options.formatCancel(), that.options.formatSort());
1350
+ var sModal = Utils.sprintf(theme.html.multipleSortModal, _selector, _selector, _selector, that.options.formatMultipleSort(), Utils.sprintf(that.constants.html.icon, o.iconsPrefix, o.icons.plus), that.options.formatAddLevel(), Utils.sprintf(that.constants.html.icon, o.iconsPrefix, o.icons.minus), that.options.formatDeleteLevel(), that.options.formatColumn(), that.options.formatOrder(), that.options.formatCancel(), that.options.formatSort());
1359
1351
  $('body').append($(sModal));
1360
1352
  that.$sortModal = $(_id);
1361
1353
  var $rows = that.$sortModal.find('tbody > tr');
@@ -1519,11 +1511,13 @@
1519
1511
  that.onMultipleSort();
1520
1512
  }
1521
1513
 
1522
- this.buttons = Object.assign(this.buttons, {
1523
- multipleSort: {
1524
- 'html': Utils.sprintf(theme.html.multipleSortButton, that.sortModalSelector, this.options.formatMultipleSort(), Utils.sprintf(that.constants.html.icon, o.iconsPrefix, theme.icons.sort))
1525
- }
1526
- });
1514
+ if (this.options.showMultiSortButton) {
1515
+ this.buttons = Object.assign(this.buttons, {
1516
+ multipleSort: {
1517
+ html: Utils.sprintf(theme.html.multipleSortButton, that.sortModalSelector, this.options.formatMultipleSort(), Utils.sprintf(that.constants.html.icon, o.iconsPrefix, o.icons.sort))
1518
+ }
1519
+ });
1520
+ }
1527
1521
 
1528
1522
  for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
1529
1523
  args[_key] = arguments[_key];
@@ -1753,9 +1747,11 @@
1753
1747
  this.options.sortName = undefined;
1754
1748
 
1755
1749
  if (this.options.sidePagination === 'server') {
1750
+ var queryParams = this.options.queryParams;
1751
+
1756
1752
  this.options.queryParams = function (params) {
1757
1753
  params.multiSort = _this2.options.sortPriority;
1758
- return $.fn.bootstrapTable.utils.calculateObjectValue(_this2.options, _this2.options.queryParams, [params]);
1754
+ return $.fn.bootstrapTable.utils.calculateObjectValue(_this2.options, queryParams, [params]);
1759
1755
  };
1760
1756
 
1761
1757
  isSingleSort = false;
@@ -1028,9 +1028,32 @@
1028
1028
  var $jumpTo = $pageGroup.find('.page-jump-to');
1029
1029
 
1030
1030
  if (!$jumpTo.length) {
1031
- $jumpTo = $("\n <div class=\"page-jump-to ".concat(this.constants.classes.inputGroup, "\">\n <input type=\"number\" class=\"").concat(this.constants.classes.input).concat(Utils.sprintf(' input-%s', this.options.iconSize), "\" value=\"").concat(this.options.pageNumber, "\">\n <button class=\"").concat(this.constants.buttonsClass, "\" type=\"button\">\n ").concat(this.options.formatJumpTo(), "\n </button>\n </div>\n ")).appendTo($pageGroup);
1032
- $jumpTo.on('click', 'button', function (e) {
1033
- _this.selectPage(+$(e.target).parent('.page-jump-to').find('input').val());
1031
+ $jumpTo = $(Utils.sprintf(this.constants.html.inputGroup, "<input type=\"number\"\n class=\"".concat(this.constants.classes.input).concat(Utils.sprintf(' %s%s', this.constants.classes.inputPrefix, this.options.iconSize), "\"\n value=\"").concat(this.options.pageNumber, "\"\n min=\"1\"\n max=\"").concat(this.totalPages, "\">"), "<button class=\"".concat(this.constants.buttonsClass, "\" type=\"button\">\n ").concat(this.options.formatJumpTo(), "\n </button>"))).addClass('page-jump-to').appendTo($pageGroup);
1032
+ var $input = $jumpTo.find('input');
1033
+ $jumpTo.find('button').click(function () {
1034
+ _this.selectPage(+$input.val());
1035
+ });
1036
+ $input.keyup(function (e) {
1037
+ if ($input.val() === '') {
1038
+ return;
1039
+ }
1040
+
1041
+ if (e.keyCode === 13) {
1042
+ _this.selectPage(+$input.val());
1043
+
1044
+ return;
1045
+ }
1046
+
1047
+ if (+$input.val() < +$input.attr('min')) {
1048
+ $input.val($input.attr('min'));
1049
+ } else if (+$input.val() > +$input.attr('max')) {
1050
+ $input.val($input.attr('max'));
1051
+ }
1052
+ });
1053
+ $input.blur(function () {
1054
+ if ($input.val() === '') {
1055
+ $input.val(_this.options.pageNumber);
1056
+ }
1034
1057
  });
1035
1058
  }
1036
1059
  }
@@ -893,9 +893,11 @@
893
893
  $.extend($.fn.bootstrapTable.defaults, {
894
894
  usePipeline: false,
895
895
  pipelineSize: 1000,
896
+ // eslint-disable-next-line no-unused-vars
896
897
  onCachedDataHit: function onCachedDataHit(data) {
897
898
  return false;
898
899
  },
900
+ // eslint-disable-next-line no-unused-vars
899
901
  onCachedDataReset: function onCachedDataReset(data) {
900
902
  return false;
901
903
  }
@@ -906,7 +908,6 @@
906
908
  });
907
909
  var BootstrapTable = $.fn.bootstrapTable.Constructor;
908
910
  var _init = BootstrapTable.prototype.init;
909
- var _initServer = BootstrapTable.prototype.initServer;
910
911
  var _onSearch = BootstrapTable.prototype.onSearch;
911
912
  var _onSort = BootstrapTable.prototype.onSort;
912
913
  var _onPageListChange = BootstrapTable.prototype.onPageListChange;
@@ -929,7 +930,7 @@
929
930
  this.resetCache = true;
930
931
  };
931
932
 
932
- BootstrapTable.prototype.onSearch = function (event) {
933
+ BootstrapTable.prototype.onSearch = function () {
933
934
  /* force a cache reset on search */
934
935
  if (this.options.usePipeline) {
935
936
  this.resetCache = true;
@@ -938,7 +939,7 @@
938
939
  _onSearch.apply(this, Array.prototype.slice.apply(arguments));
939
940
  };
940
941
 
941
- BootstrapTable.prototype.onSort = function (event) {
942
+ BootstrapTable.prototype.onSort = function () {
942
943
  /* force a cache reset on sort */
943
944
  if (this.options.usePipeline) {
944
945
  this.resetCache = true;
@@ -973,8 +974,8 @@
973
974
  for (var i = 0; i <= numWindows; i++) {
974
975
  var b = i * this.options.pipelineSize;
975
976
  this.cacheWindows[i] = {
976
- 'lower': b,
977
- 'upper': b + this.options.pipelineSize - 1
977
+ lower: b,
978
+ upper: b + this.options.pipelineSize - 1
978
979
  };
979
980
  }
980
981
  };
@@ -1066,10 +1067,8 @@
1066
1067
  useAjax = false;
1067
1068
  }
1068
1069
  }
1069
- } else {
1070
- if (params.limit === 0) {
1071
- delete params.limit;
1072
- }
1070
+ } else if (params.limit === 0) {
1071
+ delete params.limit;
1073
1072
  }
1074
1073
  }
1075
1074
  } // force an ajax call - this is on search, sort or page size change