bootstrap-table-rails 1.17.1 → 1.18.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/bootstrap-table-rails/version.rb +1 -1
- data/vendor/assets/javascripts/bootstrap-table/bootstrap-table-locale-all.js +321 -3
- data/vendor/assets/javascripts/bootstrap-table/bootstrap-table.css +10 -2
- data/vendor/assets/javascripts/bootstrap-table/bootstrap-table.js +517 -248
- data/vendor/assets/javascripts/bootstrap-table/extensions/addrbar/bootstrap-table-addrbar.js +26 -5
- data/vendor/assets/javascripts/bootstrap-table/extensions/auto-refresh/bootstrap-table-auto-refresh.js +61 -12
- data/vendor/assets/javascripts/bootstrap-table/extensions/cookie/bootstrap-table-cookie.js +45 -5
- data/vendor/assets/javascripts/bootstrap-table/extensions/copy-rows/bootstrap-table-copy-rows.js +78 -14
- data/vendor/assets/javascripts/bootstrap-table/extensions/custom-view/bootstrap-table-custom-view.js +59 -448
- data/vendor/assets/javascripts/bootstrap-table/extensions/export/bootstrap-table-export.js +83 -22
- data/vendor/assets/javascripts/bootstrap-table/extensions/filter-control/bootstrap-table-filter-control.js +65 -11
- data/vendor/assets/javascripts/bootstrap-table/extensions/group-by-v2/bootstrap-table-group-by.css +3 -2
- data/vendor/assets/javascripts/bootstrap-table/extensions/group-by-v2/bootstrap-table-group-by.js +179 -501
- data/vendor/assets/javascripts/bootstrap-table/extensions/key-events/bootstrap-table-key-events.js +2 -1
- data/vendor/assets/javascripts/bootstrap-table/extensions/multiple-sort/bootstrap-table-multiple-sort.js +65 -437
- data/vendor/assets/javascripts/bootstrap-table/extensions/print/bootstrap-table-print.js +74 -17
- data/vendor/assets/javascripts/bootstrap-table/extensions/sticky-header/bootstrap-table-sticky-header.js +17 -4
- data/vendor/assets/javascripts/bootstrap-table/extensions/toolbar/bootstrap-table-toolbar.js +71 -18
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-af-ZA.js +6 -0
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-ar-SA.js +6 -0
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-bg-BG.js +6 -0
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-ca-ES.js +6 -0
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-cs-CZ.js +6 -0
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-da-DK.js +6 -0
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-de-DE.js +9 -3
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-el-GR.js +6 -0
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-en-US.js +6 -0
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-es-AR.js +6 -0
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-es-CL.js +6 -0
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-es-CR.js +6 -0
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-es-ES.js +6 -0
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-es-MX.js +6 -0
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-es-NI.js +6 -0
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-es-SP.js +6 -0
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-et-EE.js +6 -0
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-eu-EU.js +6 -0
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-fa-IR.js +6 -0
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-fi-FI.js +6 -0
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-fr-BE.js +6 -0
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-fr-CH.js +6 -0
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-fr-FR.js +6 -0
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-fr-LU.js +6 -0
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-he-IL.js +6 -0
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-hr-HR.js +6 -0
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-hu-HU.js +6 -0
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-id-ID.js +6 -0
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-it-IT.js +6 -0
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-ja-JP.js +6 -0
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-ka-GE.js +6 -0
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-ko-KR.js +6 -0
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-ms-MY.js +6 -0
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-nb-NO.js +6 -0
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-nl-BE.js +6 -0
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-nl-NL.js +6 -0
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-pl-PL.js +6 -0
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-pt-BR.js +6 -0
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-pt-PT.js +6 -0
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-ro-RO.js +6 -0
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-ru-RU.js +6 -0
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-sk-SK.js +6 -0
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-sr-Cyrl-RS.js +6 -0
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-sr-Latn-RS.js +6 -0
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-sv-SE.js +6 -0
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-th-TH.js +6 -0
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-tr-TR.js +6 -0
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-uk-UA.js +6 -0
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-ur-PK.js +6 -0
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-uz-Latn-UZ.js +6 -0
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-vi-VN.js +6 -0
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-zh-CN.js +6 -0
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-zh-TW.js +6 -0
- data/vendor/assets/javascripts/bootstrap-table/themes/bootstrap-table/bootstrap-table.css +9 -1
- data/vendor/assets/javascripts/bootstrap-table/themes/bulma/bootstrap-table-bulma.css +9 -1
- data/vendor/assets/javascripts/bootstrap-table/themes/bulma/bootstrap-table-bulma.js +1 -1
- data/vendor/assets/javascripts/bootstrap-table/themes/foundation/bootstrap-table-foundation.css +9 -1
- data/vendor/assets/javascripts/bootstrap-table/themes/foundation/bootstrap-table-foundation.js +1 -1
- data/vendor/assets/javascripts/bootstrap-table/themes/materialize/bootstrap-table-materialize.css +9 -1
- data/vendor/assets/javascripts/bootstrap-table/themes/semantic/bootstrap-table-semantic.css +9 -1
- metadata +1 -1
data/vendor/assets/javascripts/bootstrap-table/extensions/key-events/bootstrap-table-key-events.js
CHANGED
@@ -1272,6 +1272,7 @@
|
|
1272
1272
|
* @update zhixin wen <wenzhixin2010@gmail.com>
|
1273
1273
|
*/
|
1274
1274
|
|
1275
|
+
var Utils = $.fn.bootstrapTable.utils;
|
1275
1276
|
$.extend($.fn.bootstrapTable.defaults, {
|
1276
1277
|
keyEvents: false
|
1277
1278
|
});
|
@@ -1308,7 +1309,7 @@
|
|
1308
1309
|
var _this = this;
|
1309
1310
|
|
1310
1311
|
$(document).off('keydown').on('keydown', function (e) {
|
1311
|
-
var $search =
|
1312
|
+
var $search = Utils.getSearchInput(_this);
|
1312
1313
|
|
1313
1314
|
var $refresh = _this.$toolbar.find('button[name="refresh"]');
|
1314
1315
|
|
@@ -912,19 +912,6 @@
|
|
912
912
|
}
|
913
913
|
});
|
914
914
|
|
915
|
-
var nativeJoin = [].join;
|
916
|
-
|
917
|
-
var ES3_STRINGS = indexedObject != Object;
|
918
|
-
var SLOPPY_METHOD$1 = sloppyArrayMethod('join', ',');
|
919
|
-
|
920
|
-
// `Array.prototype.join` method
|
921
|
-
// https://tc39.github.io/ecma262/#sec-array.prototype.join
|
922
|
-
_export({ target: 'Array', proto: true, forced: ES3_STRINGS || SLOPPY_METHOD$1 }, {
|
923
|
-
join: function join(separator) {
|
924
|
-
return nativeJoin.call(toIndexedObject(this), separator === undefined ? ',' : separator);
|
925
|
-
}
|
926
|
-
});
|
927
|
-
|
928
915
|
var $map = arrayIteration.map;
|
929
916
|
|
930
917
|
|
@@ -991,9 +978,9 @@
|
|
991
978
|
test.sort(null);
|
992
979
|
});
|
993
980
|
// Old WebKit
|
994
|
-
var SLOPPY_METHOD$
|
981
|
+
var SLOPPY_METHOD$1 = sloppyArrayMethod('sort');
|
995
982
|
|
996
|
-
var FORCED$1 = FAILS_ON_UNDEFINED || !FAILS_ON_NULL || SLOPPY_METHOD$
|
983
|
+
var FORCED$1 = FAILS_ON_UNDEFINED || !FAILS_ON_NULL || SLOPPY_METHOD$1;
|
997
984
|
|
998
985
|
// `Array.prototype.sort` method
|
999
986
|
// https://tc39.github.io/ecma262/#sec-array.prototype.sort
|
@@ -1062,6 +1049,56 @@
|
|
1062
1049
|
}
|
1063
1050
|
});
|
1064
1051
|
|
1052
|
+
var nativeAssign = Object.assign;
|
1053
|
+
var defineProperty = Object.defineProperty;
|
1054
|
+
|
1055
|
+
// `Object.assign` method
|
1056
|
+
// https://tc39.github.io/ecma262/#sec-object.assign
|
1057
|
+
var objectAssign = !nativeAssign || fails(function () {
|
1058
|
+
// should have correct order of operations (Edge bug)
|
1059
|
+
if (descriptors && nativeAssign({ b: 1 }, nativeAssign(defineProperty({}, 'a', {
|
1060
|
+
enumerable: true,
|
1061
|
+
get: function () {
|
1062
|
+
defineProperty(this, 'b', {
|
1063
|
+
value: 3,
|
1064
|
+
enumerable: false
|
1065
|
+
});
|
1066
|
+
}
|
1067
|
+
}), { b: 2 })).b !== 1) return true;
|
1068
|
+
// should work with symbols and should have deterministic property order (V8 bug)
|
1069
|
+
var A = {};
|
1070
|
+
var B = {};
|
1071
|
+
// eslint-disable-next-line no-undef
|
1072
|
+
var symbol = Symbol();
|
1073
|
+
var alphabet = 'abcdefghijklmnopqrst';
|
1074
|
+
A[symbol] = 7;
|
1075
|
+
alphabet.split('').forEach(function (chr) { B[chr] = chr; });
|
1076
|
+
return nativeAssign({}, A)[symbol] != 7 || objectKeys(nativeAssign({}, B)).join('') != alphabet;
|
1077
|
+
}) ? function assign(target, source) { // eslint-disable-line no-unused-vars
|
1078
|
+
var T = toObject(target);
|
1079
|
+
var argumentsLength = arguments.length;
|
1080
|
+
var index = 1;
|
1081
|
+
var getOwnPropertySymbols = objectGetOwnPropertySymbols.f;
|
1082
|
+
var propertyIsEnumerable = objectPropertyIsEnumerable.f;
|
1083
|
+
while (argumentsLength > index) {
|
1084
|
+
var S = indexedObject(arguments[index++]);
|
1085
|
+
var keys = getOwnPropertySymbols ? objectKeys(S).concat(getOwnPropertySymbols(S)) : objectKeys(S);
|
1086
|
+
var length = keys.length;
|
1087
|
+
var j = 0;
|
1088
|
+
var key;
|
1089
|
+
while (length > j) {
|
1090
|
+
key = keys[j++];
|
1091
|
+
if (!descriptors || propertyIsEnumerable.call(S, key)) T[key] = S[key];
|
1092
|
+
}
|
1093
|
+
} return T;
|
1094
|
+
} : nativeAssign;
|
1095
|
+
|
1096
|
+
// `Object.assign` method
|
1097
|
+
// https://tc39.github.io/ecma262/#sec-object.assign
|
1098
|
+
_export({ target: 'Object', stat: true, forced: Object.assign !== objectAssign }, {
|
1099
|
+
assign: objectAssign
|
1100
|
+
});
|
1101
|
+
|
1065
1102
|
var TO_STRING_TAG = wellKnownSymbol('toStringTag');
|
1066
1103
|
var test$1 = {};
|
1067
1104
|
|
@@ -1168,119 +1205,6 @@
|
|
1168
1205
|
return result;
|
1169
1206
|
};
|
1170
1207
|
|
1171
|
-
// babel-minify transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError,
|
1172
|
-
// so we use an intermediate function.
|
1173
|
-
function RE(s, f) {
|
1174
|
-
return RegExp(s, f);
|
1175
|
-
}
|
1176
|
-
|
1177
|
-
var UNSUPPORTED_Y = fails(function () {
|
1178
|
-
// babel-minify transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError
|
1179
|
-
var re = RE('a', 'y');
|
1180
|
-
re.lastIndex = 2;
|
1181
|
-
return re.exec('abcd') != null;
|
1182
|
-
});
|
1183
|
-
|
1184
|
-
var BROKEN_CARET = fails(function () {
|
1185
|
-
// https://bugzilla.mozilla.org/show_bug.cgi?id=773687
|
1186
|
-
var re = RE('^r', 'gy');
|
1187
|
-
re.lastIndex = 2;
|
1188
|
-
return re.exec('str') != null;
|
1189
|
-
});
|
1190
|
-
|
1191
|
-
var regexpStickyHelpers = {
|
1192
|
-
UNSUPPORTED_Y: UNSUPPORTED_Y,
|
1193
|
-
BROKEN_CARET: BROKEN_CARET
|
1194
|
-
};
|
1195
|
-
|
1196
|
-
var nativeExec = RegExp.prototype.exec;
|
1197
|
-
// This always refers to the native implementation, because the
|
1198
|
-
// String#replace polyfill uses ./fix-regexp-well-known-symbol-logic.js,
|
1199
|
-
// which loads this file before patching the method.
|
1200
|
-
var nativeReplace = String.prototype.replace;
|
1201
|
-
|
1202
|
-
var patchedExec = nativeExec;
|
1203
|
-
|
1204
|
-
var UPDATES_LAST_INDEX_WRONG = (function () {
|
1205
|
-
var re1 = /a/;
|
1206
|
-
var re2 = /b*/g;
|
1207
|
-
nativeExec.call(re1, 'a');
|
1208
|
-
nativeExec.call(re2, 'a');
|
1209
|
-
return re1.lastIndex !== 0 || re2.lastIndex !== 0;
|
1210
|
-
})();
|
1211
|
-
|
1212
|
-
var UNSUPPORTED_Y$1 = regexpStickyHelpers.UNSUPPORTED_Y || regexpStickyHelpers.BROKEN_CARET;
|
1213
|
-
|
1214
|
-
// nonparticipating capturing group, copied from es5-shim's String#split patch.
|
1215
|
-
var NPCG_INCLUDED = /()??/.exec('')[1] !== undefined;
|
1216
|
-
|
1217
|
-
var PATCH = UPDATES_LAST_INDEX_WRONG || NPCG_INCLUDED || UNSUPPORTED_Y$1;
|
1218
|
-
|
1219
|
-
if (PATCH) {
|
1220
|
-
patchedExec = function exec(str) {
|
1221
|
-
var re = this;
|
1222
|
-
var lastIndex, reCopy, match, i;
|
1223
|
-
var sticky = UNSUPPORTED_Y$1 && re.sticky;
|
1224
|
-
var flags = regexpFlags.call(re);
|
1225
|
-
var source = re.source;
|
1226
|
-
var charsAdded = 0;
|
1227
|
-
var strCopy = str;
|
1228
|
-
|
1229
|
-
if (sticky) {
|
1230
|
-
flags = flags.replace('y', '');
|
1231
|
-
if (flags.indexOf('g') === -1) {
|
1232
|
-
flags += 'g';
|
1233
|
-
}
|
1234
|
-
|
1235
|
-
strCopy = String(str).slice(re.lastIndex);
|
1236
|
-
// Support anchored sticky behavior.
|
1237
|
-
if (re.lastIndex > 0 && (!re.multiline || re.multiline && str[re.lastIndex - 1] !== '\n')) {
|
1238
|
-
source = '(?: ' + source + ')';
|
1239
|
-
strCopy = ' ' + strCopy;
|
1240
|
-
charsAdded++;
|
1241
|
-
}
|
1242
|
-
// ^(? + rx + ) is needed, in combination with some str slicing, to
|
1243
|
-
// simulate the 'y' flag.
|
1244
|
-
reCopy = new RegExp('^(?:' + source + ')', flags);
|
1245
|
-
}
|
1246
|
-
|
1247
|
-
if (NPCG_INCLUDED) {
|
1248
|
-
reCopy = new RegExp('^' + source + '$(?!\\s)', flags);
|
1249
|
-
}
|
1250
|
-
if (UPDATES_LAST_INDEX_WRONG) lastIndex = re.lastIndex;
|
1251
|
-
|
1252
|
-
match = nativeExec.call(sticky ? reCopy : re, strCopy);
|
1253
|
-
|
1254
|
-
if (sticky) {
|
1255
|
-
if (match) {
|
1256
|
-
match.input = match.input.slice(charsAdded);
|
1257
|
-
match[0] = match[0].slice(charsAdded);
|
1258
|
-
match.index = re.lastIndex;
|
1259
|
-
re.lastIndex += match[0].length;
|
1260
|
-
} else re.lastIndex = 0;
|
1261
|
-
} else if (UPDATES_LAST_INDEX_WRONG && match) {
|
1262
|
-
re.lastIndex = re.global ? match.index + match[0].length : lastIndex;
|
1263
|
-
}
|
1264
|
-
if (NPCG_INCLUDED && match && match.length > 1) {
|
1265
|
-
// Fix browsers whose `exec` methods don't consistently return `undefined`
|
1266
|
-
// for NPCG, like IE8. NOTE: This doesn' work for /(.?)?/
|
1267
|
-
nativeReplace.call(match[0], reCopy, function () {
|
1268
|
-
for (i = 1; i < arguments.length - 2; i++) {
|
1269
|
-
if (arguments[i] === undefined) match[i] = undefined;
|
1270
|
-
}
|
1271
|
-
});
|
1272
|
-
}
|
1273
|
-
|
1274
|
-
return match;
|
1275
|
-
};
|
1276
|
-
}
|
1277
|
-
|
1278
|
-
var regexpExec = patchedExec;
|
1279
|
-
|
1280
|
-
_export({ target: 'RegExp', proto: true, forced: /./.exec !== regexpExec }, {
|
1281
|
-
exec: regexpExec
|
1282
|
-
});
|
1283
|
-
|
1284
1208
|
var TO_STRING = 'toString';
|
1285
1209
|
var RegExpPrototype = RegExp.prototype;
|
1286
1210
|
var nativeToString = RegExpPrototype[TO_STRING];
|
@@ -1301,301 +1225,6 @@
|
|
1301
1225
|
}, { unsafe: true });
|
1302
1226
|
}
|
1303
1227
|
|
1304
|
-
var SPECIES$3 = wellKnownSymbol('species');
|
1305
|
-
|
1306
|
-
var REPLACE_SUPPORTS_NAMED_GROUPS = !fails(function () {
|
1307
|
-
// #replace needs built-in support for named groups.
|
1308
|
-
// #match works fine because it just return the exec results, even if it has
|
1309
|
-
// a "grops" property.
|
1310
|
-
var re = /./;
|
1311
|
-
re.exec = function () {
|
1312
|
-
var result = [];
|
1313
|
-
result.groups = { a: '7' };
|
1314
|
-
return result;
|
1315
|
-
};
|
1316
|
-
return ''.replace(re, '$<a>') !== '7';
|
1317
|
-
});
|
1318
|
-
|
1319
|
-
// IE <= 11 replaces $0 with the whole match, as if it was $&
|
1320
|
-
// https://stackoverflow.com/questions/6024666/getting-ie-to-replace-a-regex-with-the-literal-string-0
|
1321
|
-
var REPLACE_KEEPS_$0 = (function () {
|
1322
|
-
return 'a'.replace(/./, '$0') === '$0';
|
1323
|
-
})();
|
1324
|
-
|
1325
|
-
// Chrome 51 has a buggy "split" implementation when RegExp#exec !== nativeExec
|
1326
|
-
// Weex JS has frozen built-in prototypes, so use try / catch wrapper
|
1327
|
-
var SPLIT_WORKS_WITH_OVERWRITTEN_EXEC = !fails(function () {
|
1328
|
-
var re = /(?:)/;
|
1329
|
-
var originalExec = re.exec;
|
1330
|
-
re.exec = function () { return originalExec.apply(this, arguments); };
|
1331
|
-
var result = 'ab'.split(re);
|
1332
|
-
return result.length !== 2 || result[0] !== 'a' || result[1] !== 'b';
|
1333
|
-
});
|
1334
|
-
|
1335
|
-
var fixRegexpWellKnownSymbolLogic = function (KEY, length, exec, sham) {
|
1336
|
-
var SYMBOL = wellKnownSymbol(KEY);
|
1337
|
-
|
1338
|
-
var DELEGATES_TO_SYMBOL = !fails(function () {
|
1339
|
-
// String methods call symbol-named RegEp methods
|
1340
|
-
var O = {};
|
1341
|
-
O[SYMBOL] = function () { return 7; };
|
1342
|
-
return ''[KEY](O) != 7;
|
1343
|
-
});
|
1344
|
-
|
1345
|
-
var DELEGATES_TO_EXEC = DELEGATES_TO_SYMBOL && !fails(function () {
|
1346
|
-
// Symbol-named RegExp methods call .exec
|
1347
|
-
var execCalled = false;
|
1348
|
-
var re = /a/;
|
1349
|
-
|
1350
|
-
if (KEY === 'split') {
|
1351
|
-
// We can't use real regex here since it causes deoptimization
|
1352
|
-
// and serious performance degradation in V8
|
1353
|
-
// https://github.com/zloirock/core-js/issues/306
|
1354
|
-
re = {};
|
1355
|
-
// RegExp[@@split] doesn't call the regex's exec method, but first creates
|
1356
|
-
// a new one. We need to return the patched regex when creating the new one.
|
1357
|
-
re.constructor = {};
|
1358
|
-
re.constructor[SPECIES$3] = function () { return re; };
|
1359
|
-
re.flags = '';
|
1360
|
-
re[SYMBOL] = /./[SYMBOL];
|
1361
|
-
}
|
1362
|
-
|
1363
|
-
re.exec = function () { execCalled = true; return null; };
|
1364
|
-
|
1365
|
-
re[SYMBOL]('');
|
1366
|
-
return !execCalled;
|
1367
|
-
});
|
1368
|
-
|
1369
|
-
if (
|
1370
|
-
!DELEGATES_TO_SYMBOL ||
|
1371
|
-
!DELEGATES_TO_EXEC ||
|
1372
|
-
(KEY === 'replace' && !(REPLACE_SUPPORTS_NAMED_GROUPS && REPLACE_KEEPS_$0)) ||
|
1373
|
-
(KEY === 'split' && !SPLIT_WORKS_WITH_OVERWRITTEN_EXEC)
|
1374
|
-
) {
|
1375
|
-
var nativeRegExpMethod = /./[SYMBOL];
|
1376
|
-
var methods = exec(SYMBOL, ''[KEY], function (nativeMethod, regexp, str, arg2, forceStringMethod) {
|
1377
|
-
if (regexp.exec === regexpExec) {
|
1378
|
-
if (DELEGATES_TO_SYMBOL && !forceStringMethod) {
|
1379
|
-
// The native String method already delegates to @@method (this
|
1380
|
-
// polyfilled function), leasing to infinite recursion.
|
1381
|
-
// We avoid it by directly calling the native @@method method.
|
1382
|
-
return { done: true, value: nativeRegExpMethod.call(regexp, str, arg2) };
|
1383
|
-
}
|
1384
|
-
return { done: true, value: nativeMethod.call(str, regexp, arg2) };
|
1385
|
-
}
|
1386
|
-
return { done: false };
|
1387
|
-
}, { REPLACE_KEEPS_$0: REPLACE_KEEPS_$0 });
|
1388
|
-
var stringMethod = methods[0];
|
1389
|
-
var regexMethod = methods[1];
|
1390
|
-
|
1391
|
-
redefine(String.prototype, KEY, stringMethod);
|
1392
|
-
redefine(RegExp.prototype, SYMBOL, length == 2
|
1393
|
-
// 21.2.5.8 RegExp.prototype[@@replace](string, replaceValue)
|
1394
|
-
// 21.2.5.11 RegExp.prototype[@@split](string, limit)
|
1395
|
-
? function (string, arg) { return regexMethod.call(string, this, arg); }
|
1396
|
-
// 21.2.5.6 RegExp.prototype[@@match](string)
|
1397
|
-
// 21.2.5.9 RegExp.prototype[@@search](string)
|
1398
|
-
: function (string) { return regexMethod.call(string, this); }
|
1399
|
-
);
|
1400
|
-
}
|
1401
|
-
|
1402
|
-
if (sham) createNonEnumerableProperty(RegExp.prototype[SYMBOL], 'sham', true);
|
1403
|
-
};
|
1404
|
-
|
1405
|
-
var MATCH = wellKnownSymbol('match');
|
1406
|
-
|
1407
|
-
// `IsRegExp` abstract operation
|
1408
|
-
// https://tc39.github.io/ecma262/#sec-isregexp
|
1409
|
-
var isRegexp = function (it) {
|
1410
|
-
var isRegExp;
|
1411
|
-
return isObject(it) && ((isRegExp = it[MATCH]) !== undefined ? !!isRegExp : classofRaw(it) == 'RegExp');
|
1412
|
-
};
|
1413
|
-
|
1414
|
-
var SPECIES$4 = wellKnownSymbol('species');
|
1415
|
-
|
1416
|
-
// `SpeciesConstructor` abstract operation
|
1417
|
-
// https://tc39.github.io/ecma262/#sec-speciesconstructor
|
1418
|
-
var speciesConstructor = function (O, defaultConstructor) {
|
1419
|
-
var C = anObject(O).constructor;
|
1420
|
-
var S;
|
1421
|
-
return C === undefined || (S = anObject(C)[SPECIES$4]) == undefined ? defaultConstructor : aFunction$1(S);
|
1422
|
-
};
|
1423
|
-
|
1424
|
-
// `String.prototype.{ codePointAt, at }` methods implementation
|
1425
|
-
var createMethod$3 = function (CONVERT_TO_STRING) {
|
1426
|
-
return function ($this, pos) {
|
1427
|
-
var S = String(requireObjectCoercible($this));
|
1428
|
-
var position = toInteger(pos);
|
1429
|
-
var size = S.length;
|
1430
|
-
var first, second;
|
1431
|
-
if (position < 0 || position >= size) return CONVERT_TO_STRING ? '' : undefined;
|
1432
|
-
first = S.charCodeAt(position);
|
1433
|
-
return first < 0xD800 || first > 0xDBFF || position + 1 === size
|
1434
|
-
|| (second = S.charCodeAt(position + 1)) < 0xDC00 || second > 0xDFFF
|
1435
|
-
? CONVERT_TO_STRING ? S.charAt(position) : first
|
1436
|
-
: CONVERT_TO_STRING ? S.slice(position, position + 2) : (first - 0xD800 << 10) + (second - 0xDC00) + 0x10000;
|
1437
|
-
};
|
1438
|
-
};
|
1439
|
-
|
1440
|
-
var stringMultibyte = {
|
1441
|
-
// `String.prototype.codePointAt` method
|
1442
|
-
// https://tc39.github.io/ecma262/#sec-string.prototype.codepointat
|
1443
|
-
codeAt: createMethod$3(false),
|
1444
|
-
// `String.prototype.at` method
|
1445
|
-
// https://github.com/mathiasbynens/String.prototype.at
|
1446
|
-
charAt: createMethod$3(true)
|
1447
|
-
};
|
1448
|
-
|
1449
|
-
var charAt = stringMultibyte.charAt;
|
1450
|
-
|
1451
|
-
// `AdvanceStringIndex` abstract operation
|
1452
|
-
// https://tc39.github.io/ecma262/#sec-advancestringindex
|
1453
|
-
var advanceStringIndex = function (S, index, unicode) {
|
1454
|
-
return index + (unicode ? charAt(S, index).length : 1);
|
1455
|
-
};
|
1456
|
-
|
1457
|
-
// `RegExpExec` abstract operation
|
1458
|
-
// https://tc39.github.io/ecma262/#sec-regexpexec
|
1459
|
-
var regexpExecAbstract = function (R, S) {
|
1460
|
-
var exec = R.exec;
|
1461
|
-
if (typeof exec === 'function') {
|
1462
|
-
var result = exec.call(R, S);
|
1463
|
-
if (typeof result !== 'object') {
|
1464
|
-
throw TypeError('RegExp exec method returned something other than an Object or null');
|
1465
|
-
}
|
1466
|
-
return result;
|
1467
|
-
}
|
1468
|
-
|
1469
|
-
if (classofRaw(R) !== 'RegExp') {
|
1470
|
-
throw TypeError('RegExp#exec called on incompatible receiver');
|
1471
|
-
}
|
1472
|
-
|
1473
|
-
return regexpExec.call(R, S);
|
1474
|
-
};
|
1475
|
-
|
1476
|
-
var arrayPush = [].push;
|
1477
|
-
var min$3 = Math.min;
|
1478
|
-
var MAX_UINT32 = 0xFFFFFFFF;
|
1479
|
-
|
1480
|
-
// babel-minify transpiles RegExp('x', 'y') -> /x/y and it causes SyntaxError
|
1481
|
-
var SUPPORTS_Y = !fails(function () { return !RegExp(MAX_UINT32, 'y'); });
|
1482
|
-
|
1483
|
-
// @@split logic
|
1484
|
-
fixRegexpWellKnownSymbolLogic('split', 2, function (SPLIT, nativeSplit, maybeCallNative) {
|
1485
|
-
var internalSplit;
|
1486
|
-
if (
|
1487
|
-
'abbc'.split(/(b)*/)[1] == 'c' ||
|
1488
|
-
'test'.split(/(?:)/, -1).length != 4 ||
|
1489
|
-
'ab'.split(/(?:ab)*/).length != 2 ||
|
1490
|
-
'.'.split(/(.?)(.?)/).length != 4 ||
|
1491
|
-
'.'.split(/()()/).length > 1 ||
|
1492
|
-
''.split(/.?/).length
|
1493
|
-
) {
|
1494
|
-
// based on es5-shim implementation, need to rework it
|
1495
|
-
internalSplit = function (separator, limit) {
|
1496
|
-
var string = String(requireObjectCoercible(this));
|
1497
|
-
var lim = limit === undefined ? MAX_UINT32 : limit >>> 0;
|
1498
|
-
if (lim === 0) return [];
|
1499
|
-
if (separator === undefined) return [string];
|
1500
|
-
// If `separator` is not a regex, use native split
|
1501
|
-
if (!isRegexp(separator)) {
|
1502
|
-
return nativeSplit.call(string, separator, lim);
|
1503
|
-
}
|
1504
|
-
var output = [];
|
1505
|
-
var flags = (separator.ignoreCase ? 'i' : '') +
|
1506
|
-
(separator.multiline ? 'm' : '') +
|
1507
|
-
(separator.unicode ? 'u' : '') +
|
1508
|
-
(separator.sticky ? 'y' : '');
|
1509
|
-
var lastLastIndex = 0;
|
1510
|
-
// Make `global` and avoid `lastIndex` issues by working with a copy
|
1511
|
-
var separatorCopy = new RegExp(separator.source, flags + 'g');
|
1512
|
-
var match, lastIndex, lastLength;
|
1513
|
-
while (match = regexpExec.call(separatorCopy, string)) {
|
1514
|
-
lastIndex = separatorCopy.lastIndex;
|
1515
|
-
if (lastIndex > lastLastIndex) {
|
1516
|
-
output.push(string.slice(lastLastIndex, match.index));
|
1517
|
-
if (match.length > 1 && match.index < string.length) arrayPush.apply(output, match.slice(1));
|
1518
|
-
lastLength = match[0].length;
|
1519
|
-
lastLastIndex = lastIndex;
|
1520
|
-
if (output.length >= lim) break;
|
1521
|
-
}
|
1522
|
-
if (separatorCopy.lastIndex === match.index) separatorCopy.lastIndex++; // Avoid an infinite loop
|
1523
|
-
}
|
1524
|
-
if (lastLastIndex === string.length) {
|
1525
|
-
if (lastLength || !separatorCopy.test('')) output.push('');
|
1526
|
-
} else output.push(string.slice(lastLastIndex));
|
1527
|
-
return output.length > lim ? output.slice(0, lim) : output;
|
1528
|
-
};
|
1529
|
-
// Chakra, V8
|
1530
|
-
} else if ('0'.split(undefined, 0).length) {
|
1531
|
-
internalSplit = function (separator, limit) {
|
1532
|
-
return separator === undefined && limit === 0 ? [] : nativeSplit.call(this, separator, limit);
|
1533
|
-
};
|
1534
|
-
} else internalSplit = nativeSplit;
|
1535
|
-
|
1536
|
-
return [
|
1537
|
-
// `String.prototype.split` method
|
1538
|
-
// https://tc39.github.io/ecma262/#sec-string.prototype.split
|
1539
|
-
function split(separator, limit) {
|
1540
|
-
var O = requireObjectCoercible(this);
|
1541
|
-
var splitter = separator == undefined ? undefined : separator[SPLIT];
|
1542
|
-
return splitter !== undefined
|
1543
|
-
? splitter.call(separator, O, limit)
|
1544
|
-
: internalSplit.call(String(O), separator, limit);
|
1545
|
-
},
|
1546
|
-
// `RegExp.prototype[@@split]` method
|
1547
|
-
// https://tc39.github.io/ecma262/#sec-regexp.prototype-@@split
|
1548
|
-
//
|
1549
|
-
// NOTE: This cannot be properly polyfilled in engines that don't support
|
1550
|
-
// the 'y' flag.
|
1551
|
-
function (regexp, limit) {
|
1552
|
-
var res = maybeCallNative(internalSplit, regexp, this, limit, internalSplit !== nativeSplit);
|
1553
|
-
if (res.done) return res.value;
|
1554
|
-
|
1555
|
-
var rx = anObject(regexp);
|
1556
|
-
var S = String(this);
|
1557
|
-
var C = speciesConstructor(rx, RegExp);
|
1558
|
-
|
1559
|
-
var unicodeMatching = rx.unicode;
|
1560
|
-
var flags = (rx.ignoreCase ? 'i' : '') +
|
1561
|
-
(rx.multiline ? 'm' : '') +
|
1562
|
-
(rx.unicode ? 'u' : '') +
|
1563
|
-
(SUPPORTS_Y ? 'y' : 'g');
|
1564
|
-
|
1565
|
-
// ^(? + rx + ) is needed, in combination with some S slicing, to
|
1566
|
-
// simulate the 'y' flag.
|
1567
|
-
var splitter = new C(SUPPORTS_Y ? rx : '^(?:' + rx.source + ')', flags);
|
1568
|
-
var lim = limit === undefined ? MAX_UINT32 : limit >>> 0;
|
1569
|
-
if (lim === 0) return [];
|
1570
|
-
if (S.length === 0) return regexpExecAbstract(splitter, S) === null ? [S] : [];
|
1571
|
-
var p = 0;
|
1572
|
-
var q = 0;
|
1573
|
-
var A = [];
|
1574
|
-
while (q < S.length) {
|
1575
|
-
splitter.lastIndex = SUPPORTS_Y ? q : 0;
|
1576
|
-
var z = regexpExecAbstract(splitter, SUPPORTS_Y ? S : S.slice(q));
|
1577
|
-
var e;
|
1578
|
-
if (
|
1579
|
-
z === null ||
|
1580
|
-
(e = min$3(toLength(splitter.lastIndex + (SUPPORTS_Y ? 0 : q)), S.length)) === p
|
1581
|
-
) {
|
1582
|
-
q = advanceStringIndex(S, q, unicodeMatching);
|
1583
|
-
} else {
|
1584
|
-
A.push(S.slice(p, q));
|
1585
|
-
if (A.length === lim) return A;
|
1586
|
-
for (var i = 1; i <= z.length - 1; i++) {
|
1587
|
-
A.push(z[i]);
|
1588
|
-
if (A.length === lim) return A;
|
1589
|
-
}
|
1590
|
-
q = p = e;
|
1591
|
-
}
|
1592
|
-
}
|
1593
|
-
A.push(S.slice(p));
|
1594
|
-
return A;
|
1595
|
-
}
|
1596
|
-
];
|
1597
|
-
}, !SUPPORTS_Y);
|
1598
|
-
|
1599
1228
|
function _typeof(obj) {
|
1600
1229
|
if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
|
1601
1230
|
_typeof = function (obj) {
|
@@ -1619,7 +1248,7 @@
|
|
1619
1248
|
|
1620
1249
|
var isSingleSort = false;
|
1621
1250
|
var Utils = $.fn.bootstrapTable.utils;
|
1622
|
-
var
|
1251
|
+
var theme = {
|
1623
1252
|
bootstrap3: {
|
1624
1253
|
icons: {
|
1625
1254
|
plus: 'glyphicon-plus',
|
@@ -1711,14 +1340,12 @@
|
|
1711
1340
|
'sort': 'icon-sort-amount-asc'
|
1712
1341
|
},
|
1713
1342
|
html: {
|
1714
|
-
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
|
1343
|
+
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 ",
|
1715
1344
|
multipleSortButton: '<button class="btn multi-sort" data-target="%s" title="%s">%s</button>',
|
1716
1345
|
multipleSortSelect: '<select class="%s %s browser-default">'
|
1717
1346
|
}
|
1718
1347
|
}
|
1719
1348
|
}[$.fn.bootstrapTable.theme];
|
1720
|
-
$.extend($.fn.bootstrapTable.defaults.icons, bootstrap.icons);
|
1721
|
-
$.extend($.fn.bootstrapTable.defaults.html, bootstrap.html);
|
1722
1349
|
|
1723
1350
|
var showSortModal = function showSortModal(that) {
|
1724
1351
|
var _selector = that.sortModalSelector;
|
@@ -1728,7 +1355,7 @@
|
|
1728
1355
|
var o = that.options;
|
1729
1356
|
|
1730
1357
|
if (!$(_id).hasClass('modal')) {
|
1731
|
-
var sModal = Utils.sprintf(
|
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());
|
1732
1359
|
$('body').append($(sModal));
|
1733
1360
|
that.$sortModal = $(_id);
|
1734
1361
|
var $rows = that.$sortModal.find('tbody > tr');
|
@@ -1883,6 +1510,8 @@
|
|
1883
1510
|
var that = this;
|
1884
1511
|
var sortModalSelector = "sortModal_".concat(this.$el.attr('id'));
|
1885
1512
|
var sortModalId = "#".concat(sortModalSelector);
|
1513
|
+
var $multiSortBtn = this.$toolbar.find('div.multi-sort');
|
1514
|
+
var o = this.options;
|
1886
1515
|
this.$sortModal = $(sortModalId);
|
1887
1516
|
this.sortModalSelector = sortModalSelector;
|
1888
1517
|
|
@@ -1890,6 +1519,12 @@
|
|
1890
1519
|
that.onMultipleSort();
|
1891
1520
|
}
|
1892
1521
|
|
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
|
+
});
|
1527
|
+
|
1893
1528
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
1894
1529
|
args[_key] = arguments[_key];
|
1895
1530
|
}
|
@@ -1906,14 +1541,7 @@
|
|
1906
1541
|
}
|
1907
1542
|
|
1908
1543
|
if (this.options.showMultiSort) {
|
1909
|
-
var $btnGroup = this.$toolbar.find('>.' + that.constants.classes.buttonsGroup.split(' ').join('.')).first();
|
1910
|
-
var $multiSortBtn = this.$toolbar.find('div.multi-sort');
|
1911
|
-
var o = that.options;
|
1912
|
-
|
1913
1544
|
if (!$multiSortBtn.length && this.options.showMultiSortButton) {
|
1914
|
-
$multiSortBtn = Utils.sprintf(that.constants.html.multipleSortButton, that.sortModalSelector, this.options.formatMultipleSort(), Utils.sprintf(that.constants.html.icon, o.iconsPrefix, o.icons.sort));
|
1915
|
-
$btnGroup.append($multiSortBtn);
|
1916
|
-
|
1917
1545
|
if ($.fn.bootstrapTable.theme === 'semantic') {
|
1918
1546
|
this.$toolbar.find('.multi-sort').on('click', function () {
|
1919
1547
|
$(sortModalId).modal('show');
|
@@ -2064,7 +1692,7 @@
|
|
2064
1692
|
|
2065
1693
|
BootstrapTable.prototype.addLevel = function (index, sortPriority) {
|
2066
1694
|
var text = index === 0 ? this.options.formatSortBy() : this.options.formatThenBy();
|
2067
|
-
this.$sortModal.find('tbody').append($('<tr>').append($('<td>').text(text)).append($('<td>').append($(Utils.sprintf(
|
1695
|
+
this.$sortModal.find('tbody').append($('<tr>').append($('<td>').text(text)).append($('<td>').append($(Utils.sprintf(theme.html.multipleSortSelect, this.constants.classes.paginationDropdown, 'multi-sort-name')))).append($('<td>').append($(Utils.sprintf(theme.html.multipleSortSelect, this.constants.classes.paginationDropdown, 'multi-sort-order')))));
|
2068
1696
|
var $multiSortName = this.$sortModal.find('.multi-sort-name').last();
|
2069
1697
|
var $multiSortOrder = this.$sortModal.find('.multi-sort-order').last();
|
2070
1698
|
$.each(this.columns, function (i, column) {
|
@@ -2122,7 +1750,7 @@
|
|
2122
1750
|
var _this2 = this;
|
2123
1751
|
|
2124
1752
|
this.options.sortPriority = sortPriority;
|
2125
|
-
this.options.sortName =
|
1753
|
+
this.options.sortName = undefined;
|
2126
1754
|
|
2127
1755
|
if (this.options.sidePagination === 'server') {
|
2128
1756
|
this.options.queryParams = function (params) {
|