pui9-datatables 3.2.1 → 3.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/pui9-datatables.common.js +106 -1166
- package/dist/pui9-datatables.css +1 -1
- package/package-lock.json +34 -29
- package/package.json +1 -1
|
@@ -47882,13 +47882,6 @@ $({ target: 'Array', proto: true, forced: FORCED }, {
|
|
|
47882
47882
|
});
|
|
47883
47883
|
|
|
47884
47884
|
|
|
47885
|
-
/***/ }),
|
|
47886
|
-
|
|
47887
|
-
/***/ "4f75":
|
|
47888
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
47889
|
-
|
|
47890
|
-
// extracted by mini-css-extract-plugin
|
|
47891
|
-
|
|
47892
47885
|
/***/ }),
|
|
47893
47886
|
|
|
47894
47887
|
/***/ "4fad":
|
|
@@ -47992,13 +47985,6 @@ var webkit = userAgent.match(/AppleWebKit\/(\d+)\./);
|
|
|
47992
47985
|
module.exports = !!webkit && +webkit[1];
|
|
47993
47986
|
|
|
47994
47987
|
|
|
47995
|
-
/***/ }),
|
|
47996
|
-
|
|
47997
|
-
/***/ "517f":
|
|
47998
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
47999
|
-
|
|
48000
|
-
// extracted by mini-css-extract-plugin
|
|
48001
|
-
|
|
48002
47988
|
/***/ }),
|
|
48003
47989
|
|
|
48004
47990
|
/***/ "51eb":
|
|
@@ -48181,6 +48167,13 @@ module.exports = function (key) {
|
|
|
48181
48167
|
};
|
|
48182
48168
|
|
|
48183
48169
|
|
|
48170
|
+
/***/ }),
|
|
48171
|
+
|
|
48172
|
+
/***/ "5463c":
|
|
48173
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
48174
|
+
|
|
48175
|
+
// extracted by mini-css-extract-plugin
|
|
48176
|
+
|
|
48184
48177
|
/***/ }),
|
|
48185
48178
|
|
|
48186
48179
|
/***/ "547b":
|
|
@@ -49074,6 +49067,17 @@ module.exports = function (originalArray, length) {
|
|
|
49074
49067
|
};
|
|
49075
49068
|
|
|
49076
49069
|
|
|
49070
|
+
/***/ }),
|
|
49071
|
+
|
|
49072
|
+
/***/ "666e":
|
|
49073
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
49074
|
+
|
|
49075
|
+
"use strict";
|
|
49076
|
+
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_7_oneOf_1_0_node_modules_vue_cli_service_node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_vue_cli_service_node_modules_postcss_loader_src_index_js_ref_7_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_PuiSimpleDatatable_vue_vue_type_style_index_1_id_673ef7c9_prod_lang_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("5463c");
|
|
49077
|
+
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_7_oneOf_1_0_node_modules_vue_cli_service_node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_vue_cli_service_node_modules_postcss_loader_src_index_js_ref_7_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_PuiSimpleDatatable_vue_vue_type_style_index_1_id_673ef7c9_prod_lang_css__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_7_oneOf_1_0_node_modules_vue_cli_service_node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_vue_cli_service_node_modules_postcss_loader_src_index_js_ref_7_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_PuiSimpleDatatable_vue_vue_type_style_index_1_id_673ef7c9_prod_lang_css__WEBPACK_IMPORTED_MODULE_0__);
|
|
49078
|
+
/* unused harmony reexport * */
|
|
49079
|
+
|
|
49080
|
+
|
|
49077
49081
|
/***/ }),
|
|
49078
49082
|
|
|
49079
49083
|
/***/ "6795":
|
|
@@ -52852,6 +52856,13 @@ module.exports = queueMicrotask || function (fn) {
|
|
|
52852
52856
|
};
|
|
52853
52857
|
|
|
52854
52858
|
|
|
52859
|
+
/***/ }),
|
|
52860
|
+
|
|
52861
|
+
/***/ "b60a":
|
|
52862
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
52863
|
+
|
|
52864
|
+
// extracted by mini-css-extract-plugin
|
|
52865
|
+
|
|
52855
52866
|
/***/ }),
|
|
52856
52867
|
|
|
52857
52868
|
/***/ "b622":
|
|
@@ -53196,13 +53207,6 @@ module.exports = {
|
|
|
53196
53207
|
};
|
|
53197
53208
|
|
|
53198
53209
|
|
|
53199
|
-
/***/ }),
|
|
53200
|
-
|
|
53201
|
-
/***/ "bf85":
|
|
53202
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
53203
|
-
|
|
53204
|
-
// extracted by mini-css-extract-plugin
|
|
53205
|
-
|
|
53206
53210
|
/***/ }),
|
|
53207
53211
|
|
|
53208
53212
|
/***/ "c043":
|
|
@@ -53277,6 +53281,17 @@ module.exports = function (key) {
|
|
|
53277
53281
|
};
|
|
53278
53282
|
|
|
53279
53283
|
|
|
53284
|
+
/***/ }),
|
|
53285
|
+
|
|
53286
|
+
/***/ "c398":
|
|
53287
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
53288
|
+
|
|
53289
|
+
"use strict";
|
|
53290
|
+
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_8_oneOf_1_0_node_modules_vue_cli_service_node_modules_css_loader_dist_cjs_js_ref_8_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_vue_cli_service_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_PuiSimpleDatatable_vue_vue_type_style_index_0_id_673ef7c9_prod_lang_postcss_scoped_true__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("b60a");
|
|
53291
|
+
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_8_oneOf_1_0_node_modules_vue_cli_service_node_modules_css_loader_dist_cjs_js_ref_8_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_vue_cli_service_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_PuiSimpleDatatable_vue_vue_type_style_index_0_id_673ef7c9_prod_lang_postcss_scoped_true__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_8_oneOf_1_0_node_modules_vue_cli_service_node_modules_css_loader_dist_cjs_js_ref_8_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_vue_cli_service_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_PuiSimpleDatatable_vue_vue_type_style_index_0_id_673ef7c9_prod_lang_postcss_scoped_true__WEBPACK_IMPORTED_MODULE_0__);
|
|
53292
|
+
/* unused harmony reexport * */
|
|
53293
|
+
|
|
53294
|
+
|
|
53280
53295
|
/***/ }),
|
|
53281
53296
|
|
|
53282
53297
|
/***/ "c430":
|
|
@@ -72182,17 +72197,6 @@ $({ target: 'Promise', stat: true, forced: FORCED_PROMISE_CONSTRUCTOR }, {
|
|
|
72182
72197
|
});
|
|
72183
72198
|
|
|
72184
72199
|
|
|
72185
|
-
/***/ }),
|
|
72186
|
-
|
|
72187
|
-
/***/ "f2f2":
|
|
72188
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
72189
|
-
|
|
72190
|
-
"use strict";
|
|
72191
|
-
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_7_oneOf_1_0_node_modules_vue_cli_service_node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_vue_cli_service_node_modules_postcss_loader_src_index_js_ref_7_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_PuiSimpleDatatable_vue_vue_type_style_index_1_id_08a16ede_prod_lang_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("bf85");
|
|
72192
|
-
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_7_oneOf_1_0_node_modules_vue_cli_service_node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_vue_cli_service_node_modules_postcss_loader_src_index_js_ref_7_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_PuiSimpleDatatable_vue_vue_type_style_index_1_id_08a16ede_prod_lang_css__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_7_oneOf_1_0_node_modules_vue_cli_service_node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_vue_cli_service_node_modules_postcss_loader_src_index_js_ref_7_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_PuiSimpleDatatable_vue_vue_type_style_index_1_id_08a16ede_prod_lang_css__WEBPACK_IMPORTED_MODULE_0__);
|
|
72193
|
-
/* unused harmony reexport * */
|
|
72194
|
-
|
|
72195
|
-
|
|
72196
72200
|
/***/ }),
|
|
72197
72201
|
|
|
72198
72202
|
/***/ "f36a":
|
|
@@ -72310,17 +72314,6 @@ module.exports = function (key) {
|
|
|
72310
72314
|
};
|
|
72311
72315
|
|
|
72312
72316
|
|
|
72313
|
-
/***/ }),
|
|
72314
|
-
|
|
72315
|
-
/***/ "f871":
|
|
72316
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
72317
|
-
|
|
72318
|
-
"use strict";
|
|
72319
|
-
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_8_oneOf_1_0_node_modules_vue_cli_service_node_modules_css_loader_dist_cjs_js_ref_8_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_vue_cli_service_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_PuiSimpleDatatable_vue_vue_type_style_index_0_id_08a16ede_prod_lang_postcss_scoped_true__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("517f");
|
|
72320
|
-
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_8_oneOf_1_0_node_modules_vue_cli_service_node_modules_css_loader_dist_cjs_js_ref_8_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_vue_cli_service_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_PuiSimpleDatatable_vue_vue_type_style_index_0_id_08a16ede_prod_lang_postcss_scoped_true__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_8_oneOf_1_0_node_modules_vue_cli_service_node_modules_css_loader_dist_cjs_js_ref_8_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_vue_cli_service_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_PuiSimpleDatatable_vue_vue_type_style_index_0_id_08a16ede_prod_lang_postcss_scoped_true__WEBPACK_IMPORTED_MODULE_0__);
|
|
72321
|
-
/* unused harmony reexport * */
|
|
72322
|
-
|
|
72323
|
-
|
|
72324
72317
|
/***/ }),
|
|
72325
72318
|
|
|
72326
72319
|
/***/ "f914":
|
|
@@ -76215,9 +76208,9 @@ var PuiGridActionsBtn_component = normalizeComponent(
|
|
|
76215
76208
|
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.string.fixed.js
|
|
76216
76209
|
var es_string_fixed = __webpack_require__("c7cd");
|
|
76217
76210
|
|
|
76218
|
-
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"cf80b3ea-vue-loader-template"}!./node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--6!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/desktop/PuiSimpleDatatable.vue?vue&type=template&id=
|
|
76211
|
+
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"cf80b3ea-vue-loader-template"}!./node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--6!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/desktop/PuiSimpleDatatable.vue?vue&type=template&id=673ef7c9&scoped=true
|
|
76219
76212
|
|
|
76220
|
-
var
|
|
76213
|
+
var PuiSimpleDatatablevue_type_template_id_673ef7c9_scoped_true_render = function render() {
|
|
76221
76214
|
var _vm = this,
|
|
76222
76215
|
_c = _vm._self._c;
|
|
76223
76216
|
return _c('v-layout', {
|
|
@@ -76277,9 +76270,9 @@ var PuiSimpleDatatablevue_type_template_id_08a16ede_scoped_true_render = functio
|
|
|
76277
76270
|
}
|
|
76278
76271
|
})], 1);
|
|
76279
76272
|
};
|
|
76280
|
-
var
|
|
76273
|
+
var PuiSimpleDatatablevue_type_template_id_673ef7c9_scoped_true_staticRenderFns = [];
|
|
76281
76274
|
|
|
76282
|
-
// CONCATENATED MODULE: ./src/components/desktop/PuiSimpleDatatable.vue?vue&type=template&id=
|
|
76275
|
+
// CONCATENATED MODULE: ./src/components/desktop/PuiSimpleDatatable.vue?vue&type=template&id=673ef7c9&scoped=true
|
|
76283
76276
|
|
|
76284
76277
|
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.object.get-own-property-descriptor.js
|
|
76285
76278
|
var es_object_get_own_property_descriptor = __webpack_require__("e439");
|
|
@@ -81075,1071 +81068,6 @@ var dataTables_fixedColumns = __webpack_require__("ea7d");
|
|
|
81075
81068
|
// EXTERNAL MODULE: ./node_modules/datatables.net-fixedcolumns-dt/css/fixedColumns.dataTables.css
|
|
81076
81069
|
var fixedColumns_dataTables = __webpack_require__("8e28");
|
|
81077
81070
|
|
|
81078
|
-
// CONCATENATED MODULE: ./node_modules/datatables.net-fixedheader/js/dataTables.fixedHeader.mjs
|
|
81079
|
-
/*! FixedHeader 3.3.1
|
|
81080
|
-
* ©2009-2022 SpryMedia Ltd - datatables.net/license
|
|
81081
|
-
*/
|
|
81082
|
-
|
|
81083
|
-
|
|
81084
|
-
|
|
81085
|
-
|
|
81086
|
-
|
|
81087
|
-
|
|
81088
|
-
/**
|
|
81089
|
-
* @summary FixedHeader
|
|
81090
|
-
* @description Fix a table's header or footer, so it is always visible while
|
|
81091
|
-
* scrolling
|
|
81092
|
-
* @version 3.3.1
|
|
81093
|
-
* @author SpryMedia Ltd (www.sprymedia.co.uk)
|
|
81094
|
-
* @contact www.sprymedia.co.uk
|
|
81095
|
-
* @copyright SpryMedia Ltd.
|
|
81096
|
-
*
|
|
81097
|
-
* This source file is free software, available under the following license:
|
|
81098
|
-
* MIT license - http://datatables.net/license/mit
|
|
81099
|
-
*
|
|
81100
|
-
* This source file is distributed in the hope that it will be useful, but
|
|
81101
|
-
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
|
81102
|
-
* or FITNESS FOR A PARTICULAR PURPOSE. See the license files for details.
|
|
81103
|
-
*
|
|
81104
|
-
* For details please refer to: http://www.datatables.net
|
|
81105
|
-
*/
|
|
81106
|
-
|
|
81107
|
-
var _instCounter = 0;
|
|
81108
|
-
|
|
81109
|
-
var FixedHeader = function ( dt, config ) {
|
|
81110
|
-
// Sanity check - you just know it will happen
|
|
81111
|
-
if ( ! (this instanceof FixedHeader) ) {
|
|
81112
|
-
throw "FixedHeader must be initialised with the 'new' keyword.";
|
|
81113
|
-
}
|
|
81114
|
-
|
|
81115
|
-
// Allow a boolean true for defaults
|
|
81116
|
-
if ( config === true ) {
|
|
81117
|
-
config = {};
|
|
81118
|
-
}
|
|
81119
|
-
|
|
81120
|
-
dt = new js_jquery_dataTables_default.a.Api( dt );
|
|
81121
|
-
|
|
81122
|
-
this.c = jquery_default.a.extend( true, {}, FixedHeader.defaults, config );
|
|
81123
|
-
|
|
81124
|
-
this.s = {
|
|
81125
|
-
dt: dt,
|
|
81126
|
-
position: {
|
|
81127
|
-
theadTop: 0,
|
|
81128
|
-
tbodyTop: 0,
|
|
81129
|
-
tfootTop: 0,
|
|
81130
|
-
tfootBottom: 0,
|
|
81131
|
-
width: 0,
|
|
81132
|
-
left: 0,
|
|
81133
|
-
tfootHeight: 0,
|
|
81134
|
-
theadHeight: 0,
|
|
81135
|
-
windowHeight: jquery_default()(window).height(),
|
|
81136
|
-
visible: true
|
|
81137
|
-
},
|
|
81138
|
-
headerMode: null,
|
|
81139
|
-
footerMode: null,
|
|
81140
|
-
autoWidth: dt.settings()[0].oFeatures.bAutoWidth,
|
|
81141
|
-
namespace: '.dtfc'+(_instCounter++),
|
|
81142
|
-
scrollLeft: {
|
|
81143
|
-
header: -1,
|
|
81144
|
-
footer: -1
|
|
81145
|
-
},
|
|
81146
|
-
enable: true
|
|
81147
|
-
};
|
|
81148
|
-
|
|
81149
|
-
this.dom = {
|
|
81150
|
-
floatingHeader: null,
|
|
81151
|
-
thead: jquery_default()(dt.table().header()),
|
|
81152
|
-
tbody: jquery_default()(dt.table().body()),
|
|
81153
|
-
tfoot: jquery_default()(dt.table().footer()),
|
|
81154
|
-
header: {
|
|
81155
|
-
host: null,
|
|
81156
|
-
floating: null,
|
|
81157
|
-
floatingParent: jquery_default()('<div class="dtfh-floatingparent">'),
|
|
81158
|
-
placeholder: null
|
|
81159
|
-
},
|
|
81160
|
-
footer: {
|
|
81161
|
-
host: null,
|
|
81162
|
-
floating: null,
|
|
81163
|
-
floatingParent: jquery_default()('<div class="dtfh-floatingparent">'),
|
|
81164
|
-
placeholder: null
|
|
81165
|
-
}
|
|
81166
|
-
};
|
|
81167
|
-
|
|
81168
|
-
this.dom.header.host = this.dom.thead.parent();
|
|
81169
|
-
this.dom.footer.host = this.dom.tfoot.parent();
|
|
81170
|
-
|
|
81171
|
-
var dtSettings = dt.settings()[0];
|
|
81172
|
-
if ( dtSettings._fixedHeader ) {
|
|
81173
|
-
throw "FixedHeader already initialised on table "+dtSettings.nTable.id;
|
|
81174
|
-
}
|
|
81175
|
-
|
|
81176
|
-
dtSettings._fixedHeader = this;
|
|
81177
|
-
|
|
81178
|
-
this._constructor();
|
|
81179
|
-
};
|
|
81180
|
-
|
|
81181
|
-
|
|
81182
|
-
/*
|
|
81183
|
-
* Variable: FixedHeader
|
|
81184
|
-
* Purpose: Prototype for FixedHeader
|
|
81185
|
-
* Scope: global
|
|
81186
|
-
*/
|
|
81187
|
-
jquery_default.a.extend( FixedHeader.prototype, {
|
|
81188
|
-
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
|
81189
|
-
* API methods
|
|
81190
|
-
*/
|
|
81191
|
-
|
|
81192
|
-
/**
|
|
81193
|
-
* Kill off FH and any events
|
|
81194
|
-
*/
|
|
81195
|
-
destroy: function () {
|
|
81196
|
-
var dom = this.dom;
|
|
81197
|
-
|
|
81198
|
-
this.s.dt.off( '.dtfc' );
|
|
81199
|
-
jquery_default()(window).off( this.s.namespace );
|
|
81200
|
-
|
|
81201
|
-
// Remove clones of FC blockers
|
|
81202
|
-
if (dom.header.rightBlocker) {
|
|
81203
|
-
dom.header.rightBlocker.remove();
|
|
81204
|
-
}
|
|
81205
|
-
if (dom.header.leftBlocker) {
|
|
81206
|
-
dom.header.leftBlocker.remove();
|
|
81207
|
-
}
|
|
81208
|
-
if (dom.footer.rightBlocker) {
|
|
81209
|
-
dom.footer.rightBlocker.remove();
|
|
81210
|
-
}
|
|
81211
|
-
if (dom.footer.leftBlocker) {
|
|
81212
|
-
dom.footer.leftBlocker.remove();
|
|
81213
|
-
}
|
|
81214
|
-
|
|
81215
|
-
if ( this.c.header ) {
|
|
81216
|
-
this._modeChange( 'in-place', 'header', true );
|
|
81217
|
-
}
|
|
81218
|
-
|
|
81219
|
-
if ( this.c.footer && dom.tfoot.length ) {
|
|
81220
|
-
this._modeChange( 'in-place', 'footer', true );
|
|
81221
|
-
}
|
|
81222
|
-
},
|
|
81223
|
-
|
|
81224
|
-
/**
|
|
81225
|
-
* Enable / disable the fixed elements
|
|
81226
|
-
*
|
|
81227
|
-
* @param {boolean} enable `true` to enable, `false` to disable
|
|
81228
|
-
*/
|
|
81229
|
-
enable: function ( enable, update )
|
|
81230
|
-
{
|
|
81231
|
-
this.s.enable = enable;
|
|
81232
|
-
|
|
81233
|
-
if ( update || update === undefined ) {
|
|
81234
|
-
this._positions();
|
|
81235
|
-
this._scroll( true );
|
|
81236
|
-
}
|
|
81237
|
-
},
|
|
81238
|
-
|
|
81239
|
-
/**
|
|
81240
|
-
* Get enabled status
|
|
81241
|
-
*/
|
|
81242
|
-
enabled: function ()
|
|
81243
|
-
{
|
|
81244
|
-
return this.s.enable;
|
|
81245
|
-
},
|
|
81246
|
-
|
|
81247
|
-
/**
|
|
81248
|
-
* Set header offset
|
|
81249
|
-
*
|
|
81250
|
-
* @param {int} new value for headerOffset
|
|
81251
|
-
*/
|
|
81252
|
-
headerOffset: function ( offset )
|
|
81253
|
-
{
|
|
81254
|
-
if ( offset !== undefined ) {
|
|
81255
|
-
this.c.headerOffset = offset;
|
|
81256
|
-
this.update();
|
|
81257
|
-
}
|
|
81258
|
-
|
|
81259
|
-
return this.c.headerOffset;
|
|
81260
|
-
},
|
|
81261
|
-
|
|
81262
|
-
/**
|
|
81263
|
-
* Set footer offset
|
|
81264
|
-
*
|
|
81265
|
-
* @param {int} new value for footerOffset
|
|
81266
|
-
*/
|
|
81267
|
-
footerOffset: function ( offset )
|
|
81268
|
-
{
|
|
81269
|
-
if ( offset !== undefined ) {
|
|
81270
|
-
this.c.footerOffset = offset;
|
|
81271
|
-
this.update();
|
|
81272
|
-
}
|
|
81273
|
-
|
|
81274
|
-
return this.c.footerOffset;
|
|
81275
|
-
},
|
|
81276
|
-
|
|
81277
|
-
|
|
81278
|
-
/**
|
|
81279
|
-
* Recalculate the position of the fixed elements and force them into place
|
|
81280
|
-
*/
|
|
81281
|
-
update: function (force)
|
|
81282
|
-
{
|
|
81283
|
-
if (! this.s.enable) {
|
|
81284
|
-
return;
|
|
81285
|
-
}
|
|
81286
|
-
|
|
81287
|
-
var table = this.s.dt.table().node();
|
|
81288
|
-
|
|
81289
|
-
if ( jquery_default()(table).is(':visible') ) {
|
|
81290
|
-
this.enable( true, false );
|
|
81291
|
-
}
|
|
81292
|
-
else {
|
|
81293
|
-
this.enable( false, false );
|
|
81294
|
-
}
|
|
81295
|
-
|
|
81296
|
-
// Don't update if header is not in the document atm (due to
|
|
81297
|
-
// async events)
|
|
81298
|
-
if (jquery_default()(table).children('thead').length === 0) {
|
|
81299
|
-
return;
|
|
81300
|
-
}
|
|
81301
|
-
|
|
81302
|
-
this._positions();
|
|
81303
|
-
this._scroll( force !== undefined ? force : true );
|
|
81304
|
-
},
|
|
81305
|
-
|
|
81306
|
-
|
|
81307
|
-
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
|
81308
|
-
* Constructor
|
|
81309
|
-
*/
|
|
81310
|
-
|
|
81311
|
-
/**
|
|
81312
|
-
* FixedHeader constructor - adding the required event listeners and
|
|
81313
|
-
* simple initialisation
|
|
81314
|
-
*
|
|
81315
|
-
* @private
|
|
81316
|
-
*/
|
|
81317
|
-
_constructor: function ()
|
|
81318
|
-
{
|
|
81319
|
-
var that = this;
|
|
81320
|
-
var dt = this.s.dt;
|
|
81321
|
-
|
|
81322
|
-
jquery_default()(window)
|
|
81323
|
-
.on( 'scroll'+this.s.namespace, function () {
|
|
81324
|
-
that._scroll();
|
|
81325
|
-
} )
|
|
81326
|
-
.on( 'resize'+this.s.namespace, js_jquery_dataTables_default.a.util.throttle( function () {
|
|
81327
|
-
that.s.position.windowHeight = jquery_default()(window).height();
|
|
81328
|
-
that.update();
|
|
81329
|
-
}, 50 ) );
|
|
81330
|
-
|
|
81331
|
-
var autoHeader = jquery_default()('.fh-fixedHeader');
|
|
81332
|
-
if ( ! this.c.headerOffset && autoHeader.length ) {
|
|
81333
|
-
this.c.headerOffset = autoHeader.outerHeight();
|
|
81334
|
-
}
|
|
81335
|
-
|
|
81336
|
-
var autoFooter = jquery_default()('.fh-fixedFooter');
|
|
81337
|
-
if ( ! this.c.footerOffset && autoFooter.length ) {
|
|
81338
|
-
this.c.footerOffset = autoFooter.outerHeight();
|
|
81339
|
-
}
|
|
81340
|
-
|
|
81341
|
-
dt
|
|
81342
|
-
.on( 'column-reorder.dt.dtfc column-visibility.dt.dtfc column-sizing.dt.dtfc responsive-display.dt.dtfc', function (e, ctx) {
|
|
81343
|
-
that.update();
|
|
81344
|
-
} )
|
|
81345
|
-
.on( 'draw.dt.dtfc', function (e, ctx) {
|
|
81346
|
-
// For updates from our own table, don't reclone, but for all others, do
|
|
81347
|
-
that.update(ctx === dt.settings()[0] ? false : true);
|
|
81348
|
-
} );
|
|
81349
|
-
|
|
81350
|
-
dt.on( 'destroy.dtfc', function () {
|
|
81351
|
-
that.destroy();
|
|
81352
|
-
} );
|
|
81353
|
-
|
|
81354
|
-
this._positions();
|
|
81355
|
-
this._scroll();
|
|
81356
|
-
},
|
|
81357
|
-
|
|
81358
|
-
|
|
81359
|
-
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
|
81360
|
-
* Private methods
|
|
81361
|
-
*/
|
|
81362
|
-
|
|
81363
|
-
/**
|
|
81364
|
-
* Clone a fixed item to act as a place holder for the original element
|
|
81365
|
-
* which is moved into a clone of the table element, and moved around the
|
|
81366
|
-
* document to give the fixed effect.
|
|
81367
|
-
*
|
|
81368
|
-
* @param {string} item 'header' or 'footer'
|
|
81369
|
-
* @param {boolean} force Force the clone to happen, or allow automatic
|
|
81370
|
-
* decision (reuse existing if available)
|
|
81371
|
-
* @private
|
|
81372
|
-
*/
|
|
81373
|
-
_clone: function ( item, force )
|
|
81374
|
-
{
|
|
81375
|
-
var that = this;
|
|
81376
|
-
var dt = this.s.dt;
|
|
81377
|
-
var itemDom = this.dom[ item ];
|
|
81378
|
-
var itemElement = item === 'header' ?
|
|
81379
|
-
this.dom.thead :
|
|
81380
|
-
this.dom.tfoot;
|
|
81381
|
-
|
|
81382
|
-
// If footer and scrolling is enabled then we don't clone
|
|
81383
|
-
// Instead the table's height is decreased accordingly - see `_scroll()`
|
|
81384
|
-
if (item === 'footer' && this._scrollEnabled()) {
|
|
81385
|
-
return;
|
|
81386
|
-
}
|
|
81387
|
-
|
|
81388
|
-
if ( ! force && itemDom.floating ) {
|
|
81389
|
-
// existing floating element - reuse it
|
|
81390
|
-
itemDom.floating.removeClass( 'fixedHeader-floating fixedHeader-locked' );
|
|
81391
|
-
}
|
|
81392
|
-
else {
|
|
81393
|
-
var docScrollLeft = jquery_default()(document).scrollLeft();
|
|
81394
|
-
var docScrollTop = jquery_default()(document).scrollTop();
|
|
81395
|
-
|
|
81396
|
-
if ( itemDom.floating ) {
|
|
81397
|
-
if(itemDom.placeholder !== null) {
|
|
81398
|
-
itemDom.placeholder.remove();
|
|
81399
|
-
}
|
|
81400
|
-
this._unsize( item );
|
|
81401
|
-
itemDom.floating.children().detach();
|
|
81402
|
-
itemDom.floating.remove();
|
|
81403
|
-
}
|
|
81404
|
-
|
|
81405
|
-
var tableNode = jquery_default()(dt.table().node());
|
|
81406
|
-
var scrollBody = jquery_default()(tableNode.parent());
|
|
81407
|
-
var scrollEnabled = this._scrollEnabled();
|
|
81408
|
-
|
|
81409
|
-
itemDom.floating = jquery_default()( dt.table().node().cloneNode( false ) )
|
|
81410
|
-
.attr( 'aria-hidden', 'true' )
|
|
81411
|
-
.css({
|
|
81412
|
-
'table-layout': 'fixed',
|
|
81413
|
-
top: 0,
|
|
81414
|
-
left: 0
|
|
81415
|
-
})
|
|
81416
|
-
.removeAttr( 'id' )
|
|
81417
|
-
.append( itemElement );
|
|
81418
|
-
|
|
81419
|
-
itemDom.floatingParent
|
|
81420
|
-
.css({
|
|
81421
|
-
width: scrollBody.width(),
|
|
81422
|
-
overflow: 'hidden',
|
|
81423
|
-
height: 'fit-content',
|
|
81424
|
-
position: 'fixed',
|
|
81425
|
-
left: scrollEnabled ? tableNode.offset().left + scrollBody.scrollLeft() : 0
|
|
81426
|
-
})
|
|
81427
|
-
.css(
|
|
81428
|
-
item === 'header' ?
|
|
81429
|
-
{
|
|
81430
|
-
top: this.c.headerOffset,
|
|
81431
|
-
bottom: ''
|
|
81432
|
-
} :
|
|
81433
|
-
{
|
|
81434
|
-
top: '',
|
|
81435
|
-
bottom: this.c.footerOffset
|
|
81436
|
-
}
|
|
81437
|
-
)
|
|
81438
|
-
.addClass(item === 'footer' ? 'dtfh-floatingparentfoot' : 'dtfh-floatingparenthead')
|
|
81439
|
-
.append(itemDom.floating)
|
|
81440
|
-
.appendTo( 'body' );
|
|
81441
|
-
|
|
81442
|
-
this._stickyPosition(itemDom.floating, '-');
|
|
81443
|
-
|
|
81444
|
-
var scrollLeftUpdate = function () {
|
|
81445
|
-
var scrollLeft = scrollBody.scrollLeft()
|
|
81446
|
-
that.s.scrollLeft = {footer: scrollLeft, header: scrollLeft};
|
|
81447
|
-
itemDom.floatingParent.scrollLeft(that.s.scrollLeft.header);
|
|
81448
|
-
}
|
|
81449
|
-
|
|
81450
|
-
scrollLeftUpdate();
|
|
81451
|
-
scrollBody
|
|
81452
|
-
.off('scroll.dtfh')
|
|
81453
|
-
.on('scroll.dtfh', scrollLeftUpdate);
|
|
81454
|
-
|
|
81455
|
-
// Insert a fake thead/tfoot into the DataTable to stop it jumping around
|
|
81456
|
-
itemDom.placeholder = itemElement.clone( false );
|
|
81457
|
-
itemDom.placeholder
|
|
81458
|
-
.find( '*[id]' )
|
|
81459
|
-
.removeAttr( 'id' );
|
|
81460
|
-
|
|
81461
|
-
itemDom.host.prepend( itemDom.placeholder );
|
|
81462
|
-
|
|
81463
|
-
// Clone widths
|
|
81464
|
-
this._matchWidths( itemDom.placeholder, itemDom.floating );
|
|
81465
|
-
|
|
81466
|
-
// The above action will remove the table header, potentially causing the table to
|
|
81467
|
-
// collapse to a smaller size, before it is then re-inserted (append). The result
|
|
81468
|
-
// can be that the document, if scrolling, can "jump".
|
|
81469
|
-
jquery_default()(document)
|
|
81470
|
-
.scrollTop(docScrollTop)
|
|
81471
|
-
.scrollLeft(docScrollLeft);
|
|
81472
|
-
}
|
|
81473
|
-
},
|
|
81474
|
-
|
|
81475
|
-
/**
|
|
81476
|
-
* This method sets the sticky position of the header elements to match fixed columns
|
|
81477
|
-
* @param {JQuery<HTMLElement>} el
|
|
81478
|
-
* @param {string} sign
|
|
81479
|
-
*/
|
|
81480
|
-
_stickyPosition: function(el, sign) {
|
|
81481
|
-
if (this._scrollEnabled()) {
|
|
81482
|
-
var that = this
|
|
81483
|
-
var rtl = jquery_default()(that.s.dt.table().node()).css('direction') === 'rtl';
|
|
81484
|
-
|
|
81485
|
-
el.find('th').each(function() {
|
|
81486
|
-
// Find out if fixed header has previously set this column
|
|
81487
|
-
if (jquery_default()(this).css('position') === 'sticky') {
|
|
81488
|
-
var right = jquery_default()(this).css('right');
|
|
81489
|
-
var left = jquery_default()(this).css('left');
|
|
81490
|
-
if (right !== 'auto' && !rtl) {
|
|
81491
|
-
// New position either adds or dismisses the barWidth
|
|
81492
|
-
var potential = +right.replace(/px/g, '') + (sign === '-' ? -1 : 1) * that.s.dt.settings()[0].oBrowser.barWidth;
|
|
81493
|
-
jquery_default()(this).css('right', potential > 0 ? potential : 0);
|
|
81494
|
-
}
|
|
81495
|
-
else if(left !== 'auto' && rtl) {
|
|
81496
|
-
var potential = +left.replace(/px/g, '') + (sign === '-' ? -1 : 1) * that.s.dt.settings()[0].oBrowser.barWidth;
|
|
81497
|
-
jquery_default()(this).css('left', potential > 0 ? potential : 0);
|
|
81498
|
-
}
|
|
81499
|
-
}
|
|
81500
|
-
});
|
|
81501
|
-
}
|
|
81502
|
-
},
|
|
81503
|
-
|
|
81504
|
-
/**
|
|
81505
|
-
* Copy widths from the cells in one element to another. This is required
|
|
81506
|
-
* for the footer as the footer in the main table takes its sizes from the
|
|
81507
|
-
* header columns. That isn't present in the footer so to have it still
|
|
81508
|
-
* align correctly, the sizes need to be copied over. It is also required
|
|
81509
|
-
* for the header when auto width is not enabled
|
|
81510
|
-
*
|
|
81511
|
-
* @param {jQuery} from Copy widths from
|
|
81512
|
-
* @param {jQuery} to Copy widths to
|
|
81513
|
-
* @private
|
|
81514
|
-
*/
|
|
81515
|
-
_matchWidths: function ( from, to ) {
|
|
81516
|
-
var get = function ( name ) {
|
|
81517
|
-
return jquery_default()(name, from)
|
|
81518
|
-
.map( function () {
|
|
81519
|
-
return jquery_default()(this).css('width').replace(/[^\d\.]/g, '') * 1;
|
|
81520
|
-
} ).toArray();
|
|
81521
|
-
};
|
|
81522
|
-
|
|
81523
|
-
var set = function ( name, toWidths ) {
|
|
81524
|
-
jquery_default()(name, to).each( function ( i ) {
|
|
81525
|
-
jquery_default()(this).css( {
|
|
81526
|
-
width: toWidths[i],
|
|
81527
|
-
minWidth: toWidths[i]
|
|
81528
|
-
} );
|
|
81529
|
-
} );
|
|
81530
|
-
};
|
|
81531
|
-
|
|
81532
|
-
var thWidths = get( 'th' );
|
|
81533
|
-
var tdWidths = get( 'td' );
|
|
81534
|
-
|
|
81535
|
-
set( 'th', thWidths );
|
|
81536
|
-
set( 'td', tdWidths );
|
|
81537
|
-
},
|
|
81538
|
-
|
|
81539
|
-
/**
|
|
81540
|
-
* Remove assigned widths from the cells in an element. This is required
|
|
81541
|
-
* when inserting the footer back into the main table so the size is defined
|
|
81542
|
-
* by the header columns and also when auto width is disabled in the
|
|
81543
|
-
* DataTable.
|
|
81544
|
-
*
|
|
81545
|
-
* @param {string} item The `header` or `footer`
|
|
81546
|
-
* @private
|
|
81547
|
-
*/
|
|
81548
|
-
_unsize: function ( item ) {
|
|
81549
|
-
var el = this.dom[ item ].floating;
|
|
81550
|
-
|
|
81551
|
-
if ( el && (item === 'footer' || (item === 'header' && ! this.s.autoWidth)) ) {
|
|
81552
|
-
jquery_default()('th, td', el).css( {
|
|
81553
|
-
width: '',
|
|
81554
|
-
minWidth: ''
|
|
81555
|
-
} );
|
|
81556
|
-
}
|
|
81557
|
-
else if ( el && item === 'header' ) {
|
|
81558
|
-
jquery_default()('th, td', el).css( 'min-width', '' );
|
|
81559
|
-
}
|
|
81560
|
-
},
|
|
81561
|
-
|
|
81562
|
-
/**
|
|
81563
|
-
* Reposition the floating elements to take account of horizontal page
|
|
81564
|
-
* scroll
|
|
81565
|
-
*
|
|
81566
|
-
* @param {string} item The `header` or `footer`
|
|
81567
|
-
* @param {int} scrollLeft Document scrollLeft
|
|
81568
|
-
* @private
|
|
81569
|
-
*/
|
|
81570
|
-
_horizontal: function ( item, scrollLeft )
|
|
81571
|
-
{
|
|
81572
|
-
var itemDom = this.dom[ item ];
|
|
81573
|
-
var position = this.s.position;
|
|
81574
|
-
var lastScrollLeft = this.s.scrollLeft;
|
|
81575
|
-
|
|
81576
|
-
if ( itemDom.floating && lastScrollLeft[ item ] !== scrollLeft ) {
|
|
81577
|
-
// If scrolling is enabled we need to match the floating header to the body
|
|
81578
|
-
if (this._scrollEnabled()) {
|
|
81579
|
-
var newScrollLeft = jquery_default()(jquery_default()(this.s.dt.table().node()).parent()).scrollLeft()
|
|
81580
|
-
itemDom.floating.scrollLeft(newScrollLeft);
|
|
81581
|
-
itemDom.floatingParent.scrollLeft(newScrollLeft);
|
|
81582
|
-
}
|
|
81583
|
-
|
|
81584
|
-
lastScrollLeft[ item ] = scrollLeft;
|
|
81585
|
-
}
|
|
81586
|
-
},
|
|
81587
|
-
|
|
81588
|
-
/**
|
|
81589
|
-
* Change from one display mode to another. Each fixed item can be in one
|
|
81590
|
-
* of:
|
|
81591
|
-
*
|
|
81592
|
-
* * `in-place` - In the main DataTable
|
|
81593
|
-
* * `in` - Floating over the DataTable
|
|
81594
|
-
* * `below` - (Header only) Fixed to the bottom of the table body
|
|
81595
|
-
* * `above` - (Footer only) Fixed to the top of the table body
|
|
81596
|
-
*
|
|
81597
|
-
* @param {string} mode Mode that the item should be shown in
|
|
81598
|
-
* @param {string} item 'header' or 'footer'
|
|
81599
|
-
* @param {boolean} forceChange Force a redraw of the mode, even if already
|
|
81600
|
-
* in that mode.
|
|
81601
|
-
* @private
|
|
81602
|
-
*/
|
|
81603
|
-
_modeChange: function ( mode, item, forceChange )
|
|
81604
|
-
{
|
|
81605
|
-
var dt = this.s.dt;
|
|
81606
|
-
var itemDom = this.dom[ item ];
|
|
81607
|
-
var position = this.s.position;
|
|
81608
|
-
|
|
81609
|
-
// Just determine if scroll is enabled once
|
|
81610
|
-
var scrollEnabled = this._scrollEnabled();
|
|
81611
|
-
|
|
81612
|
-
// If footer and scrolling is enabled then we don't clone
|
|
81613
|
-
// Instead the table's height is decreased accordingly - see `_scroll()`
|
|
81614
|
-
if (item === 'footer' && scrollEnabled) {
|
|
81615
|
-
return;
|
|
81616
|
-
}
|
|
81617
|
-
|
|
81618
|
-
// It isn't trivial to add a !important css attribute...
|
|
81619
|
-
var importantWidth = function (w) {
|
|
81620
|
-
itemDom.floating.attr('style', function(i,s) {
|
|
81621
|
-
return (s || '') + 'width: '+w+'px !important;';
|
|
81622
|
-
});
|
|
81623
|
-
|
|
81624
|
-
// If not scrolling also have to update the floatingParent
|
|
81625
|
-
if (!scrollEnabled) {
|
|
81626
|
-
itemDom.floatingParent.attr('style', function(i,s) {
|
|
81627
|
-
return (s || '') + 'width: '+w+'px !important;';
|
|
81628
|
-
});
|
|
81629
|
-
}
|
|
81630
|
-
};
|
|
81631
|
-
|
|
81632
|
-
// Record focus. Browser's will cause input elements to loose focus if
|
|
81633
|
-
// they are inserted else where in the doc
|
|
81634
|
-
var tablePart = this.dom[ item==='footer' ? 'tfoot' : 'thead' ];
|
|
81635
|
-
var focus = jquery_default.a.contains( tablePart[0], document.activeElement ) ?
|
|
81636
|
-
document.activeElement :
|
|
81637
|
-
null;
|
|
81638
|
-
var scrollBody = jquery_default()(jquery_default()(this.s.dt.table().node()).parent());
|
|
81639
|
-
|
|
81640
|
-
if ( mode === 'in-place' ) {
|
|
81641
|
-
// Insert the header back into the table's real header
|
|
81642
|
-
if ( itemDom.placeholder ) {
|
|
81643
|
-
itemDom.placeholder.remove();
|
|
81644
|
-
itemDom.placeholder = null;
|
|
81645
|
-
}
|
|
81646
|
-
|
|
81647
|
-
this._unsize( item );
|
|
81648
|
-
|
|
81649
|
-
if ( item === 'header' ) {
|
|
81650
|
-
itemDom.host.prepend( tablePart );
|
|
81651
|
-
}
|
|
81652
|
-
else {
|
|
81653
|
-
itemDom.host.append( tablePart );
|
|
81654
|
-
}
|
|
81655
|
-
|
|
81656
|
-
if ( itemDom.floating ) {
|
|
81657
|
-
itemDom.floating.remove();
|
|
81658
|
-
itemDom.floating = null;
|
|
81659
|
-
this._stickyPosition(itemDom.host, '+');
|
|
81660
|
-
}
|
|
81661
|
-
|
|
81662
|
-
if ( itemDom.floatingParent ) {
|
|
81663
|
-
itemDom.floatingParent.remove();
|
|
81664
|
-
}
|
|
81665
|
-
|
|
81666
|
-
jquery_default()(jquery_default()(itemDom.host.parent()).parent()).scrollLeft(scrollBody.scrollLeft())
|
|
81667
|
-
}
|
|
81668
|
-
else if ( mode === 'in' ) {
|
|
81669
|
-
// Remove the header from the read header and insert into a fixed
|
|
81670
|
-
// positioned floating table clone
|
|
81671
|
-
this._clone( item, forceChange );
|
|
81672
|
-
|
|
81673
|
-
// Get useful position values
|
|
81674
|
-
var scrollOffset = scrollBody.offset();
|
|
81675
|
-
var windowTop = jquery_default()(document).scrollTop();
|
|
81676
|
-
var windowHeight = jquery_default()(window).height();
|
|
81677
|
-
var windowBottom = windowTop + windowHeight;
|
|
81678
|
-
var bodyTop = scrollEnabled ? scrollOffset.top : position.tbodyTop;
|
|
81679
|
-
var bodyBottom = scrollEnabled ? scrollOffset.top + scrollBody.outerHeight() : position.tfootTop
|
|
81680
|
-
|
|
81681
|
-
// Calculate the amount that the footer or header needs to be shuffled
|
|
81682
|
-
var shuffle = item === 'footer' ?
|
|
81683
|
-
// footer and top of body isn't on screen
|
|
81684
|
-
bodyTop > windowBottom ?
|
|
81685
|
-
// Yes - push the footer below
|
|
81686
|
-
position.tfootHeight :
|
|
81687
|
-
// No - bottom set to the gap between the top of the body and the bottom of the window
|
|
81688
|
-
bodyTop + position.tfootHeight - windowBottom :
|
|
81689
|
-
// Otherwise must be a header so get the difference from the bottom of the
|
|
81690
|
-
// desired floating header and the bottom of the table body
|
|
81691
|
-
windowTop + this.c.headerOffset + position.theadHeight - bodyBottom
|
|
81692
|
-
|
|
81693
|
-
// Set the top or bottom based off of the offset and the shuffle value
|
|
81694
|
-
var prop = item === 'header' ? 'top' : 'bottom';
|
|
81695
|
-
var val = this.c[item+'Offset'] - (shuffle > 0 ? shuffle : 0);
|
|
81696
|
-
|
|
81697
|
-
itemDom.floating.addClass( 'fixedHeader-floating' );
|
|
81698
|
-
itemDom.floatingParent
|
|
81699
|
-
.css(prop, val)
|
|
81700
|
-
.css( {
|
|
81701
|
-
'left': position.left,
|
|
81702
|
-
'height': item === 'header' ? position.theadHeight : position.tfootHeight,
|
|
81703
|
-
'z-index': 2
|
|
81704
|
-
})
|
|
81705
|
-
.append(itemDom.floating);
|
|
81706
|
-
|
|
81707
|
-
importantWidth(position.width);
|
|
81708
|
-
|
|
81709
|
-
if ( item === 'footer' ) {
|
|
81710
|
-
itemDom.floating.css( 'top', '' );
|
|
81711
|
-
}
|
|
81712
|
-
}
|
|
81713
|
-
else if ( mode === 'below' ) { // only used for the header
|
|
81714
|
-
// Fix the position of the floating header at base of the table body
|
|
81715
|
-
this._clone( item, forceChange );
|
|
81716
|
-
|
|
81717
|
-
itemDom.floating.addClass( 'fixedHeader-locked' );
|
|
81718
|
-
itemDom.floatingParent.css({
|
|
81719
|
-
position: 'absolute',
|
|
81720
|
-
top: position.tfootTop - position.theadHeight,
|
|
81721
|
-
left: position.left+'px'
|
|
81722
|
-
});
|
|
81723
|
-
|
|
81724
|
-
importantWidth(position.width);
|
|
81725
|
-
}
|
|
81726
|
-
else if ( mode === 'above' ) { // only used for the footer
|
|
81727
|
-
// Fix the position of the floating footer at top of the table body
|
|
81728
|
-
this._clone( item, forceChange );
|
|
81729
|
-
|
|
81730
|
-
itemDom.floating.addClass( 'fixedHeader-locked' );
|
|
81731
|
-
itemDom.floatingParent.css({
|
|
81732
|
-
position: 'absolute',
|
|
81733
|
-
top: position.tbodyTop,
|
|
81734
|
-
left: position.left+'px'
|
|
81735
|
-
});
|
|
81736
|
-
|
|
81737
|
-
importantWidth(position.width);
|
|
81738
|
-
}
|
|
81739
|
-
|
|
81740
|
-
// Restore focus if it was lost
|
|
81741
|
-
if ( focus && focus !== document.activeElement ) {
|
|
81742
|
-
setTimeout( function () {
|
|
81743
|
-
focus.focus();
|
|
81744
|
-
}, 10 );
|
|
81745
|
-
}
|
|
81746
|
-
|
|
81747
|
-
this.s.scrollLeft.header = -1;
|
|
81748
|
-
this.s.scrollLeft.footer = -1;
|
|
81749
|
-
this.s[item+'Mode'] = mode;
|
|
81750
|
-
},
|
|
81751
|
-
|
|
81752
|
-
/**
|
|
81753
|
-
* Cache the positional information that is required for the mode
|
|
81754
|
-
* calculations that FixedHeader performs.
|
|
81755
|
-
*
|
|
81756
|
-
* @private
|
|
81757
|
-
*/
|
|
81758
|
-
_positions: function ()
|
|
81759
|
-
{
|
|
81760
|
-
var dt = this.s.dt;
|
|
81761
|
-
var table = dt.table();
|
|
81762
|
-
var position = this.s.position;
|
|
81763
|
-
var dom = this.dom;
|
|
81764
|
-
var tableNode = jquery_default()(table.node());
|
|
81765
|
-
var scrollEnabled = this._scrollEnabled();
|
|
81766
|
-
|
|
81767
|
-
// Need to use the header and footer that are in the main table,
|
|
81768
|
-
// regardless of if they are clones, since they hold the positions we
|
|
81769
|
-
// want to measure from
|
|
81770
|
-
var thead = jquery_default()(dt.table().header());
|
|
81771
|
-
var tfoot = jquery_default()(dt.table().footer());
|
|
81772
|
-
var tbody = dom.tbody;
|
|
81773
|
-
var scrollBody = tableNode.parent();
|
|
81774
|
-
|
|
81775
|
-
position.visible = tableNode.is(':visible');
|
|
81776
|
-
position.width = tableNode.outerWidth();
|
|
81777
|
-
position.left = tableNode.offset().left;
|
|
81778
|
-
position.theadTop = thead.offset().top;
|
|
81779
|
-
position.tbodyTop = scrollEnabled ? scrollBody.offset().top : tbody.offset().top;
|
|
81780
|
-
position.tbodyHeight = scrollEnabled ? scrollBody.outerHeight() : tbody.outerHeight();
|
|
81781
|
-
position.theadHeight = thead.outerHeight();
|
|
81782
|
-
position.theadBottom = position.theadTop + position.theadHeight;
|
|
81783
|
-
|
|
81784
|
-
if ( tfoot.length ) {
|
|
81785
|
-
position.tfootTop = position.tbodyTop + position.tbodyHeight; //tfoot.offset().top;
|
|
81786
|
-
position.tfootBottom = position.tfootTop + tfoot.outerHeight();
|
|
81787
|
-
position.tfootHeight = tfoot.outerHeight();
|
|
81788
|
-
}
|
|
81789
|
-
else {
|
|
81790
|
-
position.tfootTop = position.tbodyTop + tbody.outerHeight();
|
|
81791
|
-
position.tfootBottom = position.tfootTop;
|
|
81792
|
-
position.tfootHeight = position.tfootTop;
|
|
81793
|
-
}
|
|
81794
|
-
},
|
|
81795
|
-
|
|
81796
|
-
|
|
81797
|
-
/**
|
|
81798
|
-
* Mode calculation - determine what mode the fixed items should be placed
|
|
81799
|
-
* into.
|
|
81800
|
-
*
|
|
81801
|
-
* @param {boolean} forceChange Force a redraw of the mode, even if already
|
|
81802
|
-
* in that mode.
|
|
81803
|
-
* @private
|
|
81804
|
-
*/
|
|
81805
|
-
_scroll: function ( forceChange )
|
|
81806
|
-
{
|
|
81807
|
-
if (this.s.dt.settings()[0].bDestroying) {
|
|
81808
|
-
return;
|
|
81809
|
-
}
|
|
81810
|
-
|
|
81811
|
-
// ScrollBody details
|
|
81812
|
-
var scrollEnabled = this._scrollEnabled();
|
|
81813
|
-
var scrollBody = jquery_default()(this.s.dt.table().node()).parent();
|
|
81814
|
-
var scrollOffset = scrollBody.offset();
|
|
81815
|
-
var scrollHeight = scrollBody.outerHeight();
|
|
81816
|
-
|
|
81817
|
-
// Window details
|
|
81818
|
-
var windowLeft = jquery_default()(document).scrollLeft();
|
|
81819
|
-
var windowTop = jquery_default()(document).scrollTop();
|
|
81820
|
-
var windowHeight = jquery_default()(window).height();
|
|
81821
|
-
var windowBottom = windowHeight + windowTop
|
|
81822
|
-
|
|
81823
|
-
|
|
81824
|
-
var position = this.s.position;
|
|
81825
|
-
var headerMode, footerMode;
|
|
81826
|
-
|
|
81827
|
-
// Body Details
|
|
81828
|
-
var bodyTop = (scrollEnabled ? scrollOffset.top : position.tbodyTop);
|
|
81829
|
-
var bodyLeft = (scrollEnabled ? scrollOffset.left : position.left);
|
|
81830
|
-
var bodyBottom = (scrollEnabled ? scrollOffset.top + scrollHeight : position.tfootTop);
|
|
81831
|
-
var bodyWidth = (scrollEnabled ? scrollBody.outerWidth() : position.tbodyWidth);
|
|
81832
|
-
|
|
81833
|
-
var windowBottom = windowTop + windowHeight;
|
|
81834
|
-
|
|
81835
|
-
if ( this.c.header ) {
|
|
81836
|
-
if ( ! this.s.enable ) {
|
|
81837
|
-
headerMode = 'in-place';
|
|
81838
|
-
}
|
|
81839
|
-
// The header is in it's normal place if the body top is lower than
|
|
81840
|
-
// the scroll of the window plus the headerOffset and the height of the header
|
|
81841
|
-
else if ( ! position.visible || windowTop + this.c.headerOffset + position.theadHeight <= bodyTop) {
|
|
81842
|
-
headerMode = 'in-place';
|
|
81843
|
-
}
|
|
81844
|
-
// The header should be floated if
|
|
81845
|
-
else if (
|
|
81846
|
-
// The scrolling plus the header offset plus the height of the header is lower than the top of the body
|
|
81847
|
-
windowTop + this.c.headerOffset + position.theadHeight > bodyTop &&
|
|
81848
|
-
// And the scrolling at the top plus the header offset is above the bottom of the body
|
|
81849
|
-
windowTop + this.c.headerOffset + position.theadHeight < bodyBottom
|
|
81850
|
-
) {
|
|
81851
|
-
headerMode = 'in';
|
|
81852
|
-
var scrollBody = jquery_default()(jquery_default()(this.s.dt.table().node()).parent());
|
|
81853
|
-
|
|
81854
|
-
// Further to the above, If the scrolling plus the header offset plus the header height is lower
|
|
81855
|
-
// than the bottom of the table a shuffle is required so have to force the calculation
|
|
81856
|
-
if(windowTop + this.c.headerOffset + position.theadHeight > bodyBottom || this.dom.header.floatingParent === undefined){
|
|
81857
|
-
forceChange = true;
|
|
81858
|
-
}
|
|
81859
|
-
else {
|
|
81860
|
-
this.dom.header.floatingParent
|
|
81861
|
-
.css({
|
|
81862
|
-
'top': this.c.headerOffset,
|
|
81863
|
-
'position': 'fixed'
|
|
81864
|
-
})
|
|
81865
|
-
.append(this.dom.header.floating);
|
|
81866
|
-
}
|
|
81867
|
-
}
|
|
81868
|
-
// Anything else and the view is below the table
|
|
81869
|
-
else {
|
|
81870
|
-
headerMode = 'below';
|
|
81871
|
-
}
|
|
81872
|
-
|
|
81873
|
-
if ( forceChange || headerMode !== this.s.headerMode ) {
|
|
81874
|
-
this._modeChange( headerMode, 'header', forceChange );
|
|
81875
|
-
}
|
|
81876
|
-
|
|
81877
|
-
this._horizontal( 'header', windowLeft );
|
|
81878
|
-
}
|
|
81879
|
-
|
|
81880
|
-
var header = {
|
|
81881
|
-
offset: {top: 0, left: 0},
|
|
81882
|
-
height: 0
|
|
81883
|
-
}
|
|
81884
|
-
var footer = {
|
|
81885
|
-
offset: {top: 0, left: 0},
|
|
81886
|
-
height: 0
|
|
81887
|
-
}
|
|
81888
|
-
|
|
81889
|
-
if ( this.c.footer && this.dom.tfoot.length ) {
|
|
81890
|
-
if ( ! this.s.enable ) {
|
|
81891
|
-
footerMode = 'in-place';
|
|
81892
|
-
}
|
|
81893
|
-
else if ( ! position.visible || position.tfootBottom + this.c.footerOffset <= windowBottom ) {
|
|
81894
|
-
footerMode = 'in-place';
|
|
81895
|
-
}
|
|
81896
|
-
else if (
|
|
81897
|
-
bodyBottom + position.tfootHeight + this.c.footerOffset > windowBottom &&
|
|
81898
|
-
bodyTop + this.c.footerOffset < windowBottom
|
|
81899
|
-
) {
|
|
81900
|
-
footerMode = 'in';
|
|
81901
|
-
forceChange = true;
|
|
81902
|
-
}
|
|
81903
|
-
else {
|
|
81904
|
-
footerMode = 'above';
|
|
81905
|
-
}
|
|
81906
|
-
|
|
81907
|
-
if ( forceChange || footerMode !== this.s.footerMode ) {
|
|
81908
|
-
this._modeChange( footerMode, 'footer', forceChange );
|
|
81909
|
-
}
|
|
81910
|
-
|
|
81911
|
-
this._horizontal( 'footer', windowLeft );
|
|
81912
|
-
|
|
81913
|
-
var getOffsetHeight = function (el) {
|
|
81914
|
-
return {
|
|
81915
|
-
offset: el.offset(),
|
|
81916
|
-
height: el.outerHeight()
|
|
81917
|
-
};
|
|
81918
|
-
};
|
|
81919
|
-
|
|
81920
|
-
header = this.dom.header.floating ? getOffsetHeight(this.dom.header.floating) : getOffsetHeight(this.dom.thead);
|
|
81921
|
-
footer = this.dom.footer.floating ? getOffsetHeight(this.dom.footer.floating) : getOffsetHeight(this.dom.tfoot);
|
|
81922
|
-
|
|
81923
|
-
// If scrolling is enabled and the footer is off the screen
|
|
81924
|
-
if (scrollEnabled && footer.offset.top > windowTop){// && footer.offset.top >= windowBottom) {
|
|
81925
|
-
// Calculate the gap between the top of the scrollBody and the top of the window
|
|
81926
|
-
var overlap = windowTop - scrollOffset.top;
|
|
81927
|
-
// The new height is the bottom of the window
|
|
81928
|
-
var newHeight = windowBottom +
|
|
81929
|
-
// If the gap between the top of the scrollbody and the window is more than
|
|
81930
|
-
// the height of the header then the top of the table is still visible so add that gap
|
|
81931
|
-
// Doing this has effectively calculated the height from the top of the table to the bottom of the current page
|
|
81932
|
-
(overlap > -header.height ? overlap : 0) -
|
|
81933
|
-
// Take from that
|
|
81934
|
-
(
|
|
81935
|
-
// The top of the header plus
|
|
81936
|
-
header.offset.top +
|
|
81937
|
-
// The header height if the standard header is present
|
|
81938
|
-
(overlap < -header.height ? header.height : 0) +
|
|
81939
|
-
// And the height of the footer
|
|
81940
|
-
footer.height
|
|
81941
|
-
)
|
|
81942
|
-
|
|
81943
|
-
// Don't want a negative height
|
|
81944
|
-
if (newHeight < 0) {
|
|
81945
|
-
newHeight = 0;
|
|
81946
|
-
}
|
|
81947
|
-
|
|
81948
|
-
// At the end of the above calculation the space between the header (top of the page if floating)
|
|
81949
|
-
// and the point just above the footer should be the new value for the height of the table.
|
|
81950
|
-
scrollBody.outerHeight(newHeight);
|
|
81951
|
-
|
|
81952
|
-
// Need some rounding here as sometimes very small decimal places are encountered
|
|
81953
|
-
// If the actual height is bigger or equal to the height we just applied then the footer is "Floating"
|
|
81954
|
-
if(Math.round(scrollBody.outerHeight()) >= Math.round(newHeight)) {
|
|
81955
|
-
jquery_default()(this.dom.tfoot.parent()).addClass("fixedHeader-floating");
|
|
81956
|
-
}
|
|
81957
|
-
// Otherwise max-width has kicked in so it is not floating
|
|
81958
|
-
else {
|
|
81959
|
-
jquery_default()(this.dom.tfoot.parent()).removeClass("fixedHeader-floating");
|
|
81960
|
-
}
|
|
81961
|
-
}
|
|
81962
|
-
}
|
|
81963
|
-
|
|
81964
|
-
if(this.dom.header.floating){
|
|
81965
|
-
this.dom.header.floatingParent.css('left', bodyLeft-windowLeft);
|
|
81966
|
-
}
|
|
81967
|
-
if(this.dom.footer.floating){
|
|
81968
|
-
this.dom.footer.floatingParent.css('left', bodyLeft-windowLeft);
|
|
81969
|
-
}
|
|
81970
|
-
|
|
81971
|
-
// If fixed columns is being used on this table then the blockers need to be copied across
|
|
81972
|
-
// Cloning these is cleaner than creating as our own as it will keep consistency with fixedColumns automatically
|
|
81973
|
-
// ASSUMING that the class remains the same
|
|
81974
|
-
if (this.s.dt.settings()[0]._fixedColumns !== undefined) {
|
|
81975
|
-
var adjustBlocker = function (side, end, el) {
|
|
81976
|
-
if (el === undefined) {
|
|
81977
|
-
var blocker = jquery_default()('div.dtfc-'+side+'-'+end+'-blocker');
|
|
81978
|
-
|
|
81979
|
-
el = blocker.length === 0 ?
|
|
81980
|
-
null :
|
|
81981
|
-
blocker.clone().css('z-index', 1);
|
|
81982
|
-
}
|
|
81983
|
-
|
|
81984
|
-
if(el !== null) {
|
|
81985
|
-
if (headerMode === 'in' || headerMode === 'below') {
|
|
81986
|
-
el
|
|
81987
|
-
.appendTo('body')
|
|
81988
|
-
.css({
|
|
81989
|
-
top: end === 'top' ? header.offset.top : footer.offset.top,
|
|
81990
|
-
left: side === 'right' ? bodyLeft + bodyWidth - el.width() : bodyLeft
|
|
81991
|
-
});
|
|
81992
|
-
}
|
|
81993
|
-
else {
|
|
81994
|
-
el.detach();
|
|
81995
|
-
}
|
|
81996
|
-
}
|
|
81997
|
-
|
|
81998
|
-
return el;
|
|
81999
|
-
}
|
|
82000
|
-
|
|
82001
|
-
// Adjust all blockers
|
|
82002
|
-
this.dom.header.rightBlocker = adjustBlocker('right', 'top', this.dom.header.rightBlocker);
|
|
82003
|
-
this.dom.header.leftBlocker = adjustBlocker('left', 'top', this.dom.header.leftBlocker);
|
|
82004
|
-
this.dom.footer.rightBlocker = adjustBlocker('right', 'bottom', this.dom.footer.rightBlocker);
|
|
82005
|
-
this.dom.footer.leftBlocker = adjustBlocker('left', 'bottom', this.dom.footer.leftBlocker);
|
|
82006
|
-
}
|
|
82007
|
-
},
|
|
82008
|
-
|
|
82009
|
-
/**
|
|
82010
|
-
* Function to check if scrolling is enabled on the table or not
|
|
82011
|
-
* @returns Boolean value indicating if scrolling on the table is enabled or not
|
|
82012
|
-
*/
|
|
82013
|
-
_scrollEnabled: function() {
|
|
82014
|
-
var oScroll = this.s.dt.settings()[0].oScroll;
|
|
82015
|
-
if(oScroll.sY !== "" || oScroll.sX !== "") {
|
|
82016
|
-
return true;
|
|
82017
|
-
}
|
|
82018
|
-
return false
|
|
82019
|
-
}
|
|
82020
|
-
} );
|
|
82021
|
-
|
|
82022
|
-
|
|
82023
|
-
/**
|
|
82024
|
-
* Version
|
|
82025
|
-
* @type {String}
|
|
82026
|
-
* @static
|
|
82027
|
-
*/
|
|
82028
|
-
FixedHeader.version = "3.3.1";
|
|
82029
|
-
|
|
82030
|
-
/**
|
|
82031
|
-
* Defaults
|
|
82032
|
-
* @type {Object}
|
|
82033
|
-
* @static
|
|
82034
|
-
*/
|
|
82035
|
-
FixedHeader.defaults = {
|
|
82036
|
-
header: true,
|
|
82037
|
-
footer: false,
|
|
82038
|
-
headerOffset: 0,
|
|
82039
|
-
footerOffset: 0
|
|
82040
|
-
};
|
|
82041
|
-
|
|
82042
|
-
|
|
82043
|
-
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
|
82044
|
-
* DataTables interfaces
|
|
82045
|
-
*/
|
|
82046
|
-
|
|
82047
|
-
// Attach for constructor access
|
|
82048
|
-
jquery_default.a.fn.dataTable.FixedHeader = FixedHeader;
|
|
82049
|
-
jquery_default.a.fn.DataTable.FixedHeader = FixedHeader;
|
|
82050
|
-
|
|
82051
|
-
|
|
82052
|
-
// DataTables creation - check if the FixedHeader option has been defined on the
|
|
82053
|
-
// table and if so, initialise
|
|
82054
|
-
jquery_default()(document).on( 'init.dt.dtfh', function (e, settings, json) {
|
|
82055
|
-
if ( e.namespace !== 'dt' ) {
|
|
82056
|
-
return;
|
|
82057
|
-
}
|
|
82058
|
-
|
|
82059
|
-
var init = settings.oInit.fixedHeader;
|
|
82060
|
-
var defaults = js_jquery_dataTables_default.a.defaults.fixedHeader;
|
|
82061
|
-
|
|
82062
|
-
if ( (init || defaults) && ! settings._fixedHeader ) {
|
|
82063
|
-
var opts = jquery_default.a.extend( {}, defaults, init );
|
|
82064
|
-
|
|
82065
|
-
if ( init !== false ) {
|
|
82066
|
-
new FixedHeader( settings, opts );
|
|
82067
|
-
}
|
|
82068
|
-
}
|
|
82069
|
-
} );
|
|
82070
|
-
|
|
82071
|
-
// DataTables API methods
|
|
82072
|
-
js_jquery_dataTables_default.a.Api.register( 'fixedHeader()', function () {} );
|
|
82073
|
-
|
|
82074
|
-
js_jquery_dataTables_default.a.Api.register( 'fixedHeader.adjust()', function () {
|
|
82075
|
-
return this.iterator( 'table', function ( ctx ) {
|
|
82076
|
-
var fh = ctx._fixedHeader;
|
|
82077
|
-
|
|
82078
|
-
if ( fh ) {
|
|
82079
|
-
fh.update();
|
|
82080
|
-
}
|
|
82081
|
-
} );
|
|
82082
|
-
} );
|
|
82083
|
-
|
|
82084
|
-
js_jquery_dataTables_default.a.Api.register( 'fixedHeader.enable()', function ( flag ) {
|
|
82085
|
-
return this.iterator( 'table', function ( ctx ) {
|
|
82086
|
-
var fh = ctx._fixedHeader;
|
|
82087
|
-
|
|
82088
|
-
flag = ( flag !== undefined ? flag : true );
|
|
82089
|
-
if ( fh && flag !== fh.enabled() ) {
|
|
82090
|
-
fh.enable( flag );
|
|
82091
|
-
}
|
|
82092
|
-
} );
|
|
82093
|
-
} );
|
|
82094
|
-
|
|
82095
|
-
js_jquery_dataTables_default.a.Api.register( 'fixedHeader.enabled()', function () {
|
|
82096
|
-
if ( this.context.length ) {
|
|
82097
|
-
var fh = this.context[0]._fixedHeader;
|
|
82098
|
-
|
|
82099
|
-
if ( fh ) {
|
|
82100
|
-
return fh.enabled();
|
|
82101
|
-
}
|
|
82102
|
-
}
|
|
82103
|
-
|
|
82104
|
-
return false;
|
|
82105
|
-
} );
|
|
82106
|
-
|
|
82107
|
-
js_jquery_dataTables_default.a.Api.register( 'fixedHeader.disable()', function ( ) {
|
|
82108
|
-
return this.iterator( 'table', function ( ctx ) {
|
|
82109
|
-
var fh = ctx._fixedHeader;
|
|
82110
|
-
|
|
82111
|
-
if ( fh && fh.enabled() ) {
|
|
82112
|
-
fh.enable( false );
|
|
82113
|
-
}
|
|
82114
|
-
} );
|
|
82115
|
-
} );
|
|
82116
|
-
|
|
82117
|
-
jquery_default.a.each( ['header', 'footer'], function ( i, el ) {
|
|
82118
|
-
js_jquery_dataTables_default.a.Api.register( 'fixedHeader.'+el+'Offset()', function ( offset ) {
|
|
82119
|
-
var ctx = this.context;
|
|
82120
|
-
|
|
82121
|
-
if ( offset === undefined ) {
|
|
82122
|
-
return ctx.length && ctx[0]._fixedHeader ?
|
|
82123
|
-
ctx[0]._fixedHeader[el +'Offset']() :
|
|
82124
|
-
undefined;
|
|
82125
|
-
}
|
|
82126
|
-
|
|
82127
|
-
return this.iterator( 'table', function ( ctx ) {
|
|
82128
|
-
var fh = ctx._fixedHeader;
|
|
82129
|
-
|
|
82130
|
-
if ( fh ) {
|
|
82131
|
-
fh[ el +'Offset' ]( offset );
|
|
82132
|
-
}
|
|
82133
|
-
} );
|
|
82134
|
-
} );
|
|
82135
|
-
} );
|
|
82136
|
-
|
|
82137
|
-
|
|
82138
|
-
/* harmony default export */ var dataTables_fixedHeader = (js_jquery_dataTables_default.a);
|
|
82139
|
-
|
|
82140
|
-
// EXTERNAL MODULE: ./node_modules/datatables.net-fixedheader-dt/css/fixedHeader.dataTables.css
|
|
82141
|
-
var fixedHeader_dataTables = __webpack_require__("4f75");
|
|
82142
|
-
|
|
82143
81071
|
// CONCATENATED MODULE: ./src/components/desktop/datatables.net-plugins/pagination/input.js
|
|
82144
81072
|
|
|
82145
81073
|
|
|
@@ -82855,7 +81783,9 @@ var lodash = __webpack_require__("2ef0");
|
|
|
82855
81783
|
|
|
82856
81784
|
// eslint-disable-line
|
|
82857
81785
|
|
|
82858
|
-
|
|
81786
|
+
|
|
81787
|
+
//import fixedheader from 'datatables.net-fixedheader'; // eslint-disable-line
|
|
81788
|
+
//import 'datatables.net-fixedheader-dt/css/fixedHeader.dataTables.css';
|
|
82859
81789
|
|
|
82860
81790
|
// eslint-disable-line
|
|
82861
81791
|
|
|
@@ -83015,7 +81945,8 @@ var lodash = __webpack_require__("2ef0");
|
|
|
83015
81945
|
actionsView: true,
|
|
83016
81946
|
actionsEdit: true,
|
|
83017
81947
|
actionsDelete: true,
|
|
83018
|
-
|
|
81948
|
+
shortDebouncedAdjustTableColumns: null,
|
|
81949
|
+
longDebouncedAdjustTableColumns: null
|
|
83019
81950
|
};
|
|
83020
81951
|
},
|
|
83021
81952
|
computed: {
|
|
@@ -83366,6 +82297,9 @@ var lodash = __webpack_require__("2ef0");
|
|
|
83366
82297
|
row.select();
|
|
83367
82298
|
}, 350);
|
|
83368
82299
|
}
|
|
82300
|
+
setTimeout(function () {
|
|
82301
|
+
return _this.scrollToRow();
|
|
82302
|
+
}, 500);
|
|
83369
82303
|
|
|
83370
82304
|
// refresh data in selectedRows from datatable
|
|
83371
82305
|
var rowObj = {};
|
|
@@ -84201,6 +83135,13 @@ var lodash = __webpack_require__("2ef0");
|
|
|
84201
83135
|
jquery_default()('html, body').animate({
|
|
84202
83136
|
scrollTop: -this.scrollHeadHeight
|
|
84203
83137
|
}, 'slow');
|
|
83138
|
+
},
|
|
83139
|
+
scrollToRow: function scrollToRow() {
|
|
83140
|
+
var _$row$position;
|
|
83141
|
+
var $row = jquery_default()('tr.selected');
|
|
83142
|
+
jquery_default()('html, body').animate({
|
|
83143
|
+
scrollTop: (_$row$position = $row.position()) === null || _$row$position === void 0 ? void 0 : _$row$position.top
|
|
83144
|
+
}, 'slow');
|
|
84204
83145
|
}
|
|
84205
83146
|
},
|
|
84206
83147
|
watch: {
|
|
@@ -84208,20 +83149,17 @@ var lodash = __webpack_require__("2ef0");
|
|
|
84208
83149
|
this.setFixedThead();
|
|
84209
83150
|
},
|
|
84210
83151
|
onPuiExpandMenu: function onPuiExpandMenu() {
|
|
84211
|
-
|
|
84212
|
-
setTimeout(function () {
|
|
84213
|
-
_this9.adjustTableColumns();
|
|
84214
|
-
}, 180);
|
|
83152
|
+
this.longDebouncedAdjustTableColumns();
|
|
84215
83153
|
},
|
|
84216
83154
|
onPuiSecondMenuShowed: function onPuiSecondMenuShowed() {
|
|
84217
|
-
|
|
84218
|
-
setTimeout(function () {
|
|
84219
|
-
_this0.adjustTableColumns();
|
|
84220
|
-
}, 180);
|
|
83155
|
+
this.longDebouncedAdjustTableColumns();
|
|
84221
83156
|
}
|
|
84222
83157
|
},
|
|
84223
83158
|
created: function created() {
|
|
84224
|
-
var
|
|
83159
|
+
var _this9 = this;
|
|
83160
|
+
// Initialize debounced functions
|
|
83161
|
+
this.shortDebouncedAdjustTableColumns = Object(lodash["debounce"])(this.adjustTableColumns, 80);
|
|
83162
|
+
this.longDebouncedAdjustTableColumns = Object(lodash["debounce"])(this.adjustTableColumns, 180);
|
|
84225
83163
|
this.dateFormat = this.$store.dateFormat;
|
|
84226
83164
|
this.timeFormat = this.$store.timeFormat;
|
|
84227
83165
|
this.toolbarSingleRowNegativeHeight = 0;
|
|
@@ -84238,7 +83176,7 @@ var lodash = __webpack_require__("2ef0");
|
|
|
84238
83176
|
this.tableColumns = [];
|
|
84239
83177
|
this.columnDefs = this.modelColumnDefs;
|
|
84240
83178
|
this.columns && this.columns.forEach(function (column) {
|
|
84241
|
-
|
|
83179
|
+
_this9.tableColumns.push(column);
|
|
84242
83180
|
});
|
|
84243
83181
|
this.addSelectCheckColumn();
|
|
84244
83182
|
this.model = this.$store.getModelByName(this.modelName);
|
|
@@ -84255,23 +83193,23 @@ var lodash = __webpack_require__("2ef0");
|
|
|
84255
83193
|
this.subscribeToActionsEvents();
|
|
84256
83194
|
},
|
|
84257
83195
|
mounted: function mounted() {
|
|
84258
|
-
var
|
|
83196
|
+
var _this0 = this;
|
|
84259
83197
|
this.createDatatable();
|
|
84260
83198
|
this.adjustTableColumns();
|
|
84261
|
-
this.
|
|
84262
|
-
window.addEventListener('resize', this.debouncedAdjustTableColumns);
|
|
84263
|
-
window.addEventListener('wheel', this.refreshDatatableScrollHeadInner = function (event) {
|
|
83199
|
+
this.refreshDatatableScrollHeadInner = function (event) {
|
|
84264
83200
|
if (event.deltaY < 0) {
|
|
84265
83201
|
// scrolling up
|
|
84266
|
-
|
|
83202
|
+
_this0.shortDebouncedAdjustTableColumns();
|
|
84267
83203
|
}
|
|
84268
|
-
}
|
|
83204
|
+
};
|
|
83205
|
+
window.addEventListener('resize', this.longDebouncedAdjustTableColumns);
|
|
83206
|
+
window.addEventListener('wheel', this.refreshDatatableScrollHeadInner);
|
|
84269
83207
|
},
|
|
84270
83208
|
updated: function updated() {
|
|
84271
83209
|
this.setFixedThead();
|
|
84272
83210
|
},
|
|
84273
83211
|
beforeDestroy: function beforeDestroy() {
|
|
84274
|
-
window.removeEventListener('resize', this.
|
|
83212
|
+
window.removeEventListener('resize', this.longDebouncedAdjustTableColumns);
|
|
84275
83213
|
window.removeEventListener('wheel', this.refreshDatatableScrollHeadInner);
|
|
84276
83214
|
this.table.destroy(true);
|
|
84277
83215
|
if (this.masterDetail && (!this.model.searcher || !this.model.searcher.goToElement)) {
|
|
@@ -84291,11 +83229,11 @@ var lodash = __webpack_require__("2ef0");
|
|
|
84291
83229
|
});
|
|
84292
83230
|
// CONCATENATED MODULE: ./src/components/desktop/PuiSimpleDatatable.vue?vue&type=script&lang=js
|
|
84293
83231
|
/* harmony default export */ var desktop_PuiSimpleDatatablevue_type_script_lang_js = (PuiSimpleDatatablevue_type_script_lang_js);
|
|
84294
|
-
// EXTERNAL MODULE: ./src/components/desktop/PuiSimpleDatatable.vue?vue&type=style&index=0&id=
|
|
84295
|
-
var
|
|
83232
|
+
// EXTERNAL MODULE: ./src/components/desktop/PuiSimpleDatatable.vue?vue&type=style&index=0&id=673ef7c9&prod&lang=postcss&scoped=true
|
|
83233
|
+
var PuiSimpleDatatablevue_type_style_index_0_id_673ef7c9_prod_lang_postcss_scoped_true = __webpack_require__("c398");
|
|
84296
83234
|
|
|
84297
|
-
// EXTERNAL MODULE: ./src/components/desktop/PuiSimpleDatatable.vue?vue&type=style&index=1&id=
|
|
84298
|
-
var
|
|
83235
|
+
// EXTERNAL MODULE: ./src/components/desktop/PuiSimpleDatatable.vue?vue&type=style&index=1&id=673ef7c9&prod&lang=css
|
|
83236
|
+
var PuiSimpleDatatablevue_type_style_index_1_id_673ef7c9_prod_lang_css = __webpack_require__("666e");
|
|
84299
83237
|
|
|
84300
83238
|
// CONCATENATED MODULE: ./src/components/desktop/PuiSimpleDatatable.vue
|
|
84301
83239
|
|
|
@@ -84309,11 +83247,11 @@ var PuiSimpleDatatablevue_type_style_index_1_id_08a16ede_prod_lang_css = __webpa
|
|
|
84309
83247
|
|
|
84310
83248
|
var PuiSimpleDatatable_component = normalizeComponent(
|
|
84311
83249
|
desktop_PuiSimpleDatatablevue_type_script_lang_js,
|
|
84312
|
-
|
|
84313
|
-
|
|
83250
|
+
PuiSimpleDatatablevue_type_template_id_673ef7c9_scoped_true_render,
|
|
83251
|
+
PuiSimpleDatatablevue_type_template_id_673ef7c9_scoped_true_staticRenderFns,
|
|
84314
83252
|
false,
|
|
84315
83253
|
null,
|
|
84316
|
-
"
|
|
83254
|
+
"673ef7c9",
|
|
84317
83255
|
null
|
|
84318
83256
|
|
|
84319
83257
|
)
|
|
@@ -95378,54 +94316,56 @@ var PuiAuditFormvue_type_template_id_47f28786_staticRenderFns = [];
|
|
|
95378
94316
|
|
|
95379
94317
|
// CONCATENATED MODULE: ./src/components/puiaudit/PuiAuditForm.vue?vue&type=template&id=47f28786
|
|
95380
94318
|
|
|
95381
|
-
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"cf80b3ea-vue-loader-template"}!./node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--6!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/puiaudit/PuiAuditItem.vue?vue&type=template&id=
|
|
94319
|
+
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"cf80b3ea-vue-loader-template"}!./node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--6!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/puiaudit/PuiAuditItem.vue?vue&type=template&id=67aaeeda
|
|
94320
|
+
|
|
95382
94321
|
|
|
95383
|
-
var
|
|
94322
|
+
var PuiAuditItemvue_type_template_id_67aaeeda_render = function render() {
|
|
95384
94323
|
var _vm = this,
|
|
95385
94324
|
_c = _vm._self._c;
|
|
95386
|
-
return _c('td', [!_vm.model || _vm.isArray(_vm.model) && _vm.model.length === 0 ? [_c('span', [_vm._v(" ")])] : _vm.model && !_vm.isObject(_vm.model) ? [_c('span', [_vm._v(" " + _vm._s(_vm.printValue(_vm.model)))])] : _vm.model && _vm.isObject(_vm.model) ? [_vm._l(Object.entries(_vm.model), function (item, index) {
|
|
95387
|
-
return [
|
|
94325
|
+
return _c('td', [!_vm.model || _vm.isArray(_vm.model) && _vm.model.length === 0 ? [_c('span', [_vm._v(" ")])] : _vm.model && !_vm.isObject(_vm.model) ? [_c('span', [_vm._v(" " + _vm._s(_vm.printValue(_vm.model)))])] : _vm.model && _vm.isObject(_vm.model) ? [_c('table', [_vm.mainHeaders ? _c('tr', [_c('th', [_vm._v(_vm._s(_vm.$t('puiaudit.attribute')))]), _c('th', [_vm._v(_vm._s(_vm.$t('puiaudit.value')))])]) : _vm._e(), _vm._l(Object.entries(_vm.model), function (item, index) {
|
|
94326
|
+
return [item[1] && _vm.isObject(item[1]) ? [_vm._l(Object.entries(item[1]), function (sitem, sindex) {
|
|
94327
|
+
return [_c('tr', {
|
|
94328
|
+
key: "".concat(index, "-").concat(sindex)
|
|
94329
|
+
}, [sitem[1] && sitem[1].attribute ? [_c('td', [_c('span', [_vm._v(_vm._s(sitem[1].attribute))])]), _c('td', [_c('span', [_vm._v(_vm._s(_vm.printValue(sitem[1].value)))])])] : [_c('td', [_c('span', [_vm._v(_vm._s(sitem[0]))])]), _c('td', [_c('span', [_vm._v(_vm._s(_vm.printValue(sitem[1])))])])]], 2)];
|
|
94330
|
+
})] : _c('tr', {
|
|
95388
94331
|
key: index
|
|
95389
|
-
}, [
|
|
95390
|
-
|
|
95391
|
-
key: sindex
|
|
95392
|
-
}, [_c('td', [_c('span', [_vm._v(_vm._s(sitem[1].attribute))])]), _c('td', [_c('span', [_vm._v(_vm._s(sitem[1].value))])])]) : _c('tr', {
|
|
95393
|
-
key: sindex
|
|
95394
|
-
}, [_c('td', [_c('span', [_vm._v(_vm._s(sitem[0]))])]), _c('td', [_c('span', [_vm._v(_vm._s(sitem[1]))])])])];
|
|
95395
|
-
})], 2)];
|
|
95396
|
-
})] : _vm._e()], 2);
|
|
94332
|
+
}, [_c('td', [_c('span', [_vm._v(_vm._s(item[0]))])]), _c('td', [_c('span', [_vm._v(_vm._s(_vm.printValue(item[1])))])])])];
|
|
94333
|
+
})], 2)] : _vm._e()], 2);
|
|
95397
94334
|
};
|
|
95398
|
-
var
|
|
94335
|
+
var PuiAuditItemvue_type_template_id_67aaeeda_staticRenderFns = [];
|
|
95399
94336
|
|
|
95400
|
-
// CONCATENATED MODULE: ./src/components/puiaudit/PuiAuditItem.vue?vue&type=template&id=
|
|
94337
|
+
// CONCATENATED MODULE: ./src/components/puiaudit/PuiAuditItem.vue?vue&type=template&id=67aaeeda
|
|
95401
94338
|
|
|
95402
94339
|
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/puiaudit/PuiAuditItem.vue?vue&type=script&lang=js
|
|
95403
94340
|
|
|
95404
94341
|
|
|
94342
|
+
|
|
94343
|
+
|
|
95405
94344
|
/* harmony default export */ var PuiAuditItemvue_type_script_lang_js = ({
|
|
95406
94345
|
name: 'PuiAuditItem',
|
|
95407
94346
|
props: {
|
|
95408
94347
|
model: {
|
|
95409
94348
|
required: true
|
|
95410
|
-
},
|
|
95411
|
-
headers: {
|
|
95412
|
-
type: Boolean,
|
|
95413
|
-
default: true
|
|
95414
|
-
},
|
|
95415
|
-
keyvalue: {
|
|
95416
|
-
type: Boolean,
|
|
95417
|
-
default: false
|
|
95418
94349
|
}
|
|
95419
94350
|
},
|
|
94351
|
+
data: function data() {
|
|
94352
|
+
return {
|
|
94353
|
+
mainHeaders: true
|
|
94354
|
+
};
|
|
94355
|
+
},
|
|
95420
94356
|
methods: {
|
|
95421
|
-
|
|
95422
|
-
return
|
|
94357
|
+
isArray: function isArray(value) {
|
|
94358
|
+
return Array.isArray(value);
|
|
95423
94359
|
},
|
|
95424
94360
|
isObject: function isObject(value) {
|
|
95425
94361
|
return _typeof(value) === 'object';
|
|
95426
94362
|
},
|
|
95427
|
-
|
|
95428
|
-
|
|
94363
|
+
printValue: function printValue(value) {
|
|
94364
|
+
if (value) {
|
|
94365
|
+
return this.isDate(value) ? this.getLocalDate(value) : value.toString();
|
|
94366
|
+
} else {
|
|
94367
|
+
return null;
|
|
94368
|
+
}
|
|
95429
94369
|
},
|
|
95430
94370
|
isDate: function isDate(value) {
|
|
95431
94371
|
try {
|
|
@@ -95451,8 +94391,8 @@ var PuiAuditItemvue_type_template_id_c0a24dcc_staticRenderFns = [];
|
|
|
95451
94391
|
|
|
95452
94392
|
var PuiAuditItem_component = normalizeComponent(
|
|
95453
94393
|
puiaudit_PuiAuditItemvue_type_script_lang_js,
|
|
95454
|
-
|
|
95455
|
-
|
|
94394
|
+
PuiAuditItemvue_type_template_id_67aaeeda_render,
|
|
94395
|
+
PuiAuditItemvue_type_template_id_67aaeeda_staticRenderFns,
|
|
95456
94396
|
false,
|
|
95457
94397
|
null,
|
|
95458
94398
|
null,
|