bootstrap-table-rails 1.16.0 → 1.17.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +142 -33
- data/lib/bootstrap-table-rails/version.rb +1 -1
- data/vendor/assets/javascripts/bootstrap-table/bootstrap-table-locale-all.js +588 -19
- data/vendor/assets/javascripts/bootstrap-table/bootstrap-table-vue.esm.js +3 -1
- data/vendor/assets/javascripts/bootstrap-table/bootstrap-table-vue.js +3 -1
- data/vendor/assets/javascripts/bootstrap-table/bootstrap-table.css +1 -2
- data/vendor/assets/javascripts/bootstrap-table/bootstrap-table.js +399 -181
- data/vendor/assets/javascripts/bootstrap-table/extensions/accent-neutralise/bootstrap-table-accent-neutralise.js +23 -2
- data/vendor/assets/javascripts/bootstrap-table/extensions/addrbar/bootstrap-table-addrbar.js +28 -8
- data/vendor/assets/javascripts/bootstrap-table/extensions/auto-refresh/bootstrap-table-auto-refresh.js +3 -2
- data/vendor/assets/javascripts/bootstrap-table/extensions/cookie/bootstrap-table-cookie.js +999 -240
- data/vendor/assets/javascripts/bootstrap-table/extensions/copy-rows/bootstrap-table-copy-rows.js +3 -2
- data/vendor/assets/javascripts/bootstrap-table/extensions/custom-view/bootstrap-table-custom-view.js +1587 -0
- data/vendor/assets/javascripts/bootstrap-table/extensions/defer-url/bootstrap-table-defer-url.js +1 -1
- data/vendor/assets/javascripts/bootstrap-table/extensions/editable/bootstrap-table-editable.js +1054 -211
- data/vendor/assets/javascripts/bootstrap-table/extensions/export/bootstrap-table-export.js +28 -3
- data/vendor/assets/javascripts/bootstrap-table/extensions/filter-control/bootstrap-table-filter-control.js +846 -720
- data/vendor/assets/javascripts/bootstrap-table/extensions/{cell-input/bootstrap-table-cell-input.js → filter-control/utils.js} +1136 -1023
- data/vendor/assets/javascripts/bootstrap-table/extensions/fixed-columns/bootstrap-table-fixed-columns.js +44 -1
- data/vendor/assets/javascripts/bootstrap-table/extensions/group-by-v2/bootstrap-table-group-by.js +6 -15
- data/vendor/assets/javascripts/bootstrap-table/extensions/i18n-enhance/bootstrap-table-i18n-enhance.js +1 -1
- data/vendor/assets/javascripts/bootstrap-table/extensions/key-events/bootstrap-table-key-events.js +1 -1
- data/vendor/assets/javascripts/bootstrap-table/extensions/mobile/bootstrap-table-mobile.js +1 -1
- data/vendor/assets/javascripts/bootstrap-table/extensions/multiple-sort/bootstrap-table-multiple-sort.js +31 -3
- data/vendor/assets/javascripts/bootstrap-table/extensions/page-jump-to/bootstrap-table-page-jump-to.js +1 -1
- data/vendor/assets/javascripts/bootstrap-table/extensions/pipeline/bootstrap-table-pipeline.js +1 -1
- data/vendor/assets/javascripts/bootstrap-table/extensions/print/bootstrap-table-print.js +170 -25
- data/vendor/assets/javascripts/bootstrap-table/extensions/reorder-columns/bootstrap-table-reorder-columns.js +4 -2
- data/vendor/assets/javascripts/bootstrap-table/extensions/reorder-rows/bootstrap-table-reorder-rows.js +3 -3
- data/vendor/assets/javascripts/bootstrap-table/extensions/resizable/bootstrap-table-resizable.js +1 -1
- data/vendor/assets/javascripts/bootstrap-table/extensions/sticky-header/bootstrap-table-sticky-header.js +2 -1
- data/vendor/assets/javascripts/bootstrap-table/extensions/toolbar/bootstrap-table-toolbar.js +45 -7
- data/vendor/assets/javascripts/bootstrap-table/extensions/treegrid/bootstrap-table-treegrid.js +14 -1
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-af-ZA.js +10 -1
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-ar-SA.js +10 -1
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-bg-BG.js +771 -0
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-ca-ES.js +10 -1
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-cs-CZ.js +10 -1
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-da-DK.js +10 -1
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-de-DE.js +10 -1
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-el-GR.js +10 -1
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-en-US.js +10 -1
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-es-AR.js +10 -1
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-es-CL.js +10 -1
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-es-CR.js +10 -1
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-es-ES.js +10 -1
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-es-MX.js +10 -1
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-es-NI.js +10 -1
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-es-SP.js +10 -1
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-et-EE.js +10 -1
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-eu-EU.js +10 -1
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-fa-IR.js +10 -1
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-fi-FI.js +10 -1
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-fr-BE.js +10 -1
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-fr-CH.js +10 -1
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-fr-FR.js +10 -1
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-fr-LU.js +10 -1
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-he-IL.js +10 -1
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-hr-HR.js +10 -1
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-hu-HU.js +10 -1
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-id-ID.js +10 -1
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-it-IT.js +25 -16
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-ja-JP.js +10 -1
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-ka-GE.js +10 -1
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-ko-KR.js +10 -1
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-ms-MY.js +10 -1
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-nb-NO.js +10 -1
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-nl-BE.js +11 -2
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-nl-NL.js +10 -1
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-pl-PL.js +10 -1
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-pt-BR.js +13 -3
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-pt-PT.js +10 -1
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-ro-RO.js +10 -1
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-ru-RU.js +10 -1
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-sk-SK.js +10 -1
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-sr-Cyrl-RS.js +10 -1
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-sr-Latn-RS.js +10 -1
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-sv-SE.js +10 -1
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-th-TH.js +10 -1
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-tr-TR.js +10 -1
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-uk-UA.js +10 -1
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-ur-PK.js +10 -1
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-uz-Latn-UZ.js +10 -1
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-vi-VN.js +10 -1
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-zh-CN.js +10 -1
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-zh-TW.js +10 -1
- data/vendor/assets/javascripts/bootstrap-table/themes/bootstrap-table/bootstrap-table.css +768 -0
- data/vendor/assets/javascripts/bootstrap-table/themes/bootstrap-table/bootstrap-table.js +1049 -0
- data/vendor/assets/javascripts/bootstrap-table/themes/bootstrap-table/fonts/bootstrap-table.eot +0 -0
- data/vendor/assets/javascripts/bootstrap-table/themes/bootstrap-table/fonts/bootstrap-table.svg +28 -0
- data/vendor/assets/javascripts/bootstrap-table/themes/bootstrap-table/fonts/bootstrap-table.ttf +0 -0
- data/vendor/assets/javascripts/bootstrap-table/themes/bootstrap-table/fonts/bootstrap-table.woff +0 -0
- data/vendor/assets/javascripts/bootstrap-table/themes/bulma/bootstrap-table-bulma.css +0 -1
- data/vendor/assets/javascripts/bootstrap-table/themes/bulma/bootstrap-table-bulma.js +54 -2
- data/vendor/assets/javascripts/bootstrap-table/themes/foundation/bootstrap-table-foundation.css +0 -1
- data/vendor/assets/javascripts/bootstrap-table/themes/foundation/bootstrap-table-foundation.js +54 -2
- data/vendor/assets/javascripts/bootstrap-table/themes/materialize/bootstrap-table-materialize.css +0 -1
- data/vendor/assets/javascripts/bootstrap-table/themes/materialize/bootstrap-table-materialize.js +55 -3
- data/vendor/assets/javascripts/bootstrap-table/themes/semantic/bootstrap-table-semantic.css +0 -1
- data/vendor/assets/javascripts/bootstrap-table/themes/semantic/bootstrap-table-semantic.js +54 -2
- metadata +10 -3
- data/vendor/assets/javascripts/bootstrap-table/extensions/cell-input/bootstrap-table-cell-input.css +0 -12
@@ -4,7 +4,7 @@
|
|
4
4
|
(global = global || self, global.BootstrapTable = factory(global.jQuery));
|
5
5
|
}(this, (function ($) { 'use strict';
|
6
6
|
|
7
|
-
$ = $ &&
|
7
|
+
$ = $ && Object.prototype.hasOwnProperty.call($, 'default') ? $['default'] : $;
|
8
8
|
|
9
9
|
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
10
10
|
|
@@ -2851,7 +2851,7 @@
|
|
2851
2851
|
throw new TypeError("Invalid attempt to destructure non-iterable instance");
|
2852
2852
|
}
|
2853
2853
|
|
2854
|
-
var VERSION = '1.
|
2854
|
+
var VERSION = '1.17.0';
|
2855
2855
|
var bootstrapVersion = 4;
|
2856
2856
|
|
2857
2857
|
try {
|
@@ -2864,6 +2864,16 @@
|
|
2864
2864
|
} catch (e) {// ignore
|
2865
2865
|
}
|
2866
2866
|
|
2867
|
+
try {
|
2868
|
+
// eslint-disable-next-line no-undef
|
2869
|
+
var _rawVersion = bootstrap.Tooltip.VERSION;
|
2870
|
+
|
2871
|
+
if (_rawVersion !== undefined) {
|
2872
|
+
bootstrapVersion = parseInt(_rawVersion, 10);
|
2873
|
+
}
|
2874
|
+
} catch (e) {// ignore
|
2875
|
+
}
|
2876
|
+
|
2867
2877
|
var CONSTANTS = {
|
2868
2878
|
3: {
|
2869
2879
|
iconsPrefix: 'glyphicon',
|
@@ -2956,6 +2966,52 @@
|
|
2956
2966
|
searchButton: '<button class="%s" type="button" name="search" title="%s">%s %s</button>',
|
2957
2967
|
searchClearButton: '<button class="%s" type="button" name="clearSearch" title="%s">%s %s</button>'
|
2958
2968
|
}
|
2969
|
+
},
|
2970
|
+
5: {
|
2971
|
+
iconsPrefix: 'fa',
|
2972
|
+
icons: {
|
2973
|
+
paginationSwitchDown: 'fa-caret-square-down',
|
2974
|
+
paginationSwitchUp: 'fa-caret-square-up',
|
2975
|
+
refresh: 'fa-sync',
|
2976
|
+
toggleOff: 'fa-toggle-off',
|
2977
|
+
toggleOn: 'fa-toggle-on',
|
2978
|
+
columns: 'fa-th-list',
|
2979
|
+
detailOpen: 'fa-plus',
|
2980
|
+
detailClose: 'fa-minus',
|
2981
|
+
fullscreen: 'fa-arrows-alt',
|
2982
|
+
search: 'fa-search',
|
2983
|
+
clearSearch: 'fa-trash'
|
2984
|
+
},
|
2985
|
+
classes: {
|
2986
|
+
buttonsPrefix: 'btn',
|
2987
|
+
buttons: 'secondary',
|
2988
|
+
buttonsGroup: 'btn-group',
|
2989
|
+
buttonsDropdown: 'btn-group',
|
2990
|
+
pull: 'float',
|
2991
|
+
inputGroup: 'btn-group',
|
2992
|
+
inputPrefix: 'form-control-',
|
2993
|
+
input: 'form-control',
|
2994
|
+
paginationDropdown: 'btn-group dropdown',
|
2995
|
+
dropup: 'dropup',
|
2996
|
+
dropdownActive: 'active',
|
2997
|
+
paginationActive: 'active',
|
2998
|
+
buttonActive: 'active'
|
2999
|
+
},
|
3000
|
+
html: {
|
3001
|
+
toolbarDropdown: ['<div class="dropdown-menu dropdown-menu-right">', '</div>'],
|
3002
|
+
toolbarDropdownItem: '<label class="dropdown-item dropdown-item-marker">%s</label>',
|
3003
|
+
pageDropdown: ['<div class="dropdown-menu">', '</div>'],
|
3004
|
+
pageDropdownItem: '<a class="dropdown-item %s" href="#">%s</a>',
|
3005
|
+
toolbarDropdownSeparator: '<div class="dropdown-divider"></div>',
|
3006
|
+
dropdownCaret: '<span class="caret"></span>',
|
3007
|
+
pagination: ['<ul class="pagination%s">', '</ul>'],
|
3008
|
+
paginationItem: '<li class="page-item%s"><a class="page-link" aria-label="%s" href="javascript:void(0)">%s</a></li>',
|
3009
|
+
icon: '<i class="%s %s"></i>',
|
3010
|
+
inputGroup: '<div class="input-group">%s<div class="input-group-append">%s</div></div>',
|
3011
|
+
searchInput: '<input class="%s%s" type="text" placeholder="%s">',
|
3012
|
+
searchButton: '<button class="%s" type="button" name="search" title="%s">%s %s</button>',
|
3013
|
+
searchClearButton: '<button class="%s" type="button" name="clearSearch" title="%s">%s %s</button>'
|
3014
|
+
}
|
2959
3015
|
}
|
2960
3016
|
}[bootstrapVersion];
|
2961
3017
|
var DEFAULTS = {
|
@@ -2979,7 +3035,8 @@
|
|
2979
3035
|
sortClass: undefined,
|
2980
3036
|
silentSort: true,
|
2981
3037
|
sortName: undefined,
|
2982
|
-
sortOrder:
|
3038
|
+
sortOrder: undefined,
|
3039
|
+
sortReset: false,
|
2983
3040
|
sortStable: false,
|
2984
3041
|
rememberOrder: false,
|
2985
3042
|
serverSort: true,
|
@@ -3005,7 +3062,7 @@
|
|
3005
3062
|
totalNotFilteredField: 'totalNotFiltered',
|
3006
3063
|
dataField: 'rows',
|
3007
3064
|
pagination: false,
|
3008
|
-
|
3065
|
+
paginationParts: ['pageInfo', 'pageSize', 'pageList'],
|
3009
3066
|
showExtendedPagination: false,
|
3010
3067
|
paginationLoop: true,
|
3011
3068
|
sidePagination: 'client',
|
@@ -3076,6 +3133,7 @@
|
|
3076
3133
|
detailView: false,
|
3077
3134
|
detailViewIcon: true,
|
3078
3135
|
detailViewByClick: false,
|
3136
|
+
detailViewAlign: 'left',
|
3079
3137
|
detailFormatter: function detailFormatter(index, row) {
|
3080
3138
|
return '';
|
3081
3139
|
},
|
@@ -3094,6 +3152,10 @@
|
|
3094
3152
|
iconSize: undefined,
|
3095
3153
|
iconsPrefix: CONSTANTS.iconsPrefix,
|
3096
3154
|
// glyphicon or fa(font-awesome)
|
3155
|
+
loadingFontSize: 'auto',
|
3156
|
+
loadingTemplate: function loadingTemplate(loadingMessage) {
|
3157
|
+
return "<span class=\"loading-wrap\">\n <span class=\"loading-text\">".concat(loadingMessage, "</span>\n <span class=\"animation-wrap\"><span class=\"animation-dot\"></span></span>\n </span>\n ");
|
3158
|
+
},
|
3097
3159
|
onAll: function onAll(name, args) {
|
3098
3160
|
return false;
|
3099
3161
|
},
|
@@ -3287,7 +3349,7 @@
|
|
3287
3349
|
escape: false,
|
3288
3350
|
events: undefined
|
3289
3351
|
};
|
3290
|
-
var METHODS = ['getOptions', 'refreshOptions', 'getData', 'getSelections', 'getAllSelections', 'load', 'append', 'prepend', 'remove', 'removeAll', 'insertRow', 'updateRow', 'getRowByUniqueId', 'updateByUniqueId', 'removeByUniqueId', 'updateCell', 'updateCellByUniqueId', 'showRow', 'hideRow', 'getHiddenRows', 'showColumn', 'hideColumn', 'getVisibleColumns', 'getHiddenColumns', 'showAllColumns', 'hideAllColumns', 'mergeCells', 'checkAll', 'uncheckAll', 'checkInvert', 'check', 'uncheck', 'checkBy', 'uncheckBy', 'refresh', 'destroy', 'resetView', 'showLoading', 'hideLoading', 'togglePagination', 'toggleFullscreen', 'toggleView', 'resetSearch', 'filterBy', 'scrollTo', 'getScrollPosition', 'selectPage', 'prevPage', 'nextPage', 'toggleDetailView', 'expandRow', 'collapseRow', 'expandAllRows', 'collapseAllRows', 'updateColumnTitle', 'updateFormatText'];
|
3352
|
+
var METHODS = ['getOptions', 'refreshOptions', 'getData', 'getSelections', 'getAllSelections', 'load', 'append', 'prepend', 'remove', 'removeAll', 'insertRow', 'updateRow', 'getRowByUniqueId', 'updateByUniqueId', 'removeByUniqueId', 'updateCell', 'updateCellByUniqueId', 'showRow', 'hideRow', 'getHiddenRows', 'showColumn', 'hideColumn', 'getVisibleColumns', 'getHiddenColumns', 'showAllColumns', 'hideAllColumns', 'mergeCells', 'checkAll', 'uncheckAll', 'checkInvert', 'check', 'uncheck', 'checkBy', 'uncheckBy', 'refresh', 'destroy', 'resetView', 'showLoading', 'hideLoading', 'togglePagination', 'toggleFullscreen', 'toggleView', 'resetSearch', 'filterBy', 'scrollTo', 'getScrollPosition', 'selectPage', 'prevPage', 'nextPage', 'toggleDetailView', 'expandRow', 'collapseRow', 'expandRowByUniqueId', 'collapseRowByUniqueId', 'expandAllRows', 'collapseAllRows', 'updateColumnTitle', 'updateFormatText'];
|
3291
3353
|
var EVENTS = {
|
3292
3354
|
'all.bs.table': 'onAll',
|
3293
3355
|
'click-row.bs.table': 'onClickRow',
|
@@ -3654,6 +3716,13 @@
|
|
3654
3716
|
|
3655
3717
|
return text;
|
3656
3718
|
},
|
3719
|
+
unescapeHTML: function unescapeHTML(text) {
|
3720
|
+
if (typeof text === 'string') {
|
3721
|
+
return text.replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>').replace(/"/g, '"').replace(/'/g, '\'').replace(/`/g, '`');
|
3722
|
+
}
|
3723
|
+
|
3724
|
+
return text;
|
3725
|
+
},
|
3657
3726
|
getRealDataAttr: function getRealDataAttr(dataAttr) {
|
3658
3727
|
for (var _i3 = 0, _Object$entries = Object.entries(dataAttr); _i3 < _Object$entries.length; _i3++) {
|
3659
3728
|
var _Object$entries$_i = _slicedToArray(_Object$entries[_i3], 2),
|
@@ -3832,6 +3901,9 @@
|
|
3832
3901
|
var id = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
3833
3902
|
id = id || "".concat(+new Date()).concat(~~(Math.random() * 1000000));
|
3834
3903
|
return "resize.bootstrap-table-".concat(id);
|
3904
|
+
},
|
3905
|
+
hasDetailViewIcon: function hasDetailViewIcon(options) {
|
3906
|
+
return options.detailView && options.detailViewIcon && !options.cardView;
|
3835
3907
|
}
|
3836
3908
|
};
|
3837
3909
|
|
@@ -4052,7 +4124,8 @@
|
|
4052
4124
|
value: function initContainer() {
|
4053
4125
|
var topPagination = ['top', 'both'].includes(this.options.paginationVAlign) ? '<div class="fixed-table-pagination clearfix"></div>' : '';
|
4054
4126
|
var bottomPagination = ['bottom', 'both'].includes(this.options.paginationVAlign) ? '<div class="fixed-table-pagination"></div>' : '';
|
4055
|
-
|
4127
|
+
var loadingTemplate = Utils.calculateObjectValue(this.options, this.options.loadingTemplate, [this.options.formatLoadingMessage()]);
|
4128
|
+
this.$container = $("\n <div class=\"bootstrap-table ".concat(this.constants.theme, "\">\n <div class=\"fixed-table-toolbar\"></div>\n ").concat(topPagination, "\n <div class=\"fixed-table-container\">\n <div class=\"fixed-table-header\"><table></table></div>\n <div class=\"fixed-table-body\">\n <div class=\"fixed-table-loading\">\n ").concat(loadingTemplate, "\n </div>\n </div>\n <div class=\"fixed-table-footer\"><table><thead><tr></tr></thead></table></div>\n </div>\n ").concat(bottomPagination, "\n </div>\n "));
|
4056
4129
|
this.$container.insertAfter(this.$el);
|
4057
4130
|
this.$tableContainer = this.$container.find('.fixed-table-container');
|
4058
4131
|
this.$tableHeader = this.$container.find('.fixed-table-header');
|
@@ -4102,23 +4175,30 @@
|
|
4102
4175
|
this.$header.addClass(this.options.theadClasses);
|
4103
4176
|
}
|
4104
4177
|
|
4178
|
+
this._headerTrClasses = [];
|
4105
4179
|
this.$header.find('tr').each(function (i, el) {
|
4180
|
+
var $tr = $(el);
|
4106
4181
|
var column = [];
|
4107
|
-
$
|
4108
|
-
// #2014: getFieldIndex and elsewhere assume this is string, causes issues if not
|
4109
|
-
|
4110
|
-
|
4182
|
+
$tr.find('th').each(function (i, el) {
|
4183
|
+
var $th = $(el); // #2014: getFieldIndex and elsewhere assume this is string, causes issues if not
|
4184
|
+
|
4185
|
+
if (typeof $th.data('field') !== 'undefined') {
|
4186
|
+
$th.data('field', "".concat($th.data('field')));
|
4111
4187
|
}
|
4112
4188
|
|
4113
4189
|
column.push($.extend({}, {
|
4114
|
-
title: $
|
4115
|
-
'class': $
|
4116
|
-
titleTooltip: $
|
4117
|
-
rowspan: $
|
4118
|
-
colspan: $
|
4119
|
-
}, $
|
4190
|
+
title: $th.html(),
|
4191
|
+
'class': $th.attr('class'),
|
4192
|
+
titleTooltip: $th.attr('title'),
|
4193
|
+
rowspan: $th.attr('rowspan') ? +$th.attr('rowspan') : undefined,
|
4194
|
+
colspan: $th.attr('colspan') ? +$th.attr('colspan') : undefined
|
4195
|
+
}, $th.data()));
|
4120
4196
|
});
|
4121
4197
|
columns.push(column);
|
4198
|
+
|
4199
|
+
if ($tr.attr('class')) {
|
4200
|
+
_this._headerTrClasses.push($tr.attr('class'));
|
4201
|
+
}
|
4122
4202
|
});
|
4123
4203
|
|
4124
4204
|
if (!Array.isArray(this.options.columns[0])) {
|
@@ -4143,9 +4223,10 @@
|
|
4143
4223
|
}); // if options.data is setting, do not process tbody and tfoot data
|
4144
4224
|
|
4145
4225
|
if (!this.options.data.length) {
|
4146
|
-
|
4226
|
+
var htmlData = Utils.trToData(this.columns, this.$el.find('>tbody>tr'));
|
4147
4227
|
|
4148
|
-
if (
|
4228
|
+
if (htmlData.length) {
|
4229
|
+
this.options.data = htmlData;
|
4149
4230
|
this.fromHtml = true;
|
4150
4231
|
}
|
4151
4232
|
}
|
@@ -4183,10 +4264,15 @@
|
|
4183
4264
|
};
|
4184
4265
|
Utils.updateFieldGroup(this.options.columns);
|
4185
4266
|
this.options.columns.forEach(function (columns, i) {
|
4186
|
-
html.push(
|
4267
|
+
html.push("<tr".concat(Utils.sprintf(' class="%s"', _this2._headerTrClasses[i]), ">"));
|
4268
|
+
var detailViewTemplate = '';
|
4269
|
+
|
4270
|
+
if (i === 0 && Utils.hasDetailViewIcon(_this2.options)) {
|
4271
|
+
detailViewTemplate = "<th class=\"detail\" rowspan=\"".concat(_this2.options.columns.length, "\">\n <div class=\"fht-cell\"></div>\n </th>");
|
4272
|
+
}
|
4187
4273
|
|
4188
|
-
if (
|
4189
|
-
html.push(
|
4274
|
+
if (detailViewTemplate && _this2.options.detailViewAlign !== 'right') {
|
4275
|
+
html.push(detailViewTemplate);
|
4190
4276
|
}
|
4191
4277
|
|
4192
4278
|
columns.forEach(function (column, j) {
|
@@ -4274,6 +4360,11 @@
|
|
4274
4360
|
html.push('</div>');
|
4275
4361
|
html.push('</th>');
|
4276
4362
|
});
|
4363
|
+
|
4364
|
+
if (detailViewTemplate && _this2.options.detailViewAlign === 'right') {
|
4365
|
+
html.push(detailViewTemplate);
|
4366
|
+
}
|
4367
|
+
|
4277
4368
|
html.push('</tr>');
|
4278
4369
|
});
|
4279
4370
|
this.$header.html(html.join(''));
|
@@ -4343,6 +4434,7 @@
|
|
4343
4434
|
}
|
4344
4435
|
|
4345
4436
|
this.data = this.options.data;
|
4437
|
+
this.unsortedData = _toConsumableArray(this.data);
|
4346
4438
|
|
4347
4439
|
if (this.options.sidePagination === 'server') {
|
4348
4440
|
return;
|
@@ -4403,6 +4495,8 @@
|
|
4403
4495
|
_this3.$el.find("tr td:nth-child(".concat(index + 1, ")")).addClass(_this3.options.sortClass);
|
4404
4496
|
}, 250);
|
4405
4497
|
}
|
4498
|
+
} else {
|
4499
|
+
this.data = this.unsortedData;
|
4406
4500
|
}
|
4407
4501
|
}
|
4408
4502
|
}, {
|
@@ -4415,7 +4509,19 @@
|
|
4415
4509
|
this.$header.add(this.$header_).find('span.order').remove();
|
4416
4510
|
|
4417
4511
|
if (this.options.sortName === $this.data('field')) {
|
4418
|
-
|
4512
|
+
var currentSortOrder = this.options.sortOrder;
|
4513
|
+
|
4514
|
+
if (currentSortOrder === undefined) {
|
4515
|
+
this.options.sortOrder = 'asc';
|
4516
|
+
} else if (currentSortOrder === 'asc') {
|
4517
|
+
this.options.sortOrder = 'desc';
|
4518
|
+
} else if (this.options.sortOrder === 'desc') {
|
4519
|
+
this.options.sortOrder = this.options.sortReset ? undefined : 'asc';
|
4520
|
+
}
|
4521
|
+
|
4522
|
+
if (this.options.sortOrder === undefined) {
|
4523
|
+
this.options.sortName = undefined;
|
4524
|
+
}
|
4419
4525
|
} else {
|
4420
4526
|
this.options.sortName = $this.data('field');
|
4421
4527
|
|
@@ -4867,9 +4973,9 @@
|
|
4867
4973
|
|
4868
4974
|
return false;
|
4869
4975
|
}) : this.data;
|
4976
|
+
this.unsortedData = _toConsumableArray(this.data);
|
4977
|
+
this.initSort();
|
4870
4978
|
}
|
4871
|
-
|
4872
|
-
this.initSort();
|
4873
4979
|
}
|
4874
4980
|
}, {
|
4875
4981
|
key: "initPagination",
|
@@ -4909,6 +5015,11 @@
|
|
4909
5015
|
|
4910
5016
|
return value;
|
4911
5017
|
});
|
5018
|
+
this.paginationParts = opts.paginationParts;
|
5019
|
+
|
5020
|
+
if (typeof this.paginationParts === 'string') {
|
5021
|
+
this.paginationParts = this.paginationParts.replace(/\[|\]| |'/g, '').split(',');
|
5022
|
+
}
|
4912
5023
|
|
4913
5024
|
if (opts.sidePagination !== 'server') {
|
4914
5025
|
opts.totalRows = data.length;
|
@@ -4945,10 +5056,16 @@
|
|
4945
5056
|
this.options.totalNotFiltered = undefined;
|
4946
5057
|
}
|
4947
5058
|
|
4948
|
-
|
4949
|
-
|
5059
|
+
if (this.paginationParts.includes('pageInfo') || this.paginationParts.includes('pageInfoShort') || this.paginationParts.includes('pageSize')) {
|
5060
|
+
html.push("<div class=\"".concat(this.constants.classes.pull, "-").concat(opts.paginationDetailHAlign, " pagination-detail\">"));
|
5061
|
+
}
|
4950
5062
|
|
4951
|
-
if (
|
5063
|
+
if (this.paginationParts.includes('pageInfo') || this.paginationParts.includes('pageInfoShort')) {
|
5064
|
+
var paginationInfo = this.paginationParts.includes('pageInfoShort') ? opts.formatDetailPagination(opts.totalRows) : opts.formatShowingRows(this.pageFrom, this.pageTo, opts.totalRows, opts.totalNotFiltered);
|
5065
|
+
html.push("<span class=\"pagination-info\">\n ".concat(paginationInfo, "\n </span>"));
|
5066
|
+
}
|
5067
|
+
|
5068
|
+
if (this.paginationParts.includes('pageSize')) {
|
4952
5069
|
html.push('<span class="page-list">');
|
4953
5070
|
var pageNumber = ["<span class=\"".concat(this.constants.classes.paginationDropdown, "\">\n <button class=\"").concat(this.constants.buttonsClass, " dropdown-toggle\" type=\"button\" data-toggle=\"dropdown\">\n <span class=\"page-size\">\n ").concat(allSelected ? opts.formatAllRows() : opts.pageSize, "\n </span>\n ").concat(this.constants.html.dropdownCaret, "\n </button>\n ").concat(this.constants.html.pageDropdown[0])];
|
4954
5071
|
pageList.forEach(function (page, i) {
|
@@ -4966,7 +5083,13 @@
|
|
4966
5083
|
});
|
4967
5084
|
pageNumber.push("".concat(this.constants.html.pageDropdown[1], "</span>"));
|
4968
5085
|
html.push(opts.formatRecordsPerPage(pageNumber.join('')));
|
5086
|
+
}
|
5087
|
+
|
5088
|
+
if (this.paginationParts.includes('pageInfo') || this.paginationParts.includes('pageInfoShort') || this.paginationParts.includes('pageSize')) {
|
4969
5089
|
html.push('</span></div>');
|
5090
|
+
}
|
5091
|
+
|
5092
|
+
if (this.paginationParts.includes('pageList')) {
|
4970
5093
|
html.push("<div class=\"".concat(this.constants.classes.pull, "-").concat(opts.paginationHAlign, " pagination\">"), Utils.sprintf(this.constants.html.pagination[0], Utils.sprintf(' pagination-%s', opts.iconSize)), Utils.sprintf(this.constants.html.paginationItem, ' page-pre', opts.formatSRPaginationPreText(), opts.paginationPreText));
|
4971
5094
|
|
4972
5095
|
if (this.totalPages < opts.paginationSuccessivelySize) {
|
@@ -5119,14 +5242,13 @@
|
|
5119
5242
|
}
|
5120
5243
|
|
5121
5244
|
this.initPagination();
|
5245
|
+
this.trigger('page-change', this.options.pageNumber, this.options.pageSize);
|
5122
5246
|
|
5123
5247
|
if (this.options.sidePagination === 'server') {
|
5124
5248
|
this.initServer();
|
5125
5249
|
} else {
|
5126
5250
|
this.initBody();
|
5127
5251
|
}
|
5128
|
-
|
5129
|
-
this.trigger('page-change', this.options.pageNumber, this.options.pageSize);
|
5130
5252
|
}
|
5131
5253
|
}, {
|
5132
5254
|
key: "onPageListChange",
|
@@ -5235,20 +5357,26 @@
|
|
5235
5357
|
}
|
5236
5358
|
}
|
5237
5359
|
|
5238
|
-
html.push('<tr', Utils.sprintf(' %s', htmlAttributes.length ? htmlAttributes.join(' ') : undefined), Utils.sprintf(' id="%s"', Array.isArray(item) ? undefined : item._id), Utils.sprintf(' class="%s"', style.classes || (Array.isArray(item) ? undefined : item._class)), " data-index=\"".concat(i, "\""), Utils.sprintf(' data-uniqueid="%s"', Utils.getItemField(item, this.options.uniqueId, false)), Utils.sprintf(' data-has-detail-view="%s"',
|
5360
|
+
html.push('<tr', Utils.sprintf(' %s', htmlAttributes.length ? htmlAttributes.join(' ') : undefined), Utils.sprintf(' id="%s"', Array.isArray(item) ? undefined : item._id), Utils.sprintf(' class="%s"', style.classes || (Array.isArray(item) ? undefined : item._class)), " data-index=\"".concat(i, "\""), Utils.sprintf(' data-uniqueid="%s"', Utils.getItemField(item, this.options.uniqueId, false)), Utils.sprintf(' data-has-detail-view="%s"', this.options.detailView && Utils.calculateObjectValue(null, this.options.detailFilter, [i, item]) ? 'true' : undefined), Utils.sprintf('%s', data_), '>');
|
5239
5361
|
|
5240
5362
|
if (this.options.cardView) {
|
5241
5363
|
html.push("<td colspan=\"".concat(this.header.fields.length, "\"><div class=\"card-views\">"));
|
5242
5364
|
}
|
5243
5365
|
|
5244
|
-
|
5245
|
-
|
5366
|
+
var detailViewTemplate = '';
|
5367
|
+
|
5368
|
+
if (Utils.hasDetailViewIcon(this.options)) {
|
5369
|
+
detailViewTemplate = '<td>';
|
5246
5370
|
|
5247
5371
|
if (Utils.calculateObjectValue(null, this.options.detailFilter, [i, item])) {
|
5248
|
-
|
5372
|
+
detailViewTemplate += "\n <a class=\"detail-icon\" href=\"#\">\n ".concat(Utils.sprintf(this.constants.html.icon, this.options.iconsPrefix, this.options.icons.detailOpen), "\n </a>\n ");
|
5249
5373
|
}
|
5250
5374
|
|
5251
|
-
|
5375
|
+
detailViewTemplate += '</td>';
|
5376
|
+
}
|
5377
|
+
|
5378
|
+
if (detailViewTemplate && this.options.detailViewAlign !== 'right') {
|
5379
|
+
html.push(detailViewTemplate);
|
5252
5380
|
}
|
5253
5381
|
|
5254
5382
|
this.header.fields.forEach(function (field, j) {
|
@@ -5286,7 +5414,7 @@
|
|
5286
5414
|
|
5287
5415
|
if (csses.concat([_this7.header.styles[j]]).length) {
|
5288
5416
|
style_ = " style=\"".concat(csses.concat([_this7.header.styles[j]]).join('; '), "\"");
|
5289
|
-
} // handle
|
5417
|
+
} // handle id and class of td
|
5290
5418
|
|
5291
5419
|
|
5292
5420
|
if (item["_".concat(field, "_id")]) {
|
@@ -5372,6 +5500,10 @@
|
|
5372
5500
|
html.push(text);
|
5373
5501
|
});
|
5374
5502
|
|
5503
|
+
if (detailViewTemplate && this.options.detailViewAlign === 'right') {
|
5504
|
+
html.push(detailViewTemplate);
|
5505
|
+
}
|
5506
|
+
|
5375
5507
|
if (this.options.cardView) {
|
5376
5508
|
html.push('</div></td>');
|
5377
5509
|
}
|
@@ -5418,7 +5550,7 @@
|
|
5418
5550
|
|
5419
5551
|
|
5420
5552
|
if (!hasTr) {
|
5421
|
-
this.$body.html("<tr class=\"no-records-found\">".concat(Utils.sprintf('<td colspan="%s">%s</td>', this
|
5553
|
+
this.$body.html("<tr class=\"no-records-found\">".concat(Utils.sprintf('<td colspan="%s">%s</td>', this.getVisibleFields().length, this.options.formatNoMatches()), "</tr>"));
|
5422
5554
|
} else {
|
5423
5555
|
if (!this.options.virtualScroll) {
|
5424
5556
|
this.$body.html(trFragments);
|
@@ -5474,7 +5606,7 @@
|
|
5474
5606
|
|
5475
5607
|
var fields = _this9.getVisibleFields();
|
5476
5608
|
|
5477
|
-
var field = fields[_this9.options
|
5609
|
+
var field = fields[Utils.hasDetailViewIcon(_this9.options) && _this9.options.detailViewAlign !== 'right' ? index - 1 : index];
|
5478
5610
|
var column = _this9.columns[_this9.fieldsColumnsIndex[field]];
|
5479
5611
|
var value = Utils.getItemField(item, field, _this9.options.escape);
|
5480
5612
|
|
@@ -5537,7 +5669,7 @@
|
|
5537
5669
|
return;
|
5538
5670
|
}
|
5539
5671
|
|
5540
|
-
if (_this9.options
|
5672
|
+
if (Utils.hasDetailViewIcon(_this9.options) && _this9.options.detailViewAlign !== 'right') {
|
5541
5673
|
fieldIndex += 1;
|
5542
5674
|
}
|
5543
5675
|
|
@@ -5613,6 +5745,38 @@
|
|
5613
5745
|
}
|
5614
5746
|
}
|
5615
5747
|
|
5748
|
+
if (this.options.search && this.options.sidePagination === 'server' && this.columns.filter(function (column) {
|
5749
|
+
return !column.searchable;
|
5750
|
+
}).length) {
|
5751
|
+
params.searchable = [];
|
5752
|
+
var _iteratorNormalCompletion2 = true;
|
5753
|
+
var _didIteratorError2 = false;
|
5754
|
+
var _iteratorError2 = undefined;
|
5755
|
+
|
5756
|
+
try {
|
5757
|
+
for (var _iterator2 = this.columns[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {
|
5758
|
+
var column = _step2.value;
|
5759
|
+
|
5760
|
+
if (!column.checkbox && column.searchable && (this.options.visibleSearch && column.visible || !this.options.visibleSearch)) {
|
5761
|
+
params.searchable.push(column.field);
|
5762
|
+
}
|
5763
|
+
}
|
5764
|
+
} catch (err) {
|
5765
|
+
_didIteratorError2 = true;
|
5766
|
+
_iteratorError2 = err;
|
5767
|
+
} finally {
|
5768
|
+
try {
|
5769
|
+
if (!_iteratorNormalCompletion2 && _iterator2.return != null) {
|
5770
|
+
_iterator2.return();
|
5771
|
+
}
|
5772
|
+
} finally {
|
5773
|
+
if (_didIteratorError2) {
|
5774
|
+
throw _iteratorError2;
|
5775
|
+
}
|
5776
|
+
}
|
5777
|
+
}
|
5778
|
+
}
|
5779
|
+
|
5616
5780
|
if (!Utils.isEmptyObject(this.filterColumnsPartial)) {
|
5617
5781
|
params.filter = JSON.stringify(this.filterColumnsPartial, null);
|
5618
5782
|
}
|
@@ -5725,13 +5889,13 @@
|
|
5725
5889
|
}, {
|
5726
5890
|
key: "resetRows",
|
5727
5891
|
value: function resetRows() {
|
5728
|
-
var
|
5729
|
-
var
|
5730
|
-
var
|
5892
|
+
var _iteratorNormalCompletion3 = true;
|
5893
|
+
var _didIteratorError3 = false;
|
5894
|
+
var _iteratorError3 = undefined;
|
5731
5895
|
|
5732
5896
|
try {
|
5733
|
-
for (var
|
5734
|
-
var row =
|
5897
|
+
for (var _iterator3 = this.data[Symbol.iterator](), _step3; !(_iteratorNormalCompletion3 = (_step3 = _iterator3.next()).done); _iteratorNormalCompletion3 = true) {
|
5898
|
+
var row = _step3.value;
|
5735
5899
|
this.$selectAll.prop('checked', false);
|
5736
5900
|
this.$selectItem.prop('checked', false);
|
5737
5901
|
|
@@ -5740,16 +5904,16 @@
|
|
5740
5904
|
}
|
5741
5905
|
}
|
5742
5906
|
} catch (err) {
|
5743
|
-
|
5744
|
-
|
5907
|
+
_didIteratorError3 = true;
|
5908
|
+
_iteratorError3 = err;
|
5745
5909
|
} finally {
|
5746
5910
|
try {
|
5747
|
-
if (!
|
5748
|
-
|
5911
|
+
if (!_iteratorNormalCompletion3 && _iterator3.return != null) {
|
5912
|
+
_iterator3.return();
|
5749
5913
|
}
|
5750
5914
|
} finally {
|
5751
|
-
if (
|
5752
|
-
throw
|
5915
|
+
if (_didIteratorError3) {
|
5916
|
+
throw _iteratorError3;
|
5753
5917
|
}
|
5754
5918
|
}
|
5755
5919
|
}
|
@@ -5841,25 +6005,22 @@
|
|
5841
6005
|
$tr = $tr.next();
|
5842
6006
|
}
|
5843
6007
|
|
6008
|
+
var trLength = $tr.find('> *').length;
|
5844
6009
|
$tr.find('> *').each(function (i, el) {
|
5845
6010
|
var $this = $(el);
|
5846
|
-
var index = i;
|
5847
6011
|
|
5848
|
-
if (
|
5849
|
-
if (i === 0) {
|
6012
|
+
if (Utils.hasDetailViewIcon(_this14.options)) {
|
6013
|
+
if (i === 0 && _this14.options.detailViewAlign !== 'right' || i === trLength - 1 && _this14.options.detailViewAlign === 'right') {
|
5850
6014
|
var $thDetail = $ths.filter('.detail');
|
5851
6015
|
|
5852
6016
|
var _zoomWidth = $thDetail.innerWidth() - $thDetail.find('.fht-cell').width();
|
5853
6017
|
|
5854
6018
|
$thDetail.find('.fht-cell').width($this.innerWidth() - _zoomWidth);
|
6019
|
+
return;
|
5855
6020
|
}
|
5856
|
-
|
5857
|
-
index = i - 1;
|
5858
6021
|
}
|
5859
6022
|
|
5860
|
-
|
5861
|
-
return;
|
5862
|
-
}
|
6023
|
+
var index = Utils.hasDetailViewIcon(_this14.options) && _this14.options.detailViewAlign !== 'right' ? i - 1 : i;
|
5863
6024
|
|
5864
6025
|
var $th = _this14.$header_.find(Utils.sprintf('th[data-field="%s"]', visibleFields[index]));
|
5865
6026
|
|
@@ -5883,18 +6044,23 @@
|
|
5883
6044
|
|
5884
6045
|
var data = this.getData();
|
5885
6046
|
var html = [];
|
6047
|
+
var detailTemplate = '';
|
5886
6048
|
|
5887
|
-
if (
|
5888
|
-
|
6049
|
+
if (Utils.hasDetailViewIcon(this.options)) {
|
6050
|
+
detailTemplate = '<th class="detail"><div class="th-inner"></div><div class="fht-cell"></div></th>';
|
5889
6051
|
}
|
5890
6052
|
|
5891
|
-
|
5892
|
-
|
5893
|
-
|
6053
|
+
if (detailTemplate && this.options.detailViewAlign !== 'right') {
|
6054
|
+
html.push(detailTemplate);
|
6055
|
+
}
|
6056
|
+
|
6057
|
+
var _iteratorNormalCompletion4 = true;
|
6058
|
+
var _didIteratorError4 = false;
|
6059
|
+
var _iteratorError4 = undefined;
|
5894
6060
|
|
5895
6061
|
try {
|
5896
|
-
for (var
|
5897
|
-
var column =
|
6062
|
+
for (var _iterator4 = this.columns[Symbol.iterator](), _step4; !(_iteratorNormalCompletion4 = (_step4 = _iterator4.next()).done); _iteratorNormalCompletion4 = true) {
|
6063
|
+
var column = _step4.value;
|
5898
6064
|
var falign = '';
|
5899
6065
|
var valign = '';
|
5900
6066
|
var csses = [];
|
@@ -5936,20 +6102,24 @@
|
|
5936
6102
|
html.push('</th>');
|
5937
6103
|
}
|
5938
6104
|
} catch (err) {
|
5939
|
-
|
5940
|
-
|
6105
|
+
_didIteratorError4 = true;
|
6106
|
+
_iteratorError4 = err;
|
5941
6107
|
} finally {
|
5942
6108
|
try {
|
5943
|
-
if (!
|
5944
|
-
|
6109
|
+
if (!_iteratorNormalCompletion4 && _iterator4.return != null) {
|
6110
|
+
_iterator4.return();
|
5945
6111
|
}
|
5946
6112
|
} finally {
|
5947
|
-
if (
|
5948
|
-
throw
|
6113
|
+
if (_didIteratorError4) {
|
6114
|
+
throw _iteratorError4;
|
5949
6115
|
}
|
5950
6116
|
}
|
5951
6117
|
}
|
5952
6118
|
|
6119
|
+
if (detailTemplate && this.options.detailViewAlign === 'right') {
|
6120
|
+
html.push(detailTemplate);
|
6121
|
+
}
|
6122
|
+
|
5953
6123
|
if (!this.options.height && !this.$tableFooter.length) {
|
5954
6124
|
this.$el.append('<tfoot><tr></tr></tfoot>');
|
5955
6125
|
this.$tableFooter = this.$el.find('tfoot');
|
@@ -5981,24 +6151,19 @@
|
|
5981
6151
|
$tr = $tr.next();
|
5982
6152
|
}
|
5983
6153
|
|
6154
|
+
var trLength = $tr.find('> *').length;
|
5984
6155
|
$tr.find('> *').each(function (i, el) {
|
5985
6156
|
var $this = $(el);
|
5986
|
-
var index = i;
|
5987
6157
|
|
5988
|
-
if (
|
5989
|
-
if (i === 0) {
|
6158
|
+
if (Utils.hasDetailViewIcon(_this15.options)) {
|
6159
|
+
if (i === 0 && _this15.options.detailViewAlign === 'left' || i === trLength - 1 && _this15.options.detailViewAlign === 'right') {
|
5990
6160
|
var $thDetail = $ths.filter('.detail');
|
5991
6161
|
|
5992
6162
|
var _zoomWidth2 = $thDetail.innerWidth() - $thDetail.find('.fht-cell').width();
|
5993
6163
|
|
5994
6164
|
$thDetail.find('.fht-cell').width($this.innerWidth() - _zoomWidth2);
|
6165
|
+
return;
|
5995
6166
|
}
|
5996
|
-
|
5997
|
-
index = i - 1;
|
5998
|
-
}
|
5999
|
-
|
6000
|
-
if (index === -1) {
|
6001
|
-
return;
|
6002
6167
|
}
|
6003
6168
|
|
6004
6169
|
var $th = $ths.eq(i);
|
@@ -6032,13 +6197,13 @@
|
|
6032
6197
|
key: "getVisibleFields",
|
6033
6198
|
value: function getVisibleFields() {
|
6034
6199
|
var visibleFields = [];
|
6035
|
-
var
|
6036
|
-
var
|
6037
|
-
var
|
6200
|
+
var _iteratorNormalCompletion5 = true;
|
6201
|
+
var _didIteratorError5 = false;
|
6202
|
+
var _iteratorError5 = undefined;
|
6038
6203
|
|
6039
6204
|
try {
|
6040
|
-
for (var
|
6041
|
-
var field =
|
6205
|
+
for (var _iterator5 = this.header.fields[Symbol.iterator](), _step5; !(_iteratorNormalCompletion5 = (_step5 = _iterator5.next()).done); _iteratorNormalCompletion5 = true) {
|
6206
|
+
var field = _step5.value;
|
6042
6207
|
var column = this.columns[this.fieldsColumnsIndex[field]];
|
6043
6208
|
|
6044
6209
|
if (!column || !column.visible) {
|
@@ -6048,16 +6213,16 @@
|
|
6048
6213
|
visibleFields.push(field);
|
6049
6214
|
}
|
6050
6215
|
} catch (err) {
|
6051
|
-
|
6052
|
-
|
6216
|
+
_didIteratorError5 = true;
|
6217
|
+
_iteratorError5 = err;
|
6053
6218
|
} finally {
|
6054
6219
|
try {
|
6055
|
-
if (!
|
6056
|
-
|
6220
|
+
if (!_iteratorNormalCompletion5 && _iterator5.return != null) {
|
6221
|
+
_iterator5.return();
|
6057
6222
|
}
|
6058
6223
|
} finally {
|
6059
|
-
if (
|
6060
|
-
throw
|
6224
|
+
if (_didIteratorError5) {
|
6225
|
+
throw _iteratorError5;
|
6061
6226
|
}
|
6062
6227
|
}
|
6063
6228
|
}
|
@@ -6095,6 +6260,8 @@
|
|
6095
6260
|
}, {
|
6096
6261
|
key: "getData",
|
6097
6262
|
value: function getData(params) {
|
6263
|
+
var _this17 = this;
|
6264
|
+
|
6098
6265
|
var data = this.options.data;
|
6099
6266
|
|
6100
6267
|
if ((this.searchText || this.options.customSearch || this.options.sortName || !Utils.isEmptyObject(this.filterColumns) || !Utils.isEmptyObject(this.filterColumnsPartial)) && (!params || !params.unfiltered)) {
|
@@ -6112,25 +6279,43 @@
|
|
6112
6279
|
});
|
6113
6280
|
}
|
6114
6281
|
|
6282
|
+
if (params && params.formatted) {
|
6283
|
+
data.forEach(function (row) {
|
6284
|
+
for (var _i9 = 0, _Object$entries8 = Object.entries(row); _i9 < _Object$entries8.length; _i9++) {
|
6285
|
+
var _Object$entries8$_i = _slicedToArray(_Object$entries8[_i9], 2),
|
6286
|
+
key = _Object$entries8$_i[0],
|
6287
|
+
value = _Object$entries8$_i[1];
|
6288
|
+
|
6289
|
+
var column = _this17.columns[_this17.fieldsColumnsIndex[key]];
|
6290
|
+
|
6291
|
+
if (!column) {
|
6292
|
+
return;
|
6293
|
+
}
|
6294
|
+
|
6295
|
+
row[key] = Utils.calculateObjectValue(column, _this17.header.formatters[column.fieldIndex], [value, row, row.index, column.field], value);
|
6296
|
+
}
|
6297
|
+
});
|
6298
|
+
}
|
6299
|
+
|
6115
6300
|
return data;
|
6116
6301
|
}
|
6117
6302
|
}, {
|
6118
6303
|
key: "getSelections",
|
6119
6304
|
value: function getSelections() {
|
6120
|
-
var
|
6305
|
+
var _this18 = this;
|
6121
6306
|
|
6122
6307
|
// fix #2424: from html with checkbox
|
6123
6308
|
return this.data.filter(function (row) {
|
6124
|
-
return row[
|
6309
|
+
return row[_this18.header.stateField] === true;
|
6125
6310
|
});
|
6126
6311
|
}
|
6127
6312
|
}, {
|
6128
6313
|
key: "getAllSelections",
|
6129
6314
|
value: function getAllSelections() {
|
6130
|
-
var
|
6315
|
+
var _this19 = this;
|
6131
6316
|
|
6132
6317
|
return this.options.data.filter(function (row) {
|
6133
|
-
return row[
|
6318
|
+
return row[_this19.header.stateField] === true;
|
6134
6319
|
});
|
6135
6320
|
}
|
6136
6321
|
}, {
|
@@ -6184,13 +6369,18 @@
|
|
6184
6369
|
}
|
6185
6370
|
|
6186
6371
|
for (i = len - 1; i >= 0; i--) {
|
6372
|
+
var exists = false;
|
6187
6373
|
row = this.options.data[i];
|
6188
6374
|
|
6189
|
-
if (!row.hasOwnProperty(params.field)) {
|
6375
|
+
if (!row.hasOwnProperty(params.field) && params.field !== '$index') {
|
6190
6376
|
continue;
|
6377
|
+
} else if (!row.hasOwnProperty(params.field) && params.field === '$index') {
|
6378
|
+
exists = params.values.includes(i);
|
6379
|
+
} else {
|
6380
|
+
exists = params.values.includes(row[params.field]);
|
6191
6381
|
}
|
6192
6382
|
|
6193
|
-
if (
|
6383
|
+
if (exists) {
|
6194
6384
|
this.options.data.splice(i, 1);
|
6195
6385
|
|
6196
6386
|
if (this.options.sidePagination === 'server') {
|
@@ -6235,20 +6425,18 @@
|
|
6235
6425
|
key: "updateRow",
|
6236
6426
|
value: function updateRow(params) {
|
6237
6427
|
var allParams = Array.isArray(params) ? params : [params];
|
6238
|
-
var
|
6239
|
-
var
|
6240
|
-
var
|
6428
|
+
var _iteratorNormalCompletion6 = true;
|
6429
|
+
var _didIteratorError6 = false;
|
6430
|
+
var _iteratorError6 = undefined;
|
6241
6431
|
|
6242
6432
|
try {
|
6243
|
-
for (var
|
6244
|
-
var _params =
|
6433
|
+
for (var _iterator6 = allParams[Symbol.iterator](), _step6; !(_iteratorNormalCompletion6 = (_step6 = _iterator6.next()).done); _iteratorNormalCompletion6 = true) {
|
6434
|
+
var _params = _step6.value;
|
6245
6435
|
|
6246
6436
|
if (!_params.hasOwnProperty('index') || !_params.hasOwnProperty('row')) {
|
6247
6437
|
continue;
|
6248
6438
|
}
|
6249
6439
|
|
6250
|
-
$.extend(this.options.data[_params.index], _params.row);
|
6251
|
-
|
6252
6440
|
if (_params.hasOwnProperty('replace') && _params.replace) {
|
6253
6441
|
this.options.data[_params.index] = _params.row;
|
6254
6442
|
} else {
|
@@ -6256,16 +6444,16 @@
|
|
6256
6444
|
}
|
6257
6445
|
}
|
6258
6446
|
} catch (err) {
|
6259
|
-
|
6260
|
-
|
6447
|
+
_didIteratorError6 = true;
|
6448
|
+
_iteratorError6 = err;
|
6261
6449
|
} finally {
|
6262
6450
|
try {
|
6263
|
-
if (!
|
6264
|
-
|
6451
|
+
if (!_iteratorNormalCompletion6 && _iterator6.return != null) {
|
6452
|
+
_iterator6.return();
|
6265
6453
|
}
|
6266
6454
|
} finally {
|
6267
|
-
if (
|
6268
|
-
throw
|
6455
|
+
if (_didIteratorError6) {
|
6456
|
+
throw _iteratorError6;
|
6269
6457
|
}
|
6270
6458
|
}
|
6271
6459
|
}
|
@@ -6321,13 +6509,13 @@
|
|
6321
6509
|
key: "updateByUniqueId",
|
6322
6510
|
value: function updateByUniqueId(params) {
|
6323
6511
|
var allParams = Array.isArray(params) ? params : [params];
|
6324
|
-
var
|
6325
|
-
var
|
6326
|
-
var
|
6512
|
+
var _iteratorNormalCompletion7 = true;
|
6513
|
+
var _didIteratorError7 = false;
|
6514
|
+
var _iteratorError7 = undefined;
|
6327
6515
|
|
6328
6516
|
try {
|
6329
|
-
for (var
|
6330
|
-
var _params2 =
|
6517
|
+
for (var _iterator7 = allParams[Symbol.iterator](), _step7; !(_iteratorNormalCompletion7 = (_step7 = _iterator7.next()).done); _iteratorNormalCompletion7 = true) {
|
6518
|
+
var _params2 = _step7.value;
|
6331
6519
|
|
6332
6520
|
if (!_params2.hasOwnProperty('id') || !_params2.hasOwnProperty('row')) {
|
6333
6521
|
continue;
|
@@ -6346,16 +6534,16 @@
|
|
6346
6534
|
}
|
6347
6535
|
}
|
6348
6536
|
} catch (err) {
|
6349
|
-
|
6350
|
-
|
6537
|
+
_didIteratorError7 = true;
|
6538
|
+
_iteratorError7 = err;
|
6351
6539
|
} finally {
|
6352
6540
|
try {
|
6353
|
-
if (!
|
6354
|
-
|
6541
|
+
if (!_iteratorNormalCompletion7 && _iterator7.return != null) {
|
6542
|
+
_iterator7.return();
|
6355
6543
|
}
|
6356
6544
|
} finally {
|
6357
|
-
if (
|
6358
|
-
throw
|
6545
|
+
if (_didIteratorError7) {
|
6546
|
+
throw _iteratorError7;
|
6359
6547
|
}
|
6360
6548
|
}
|
6361
6549
|
}
|
@@ -6402,11 +6590,7 @@
|
|
6402
6590
|
}, {
|
6403
6591
|
key: "updateCellByUniqueId",
|
6404
6592
|
value: function updateCellByUniqueId(params) {
|
6405
|
-
var
|
6406
|
-
|
6407
|
-
if (!params.hasOwnProperty('id') || !params.hasOwnProperty('field') || !params.hasOwnProperty('value')) {
|
6408
|
-
return;
|
6409
|
-
}
|
6593
|
+
var _this20 = this;
|
6410
6594
|
|
6411
6595
|
var allParams = Array.isArray(params) ? params : [params];
|
6412
6596
|
allParams.forEach(function (_ref6) {
|
@@ -6414,13 +6598,13 @@
|
|
6414
6598
|
field = _ref6.field,
|
6415
6599
|
value = _ref6.value;
|
6416
6600
|
|
6417
|
-
var rowId =
|
6601
|
+
var rowId = _this20.options.data.indexOf(_this20.getRowByUniqueId(id));
|
6418
6602
|
|
6419
6603
|
if (rowId === -1) {
|
6420
6604
|
return;
|
6421
6605
|
}
|
6422
6606
|
|
6423
|
-
|
6607
|
+
_this20.options.data[rowId][field] = value;
|
6424
6608
|
});
|
6425
6609
|
|
6426
6610
|
if (params.reinit === false) {
|
@@ -6463,12 +6647,8 @@
|
|
6463
6647
|
this.hiddenRows.splice(index, 1);
|
6464
6648
|
}
|
6465
6649
|
|
6466
|
-
|
6467
|
-
|
6468
|
-
} else {
|
6469
|
-
this.initBody(true);
|
6470
|
-
this.initPagination();
|
6471
|
-
}
|
6650
|
+
this.initBody(true);
|
6651
|
+
this.initPagination();
|
6472
6652
|
}
|
6473
6653
|
}, {
|
6474
6654
|
key: "getHiddenRows",
|
@@ -6476,34 +6656,35 @@
|
|
6476
6656
|
if (show) {
|
6477
6657
|
this.initHiddenRows();
|
6478
6658
|
this.initBody(true);
|
6659
|
+
this.initPagination();
|
6479
6660
|
return;
|
6480
6661
|
}
|
6481
6662
|
|
6482
6663
|
var data = this.getData();
|
6483
6664
|
var rows = [];
|
6484
|
-
var
|
6485
|
-
var
|
6486
|
-
var
|
6665
|
+
var _iteratorNormalCompletion8 = true;
|
6666
|
+
var _didIteratorError8 = false;
|
6667
|
+
var _iteratorError8 = undefined;
|
6487
6668
|
|
6488
6669
|
try {
|
6489
|
-
for (var
|
6490
|
-
var row =
|
6670
|
+
for (var _iterator8 = data[Symbol.iterator](), _step8; !(_iteratorNormalCompletion8 = (_step8 = _iterator8.next()).done); _iteratorNormalCompletion8 = true) {
|
6671
|
+
var row = _step8.value;
|
6491
6672
|
|
6492
6673
|
if (this.hiddenRows.includes(row)) {
|
6493
6674
|
rows.push(row);
|
6494
6675
|
}
|
6495
6676
|
}
|
6496
6677
|
} catch (err) {
|
6497
|
-
|
6498
|
-
|
6678
|
+
_didIteratorError8 = true;
|
6679
|
+
_iteratorError8 = err;
|
6499
6680
|
} finally {
|
6500
6681
|
try {
|
6501
|
-
if (!
|
6502
|
-
|
6682
|
+
if (!_iteratorNormalCompletion8 && _iterator8.return != null) {
|
6683
|
+
_iterator8.return();
|
6503
6684
|
}
|
6504
6685
|
} finally {
|
6505
|
-
if (
|
6506
|
-
throw
|
6686
|
+
if (_didIteratorError8) {
|
6687
|
+
throw _iteratorError8;
|
6507
6688
|
}
|
6508
6689
|
}
|
6509
6690
|
}
|
@@ -6514,21 +6695,21 @@
|
|
6514
6695
|
}, {
|
6515
6696
|
key: "showColumn",
|
6516
6697
|
value: function showColumn(field) {
|
6517
|
-
var
|
6698
|
+
var _this21 = this;
|
6518
6699
|
|
6519
6700
|
var fields = Array.isArray(field) ? field : [field];
|
6520
6701
|
fields.forEach(function (field) {
|
6521
|
-
|
6702
|
+
_this21._toggleColumn(_this21.fieldsColumnsIndex[field], true, true);
|
6522
6703
|
});
|
6523
6704
|
}
|
6524
6705
|
}, {
|
6525
6706
|
key: "hideColumn",
|
6526
6707
|
value: function hideColumn(field) {
|
6527
|
-
var
|
6708
|
+
var _this22 = this;
|
6528
6709
|
|
6529
6710
|
var fields = Array.isArray(field) ? field : [field];
|
6530
6711
|
fields.forEach(function (field) {
|
6531
|
-
|
6712
|
+
_this22._toggleColumn(_this22.fieldsColumnsIndex[field], false, true);
|
6532
6713
|
});
|
6533
6714
|
}
|
6534
6715
|
}, {
|
@@ -6559,10 +6740,10 @@
|
|
6559
6740
|
}, {
|
6560
6741
|
key: "getVisibleColumns",
|
6561
6742
|
value: function getVisibleColumns() {
|
6562
|
-
var
|
6743
|
+
var _this23 = this;
|
6563
6744
|
|
6564
6745
|
return this.columns.filter(function (column) {
|
6565
|
-
return column.visible && !
|
6746
|
+
return column.visible && !_this23.isSelectionColumn(column);
|
6566
6747
|
});
|
6567
6748
|
}
|
6568
6749
|
}, {
|
@@ -6591,15 +6772,15 @@
|
|
6591
6772
|
}, {
|
6592
6773
|
key: "_toggleAllColumns",
|
6593
6774
|
value: function _toggleAllColumns(visible) {
|
6594
|
-
var
|
6775
|
+
var _this24 = this;
|
6595
6776
|
|
6596
|
-
var
|
6597
|
-
var
|
6598
|
-
var
|
6777
|
+
var _iteratorNormalCompletion9 = true;
|
6778
|
+
var _didIteratorError9 = false;
|
6779
|
+
var _iteratorError9 = undefined;
|
6599
6780
|
|
6600
6781
|
try {
|
6601
|
-
for (var
|
6602
|
-
var column =
|
6782
|
+
for (var _iterator9 = this.columns.slice().reverse()[Symbol.iterator](), _step9; !(_iteratorNormalCompletion9 = (_step9 = _iterator9.next()).done); _iteratorNormalCompletion9 = true) {
|
6783
|
+
var column = _step9.value;
|
6603
6784
|
|
6604
6785
|
if (column.switchable) {
|
6605
6786
|
if (!visible && this.options.showColumns && this.getVisibleColumns().length === this.options.minimumCountColumns) {
|
@@ -6610,16 +6791,16 @@
|
|
6610
6791
|
}
|
6611
6792
|
}
|
6612
6793
|
} catch (err) {
|
6613
|
-
|
6614
|
-
|
6794
|
+
_didIteratorError9 = true;
|
6795
|
+
_iteratorError9 = err;
|
6615
6796
|
} finally {
|
6616
6797
|
try {
|
6617
|
-
if (!
|
6618
|
-
|
6798
|
+
if (!_iteratorNormalCompletion9 && _iterator9.return != null) {
|
6799
|
+
_iterator9.return();
|
6619
6800
|
}
|
6620
6801
|
} finally {
|
6621
|
-
if (
|
6622
|
-
throw
|
6802
|
+
if (_didIteratorError9) {
|
6803
|
+
throw _iteratorError9;
|
6623
6804
|
}
|
6624
6805
|
}
|
6625
6806
|
}
|
@@ -6636,7 +6817,7 @@
|
|
6636
6817
|
$items.prop('checked', visible);
|
6637
6818
|
} else {
|
6638
6819
|
$items.get().reverse().forEach(function (item) {
|
6639
|
-
if ($items.filter(':checked').length >
|
6820
|
+
if ($items.filter(':checked').length > _this24.options.minimumCountColumns) {
|
6640
6821
|
$(item).prop('checked', visible);
|
6641
6822
|
}
|
6642
6823
|
});
|
@@ -6658,7 +6839,7 @@
|
|
6658
6839
|
var j;
|
6659
6840
|
var $tr = this.$body.find('>tr');
|
6660
6841
|
|
6661
|
-
if (
|
6842
|
+
if (Utils.hasDetailViewIcon(this.options)) {
|
6662
6843
|
col += 1;
|
6663
6844
|
}
|
6664
6845
|
|
@@ -6733,26 +6914,26 @@
|
|
6733
6914
|
var row = this.data[index];
|
6734
6915
|
|
6735
6916
|
if ($el.is(':radio') || this.options.singleSelect || this.options.multipleSelectRow && !this.multipleSelectRowCtrlKey && !this.multipleSelectRowShiftKey) {
|
6736
|
-
var
|
6737
|
-
var
|
6738
|
-
var
|
6917
|
+
var _iteratorNormalCompletion10 = true;
|
6918
|
+
var _didIteratorError10 = false;
|
6919
|
+
var _iteratorError10 = undefined;
|
6739
6920
|
|
6740
6921
|
try {
|
6741
|
-
for (var
|
6742
|
-
var r =
|
6922
|
+
for (var _iterator10 = this.options.data[Symbol.iterator](), _step10; !(_iteratorNormalCompletion10 = (_step10 = _iterator10.next()).done); _iteratorNormalCompletion10 = true) {
|
6923
|
+
var r = _step10.value;
|
6743
6924
|
r[this.header.stateField] = false;
|
6744
6925
|
}
|
6745
6926
|
} catch (err) {
|
6746
|
-
|
6747
|
-
|
6927
|
+
_didIteratorError10 = true;
|
6928
|
+
_iteratorError10 = err;
|
6748
6929
|
} finally {
|
6749
6930
|
try {
|
6750
|
-
if (!
|
6751
|
-
|
6931
|
+
if (!_iteratorNormalCompletion10 && _iterator10.return != null) {
|
6932
|
+
_iterator10.return();
|
6752
6933
|
}
|
6753
6934
|
} finally {
|
6754
|
-
if (
|
6755
|
-
throw
|
6935
|
+
if (_didIteratorError10) {
|
6936
|
+
throw _iteratorError10;
|
6756
6937
|
}
|
6757
6938
|
}
|
6758
6939
|
}
|
@@ -6794,7 +6975,7 @@
|
|
6794
6975
|
}, {
|
6795
6976
|
key: "_toggleCheckBy",
|
6796
6977
|
value: function _toggleCheckBy(checked, obj) {
|
6797
|
-
var
|
6978
|
+
var _this25 = this;
|
6798
6979
|
|
6799
6980
|
if (!obj.hasOwnProperty('field') || !obj.hasOwnProperty('values')) {
|
6800
6981
|
return;
|
@@ -6807,7 +6988,7 @@
|
|
6807
6988
|
}
|
6808
6989
|
|
6809
6990
|
if (obj.values.includes(row[obj.field])) {
|
6810
|
-
var $el =
|
6991
|
+
var $el = _this25.$selectItem.filter(':enabled').filter(Utils.sprintf('[data-index="%s"]', i));
|
6811
6992
|
|
6812
6993
|
$el = checked ? $el.not(':checked') : $el.filter(':checked');
|
6813
6994
|
|
@@ -6816,10 +6997,10 @@
|
|
6816
6997
|
}
|
6817
6998
|
|
6818
6999
|
$el.prop('checked', checked);
|
6819
|
-
row[
|
7000
|
+
row[_this25.header.stateField] = checked;
|
6820
7001
|
rows.push(row);
|
6821
7002
|
|
6822
|
-
|
7003
|
+
_this25.trigger(checked ? 'check' : 'uncheck', row, $el);
|
6823
7004
|
}
|
6824
7005
|
});
|
6825
7006
|
this.updateSelected();
|
@@ -6885,6 +7066,11 @@
|
|
6885
7066
|
this.$tableContainer.css('height', '');
|
6886
7067
|
this.$tableContainer.css('width', '');
|
6887
7068
|
} else if (this.options.height) {
|
7069
|
+
if (this.$tableBorder) {
|
7070
|
+
this.$tableBorder.css('width', '');
|
7071
|
+
this.$tableBorder.css('height', '');
|
7072
|
+
}
|
7073
|
+
|
6888
7074
|
var toolbarHeight = this.$toolbar.outerHeight(true);
|
6889
7075
|
var paginationHeight = this.$pagination.outerHeight(true);
|
6890
7076
|
var height = this.options.height - toolbarHeight - paginationHeight;
|
@@ -6892,7 +7078,7 @@
|
|
6892
7078
|
var tableHeight = $bodyTable.outerHeight();
|
6893
7079
|
this.$tableContainer.css('height', "".concat(height, "px"));
|
6894
7080
|
|
6895
|
-
if (this.$tableBorder) {
|
7081
|
+
if (this.$tableBorder && $bodyTable.is(':visible')) {
|
6896
7082
|
var tableBorderHeight = height - tableHeight - 2;
|
6897
7083
|
|
6898
7084
|
if (this.$tableBody[0].scrollWidth - this.$tableBody.innerWidth()) {
|
@@ -6921,6 +7107,16 @@
|
|
6921
7107
|
key: "showLoading",
|
6922
7108
|
value: function showLoading() {
|
6923
7109
|
this.$tableLoading.css('display', 'flex');
|
7110
|
+
var fontSize = this.options.loadingFontSize;
|
7111
|
+
|
7112
|
+
if (this.options.loadingFontSize === 'auto') {
|
7113
|
+
fontSize = this.$tableLoading.width() * 0.04;
|
7114
|
+
fontSize = Math.max(12, fontSize);
|
7115
|
+
fontSize = Math.min(32, fontSize);
|
7116
|
+
fontSize = "".concat(fontSize, "px");
|
7117
|
+
}
|
7118
|
+
|
7119
|
+
this.$tableLoading.find('.loading-text').css('font-size', fontSize);
|
6924
7120
|
}
|
6925
7121
|
}, {
|
6926
7122
|
key: "hideLoading",
|
@@ -6987,7 +7183,7 @@
|
|
6987
7183
|
options = Object.assign(options, params);
|
6988
7184
|
} else if (typeof params === 'string' && params === 'bottom') {
|
6989
7185
|
options.value = this.$tableBody[0].scrollHeight;
|
6990
|
-
} else if (typeof params === 'string') {
|
7186
|
+
} else if (typeof params === 'string' || typeof params === 'number') {
|
6991
7187
|
options.value = params;
|
6992
7188
|
}
|
6993
7189
|
|
@@ -7069,6 +7265,17 @@
|
|
7069
7265
|
|
7070
7266
|
this.trigger('expand-row', index, row, $element);
|
7071
7267
|
}
|
7268
|
+
}, {
|
7269
|
+
key: "expandRowByUniqueId",
|
7270
|
+
value: function expandRowByUniqueId(uniqueId) {
|
7271
|
+
var row = this.getRowByUniqueId(uniqueId);
|
7272
|
+
|
7273
|
+
if (!row) {
|
7274
|
+
return;
|
7275
|
+
}
|
7276
|
+
|
7277
|
+
this.expandRow(this.data.indexOf(row));
|
7278
|
+
}
|
7072
7279
|
}, {
|
7073
7280
|
key: "collapseRow",
|
7074
7281
|
value: function collapseRow(index) {
|
@@ -7086,6 +7293,17 @@
|
|
7086
7293
|
this.trigger('collapse-row', index, row, $tr.next());
|
7087
7294
|
$tr.next().remove();
|
7088
7295
|
}
|
7296
|
+
}, {
|
7297
|
+
key: "collapseRowByUniqueId",
|
7298
|
+
value: function collapseRowByUniqueId(uniqueId) {
|
7299
|
+
var row = this.getRowByUniqueId(uniqueId);
|
7300
|
+
|
7301
|
+
if (!row) {
|
7302
|
+
return;
|
7303
|
+
}
|
7304
|
+
|
7305
|
+
this.collapseRow(this.data.indexOf(row));
|
7306
|
+
}
|
7089
7307
|
}, {
|
7090
7308
|
key: "expandAllRows",
|
7091
7309
|
value: function expandAllRows() {
|