bootstrap-table-rails 1.15.4 → 1.15.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (26) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +7 -21
  3. data/lib/bootstrap-table-rails/version.rb +1 -1
  4. data/vendor/assets/javascripts/bootstrap-table/bootstrap-table-locale-all.js +182 -0
  5. data/vendor/assets/javascripts/bootstrap-table/bootstrap-table.css +1 -1
  6. data/vendor/assets/javascripts/bootstrap-table/bootstrap-table.js +145 -110
  7. data/vendor/assets/javascripts/bootstrap-table/extensions/export/bootstrap-table-export.js +34 -28
  8. data/vendor/assets/javascripts/bootstrap-table/extensions/filter-control/bootstrap-table-filter-control.js +2 -2
  9. data/vendor/assets/javascripts/bootstrap-table/extensions/sticky-header/bootstrap-table-sticky-header.js +6 -2
  10. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-sr-Cyrl-RS.js +721 -0
  11. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-sr-Latn-RS.js +721 -0
  12. data/vendor/assets/javascripts/bootstrap-table/themes/bulma/bootstrap-table-bulma.js +1 -1
  13. data/vendor/assets/javascripts/bootstrap-table/themes/foundation/bootstrap-table-foundation.js +1 -1
  14. data/vendor/assets/javascripts/bootstrap-table/themes/materialize/bootstrap-table-materialize.js +1 -1
  15. data/vendor/assets/javascripts/bootstrap-table/themes/semantic/bootstrap-table-semantic.js +1 -1
  16. metadata +4 -12
  17. data/vendor/assets/javascripts/bootstrap-table/extensions/auto-refresh/bootstrap-table-auto-refresh.css +0 -3
  18. data/vendor/assets/javascripts/bootstrap-table/extensions/group-by/bootstrap-table-group-by.css +0 -53
  19. data/vendor/assets/javascripts/bootstrap-table/extensions/group-by/bootstrap-table-group-by.js +0 -257
  20. data/vendor/assets/javascripts/bootstrap-table/extensions/multi-column-toggle/bootstrap-table-multi-toggle.js +0 -105
  21. data/vendor/assets/javascripts/bootstrap-table/extensions/multiple-search/bootstrap-table-multiple-search.js +0 -85
  22. data/vendor/assets/javascripts/bootstrap-table/extensions/multiple-selection-row/bootstrap-table-multiple-selection-row.css +0 -17
  23. data/vendor/assets/javascripts/bootstrap-table/extensions/multiple-selection-row/bootstrap-table-multiple-selection-row.js +0 -143
  24. data/vendor/assets/javascripts/bootstrap-table/extensions/select2-filter/bootstrap-table-select2-filter.js +0 -341
  25. data/vendor/assets/javascripts/bootstrap-table/extensions/tree-column/bootstrap-table-tree-column.css +0 -1
  26. data/vendor/assets/javascripts/bootstrap-table/extensions/tree-column/bootstrap-table-tree-column.js +0 -142
@@ -2280,9 +2280,6 @@
2280
2280
  }
2281
2281
 
2282
2282
  var $menu = $(this.constants.html.toolbarDropdown.join(''));
2283
- this.$export = $("\n <div class=\"export ".concat(this.constants.classes.buttonsDropdown, "\">\n <button class=\"").concat(this.constants.buttonsClass, " dropdown-toggle\"\n aria-label=\"Export\"\n data-toggle=\"dropdown\"\n type=\"button\"\n title=\"").concat(o.formatExport(), "\">\n ").concat(o.showButtonIcons ? Utils.sprintf(this.constants.html.icon, o.iconsPrefix, o.icons.export) : '', "\n ").concat(o.showButtonText ? o.formatExport() : '', "\n ").concat(this.constants.html.dropdownCaret, "\n </button>\n </div>\n ")).appendTo($btnGroup);
2284
- this.$export.append($menu);
2285
- this.updateExportButton();
2286
2283
  var exportTypes = o.exportTypes;
2287
2284
 
2288
2285
  if (typeof exportTypes === 'string') {
@@ -2290,43 +2287,52 @@
2290
2287
  exportTypes = types.map(function (t) {
2291
2288
  return t.slice(1, -1);
2292
2289
  });
2293
- } // themes support
2294
-
2295
-
2296
- if ($menu.children().length) {
2297
- $menu = $menu.children().eq(0);
2298
2290
  }
2299
2291
 
2300
- var _iteratorNormalCompletion = true;
2301
- var _didIteratorError = false;
2302
- var _iteratorError = undefined;
2292
+ this.$export = $(exportTypes.length === 1 ? "\n <div class=\"export ".concat(this.constants.classes.buttonsDropdown, "\"\n data-type=\"").concat(exportTypes[0], "\">\n <button class=\"").concat(this.constants.buttonsClass, "\"\n aria-label=\"Export\"\n type=\"button\"\n title=\"").concat(o.formatExport(), "\">\n ").concat(o.showButtonIcons ? Utils.sprintf(this.constants.html.icon, o.iconsPrefix, o.icons.export) : '', "\n ").concat(o.showButtonText ? o.formatExport() : '', "\n </button>\n </div>\n ") : "\n <div class=\"export ".concat(this.constants.classes.buttonsDropdown, "\">\n <button class=\"").concat(this.constants.buttonsClass, " dropdown-toggle\"\n aria-label=\"Export\"\n data-toggle=\"dropdown\"\n type=\"button\"\n title=\"").concat(o.formatExport(), "\">\n ").concat(o.showButtonIcons ? Utils.sprintf(this.constants.html.icon, o.iconsPrefix, o.icons.export) : '', "\n ").concat(o.showButtonText ? o.formatExport() : '', "\n ").concat(this.constants.html.dropdownCaret, "\n </button>\n </div>\n ")).appendTo($btnGroup);
2293
+ var $items = this.$export;
2303
2294
 
2304
- try {
2305
- for (var _iterator = exportTypes[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
2306
- var type = _step.value;
2295
+ if (exportTypes.length > 1) {
2296
+ this.$export.append($menu); // themes support
2307
2297
 
2308
- if (TYPE_NAME.hasOwnProperty(type)) {
2309
- var $item = $(Utils.sprintf(this.constants.html.pageDropdownItem, '', TYPE_NAME[type]));
2310
- $item.attr('data-type', type);
2311
- $menu.append($item);
2312
- }
2298
+ if ($menu.children().length) {
2299
+ $menu = $menu.children().eq(0);
2313
2300
  }
2314
- } catch (err) {
2315
- _didIteratorError = true;
2316
- _iteratorError = err;
2317
- } finally {
2301
+
2302
+ var _iteratorNormalCompletion = true;
2303
+ var _didIteratorError = false;
2304
+ var _iteratorError = undefined;
2305
+
2318
2306
  try {
2319
- if (!_iteratorNormalCompletion && _iterator.return != null) {
2320
- _iterator.return();
2307
+ for (var _iterator = exportTypes[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
2308
+ var type = _step.value;
2309
+
2310
+ if (TYPE_NAME.hasOwnProperty(type)) {
2311
+ var $item = $(Utils.sprintf(this.constants.html.pageDropdownItem, '', TYPE_NAME[type]));
2312
+ $item.attr('data-type', type);
2313
+ $menu.append($item);
2314
+ }
2321
2315
  }
2316
+ } catch (err) {
2317
+ _didIteratorError = true;
2318
+ _iteratorError = err;
2322
2319
  } finally {
2323
- if (_didIteratorError) {
2324
- throw _iteratorError;
2320
+ try {
2321
+ if (!_iteratorNormalCompletion && _iterator.return != null) {
2322
+ _iterator.return();
2323
+ }
2324
+ } finally {
2325
+ if (_didIteratorError) {
2326
+ throw _iteratorError;
2327
+ }
2325
2328
  }
2326
2329
  }
2330
+
2331
+ $items = $menu.children();
2327
2332
  }
2328
2333
 
2329
- $menu.children().click(function (e) {
2334
+ this.updateExportButton();
2335
+ $items.click(function (e) {
2330
2336
  e.preventDefault();
2331
2337
  var type = $(e.currentTarget).data('type');
2332
2338
  var exportOptions = {
@@ -1879,7 +1879,7 @@
1879
1879
  var z = that.options.pagination ? that.options.sidePagination === 'server' ? that.pageTo : that.options.totalRows : that.pageTo;
1880
1880
  $.each(that.header.fields, function (j, field) {
1881
1881
  var column = that.columns[that.fieldsColumnsIndex[field]];
1882
- var selectControl = $(".bootstrap-table-filter-control-".concat(UtilsFilterControl.escapeID(column.field)));
1882
+ var selectControl = that.$tableBody.find(".bootstrap-table-filter-control-".concat(UtilsFilterControl.escapeID(column.field)));
1883
1883
 
1884
1884
  if (UtilsFilterControl.isColumnSearchableViaSelect(column) && UtilsFilterControl.isFilterDataNotGiven(column) && UtilsFilterControl.hasSelectControlElement(selectControl)) {
1885
1885
  if (selectControl.get(selectControl.length - 1).options.length === 0) {
@@ -1979,7 +1979,7 @@
1979
1979
 
1980
1980
  if (filterDataType !== null) {
1981
1981
  filterDataSource = column.filterData.substring(column.filterData.indexOf(':') + 1, column.filterData.length);
1982
- selectControl = $(".bootstrap-table-filter-control-".concat(UtilsFilterControl.escapeID(column.field)));
1982
+ selectControl = that.$tableBody.find(".bootstrap-table-filter-control-".concat(UtilsFilterControl.escapeID(column.field)));
1983
1983
  UtilsFilterControl.addOptionToSelectControl(selectControl, '', column.filterControlPlaceholder, column.filterDefault);
1984
1984
  filterDataType(filterDataSource, selectControl, column.filterDefault);
1985
1985
  } else {
@@ -921,7 +921,9 @@
921
921
  var Utils = $.fn.bootstrapTable.utils;
922
922
  $.extend($.fn.bootstrapTable.defaults, {
923
923
  stickyHeader: false,
924
- stickyHeaderOffsetY: 0
924
+ stickyHeaderOffsetY: 0,
925
+ stickyHeaderOffsetLeft: 0,
926
+ stickyHeaderOffsetRight: 0
925
927
  });
926
928
  var hiddenClass = {
927
929
  bootstrap3: 'hidden'
@@ -994,7 +996,9 @@
994
996
 
995
997
  this.$stickyContainer.removeClass(hiddenClass).addClass('fix-sticky fixed-table-container'); // stick it in position
996
998
 
997
- this.$stickyContainer.css('top', "".concat(this.options.stickyHeaderOffsetY, "px")); // create scrollable container for header
999
+ this.$stickyContainer.css('top', "".concat(this.options.stickyHeaderOffsetY));
1000
+ this.$stickyContainer.css('left', "".concat(this.options.stickyHeaderOffsetLeft));
1001
+ this.$stickyContainer.css('right', "".concat(this.options.stickyHeaderOffsetRight)); // create scrollable container for header
998
1002
 
999
1003
  this.$stickyTable = $('<table/>');
1000
1004
  this.$stickyTable.addClass(this.options.classes); // append cloned header to dom