Version Description
/ 25.01.2020
Download this release
Release Info
Developer | supsystic.com |
Plugin | Data Tables Generator by Supsystic |
Version | 1.9.99 |
Comparing to | |
See all releases |
Code changes from version 1.9.98 to 1.9.99
- app/SupsysticTables.php +1 -1
- app/assets/css/supsystic-ui.css +0 -3
- app/assets/js/dtgsnonce.js +1 -0
- index.php +1 -1
- readme.txt +4 -1
- src/SupsysticTables/Core/Module.php +1 -1
- src/SupsysticTables/Core/assets/css/lib/jquery.dataTables.min.css +1 -1
- src/SupsysticTables/Core/assets/js/core.js +1309 -1259
- src/SupsysticTables/Core/assets/js/lib/jquery.dataTables.min.js +182 -164
- src/SupsysticTables/Tables/Controller.php +2 -2
- src/SupsysticTables/Tables/Model/Tables.php +17 -32
- src/SupsysticTables/Tables/Module.php +2 -2
- src/SupsysticTables/Tables/assets/js/tables.model.js +5 -1
- src/SupsysticTables/Tables/views/index.twig +1 -1
- src/SupsysticTables/Tables/views/shortcode.twig +12 -22
- src/SupsysticTables/Tables/views/view.twig +1 -1
app/SupsysticTables.php
CHANGED
@@ -18,7 +18,7 @@ class SupsysticTables
|
|
18 |
|
19 |
$menuSlug = 'supsystic-tables';
|
20 |
$pluginPath = dirname(dirname(__FILE__));
|
21 |
-
$environment = new Rsc_Environment('st', '1.9.
|
22 |
|
23 |
/* Configure */
|
24 |
$environment->configure(
|
18 |
|
19 |
$menuSlug = 'supsystic-tables';
|
20 |
$pluginPath = dirname(dirname(__FILE__));
|
21 |
+
$environment = new Rsc_Environment('st', '1.9.99', $pluginPath);
|
22 |
|
23 |
/* Configure */
|
24 |
$environment->configure(
|
app/assets/css/supsystic-ui.css
CHANGED
@@ -440,7 +440,6 @@ h3.nav-tab-wrapper {
|
|
440 |
|
441 |
.button.supsystic-button,
|
442 |
.supsystic-plugin .button,
|
443 |
-
.supsystic-plugin .paginate_button,
|
444 |
.supsystic-plugin .button-primary,
|
445 |
.ui-button:not(.ui-dialog-titlebar-close),
|
446 |
.ui-button.ui-state-default:not(.ui-dialog-titlebar-close) {
|
@@ -462,7 +461,6 @@ h3.nav-tab-wrapper {
|
|
462 |
.button.supsystic-button:hover,
|
463 |
.supsystic-plugin .button.hover,
|
464 |
.supsystic-plugin .button:hover,
|
465 |
-
.supsystic-plugin .paginate_button:hover,
|
466 |
.supsystic-plugin .button.focus,
|
467 |
.supsystic-plugin .button:focus,
|
468 |
.ui-button.ui-state-hover,
|
@@ -477,7 +475,6 @@ h3.nav-tab-wrapper {
|
|
477 |
.button.supsystic-button.disabled,
|
478 |
.supsystic-plugin .button[disabled],
|
479 |
.supsystic-plugin .button:disabled,
|
480 |
-
.supsystic-plugin .paginate_button:disabled,
|
481 |
.supsystic-plugin .button.disabled,
|
482 |
.supsystic-plugin .button-secondary[disabled],
|
483 |
.supsystic-plugin .button-secondary:disabled,
|
440 |
|
441 |
.button.supsystic-button,
|
442 |
.supsystic-plugin .button,
|
|
|
443 |
.supsystic-plugin .button-primary,
|
444 |
.ui-button:not(.ui-dialog-titlebar-close),
|
445 |
.ui-button.ui-state-default:not(.ui-dialog-titlebar-close) {
|
461 |
.button.supsystic-button:hover,
|
462 |
.supsystic-plugin .button.hover,
|
463 |
.supsystic-plugin .button:hover,
|
|
|
464 |
.supsystic-plugin .button.focus,
|
465 |
.supsystic-plugin .button:focus,
|
466 |
.ui-button.ui-state-hover,
|
475 |
.button.supsystic-button.disabled,
|
476 |
.supsystic-plugin .button[disabled],
|
477 |
.supsystic-plugin .button:disabled,
|
|
|
478 |
.supsystic-plugin .button.disabled,
|
479 |
.supsystic-plugin .button-secondary[disabled],
|
480 |
.supsystic-plugin .button-secondary:disabled,
|
app/assets/js/dtgsnonce.js
CHANGED
@@ -0,0 +1 @@
|
|
|
1 |
+
//console.log('DTGS_NONCE is enabled');
|
index.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
* Plugin Name: Data Tables Generator by Supsystic
|
5 |
* Plugin URI: http://supsystic.com
|
6 |
* Description: Create and manage beautiful data tables with custom design. No HTML knowledge is required
|
7 |
-
* Version: 1.9.
|
8 |
* Author: supsystic.com
|
9 |
* Author URI: http://supsystic.com
|
10 |
* Text Domain: supsystic_tables
|
4 |
* Plugin Name: Data Tables Generator by Supsystic
|
5 |
* Plugin URI: http://supsystic.com
|
6 |
* Description: Create and manage beautiful data tables with custom design. No HTML knowledge is required
|
7 |
+
* Version: 1.9.99
|
8 |
* Author: supsystic.com
|
9 |
* Author URI: http://supsystic.com
|
10 |
* Text Domain: supsystic_tables
|
readme.txt
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
Contributors: supsystic.com
|
3 |
Tags: data table, spreadsheet, table builder, charts, graphs, wordpress table plugin, excel, line chart, pie chart, visualise data
|
4 |
Tested up to: 5.6
|
5 |
-
Stable tag: 1.9.
|
6 |
|
7 |
Create data tables with charts and graphs. Custom design, navigation, searching and ordering functions. Export to PDF, CSV, Print. Excel spreadsheet. WooCommerce Integration.
|
8 |
|
@@ -214,6 +214,9 @@ It's perfect for product [Price List](http://woo.supsystic.com/price-list "Price
|
|
214 |
Create custom order forms which increase your conversion rate!
|
215 |
|
216 |
== Changelog ==
|
|
|
|
|
|
|
217 |
= 1.9.98 / 20.01.2020 =
|
218 |
* Add fix for DataTables Export/Import library
|
219 |
* Migrating to new export/impor library PHP Spreadsheets from PHP Excel
|
2 |
Contributors: supsystic.com
|
3 |
Tags: data table, spreadsheet, table builder, charts, graphs, wordpress table plugin, excel, line chart, pie chart, visualise data
|
4 |
Tested up to: 5.6
|
5 |
+
Stable tag: 1.9.99
|
6 |
|
7 |
Create data tables with charts and graphs. Custom design, navigation, searching and ordering functions. Export to PDF, CSV, Print. Excel spreadsheet. WooCommerce Integration.
|
8 |
|
214 |
Create custom order forms which increase your conversion rate!
|
215 |
|
216 |
== Changelog ==
|
217 |
+
= 1.9.99 / 25.01.2020 =
|
218 |
+
* fix for dtgs_nonce
|
219 |
+
|
220 |
= 1.9.98 / 20.01.2020 =
|
221 |
* Add fix for DataTables Export/Import library
|
222 |
* Migrating to new export/impor library PHP Spreadsheets from PHP Excel
|
src/SupsysticTables/Core/Module.php
CHANGED
@@ -111,7 +111,7 @@ class SupsysticTables_Core_Module extends SupsysticTables_Core_BaseModule
|
|
111 |
}
|
112 |
|
113 |
$environment = $this->getEnvironment();
|
114 |
-
$path = $environment->getConfig()->get('plugin_url').'/app/assets/js/
|
115 |
|
116 |
if ( is_admin() && ( (current_user_can('administrator') || $userCanEdit) || empty($settings['access_roles']) ) ) {
|
117 |
$nonce = wp_create_nonce('dtgs_nonce');
|
111 |
}
|
112 |
|
113 |
$environment = $this->getEnvironment();
|
114 |
+
$path = $environment->getConfig()->get('plugin_url').'/app/assets/js/dtgsnonce.js';
|
115 |
|
116 |
if ( is_admin() && ( (current_user_can('administrator') || $userCanEdit) || empty($settings['access_roles']) ) ) {
|
117 |
$nonce = wp_create_nonce('dtgs_nonce');
|
src/SupsysticTables/Core/assets/css/lib/jquery.dataTables.min.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
table.dataTable{width:100%;margin:0 auto;clear:both;border-collapse:separate;border-spacing:0}table.dataTable thead th,table.dataTable tfoot th{font-weight:bold}table.dataTable thead th,table.dataTable thead td{padding:10px 18px;border-bottom:1px solid #111}table.dataTable thead th:active,table.dataTable thead td:active{outline:none}table.dataTable tfoot th,table.dataTable tfoot td{padding:10px 18px 6px 18px;border-top:1px solid #111}table.dataTable thead .sorting,table.dataTable thead .sorting_asc,table.dataTable thead .sorting_desc{cursor:pointer;*cursor:hand}table.dataTable thead .sorting,table.dataTable thead .sorting_asc,table.dataTable thead .sorting_desc,table.dataTable thead .sorting_asc_disabled,table.dataTable thead .sorting_desc_disabled{background-repeat:no-repeat;background-position:center right}table.dataTable thead .sorting{background-image:url("../images/sort_both.png")}table.dataTable thead .sorting_asc{background-image:url("../images/sort_asc.png")}table.dataTable thead .sorting_desc{background-image:url("../images/sort_desc.png")}table.dataTable thead .sorting_asc_disabled{background-image:url("../images/sort_asc_disabled.png")}table.dataTable thead .sorting_desc_disabled{background-image:url("../images/sort_desc_disabled.png")}table.dataTable tbody tr{background-color:#ffffff}table.dataTable tbody tr.selected{background-color:#B0BED9}table.dataTable tbody th,table.dataTable tbody td{padding:8px 10px}table.dataTable.row-border tbody th,table.dataTable.row-border tbody td,table.dataTable.display tbody th,table.dataTable.display tbody td{border-top:1px solid #ddd}table.dataTable.row-border tbody tr:first-child th,table.dataTable.row-border tbody tr:first-child td,table.dataTable.display tbody tr:first-child th,table.dataTable.display tbody tr:first-child td{border-top:none}table.dataTable.cell-border tbody th,table.dataTable.cell-border tbody td{border-top:1px solid #ddd;border-right:1px solid #ddd}table.dataTable.cell-border tbody tr th:first-child,table.dataTable.cell-border tbody tr td:first-child{border-left:1px solid #ddd}table.dataTable.cell-border tbody tr:first-child th,table.dataTable.cell-border tbody tr:first-child td{border-top:none}table.dataTable.stripe tbody tr.odd,table.dataTable.display tbody tr.odd{background-color:#f9f9f9}table.dataTable.stripe tbody tr.odd.selected,table.dataTable.display tbody tr.odd.selected{background-color:#acbad4}table.dataTable.hover tbody tr:hover,table.dataTable.display tbody tr:hover{background-color:#f6f6f6}table.dataTable.hover tbody tr:hover.selected,table.dataTable.display tbody tr:hover.selected{background-color:#aab7d1}table.dataTable.order-column tbody tr>.sorting_1,table.dataTable.order-column tbody tr>.sorting_2,table.dataTable.order-column tbody tr>.sorting_3,table.dataTable.display tbody tr>.sorting_1,table.dataTable.display tbody tr>.sorting_2,table.dataTable.display tbody tr>.sorting_3{background-color:#fafafa}table.dataTable.order-column tbody tr.selected>.sorting_1,table.dataTable.order-column tbody tr.selected>.sorting_2,table.dataTable.order-column tbody tr.selected>.sorting_3,table.dataTable.display tbody tr.selected>.sorting_1,table.dataTable.display tbody tr.selected>.sorting_2,table.dataTable.display tbody tr.selected>.sorting_3{background-color:#acbad5}table.dataTable.display tbody tr.odd>.sorting_1,table.dataTable.order-column.stripe tbody tr.odd>.sorting_1{background-color:#f1f1f1}table.dataTable.display tbody tr.odd>.sorting_2,table.dataTable.order-column.stripe tbody tr.odd>.sorting_2{background-color:#f3f3f3}table.dataTable.display tbody tr.odd>.sorting_3,table.dataTable.order-column.stripe tbody tr.odd>.sorting_3{background-color:whitesmoke}table.dataTable.display tbody tr.odd.selected>.sorting_1,table.dataTable.order-column.stripe tbody tr.odd.selected>.sorting_1{background-color:#a6b4cd}table.dataTable.display tbody tr.odd.selected>.sorting_2,table.dataTable.order-column.stripe tbody tr.odd.selected>.sorting_2{background-color:#a8b5cf}table.dataTable.display tbody tr.odd.selected>.sorting_3,table.dataTable.order-column.stripe tbody tr.odd.selected>.sorting_3{background-color:#a9b7d1}table.dataTable.display tbody tr.even>.sorting_1,table.dataTable.order-column.stripe tbody tr.even>.sorting_1{background-color:#fafafa}table.dataTable.display tbody tr.even>.sorting_2,table.dataTable.order-column.stripe tbody tr.even>.sorting_2{background-color:#fcfcfc}table.dataTable.display tbody tr.even>.sorting_3,table.dataTable.order-column.stripe tbody tr.even>.sorting_3{background-color:#fefefe}table.dataTable.display tbody tr.even.selected>.sorting_1,table.dataTable.order-column.stripe tbody tr.even.selected>.sorting_1{background-color:#acbad5}table.dataTable.display tbody tr.even.selected>.sorting_2,table.dataTable.order-column.stripe tbody tr.even.selected>.sorting_2{background-color:#aebcd6}table.dataTable.display tbody tr.even.selected>.sorting_3,table.dataTable.order-column.stripe tbody tr.even.selected>.sorting_3{background-color:#afbdd8}table.dataTable.display tbody tr:hover>.sorting_1,table.dataTable.order-column.hover tbody tr:hover>.sorting_1{background-color:#eaeaea}table.dataTable.display tbody tr:hover>.sorting_2,table.dataTable.order-column.hover tbody tr:hover>.sorting_2{background-color:#ececec}table.dataTable.display tbody tr:hover>.sorting_3,table.dataTable.order-column.hover tbody tr:hover>.sorting_3{background-color:#efefef}table.dataTable.display tbody tr:hover.selected>.sorting_1,table.dataTable.order-column.hover tbody tr:hover.selected>.sorting_1{background-color:#a2aec7}table.dataTable.display tbody tr:hover.selected>.sorting_2,table.dataTable.order-column.hover tbody tr:hover.selected>.sorting_2{background-color:#a3b0c9}table.dataTable.display tbody tr:hover.selected>.sorting_3,table.dataTable.order-column.hover tbody tr:hover.selected>.sorting_3{background-color:#a5b2cb}table.dataTable.no-footer{border-bottom:1px solid #111}table.dataTable.nowrap th,table.dataTable.nowrap td{white-space:nowrap}table.dataTable.compact thead th,table.dataTable.compact thead td{padding:4px 17px 4px 4px}table.dataTable.compact tfoot th,table.dataTable.compact tfoot td{padding:4px}table.dataTable.compact tbody th,table.dataTable.compact tbody td{padding:4px}table.dataTable th.dt-left,table.dataTable td.dt-left{text-align:left}table.dataTable th.dt-center,table.dataTable td.dt-center,table.dataTable td.dataTables_empty{text-align:center}table.dataTable th.dt-right,table.dataTable td.dt-right{text-align:right}table.dataTable th.dt-justify,table.dataTable td.dt-justify{text-align:justify}table.dataTable th.dt-nowrap,table.dataTable td.dt-nowrap{white-space:nowrap}table.dataTable thead th.dt-head-left,table.dataTable thead td.dt-head-left,table.dataTable tfoot th.dt-head-left,table.dataTable tfoot td.dt-head-left{text-align:left}table.dataTable thead th.dt-head-center,table.dataTable thead td.dt-head-center,table.dataTable tfoot th.dt-head-center,table.dataTable tfoot td.dt-head-center{text-align:center}table.dataTable thead th.dt-head-right,table.dataTable thead td.dt-head-right,table.dataTable tfoot th.dt-head-right,table.dataTable tfoot td.dt-head-right{text-align:right}table.dataTable thead th.dt-head-justify,table.dataTable thead td.dt-head-justify,table.dataTable tfoot th.dt-head-justify,table.dataTable tfoot td.dt-head-justify{text-align:justify}table.dataTable thead th.dt-head-nowrap,table.dataTable thead td.dt-head-nowrap,table.dataTable tfoot th.dt-head-nowrap,table.dataTable tfoot td.dt-head-nowrap{white-space:nowrap}table.dataTable tbody th.dt-body-left,table.dataTable tbody td.dt-body-left{text-align:left}table.dataTable tbody th.dt-body-center,table.dataTable tbody td.dt-body-center{text-align:center}table.dataTable tbody th.dt-body-right,table.dataTable tbody td.dt-body-right{text-align:right}table.dataTable tbody th.dt-body-justify,table.dataTable tbody td.dt-body-justify{text-align:justify}table.dataTable tbody th.dt-body-nowrap,table.dataTable tbody td.dt-body-nowrap{white-space:nowrap}table.dataTable,table.dataTable th,table.dataTable td{-webkit-box-sizing:content-box;box-sizing:content-box}.dataTables_wrapper{position:relative;clear:both;*zoom:1;zoom:1}.dataTables_wrapper .dataTables_length{float:left}.dataTables_wrapper .dataTables_filter{float:right;text-align:right}.dataTables_wrapper .dataTables_filter input{margin-left:0.5em}.dataTables_wrapper .dataTables_info{clear:both;float:left;padding-top:0.755em}.dataTables_wrapper .dataTables_paginate{float:right;text-align:right;padding-top:0.25em}.dataTables_wrapper .dataTables_paginate .paginate_button{box-sizing:border-box;display:inline-block;min-width:1.5em;padding:0.5em 1em;margin-left:2px;text-align:center;text-decoration:none !important;cursor:pointer;*cursor:hand;color:#333 !important;border:1px solid transparent;border-radius:2px}.dataTables_wrapper .dataTables_paginate .paginate_button.current,.dataTables_wrapper .dataTables_paginate .paginate_button.current:hover{color:#333 !important;border:1px solid #979797;background-color:white;background:-webkit-gradient(linear, left top, left bottom, color-stop(0%, #fff), color-stop(100%, #dcdcdc));background:-webkit-linear-gradient(top, #fff 0%, #dcdcdc 100%);background:-moz-linear-gradient(top, #fff 0%, #dcdcdc 100%);background:-ms-linear-gradient(top, #fff 0%, #dcdcdc 100%);background:-o-linear-gradient(top, #fff 0%, #dcdcdc 100%);background:linear-gradient(to bottom, #fff 0%, #dcdcdc 100%)}.dataTables_wrapper .dataTables_paginate .paginate_button.disabled,.dataTables_wrapper .dataTables_paginate .paginate_button.disabled:hover,.dataTables_wrapper .dataTables_paginate .paginate_button.disabled:active{cursor:default;color:#666 !important;border:1px solid transparent;background:transparent;box-shadow:none}.dataTables_wrapper .dataTables_paginate .paginate_button:hover{color:white !important;border:1px solid #111;background-color:#585858;background:-webkit-gradient(linear, left top, left bottom, color-stop(0%, #585858), color-stop(100%, #111));background:-webkit-linear-gradient(top, #585858 0%, #111 100%);background:-moz-linear-gradient(top, #585858 0%, #111 100%);background:-ms-linear-gradient(top, #585858 0%, #111 100%);background:-o-linear-gradient(top, #585858 0%, #111 100%);background:linear-gradient(to bottom, #585858 0%, #111 100%)}.dataTables_wrapper .dataTables_paginate .paginate_button:active{outline:none;background-color:#2b2b2b;background:-webkit-gradient(linear, left top, left bottom, color-stop(0%, #2b2b2b), color-stop(100%, #0c0c0c));background:-webkit-linear-gradient(top, #2b2b2b 0%, #0c0c0c 100%);background:-moz-linear-gradient(top, #2b2b2b 0%, #0c0c0c 100%);background:-ms-linear-gradient(top, #2b2b2b 0%, #0c0c0c 100%);background:-o-linear-gradient(top, #2b2b2b 0%, #0c0c0c 100%);background:linear-gradient(to bottom, #2b2b2b 0%, #0c0c0c 100%);box-shadow:inset 0 0 3px #111}.dataTables_wrapper .dataTables_paginate .ellipsis{padding:0 1em}.dataTables_wrapper .dataTables_processing{position:absolute;top:50%;left:50%;width:100%;height:40px;margin-left:-50%;margin-top:-25px;padding-top:20px;text-align:center;font-size:1.2em;background-color:white;background:-webkit-gradient(linear, left top, right top, color-stop(0%, rgba(255,255,255,0)), color-stop(25%, rgba(255,255,255,0.9)), color-stop(75%, rgba(255,255,255,0.9)), color-stop(100%, rgba(255,255,255,0)));background:-webkit-linear-gradient(left, rgba(255,255,255,0) 0%, rgba(255,255,255,0.9) 25%, rgba(255,255,255,0.9) 75%, rgba(255,255,255,0) 100%);background:-moz-linear-gradient(left, rgba(255,255,255,0) 0%, rgba(255,255,255,0.9) 25%, rgba(255,255,255,0.9) 75%, rgba(255,255,255,0) 100%);background:-ms-linear-gradient(left, rgba(255,255,255,0) 0%, rgba(255,255,255,0.9) 25%, rgba(255,255,255,0.9) 75%, rgba(255,255,255,0) 100%);background:-o-linear-gradient(left, rgba(255,255,255,0) 0%, rgba(255,255,255,0.9) 25%, rgba(255,255,255,0.9) 75%, rgba(255,255,255,0) 100%);background:linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,0.9) 25%, rgba(255,255,255,0.9) 75%, rgba(255,255,255,0) 100%)}.dataTables_wrapper .dataTables_length,.dataTables_wrapper .dataTables_filter,.dataTables_wrapper .dataTables_info,.dataTables_wrapper .dataTables_processing,.dataTables_wrapper .dataTables_paginate{color:#333}.dataTables_wrapper .dataTables_scroll{clear:both}.dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody{*margin-top:-1px;-webkit-overflow-scrolling:touch}.dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody th,.dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody td{}.dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody th>div.dataTables_sizing,.dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody td>div.dataTables_sizing{height:0;overflow:hidden;margin:0 !important;padding:0 !important}.dataTables_wrapper.no-footer .dataTables_scrollBody{border-bottom:1px solid #111}.dataTables_wrapper.no-footer div.dataTables_scrollHead table,.dataTables_wrapper.no-footer div.dataTables_scrollBody table{border-bottom:none}.dataTables_wrapper:after{visibility:hidden;display:block;content:"";clear:both;height:0}@media screen and (max-width: 767px){.dataTables_wrapper .dataTables_info,.dataTables_wrapper .dataTables_paginate{float:none;text-align:center}.dataTables_wrapper .dataTables_paginate{margin-top:0.5em}}@media screen and (max-width: 640px){.dataTables_wrapper .dataTables_length,.dataTables_wrapper .dataTables_filter{float:none;text-align:center}.dataTables_wrapper .dataTables_filter{margin-top:0.5em}}.dataTables_scrollBody .stbColumnsSearchWrapper{display:none;}
|
1 |
+
table.dataTable{width:100%;margin:0 auto;clear:both;border-collapse:separate;border-spacing:0}table.dataTable thead th,table.dataTable tfoot th{font-weight:bold}table.dataTable thead th,table.dataTable thead td{padding:10px 18px;border-bottom:1px solid #111}table.dataTable thead th:active,table.dataTable thead td:active{outline:none}table.dataTable tfoot th,table.dataTable tfoot td{padding:10px 18px 6px 18px;border-top:1px solid #111}table.dataTable thead .sorting,table.dataTable thead .sorting_asc,table.dataTable thead .sorting_desc,table.dataTable thead .sorting_asc_disabled,table.dataTable thead .sorting_desc_disabled{cursor:pointer;*cursor:hand;background-repeat:no-repeat;background-position:center right}table.dataTable thead .sorting{background-image:url("../images/sort_both.png")}table.dataTable thead .sorting_asc{background-image:url("../images/sort_asc.png")}table.dataTable thead .sorting_desc{background-image:url("../images/sort_desc.png")}table.dataTable thead .sorting_asc_disabled{background-image:url("../images/sort_asc_disabled.png")}table.dataTable thead .sorting_desc_disabled{background-image:url("../images/sort_desc_disabled.png")}table.dataTable tbody tr{background-color:#fff}table.dataTable tbody tr.selected{background-color:#b0bed9}table.dataTable tbody th,table.dataTable tbody td{padding:8px 10px}table.dataTable.row-border tbody th,table.dataTable.row-border tbody td,table.dataTable.display tbody th,table.dataTable.display tbody td{border-top:1px solid #ddd}table.dataTable.row-border tbody tr:first-child th,table.dataTable.row-border tbody tr:first-child td,table.dataTable.display tbody tr:first-child th,table.dataTable.display tbody tr:first-child td{border-top:none}table.dataTable.cell-border tbody th,table.dataTable.cell-border tbody td{border-top:1px solid #ddd;border-right:1px solid #ddd}table.dataTable.cell-border tbody tr th:first-child,table.dataTable.cell-border tbody tr td:first-child{border-left:1px solid #ddd}table.dataTable.cell-border tbody tr:first-child th,table.dataTable.cell-border tbody tr:first-child td{border-top:none}table.dataTable.stripe tbody tr.odd,table.dataTable.display tbody tr.odd{background-color:#f9f9f9}table.dataTable.stripe tbody tr.odd.selected,table.dataTable.display tbody tr.odd.selected{background-color:#acbad4}table.dataTable.hover tbody tr:hover,table.dataTable.display tbody tr:hover{background-color:#f6f6f6}table.dataTable.hover tbody tr:hover.selected,table.dataTable.display tbody tr:hover.selected{background-color:#aab7d1}table.dataTable.order-column tbody tr>.sorting_1,table.dataTable.order-column tbody tr>.sorting_2,table.dataTable.order-column tbody tr>.sorting_3,table.dataTable.display tbody tr>.sorting_1,table.dataTable.display tbody tr>.sorting_2,table.dataTable.display tbody tr>.sorting_3{background-color:#fafafa}table.dataTable.order-column tbody tr.selected>.sorting_1,table.dataTable.order-column tbody tr.selected>.sorting_2,table.dataTable.order-column tbody tr.selected>.sorting_3,table.dataTable.display tbody tr.selected>.sorting_1,table.dataTable.display tbody tr.selected>.sorting_2,table.dataTable.display tbody tr.selected>.sorting_3{background-color:#acbad5}table.dataTable.display tbody tr.odd>.sorting_1,table.dataTable.order-column.stripe tbody tr.odd>.sorting_1{background-color:#f1f1f1}table.dataTable.display tbody tr.odd>.sorting_2,table.dataTable.order-column.stripe tbody tr.odd>.sorting_2{background-color:#f3f3f3}table.dataTable.display tbody tr.odd>.sorting_3,table.dataTable.order-column.stripe tbody tr.odd>.sorting_3{background-color:whitesmoke}table.dataTable.display tbody tr.odd.selected>.sorting_1,table.dataTable.order-column.stripe tbody tr.odd.selected>.sorting_1{background-color:#a6b4cd}table.dataTable.display tbody tr.odd.selected>.sorting_2,table.dataTable.order-column.stripe tbody tr.odd.selected>.sorting_2{background-color:#a8b5cf}table.dataTable.display tbody tr.odd.selected>.sorting_3,table.dataTable.order-column.stripe tbody tr.odd.selected>.sorting_3{background-color:#a9b7d1}table.dataTable.display tbody tr.even>.sorting_1,table.dataTable.order-column.stripe tbody tr.even>.sorting_1{background-color:#fafafa}table.dataTable.display tbody tr.even>.sorting_2,table.dataTable.order-column.stripe tbody tr.even>.sorting_2{background-color:#fcfcfc}table.dataTable.display tbody tr.even>.sorting_3,table.dataTable.order-column.stripe tbody tr.even>.sorting_3{background-color:#fefefe}table.dataTable.display tbody tr.even.selected>.sorting_1,table.dataTable.order-column.stripe tbody tr.even.selected>.sorting_1{background-color:#acbad5}table.dataTable.display tbody tr.even.selected>.sorting_2,table.dataTable.order-column.stripe tbody tr.even.selected>.sorting_2{background-color:#aebcd6}table.dataTable.display tbody tr.even.selected>.sorting_3,table.dataTable.order-column.stripe tbody tr.even.selected>.sorting_3{background-color:#afbdd8}table.dataTable.display tbody tr:hover>.sorting_1,table.dataTable.order-column.hover tbody tr:hover>.sorting_1{background-color:#eaeaea}table.dataTable.display tbody tr:hover>.sorting_2,table.dataTable.order-column.hover tbody tr:hover>.sorting_2{background-color:#ececec}table.dataTable.display tbody tr:hover>.sorting_3,table.dataTable.order-column.hover tbody tr:hover>.sorting_3{background-color:#efefef}table.dataTable.display tbody tr:hover.selected>.sorting_1,table.dataTable.order-column.hover tbody tr:hover.selected>.sorting_1{background-color:#a2aec7}table.dataTable.display tbody tr:hover.selected>.sorting_2,table.dataTable.order-column.hover tbody tr:hover.selected>.sorting_2{background-color:#a3b0c9}table.dataTable.display tbody tr:hover.selected>.sorting_3,table.dataTable.order-column.hover tbody tr:hover.selected>.sorting_3{background-color:#a5b2cb}table.dataTable.no-footer{border-bottom:1px solid #111}table.dataTable.nowrap th,table.dataTable.nowrap td{white-space:nowrap}table.dataTable.compact thead th,table.dataTable.compact thead td{padding:4px 17px}table.dataTable.compact tfoot th,table.dataTable.compact tfoot td{padding:4px}table.dataTable.compact tbody th,table.dataTable.compact tbody td{padding:4px}table.dataTable th.dt-left,table.dataTable td.dt-left{text-align:left}table.dataTable th.dt-center,table.dataTable td.dt-center,table.dataTable td.dataTables_empty{text-align:center}table.dataTable th.dt-right,table.dataTable td.dt-right{text-align:right}table.dataTable th.dt-justify,table.dataTable td.dt-justify{text-align:justify}table.dataTable th.dt-nowrap,table.dataTable td.dt-nowrap{white-space:nowrap}table.dataTable thead th.dt-head-left,table.dataTable thead td.dt-head-left,table.dataTable tfoot th.dt-head-left,table.dataTable tfoot td.dt-head-left{text-align:left}table.dataTable thead th.dt-head-center,table.dataTable thead td.dt-head-center,table.dataTable tfoot th.dt-head-center,table.dataTable tfoot td.dt-head-center{text-align:center}table.dataTable thead th.dt-head-right,table.dataTable thead td.dt-head-right,table.dataTable tfoot th.dt-head-right,table.dataTable tfoot td.dt-head-right{text-align:right}table.dataTable thead th.dt-head-justify,table.dataTable thead td.dt-head-justify,table.dataTable tfoot th.dt-head-justify,table.dataTable tfoot td.dt-head-justify{text-align:justify}table.dataTable thead th.dt-head-nowrap,table.dataTable thead td.dt-head-nowrap,table.dataTable tfoot th.dt-head-nowrap,table.dataTable tfoot td.dt-head-nowrap{white-space:nowrap}table.dataTable tbody th.dt-body-left,table.dataTable tbody td.dt-body-left{text-align:left}table.dataTable tbody th.dt-body-center,table.dataTable tbody td.dt-body-center{text-align:center}table.dataTable tbody th.dt-body-right,table.dataTable tbody td.dt-body-right{text-align:right}table.dataTable tbody th.dt-body-justify,table.dataTable tbody td.dt-body-justify{text-align:justify}table.dataTable tbody th.dt-body-nowrap,table.dataTable tbody td.dt-body-nowrap{white-space:nowrap}table.dataTable,table.dataTable th,table.dataTable td{box-sizing:content-box}.dataTables_wrapper{position:relative;clear:both;*zoom:1;zoom:1}.dataTables_wrapper .dataTables_length{float:left; margin-bottom:10px;}.dataTables_wrapper .dataTables_length select{border:1px solid #aaa;border-radius:3px;min-width:40px;padding:5px;background-color:transparent;padding:4px}.dataTables_wrapper .dataTables_filter{float:right;text-align:right}.dataTables_wrapper .dataTables_filter input{border:1px solid #aaa;border-radius:3px;padding:5px;background-color:transparent;margin-left:3px}.dataTables_wrapper .dataTables_info{clear:both;float:left;padding-top:.755em}.dataTables_wrapper .dataTables_paginate{float:right;text-align:right;padding-top:.25em}.dataTables_wrapper .dataTables_paginate .paginate_button{box-sizing:border-box;display:inline-block;min-width:1.5em;padding:.5em 1em;margin-left:2px;text-align:center;text-decoration:none !important;cursor:pointer;*cursor:hand;color:#333 !important;border:1px solid transparent;border-radius:2px}.dataTables_wrapper .dataTables_paginate .paginate_button.current,.dataTables_wrapper .dataTables_paginate .paginate_button.current:hover{color:#333 !important;border:1px solid #979797;background-color:white;background:-webkit-gradient(linear, left top, left bottom, color-stop(0%, white), color-stop(100%, #dcdcdc));background:-webkit-linear-gradient(top, white 0%, #dcdcdc 100%);background:-moz-linear-gradient(top, white 0%, #dcdcdc 100%);background:-ms-linear-gradient(top, white 0%, #dcdcdc 100%);background:-o-linear-gradient(top, white 0%, #dcdcdc 100%);background:linear-gradient(to bottom, white 0%, #dcdcdc 100%)}.dataTables_wrapper .dataTables_paginate .paginate_button.disabled,.dataTables_wrapper .dataTables_paginate .paginate_button.disabled:hover,.dataTables_wrapper .dataTables_paginate .paginate_button.disabled:active{cursor:default;color:#666 !important;border:1px solid transparent;background:transparent;box-shadow:none}.dataTables_wrapper .dataTables_paginate .paginate_button:hover{color:white !important;border:1px solid #111;background-color:#585858;background:-webkit-gradient(linear, left top, left bottom, color-stop(0%, #585858), color-stop(100%, #111));background:-webkit-linear-gradient(top, #585858 0%, #111 100%);background:-moz-linear-gradient(top, #585858 0%, #111 100%);background:-ms-linear-gradient(top, #585858 0%, #111 100%);background:-o-linear-gradient(top, #585858 0%, #111 100%);background:linear-gradient(to bottom, #585858 0%, #111 100%)}.dataTables_wrapper .dataTables_paginate .paginate_button:active{outline:none;background-color:#2b2b2b;background:-webkit-gradient(linear, left top, left bottom, color-stop(0%, #2b2b2b), color-stop(100%, #0c0c0c));background:-webkit-linear-gradient(top, #2b2b2b 0%, #0c0c0c 100%);background:-moz-linear-gradient(top, #2b2b2b 0%, #0c0c0c 100%);background:-ms-linear-gradient(top, #2b2b2b 0%, #0c0c0c 100%);background:-o-linear-gradient(top, #2b2b2b 0%, #0c0c0c 100%);background:linear-gradient(to bottom, #2b2b2b 0%, #0c0c0c 100%);box-shadow:inset 0 0 3px #111}.dataTables_wrapper .dataTables_paginate .ellipsis{padding:0 1em}.dataTables_wrapper .dataTables_processing{position:absolute;top:50%;left:50%;width:100%;height:40px;margin-left:-50%;margin-top:-25px;padding-top:20px;text-align:center;font-size:1.2em;background-color:white;background:-webkit-gradient(linear, left top, right top, color-stop(0%, rgba(255, 255, 255, 0)), color-stop(25%, rgba(255, 255, 255, 0.9)), color-stop(75%, rgba(255, 255, 255, 0.9)), color-stop(100%, rgba(255, 255, 255, 0)));background:-webkit-linear-gradient(left, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.9) 25%, rgba(255, 255, 255, 0.9) 75%, rgba(255, 255, 255, 0) 100%);background:-moz-linear-gradient(left, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.9) 25%, rgba(255, 255, 255, 0.9) 75%, rgba(255, 255, 255, 0) 100%);background:-ms-linear-gradient(left, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.9) 25%, rgba(255, 255, 255, 0.9) 75%, rgba(255, 255, 255, 0) 100%);background:-o-linear-gradient(left, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.9) 25%, rgba(255, 255, 255, 0.9) 75%, rgba(255, 255, 255, 0) 100%);background:linear-gradient(to right, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.9) 25%, rgba(255, 255, 255, 0.9) 75%, rgba(255, 255, 255, 0) 100%)}.dataTables_wrapper .dataTables_length,.dataTables_wrapper .dataTables_filter,.dataTables_wrapper .dataTables_info,.dataTables_wrapper .dataTables_processing,.dataTables_wrapper .dataTables_paginate{color:#333}.dataTables_wrapper .dataTables_scroll{clear:both}.dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody{*margin-top:-1px;-webkit-overflow-scrolling:touch}.dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody>table>thead>tr>th,.dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody>table>thead>tr>td,.dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody>table>tbody>tr>th,.dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody>table>tbody>tr>td{vertical-align:middle}.dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody>table>thead>tr>th>div.dataTables_sizing,.dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody>table>thead>tr>td>div.dataTables_sizing,.dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody>table>tbody>tr>th>div.dataTables_sizing,.dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody>table>tbody>tr>td>div.dataTables_sizing{height:0;overflow:hidden;margin:0 !important;padding:0 !important}.dataTables_wrapper.no-footer .dataTables_scrollBody{border-bottom:1px solid #111}.dataTables_wrapper.no-footer div.dataTables_scrollHead table.dataTable,.dataTables_wrapper.no-footer div.dataTables_scrollBody>table{border-bottom:none}.dataTables_wrapper:after{visibility:hidden;display:block;content:"";clear:both;height:0}@media screen and (max-width: 767px){.dataTables_wrapper .dataTables_info,.dataTables_wrapper .dataTables_paginate{float:none;text-align:center}.dataTables_wrapper .dataTables_paginate{margin-top:.5em}}@media screen and (max-width: 640px){.dataTables_wrapper .dataTables_length,.dataTables_wrapper .dataTables_filter{float:none;text-align:center}.dataTables_wrapper .dataTables_filter{margin-top:.5em}}
|
src/SupsysticTables/Core/assets/js/core.js
CHANGED
@@ -1,15 +1,15 @@
|
|
1 |
-
if(typeof(SDT_DATA) == 'undefined') {
|
2 |
var SDT_DATA = {};
|
3 |
}
|
4 |
var g_stbServerSideProcessing = false;
|
5 |
var g_stbServerSideProcessingIsActive = false;
|
6 |
|
7 |
-
(function
|
8 |
|
9 |
var appName = 'Tables';
|
10 |
var dataTableInstances = [];
|
11 |
var ruleJSInstances = [];
|
12 |
-
|
13 |
|
14 |
if (!(appName in vendor)) {
|
15 |
vendor[appName] = {};
|
@@ -18,9 +18,9 @@ var g_stbServerSideProcessingIsActive = false;
|
|
18 |
return appName;
|
19 |
});
|
20 |
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
|
25 |
vendor[appName].getParameterByName = (function(name) {
|
26 |
name = name.replace(/[\[]/, "\\[").replace(/[\]]/, "\\]");
|
@@ -32,20 +32,20 @@ var g_stbServerSideProcessingIsActive = false;
|
|
32 |
});
|
33 |
|
34 |
vendor[appName].replaceParameterByName = (function(url, paramName, paramValue) {
|
35 |
-
var pattern = new RegExp('\\b('+paramName+'=).*?(&|$)');
|
36 |
if (url.search(pattern) >= 0) {
|
37 |
-
return url.replace(pattern,'$1' + paramValue + '$2');
|
38 |
}
|
39 |
-
return url + (url.indexOf('?')>0 ? '&' : '?') + paramName + '=' + paramValue;
|
40 |
});
|
41 |
|
42 |
vendor[appName].getAllTableInstances = (function() {
|
43 |
return dataTableInstances;
|
44 |
});
|
45 |
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
|
50 |
vendor[appName].setTableInstance = (function(instance) {
|
51 |
dataTableInstances.push(instance);
|
@@ -54,8 +54,8 @@ var g_stbServerSideProcessingIsActive = false;
|
|
54 |
vendor[appName].getTableInstanceById = (function(id) {
|
55 |
var allTables = this.getAllTableInstances();
|
56 |
|
57 |
-
for(var i = 0; i < allTables.length; i++) {
|
58 |
-
if(allTables[i].table_id == id) {
|
59 |
return allTables[i];
|
60 |
}
|
61 |
}
|
@@ -65,8 +65,8 @@ var g_stbServerSideProcessingIsActive = false;
|
|
65 |
vendor[appName].getTableInstanceByViewId = (function(viewId) {
|
66 |
var allTables = this.getAllTableInstances();
|
67 |
|
68 |
-
for(var i = 0; i < allTables.length; i++) {
|
69 |
-
if(allTables[i].table_view_id == viewId) {
|
70 |
return allTables[i];
|
71 |
}
|
72 |
}
|
@@ -76,8 +76,8 @@ var g_stbServerSideProcessingIsActive = false;
|
|
76 |
vendor[appName].removeTableInstanceByViewId = (function(viewId) {
|
77 |
var allTables = this.getAllTableInstances();
|
78 |
|
79 |
-
for(var i = 0; i < allTables.length; i++) {
|
80 |
-
if(allTables[i].table_view_id == viewId) {
|
81 |
allTables.splice(i, 1);
|
82 |
return true;
|
83 |
}
|
@@ -102,16 +102,16 @@ var g_stbServerSideProcessingIsActive = false;
|
|
102 |
var allRuleJS = this.getAllRuleJSInstances(),
|
103 |
viewId = table.data('view-id');
|
104 |
|
105 |
-
if(!allRuleJS[viewId]) {
|
106 |
-
|
107 |
}
|
108 |
return allRuleJS[viewId];
|
109 |
});
|
110 |
|
111 |
vendor[appName].request = (function(route, data) {
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
if (!$.isPlainObject(data)) {
|
116 |
data = {};
|
117 |
}
|
@@ -120,263 +120,269 @@ var g_stbServerSideProcessingIsActive = false;
|
|
120 |
}
|
121 |
data.action = 'supsystic-tables';
|
122 |
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
|
|
|
|
|
|
|
|
170 |
|
171 |
return deferred.promise();
|
172 |
});
|
173 |
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
-
|
268 |
-
|
269 |
-
|
270 |
-
|
271 |
-
|
272 |
-
|
273 |
-
|
274 |
-
|
275 |
-
|
276 |
-
|
277 |
-
|
278 |
-
|
279 |
-
|
280 |
-
|
281 |
-
|
282 |
-
|
283 |
-
|
284 |
-
|
285 |
-
|
286 |
-
|
287 |
-
|
288 |
-
|
289 |
-
|
290 |
-
|
291 |
-
|
292 |
-
|
293 |
-
|
294 |
-
|
295 |
-
|
296 |
-
|
297 |
-
|
298 |
-
|
299 |
-
|
300 |
-
|
301 |
-
|
302 |
-
|
303 |
-
|
304 |
-
|
305 |
-
|
306 |
-
|
307 |
-
|
308 |
-
|
309 |
-
|
310 |
-
|
311 |
-
|
312 |
-
|
313 |
-
|
314 |
-
|
315 |
-
|
316 |
-
|
317 |
-
|
318 |
-
|
319 |
-
|
320 |
-
|
321 |
-
|
322 |
-
|
323 |
-
|
324 |
-
|
325 |
-
|
326 |
-
|
327 |
-
|
328 |
-
|
329 |
-
|
330 |
-
|
331 |
-
|
332 |
-
|
333 |
-
|
334 |
-
|
335 |
-
|
336 |
-
|
337 |
-
|
338 |
-
|
339 |
-
|
340 |
-
|
341 |
-
|
342 |
-
|
343 |
-
|
344 |
-
|
345 |
-
|
346 |
-
|
347 |
-
|
348 |
-
|
349 |
-
|
350 |
-
|
351 |
-
|
352 |
-
|
353 |
-
|
354 |
-
|
355 |
-
|
356 |
-
|
357 |
-
|
358 |
-
|
359 |
-
|
360 |
|
361 |
vendor[appName].createSpinner = (function(elem) {
|
362 |
elem = typeof(elem) != 'undefined' ? elem : false;
|
363 |
|
364 |
-
if(elem) {
|
365 |
var icon = elem.attr('disabled', true).find('.fa');
|
366 |
|
367 |
-
if(icon) {
|
368 |
icon.data('icon', icon.attr('class'));
|
369 |
icon.attr('class', 'fa fa-spinner fa-spin');
|
370 |
}
|
371 |
} else {
|
372 |
-
return $('<i/>', {
|
|
|
|
|
373 |
}
|
374 |
});
|
375 |
|
376 |
vendor[appName].deleteSpinner = (function(elem) {
|
377 |
var icon = elem.attr('disabled', false).find('.fa');
|
378 |
|
379 |
-
if(icon) {
|
380 |
icon.attr('class', icon.data('icon'));
|
381 |
icon.data('icon', '');
|
382 |
}
|
@@ -387,92 +393,94 @@ var g_stbServerSideProcessingIsActive = false;
|
|
387 |
addInstance = typeof addInstance != 'undefined' ? addInstance : true;
|
388 |
|
389 |
var self = this,
|
390 |
-
|
391 |
features = $table.data('features'),
|
392 |
config = {},
|
393 |
responsiveMode = $table.data('responsive-mode'),
|
394 |
searchingSettings = $table.data('searching-settings'),
|
395 |
tableInstance = {},
|
396 |
defaultFeatures = {
|
397 |
-
autoWidth:
|
398 |
-
info:
|
399 |
-
ordering:
|
400 |
-
paging:
|
401 |
responsive: false,
|
402 |
-
searching:
|
403 |
-
stateSave:
|
404 |
bJQueryUI: true,
|
405 |
-
api:
|
406 |
-
retrieve:
|
407 |
processing: true,
|
408 |
initComplete: callback,
|
409 |
-
headerCallback: function(
|
410 |
$(thead).closest('thead').find('th').each(function() {
|
411 |
-
|
412 |
});
|
413 |
},
|
414 |
-
footerCallback: function(
|
415 |
$(tfoot).closest('tfoot').find('th').each(function() {
|
416 |
-
|
417 |
});
|
418 |
},
|
419 |
-
|
420 |
-
|
421 |
-
|
422 |
-
|
423 |
-
|
424 |
-
|
425 |
};
|
426 |
|
427 |
-
|
428 |
-
|
429 |
-
|
430 |
-
|
431 |
-
|
432 |
-
|
433 |
-
|
434 |
-
|
435 |
-
|
436 |
-
|
437 |
-
|
438 |
-
|
439 |
-
|
440 |
-
|
441 |
-
|
442 |
-
|
443 |
-
|
444 |
-
|
445 |
-
|
446 |
-
|
447 |
-
|
448 |
-
|
449 |
-
|
450 |
-
|
451 |
-
|
452 |
-
|
453 |
-
|
454 |
-
|
455 |
-
|
456 |
-
|
457 |
-
|
458 |
-
|
459 |
-
|
460 |
-
|
461 |
-
|
462 |
-
|
463 |
-
|
464 |
-
|
465 |
-
|
466 |
-
$.each(features, function
|
467 |
-
var featureName = this.replace(/[-_]([a-z])/g, function
|
|
|
|
|
468 |
config[featureName] = true;
|
469 |
});
|
470 |
-
|
471 |
-
|
472 |
-
|
473 |
-
|
474 |
-
|
475 |
-
|
476 |
if (toeInArray('searching', features) != -1 && searchingSettings) {
|
477 |
if (searchingSettings.minChars > 0 ||
|
478 |
searchingSettings.resultOnly ||
|
@@ -506,7 +514,7 @@ var g_stbServerSideProcessingIsActive = false;
|
|
506 |
return data.join(' ').toLowerCase().indexOf(searchValue.toLowerCase()) !== -1
|
507 |
}
|
508 |
});
|
509 |
-
$table.on('init.dt', function
|
510 |
if (!settings) {
|
511 |
return;
|
512 |
}
|
@@ -541,36 +549,38 @@ var g_stbServerSideProcessingIsActive = false;
|
|
541 |
});
|
542 |
}
|
543 |
if (searchingSettings.columnSearch) {
|
544 |
-
|
545 |
tPosition = inputTop ? 'thead' : 'tfoot';
|
546 |
-
|
547 |
var headerRow = $table.find('thead tr:first').find('th');
|
548 |
-
|
549 |
-
|
550 |
-
|
551 |
-
|
552 |
-
|
553 |
-
|
554 |
-
|
555 |
-
|
556 |
-
|
557 |
-
|
558 |
-
|
559 |
-
|
560 |
-
|
561 |
-
|
562 |
-
|
563 |
-
|
564 |
-
|
565 |
-
|
566 |
-
|
567 |
-
|
568 |
-
|
569 |
-
|
570 |
-
|
571 |
-
|
572 |
-
|
573 |
-
|
|
|
|
|
574 |
}
|
575 |
if (toeInArray('ordering', features) != -1) {
|
576 |
var sortingEnable = ['_all'],
|
@@ -579,13 +589,13 @@ var g_stbServerSideProcessingIsActive = false;
|
|
579 |
multipleSorting = $table.data('multiple-sorting'),
|
580 |
disableSorting = $table.data('disable-sorting');
|
581 |
|
582 |
-
if(!$table.data('head')) {
|
583 |
sortingDisable = ['_all'];
|
584 |
}
|
585 |
-
if(disableSorting && disableSorting.length) {
|
586 |
sortingDisable = disableSorting;
|
587 |
}
|
588 |
-
if(multipleSorting && multipleSorting.length) {
|
589 |
aaSorting = multipleSorting;
|
590 |
} else {
|
591 |
var columnsCount = $table.find('tr:first th').length,
|
@@ -593,7 +603,7 @@ var g_stbServerSideProcessingIsActive = false;
|
|
593 |
sortOrder = $table.data('sort-order') || 'asc',
|
594 |
columnNumber = sortColumn - 1;
|
595 |
|
596 |
-
if(columnNumber >= 0 && columnNumber < columnsCount) {
|
597 |
aaSorting.push([columnNumber, sortOrder]);
|
598 |
}
|
599 |
}
|
@@ -604,34 +614,34 @@ var g_stbServerSideProcessingIsActive = false;
|
|
604 |
// ];
|
605 |
config.aoColumnDefs = {};
|
606 |
config.aaSorting = aaSorting;
|
607 |
-
|
608 |
}
|
609 |
if ($table.data('pagination-length')) {
|
610 |
var paginationLength = String($table.data('pagination-length'));
|
611 |
|
612 |
-
|
613 |
-
|
614 |
-
|
615 |
-
}
|
616 |
-
|
617 |
-
|
618 |
-
|
619 |
-
|
620 |
-
|
621 |
-
|
622 |
-
|
623 |
-
|
624 |
-
|
625 |
-
|
626 |
-
|
627 |
-
|
628 |
-
|
629 |
-
|
630 |
-
|
631 |
-
|
632 |
-
|
633 |
-
|
634 |
-
|
635 |
if (responsiveMode == 0) {
|
636 |
// Responsive Mode: Standart Responsive Mode
|
637 |
var labelStyles = '<style>',
|
@@ -661,9 +671,12 @@ var g_stbServerSideProcessingIsActive = false;
|
|
661 |
}
|
662 |
}
|
663 |
}, 150));
|
664 |
-
if(g_stbServerSideProcessing) {
|
665 |
$table.find('td').each(function() {
|
666 |
-
$(this).css({
|
|
|
|
|
|
|
667 |
});
|
668 |
}
|
669 |
});
|
@@ -671,16 +684,16 @@ var g_stbServerSideProcessingIsActive = false;
|
|
671 |
// Responsive Mode: Automatic Column Hiding
|
672 |
config.responsive = {
|
673 |
details: {
|
674 |
-
renderer: function
|
675 |
var $table = $(api.table().node()),
|
676 |
$subTable = $('<table/>');
|
677 |
|
678 |
-
$.each(columns, function
|
679 |
if (col.hidden) {
|
680 |
var $cell = $(api.cell(col.rowIndex, col.columnIndex).node()).clone(),
|
681 |
-
markup = '<tr data-dt-row="'+col.rowIndex+'" data-dt-column="'+col.columnIndex+'">';
|
682 |
if ($table.data('head') == 'on') {
|
683 |
-
|
684 |
var $headerContent = tableHeadTr.find('th').eq(col.columnIndex).html();
|
685 |
markup += '<td>';
|
686 |
if ($headerContent) {
|
@@ -691,10 +704,10 @@ var g_stbServerSideProcessingIsActive = false;
|
|
691 |
markup += '</tr>';
|
692 |
$cell.after(
|
693 |
$('<td>')
|
694 |
-
|
695 |
-
|
696 |
-
|
697 |
-
|
698 |
);
|
699 |
$subTable.append($(markup).append($cell.addClass('collapsed').show()));
|
700 |
}
|
@@ -704,39 +717,39 @@ var g_stbServerSideProcessingIsActive = false;
|
|
704 |
}
|
705 |
};
|
706 |
$table.on('responsive-resize.dt', function(event, api, columns) {
|
707 |
-
|
708 |
-
|
709 |
-
|
710 |
-
|
711 |
-
|
712 |
-
|
713 |
-
|
714 |
-
|
715 |
-
|
716 |
-
|
717 |
-
|
718 |
-
|
719 |
-
|
720 |
-
|
721 |
-
|
722 |
-
|
723 |
-
|
724 |
-
|
725 |
-
|
726 |
-
|
727 |
-
|
728 |
-
|
729 |
-
|
730 |
-
|
731 |
if ($table.width() > $table.parent().width()) {
|
732 |
-
|
733 |
-
|
734 |
api.responsive.recalc();
|
735 |
return;
|
736 |
}
|
737 |
for (var i = 0, len = columns.length; i < len; i++) {
|
738 |
if (columns[i]) {
|
739 |
-
|
740 |
var $this = $(this);
|
741 |
var $cell = $(api.cell(
|
742 |
$this.data('cell-row'),
|
@@ -751,26 +764,31 @@ var g_stbServerSideProcessingIsActive = false;
|
|
751 |
}
|
752 |
}
|
753 |
if ($table.data('merged')) {
|
754 |
-
|
755 |
$table.find('td[data-hide]').show();
|
756 |
-
$table.find('td[data-rowspan]').attr({
|
757 |
-
|
|
|
|
|
|
|
|
|
|
|
758 |
});
|
759 |
} else if (responsiveMode === 2) {
|
760 |
// Responsive Mode: Horizontal Scroll
|
761 |
config.scrollX = true;
|
762 |
config.bAutoWidth = false;
|
763 |
var firstRow = $table.find('tbody tr:first-child td');
|
764 |
-
if(firstRow.length) {
|
765 |
-
|
766 |
-
|
767 |
-
|
768 |
-
|
769 |
-
|
770 |
-
|
771 |
}
|
772 |
}
|
773 |
-
if(responsiveMode === 2 || responsiveMode === 3) {
|
774 |
// Responsive Mode: 2 - Horizontal Scroll, 3 - Disable Responsivity
|
775 |
var fixedHead = $table.data('head') && $table.data('fixed-head'),
|
776 |
fixedFoot = $table.data('foot') && $table.data('fixed-foot'),
|
@@ -789,7 +807,7 @@ var g_stbServerSideProcessingIsActive = false;
|
|
789 |
//if (fixedFoot) {
|
790 |
// config.fixedHeader.footer = true;
|
791 |
//}
|
792 |
-
if(fixedHead || fixedFoot) {
|
793 |
config.scrollY = $table.data('fixed-height');
|
794 |
config.scrollCollapse = true;
|
795 |
}
|
@@ -809,11 +827,11 @@ var g_stbServerSideProcessingIsActive = false;
|
|
809 |
translation = langData || {},
|
810 |
override = $table.data('override');
|
811 |
|
812 |
-
if(typeof translation != 'object') {
|
813 |
-
translation = {};
|
814 |
}
|
815 |
$.each(override, function(key, value) {
|
816 |
-
if(value.length) {
|
817 |
translation[key] = value;
|
818 |
// We need to support old DT format, cuz some languages use it
|
819 |
translation['s' + key.charAt(0).toUpperCase() + key.substr(1)] = value;
|
@@ -823,9 +841,13 @@ var g_stbServerSideProcessingIsActive = false;
|
|
823 |
|
824 |
var ajaxSource = {};
|
825 |
|
826 |
-
if(g_stbServerSideProcessing) {
|
827 |
var nonce = (typeof DTGS_NONCE !== "undefined") ? DTGS_NONCE : DTGS_NONCE_FRONTEND;
|
828 |
-
var route = {
|
|
|
|
|
|
|
|
|
829 |
loadedRows = [],
|
830 |
loadedCells = [],
|
831 |
headerRowsCount = ($table.data('head') == 'on' ? $table.data('head-rows-count') : 0),
|
@@ -841,29 +863,30 @@ var g_stbServerSideProcessingIsActive = false;
|
|
841 |
route: route,
|
842 |
id: $table.data('id'),
|
843 |
searchParams: searchingSettings,
|
844 |
-
searchValue: function
|
845 |
var input = $('#' + $table.attr('id') + '_filter.dataTables_filter').find('input');
|
846 |
return (input.length ? input.val() : '');
|
847 |
},
|
848 |
header: headerRowsCount,
|
849 |
footer: footerRowsCount,
|
850 |
-
|
851 |
-
|
852 |
-
|
853 |
-
|
|
|
854 |
var json = jQuery.parseJSON(data),
|
855 |
rows = $(json.rows).find('tr'),
|
856 |
aData = [];
|
857 |
|
858 |
loadedRows = [];
|
859 |
loadedCells = [];
|
860 |
-
for(var i = 0; i < rows.length; i++) {
|
861 |
var row = rows[i];
|
862 |
loadedRows.push(row.attributes);
|
863 |
var cells = $(row).find('td'),
|
864 |
attrs = [],
|
865 |
vals = [];
|
866 |
-
for(var j = 0; j < cells.length; j++) {
|
867 |
var cell = cells[j];
|
868 |
attrs.push(cell.attributes);
|
869 |
vals.push(cell.innerHTML);
|
@@ -873,181 +896,187 @@ var g_stbServerSideProcessingIsActive = false;
|
|
873 |
}
|
874 |
json.rows = '';
|
875 |
json.data = aData;
|
876 |
-
|
877 |
return JSON.stringify(json);
|
878 |
}
|
879 |
},
|
880 |
-
createdRow: function
|
881 |
-
if(typeof(loadedRows[dataIndex]) != 'undefined') {
|
882 |
-
$(loadedRows[dataIndex]).each(function
|
883 |
$(row).attr(this.name, this.value);
|
884 |
});
|
885 |
}
|
886 |
}
|
887 |
};
|
888 |
-
if(typeof(config.aoColumnDefs) == 'undefined' || jQuery.isEmptyObject(config.aoColumnDefs)) {
|
889 |
config.aoColumnDefs = [];
|
890 |
}
|
891 |
config.aoColumnDefs.push({
|
892 |
targets: '_all',
|
893 |
cellType: 'td',
|
894 |
-
createdCell: function
|
895 |
-
if(typeof(loadedCells[row][col]) != 'undefined') {
|
896 |
var rowspan = 1,
|
897 |
colspan = 1;
|
898 |
-
$(loadedCells[row][col]).each(function
|
899 |
if (this.name == 'data-rowspan' && this.value > 1) {
|
900 |
rowspan = this.value;
|
901 |
}
|
902 |
-
if(this.name == 'data-colspan' && this.value > 1) {
|
903 |
colspan = this.value;
|
904 |
}
|
905 |
});
|
906 |
-
if(rowspan > 1 || colspan > 1) {
|
907 |
var stopRow = row + parseInt(rowspan),
|
908 |
stopCol = col + parseInt(colspan),
|
909 |
startRow = colspan > 1 ? row : row + 1,
|
910 |
hide;
|
911 |
-
if(stopRow >= loadedCells.length) {
|
912 |
stopRow = loadedCells.length;
|
913 |
}
|
914 |
-
if(stopCol >= loadedCells[row].length) {
|
915 |
stopCol = loadedCells[row].length;
|
916 |
}
|
917 |
|
918 |
-
for(i = startRow; i < stopRow; i++) {
|
919 |
-
if(i > row) {
|
920 |
hide = document.createAttribute('data-hide');
|
921 |
hide.value = 'true';
|
922 |
loadedCells[i][col].setNamedItem(hide);
|
923 |
}
|
924 |
-
for(j = col + 1; j < stopCol; j++) {
|
925 |
hide = document.createAttribute('data-hide');
|
926 |
hide.value = 'true';
|
927 |
loadedCells[i][j].setNamedItem(hide);
|
928 |
}
|
929 |
}
|
930 |
}
|
931 |
-
$(loadedCells[row][col]).each(function
|
932 |
//if(this.name != 'data-formula') {
|
933 |
-
|
934 |
//}
|
935 |
});
|
936 |
}
|
937 |
}
|
938 |
});
|
939 |
}
|
940 |
-
|
941 |
-
|
942 |
-
|
943 |
-
|
944 |
-
|
945 |
-
|
946 |
-
|
947 |
-
|
948 |
-
|
949 |
-
|
950 |
-
|
951 |
-
|
952 |
-
|
953 |
-
|
954 |
-
|
955 |
-
|
956 |
-
|
957 |
-
|
958 |
-
|
959 |
-
|
|
|
|
|
|
|
|
|
960 |
"remove_row": {
|
961 |
-
|
962 |
-
|
963 |
-
|
964 |
-
|
965 |
},
|
966 |
"add_row_before": {
|
967 |
-
|
968 |
-
|
969 |
-
|
970 |
-
|
971 |
},
|
972 |
"add_row_after": {
|
973 |
-
|
974 |
-
|
975 |
-
|
976 |
-
|
977 |
},
|
978 |
"sep1": "---------",
|
979 |
-
"quit": {
|
980 |
-
|
981 |
-
|
982 |
-
|
983 |
-
|
984 |
-
|
985 |
-
|
986 |
-
|
987 |
-
|
988 |
-
|
989 |
-
|
990 |
-
|
991 |
-
|
992 |
-
|
993 |
-
|
994 |
-
|
995 |
-
|
996 |
-
|
997 |
-
|
998 |
-
|
999 |
-
|
1000 |
-
|
1001 |
-
|
1002 |
-
|
1003 |
-
|
1004 |
-
|
1005 |
-
|
1006 |
-
|
1007 |
-
|
1008 |
-
|
1009 |
-
|
1010 |
-
|
1011 |
-
|
1012 |
-
|
1013 |
-
|
1014 |
-
|
1015 |
-
|
1016 |
-
|
|
|
|
|
1017 |
|
1018 |
-
|
1019 |
|
1020 |
-
|
1021 |
|
1022 |
-
if(g_stbServerSideProcessing) {
|
1023 |
jQuery('.dataTables_processing').css('z-index', '10');
|
1024 |
} else {
|
1025 |
self.setColumnSearch($table);
|
1026 |
}
|
1027 |
-
|
1028 |
-
|
1029 |
-
|
1030 |
-
|
1031 |
-
|
1032 |
-
|
1033 |
-
|
1034 |
-
|
1035 |
-
|
1036 |
-
|
1037 |
-
|
1038 |
-
|
1039 |
-
|
1040 |
-
|
1041 |
-
|
1042 |
-
|
1043 |
-
|
1044 |
if (typeof $table.data('fixed-cols') !== 'undefined') {
|
1045 |
tableInstance.api().fixedColumns().update();
|
1046 |
}
|
1047 |
-
if(addInstance) {
|
1048 |
-
|
1049 |
}
|
1050 |
-
|
1051 |
});
|
1052 |
|
1053 |
/** Callback for displaying table after initializing
|
@@ -1055,10 +1084,10 @@ var g_stbServerSideProcessingIsActive = false;
|
|
1055 |
* @param {object} json - JSON data retrieved from the server if the ajax option was set. Otherwise undefined.
|
1056 |
*/
|
1057 |
vendor[appName].showTable = (function(settings, json) {
|
1058 |
-
var self = vendor[appName],
|
1059 |
-
|
1060 |
$tableWrap = $table.closest('.supsystic-tables-wrap'),
|
1061 |
-
|
1062 |
afterTableLoadedScriptString = $table.attr('data-after-table-loaded-script'),
|
1063 |
_ruleJS = self.setRuleJSInstance($table),
|
1064 |
responsiveMode = $table.data('responsive-mode'),
|
@@ -1067,17 +1096,17 @@ var g_stbServerSideProcessingIsActive = false;
|
|
1067 |
fixedColumns = $table.data('fixed-right') > 0 || $table.data('fixed-left') > 0,
|
1068 |
viewId = $table.data('view-id');
|
1069 |
|
1070 |
-
|
1071 |
-
|
1072 |
-
|
1073 |
-
|
1074 |
-
|
1075 |
-
|
1076 |
-
|
1077 |
-
|
1078 |
-
|
1079 |
-
|
1080 |
-
|
1081 |
if (!$table.data('head')) {
|
1082 |
$table.find('th').removeClass('sorting sorting_asc sorting_desc sorting_disabled');
|
1083 |
}
|
@@ -1086,83 +1115,83 @@ var g_stbServerSideProcessingIsActive = false;
|
|
1086 |
_ruleJS.init();
|
1087 |
|
1088 |
// Set formats
|
1089 |
-
|
1090 |
|
1091 |
|
1092 |
-
|
1093 |
-
|
1094 |
-
|
1095 |
-
|
1096 |
|
1097 |
// Show comments on tap
|
1098 |
if ('ontouchstart' in window || navigator.msMaxTouchPoints) {
|
1099 |
-
|
1100 |
-
}
|
1101 |
-
|
1102 |
-
|
1103 |
-
|
1104 |
-
|
1105 |
-
|
1106 |
-
|
1107 |
-
|
1108 |
-
|
1109 |
-
|
1110 |
-
|
1111 |
-
|
1112 |
-
|
1113 |
-
|
1114 |
-
|
1115 |
-
|
1116 |
-
|
1117 |
-
|
1118 |
-
if(typeof(self.setImgLightbox) == 'function'){
|
1119 |
self.setImgLightbox($table);
|
1120 |
}
|
1121 |
-
|
1122 |
|
1123 |
// Frontend fields
|
1124 |
-
if (typeof(self.createEditableFields) == 'function') {
|
1125 |
var $editableFields = $tableWrap.find('.editable'),
|
1126 |
$editfileFields = $tableWrap.find('.editfile'),
|
1127 |
$selectableFields = $tableWrap.find('.selectable'),
|
1128 |
$tableId = $table.data('id'),
|
1129 |
-
useEditableFields = typeof(useEdit) != 'undefined' && typeof(useEdit[$tableId]) != 'undefined'
|
1130 |
-
|
1131 |
-
|
1132 |
|
1133 |
-
if(useEditableFields || (SDT_DATA.isAdmin && SDT_DATA.isPro)) {
|
1134 |
if (typeof(self.setFrontendFields) == 'function') {
|
1135 |
-
|
1136 |
} else if (typeof(self.setAllFields) == 'function') {
|
1137 |
self.setAllFields($table, $editableFields, $selectableFields);
|
1138 |
} else {
|
1139 |
self.createEditableFields($table, $editableFields);
|
1140 |
self.createEditableFileFields($table, $editfileFields);
|
1141 |
}
|
1142 |
-
|
1143 |
-
|
1144 |
-
|
1145 |
$editfileFields.off('click.sup');
|
1146 |
-
|
1147 |
-
|
1148 |
-
|
1149 |
}
|
1150 |
}
|
1151 |
-
if(typeof(self.setImgLightbox) == 'function'){
|
1152 |
-
|
1153 |
}
|
1154 |
|
1155 |
-
|
1156 |
-
|
1157 |
-
|
1158 |
-
|
1159 |
-
|
1160 |
-
|
1161 |
-
|
1162 |
|
1163 |
-
|
1164 |
|
1165 |
-
|
1166 |
|
1167 |
// Show table
|
1168 |
$tableWrap.prev('.supsystic-table-loader').hide();
|
@@ -1170,100 +1199,102 @@ var g_stbServerSideProcessingIsActive = false;
|
|
1170 |
|
1171 |
self.fixSortingForMultipleHeader($table);
|
1172 |
|
1173 |
-
if(responsiveMode === 2 || fixedHeader || fixedFooter) {
|
1174 |
// Responsive Mode: Horizontal Scroll
|
1175 |
$(window).on('load resize orientationchange', $table, function(event) {
|
1176 |
-
|
1177 |
tBodyTable = tBody.find('.supsystic-table');
|
1178 |
|
1179 |
-
if(tBody.width() > tBodyTable.width() || $tableWrap.width() > tBodyTable.width()) {
|
1180 |
-
|
1181 |
-
|
1182 |
-
|
1183 |
-
|
1184 |
-
|
1185 |
-
|
1186 |
-
|
1187 |
-
if(tBody.isHorizontallyScrollable()){
|
1188 |
-
tBody.css({
|
1189 |
-
|
|
|
|
|
1190 |
tBody.removeStyle('border-bottom');
|
1191 |
}
|
1192 |
var table = self.getTableInstanceById($table.data('id'));
|
1193 |
-
if(typeof table.fnAdjustColumnSizing == 'function'
|
1194 |
-
|
1195 |
-
|
1196 |
-
|
1197 |
-
|
1198 |
});
|
1199 |
|
1200 |
// need resize twice to get better frontend view
|
1201 |
var tBody = $tableWrap.find('.dataTables_scrollBody'),
|
1202 |
-
|
1203 |
|
1204 |
-
if(tBodyTable.is(":visible")){
|
1205 |
setTimeout(function() {
|
1206 |
$(window).trigger('load');
|
1207 |
}, 200);
|
1208 |
}
|
1209 |
var $tHeadTable = $tableWrap.find('.dataTables_scrollHead .supsystic-table');
|
1210 |
-
if($tHeadTable.length) {
|
1211 |
self.formatDataAtTable($tHeadTable, true);
|
1212 |
}
|
1213 |
-
|
1214 |
-
if($tFootTable.length) {
|
1215 |
self.formatDataAtTable($tFootTable, true);
|
1216 |
}
|
1217 |
}
|
1218 |
// Correct width of fixed header / footer
|
1219 |
-
if(fixedHeader || fixedFooter) {
|
1220 |
$table.api().fixedHeader.adjust();
|
1221 |
|
1222 |
-
|
1223 |
setTimeout(function() {
|
1224 |
-
|
1225 |
-
|
1226 |
-
|
1227 |
-
|
1228 |
|
1229 |
el.each(function() {
|
1230 |
-
|
1231 |
-
|
1232 |
-
|
1233 |
-
|
1234 |
-
|
1235 |
-
|
1236 |
-
|
1237 |
-
|
1238 |
-
|
1239 |
-
|
1240 |
-
|
1241 |
-
|
1242 |
-
|
1243 |
-
|
1244 |
-
|
1245 |
-
|
1246 |
-
|
1247 |
-
|
1248 |
}
|
1249 |
|
1250 |
// Correct width of fixed columns
|
1251 |
-
if(fixedColumns) {
|
1252 |
$table.api().fixedColumns().relayout();
|
1253 |
|
1254 |
//var tableCaption = $('.dataTables_scrollHead caption');
|
1255 |
-
|
1256 |
//if(tableCaption.length) {
|
1257 |
-
|
1258 |
//}
|
1259 |
}
|
1260 |
/* Fix for Horizontal scroll responsive mode if table has different width for one column in header and body */
|
1261 |
-
if(!fixedHeader && !fixedFooter && responsiveMode === 2 && toeInArray('auto_width', $table.data('features')) == -1) {
|
1262 |
$tableWrap.find('.dataTables_scrollBody table thead tr:first-child th').each(function() {
|
1263 |
var tableWidth = $table.width(),
|
1264 |
tableWrapWidth = $tableWrap.width();
|
1265 |
|
1266 |
-
if(tableWrapWidth > tableWidth){
|
1267 |
$tableWrap
|
1268 |
.find('.dataTables_scrollHeadInner, .dataTables_scrollBody, .dataTables_scrollFootInner')
|
1269 |
.addClass('fit-content');
|
@@ -1285,25 +1316,25 @@ var g_stbServerSideProcessingIsActive = false;
|
|
1285 |
}
|
1286 |
}
|
1287 |
|
1288 |
-
if(g_stbServerSideProcessing) {
|
1289 |
-
$table.on('draw.dt', function
|
1290 |
var searching = $table.data('searching-settings');
|
1291 |
-
if(searching && ('columnSearch' in searching) && searching.columnSearch == 'on') {
|
1292 |
self.setColumnSearch($table);
|
1293 |
}
|
1294 |
self.getTableInstanceByViewId(viewId).fnFakeRowspan();
|
1295 |
-
if(responsiveMode === 0 || responsiveMode === 2) {
|
1296 |
$(window).trigger('load');
|
1297 |
}
|
1298 |
}).trigger('draw.dt');
|
1299 |
}
|
1300 |
|
1301 |
-
var tblEditLink = 'g_stbTblEditLink_'+ $table.data('id'),
|
1302 |
-
|
1303 |
|
1304 |
if (showTblEditLink && jQuery(tableSelector).closest('.supsystic-tables-wrap').find('.tblEditLink').length === 0) {
|
1305 |
jQuery(tableSelector).closest('.supsystic-tables-wrap').append(showTblEditLink);
|
1306 |
-
|
1307 |
|
1308 |
function b64DecodeUnicode(str) {
|
1309 |
return decodeURIComponent(Array.prototype.map.call(atob(str), function(c) {
|
@@ -1312,151 +1343,151 @@ var g_stbServerSideProcessingIsActive = false;
|
|
1312 |
}
|
1313 |
});
|
1314 |
|
1315 |
-
|
1316 |
-
|
1317 |
-
|
1318 |
-
|
1319 |
-
|
1320 |
-
|
1321 |
-
|
1322 |
-
|
1323 |
-
|
1324 |
-
|
1325 |
-
|
1326 |
-
|
1327 |
-
|
1328 |
-
|
1329 |
-
|
1330 |
-
|
1331 |
-
|
1332 |
-
|
1333 |
-
|
1334 |
-
|
1335 |
-
|
1336 |
-
|
1337 |
-
|
1338 |
-
|
1339 |
-
|
1340 |
-
|
1341 |
-
|
1342 |
-
|
1343 |
-
|
1344 |
-
|
1345 |
-
|
1346 |
-
|
1347 |
-
|
1348 |
-
|
1349 |
-
|
1350 |
-
|
1351 |
-
|
1352 |
-
|
1353 |
-
|
1354 |
-
|
1355 |
-
|
1356 |
-
|
1357 |
-
|
1358 |
-
|
1359 |
-
|
1360 |
-
|
1361 |
-
|
1362 |
-
|
1363 |
-
|
1364 |
-
|
1365 |
-
|
1366 |
-
|
1367 |
-
|
1368 |
-
|
1369 |
-
|
1370 |
-
|
1371 |
-
|
1372 |
-
|
1373 |
-
|
1374 |
-
|
1375 |
-
|
1376 |
-
|
1377 |
-
|
1378 |
-
|
1379 |
-
|
1380 |
-
|
1381 |
-
|
1382 |
-
|
1383 |
-
|
1384 |
-
|
1385 |
-
|
1386 |
-
|
1387 |
-
|
1388 |
-
|
1389 |
-
|
1390 |
-
|
1391 |
-
|
1392 |
-
|
1393 |
-
|
1394 |
-
|
1395 |
-
|
1396 |
-
|
1397 |
-
|
1398 |
-
|
1399 |
-
|
1400 |
|
1401 |
vendor[appName]._contactFormBtnCellClb = (function(e) {
|
1402 |
-
|
1403 |
-
|
1404 |
-
|
1405 |
-
|
1406 |
-
|
1407 |
-
|
1408 |
-
|
1409 |
-
|
1410 |
-
|
1411 |
-
|
1412 |
-
|
1413 |
-
|
1414 |
-
|
1415 |
-
|
1416 |
-
|
1417 |
-
|
1418 |
-
|
1419 |
-
|
1420 |
-
|
1421 |
-
|
1422 |
-
|
1423 |
-
|
1424 |
-
|
1425 |
-
|
1426 |
-
|
1427 |
-
|
1428 |
-
|
1429 |
-
|
1430 |
|
1431 |
vendor[appName].setColumnSearch = (function(table) {
|
1432 |
-
|
1433 |
|
1434 |
-
|
1435 |
-
|
1436 |
inputs = table.parents('.dataTables_wrapper:first').find('.stbColumnsSearchWrapper .search-column');
|
1437 |
-
|
1438 |
return;
|
1439 |
-
|
1440 |
-
|
1441 |
-
|
1442 |
-
|
1443 |
-
|
1444 |
-
|
1445 |
-
|
1446 |
-
|
1447 |
-
|
1448 |
-
|
1449 |
-
|
1450 |
-
|
1451 |
-
|
1452 |
-
|
1453 |
-
|
1454 |
-
|
1455 |
});
|
1456 |
|
1457 |
vendor[appName].setCopyEvents = (function(obj, events) {
|
1458 |
-
$.each(events, function
|
1459 |
-
$.each(handlers, function
|
1460 |
$(obj).unbind(event).bind(event, handler);
|
1461 |
});
|
1462 |
});
|
@@ -1467,38 +1498,38 @@ var g_stbServerSideProcessingIsActive = false;
|
|
1467 |
var $table = (table instanceof $ ? table : $(table)),
|
1468 |
$tableWrap = $table.closest('.supsystic-tables-wrap');
|
1469 |
|
1470 |
-
|
1471 |
$tableWrap.prev('.supsystic-table-loader').hide();
|
1472 |
$tableWrap.css('visibility', 'visible');
|
1473 |
});
|
1474 |
|
1475 |
vendor[appName].fixSortingForMultipleHeader = (function(table) {
|
1476 |
-
if(table.data('head-rows-count') > 1 && table.data('sort-order')) {
|
1477 |
var thead = table.find('thead tr').get().reverse();
|
1478 |
|
1479 |
// Fix of sorting for table with multiple header (when header has more than 1 row)
|
1480 |
-
if(table.data('head')) {
|
1481 |
-
$.each(table.find('thead tr:last-child th'), function
|
1482 |
var th = $(element),
|
1483 |
nthChild = index + 1;
|
1484 |
|
1485 |
-
if(th.data('hide')) {
|
1486 |
$(thead).each(function() {
|
1487 |
var item = $(this).find('th:nth-child(' + nthChild + ')');
|
1488 |
|
1489 |
-
if(!item.data('hide')) {
|
1490 |
item.addClass('sorting');
|
1491 |
item.click(function() {
|
1492 |
th.trigger('click');
|
1493 |
-
if(th.hasClass('sorting')) {
|
1494 |
item.removeClass('sorting_asc');
|
1495 |
item.removeClass('sorting_desc');
|
1496 |
item.addClass('sorting');
|
1497 |
-
} else if(th.hasClass('sorting_asc')) {
|
1498 |
item.removeClass('sorting');
|
1499 |
item.removeClass('sorting_desc');
|
1500 |
item.addClass('sorting_asc');
|
1501 |
-
} else if(th.hasClass('sorting_desc')) {
|
1502 |
item.removeClass('sorting');
|
1503 |
item.removeClass('sorting_asc');
|
1504 |
item.addClass('sorting_desc');
|
@@ -1514,10 +1545,10 @@ var g_stbServerSideProcessingIsActive = false;
|
|
1514 |
});
|
1515 |
|
1516 |
vendor[appName].formatDataAtTable = (function(table, correctSorting) {
|
1517 |
-
|
1518 |
|
1519 |
var self = this,
|
1520 |
-
|
1521 |
generalCurrencyFormat = table.data('currency-format'),
|
1522 |
generalPercentFormat = table.data('percent-format'),
|
1523 |
generalDateFormat = table.data('date-format'),
|
@@ -1526,12 +1557,12 @@ var g_stbServerSideProcessingIsActive = false;
|
|
1526 |
table.find('th, td').each(function(index, el) {
|
1527 |
var $this = $(this);
|
1528 |
|
1529 |
-
if((table.data('auto-index') != 'off' && $this.is(':first-child'))
|
1530 |
-
|
1531 |
-
|
1532 |
-
|
1533 |
-
|
1534 |
-
|
1535 |
// Break current .each iteration
|
1536 |
return;
|
1537 |
}
|
@@ -1544,180 +1575,182 @@ var g_stbServerSideProcessingIsActive = false;
|
|
1544 |
value = $.trim($this.html()),
|
1545 |
noFormat = false;
|
1546 |
|
1547 |
-
|
1548 |
-
|
1549 |
-
|
1550 |
-
|
1551 |
-
|
1552 |
-
|
1553 |
-
|
1554 |
-
|
1555 |
-
|
1556 |
-
|
1557 |
-
|
1558 |
-
|
1559 |
-
|
1560 |
-
|
1561 |
-
|
1562 |
-
|
1563 |
-
|
1564 |
-
|
1565 |
-
|
1566 |
-
|
1567 |
-
|
1568 |
-
|
1569 |
-
|
1570 |
-
|
1571 |
-
|
1572 |
-
|
1573 |
-
|
1574 |
-
|
1575 |
-
|
1576 |
-
|
1577 |
-
|
1578 |
-
|
1579 |
-
|
1580 |
-
|
1581 |
-
|
1582 |
-
|
1583 |
-
|
1584 |
-
|
1585 |
-
|
1586 |
-
|
1587 |
-
|
1588 |
-
|
1589 |
-
|
1590 |
-
|
1591 |
-
|
1592 |
-
|
1593 |
-
|
1594 |
-
|
1595 |
-
|
1596 |
-
|
1597 |
-
|
1598 |
-
|
1599 |
-
|
1600 |
-
|
1601 |
-
|
1602 |
-
|
1603 |
-
|
1604 |
-
|
1605 |
-
|
1606 |
-
|
1607 |
-
|
1608 |
-
|
1609 |
-
|
1610 |
-
|
1611 |
-
|
1612 |
-
|
1613 |
-
|
1614 |
-
|
1615 |
-
|
1616 |
-
|
1617 |
-
|
1618 |
-
|
1619 |
-
|
1620 |
-
|
1621 |
-
|
1622 |
-
|
1623 |
-
|
1624 |
-
|
1625 |
-
|
1626 |
-
|
1627 |
-
|
1628 |
-
|
1629 |
-
|
1630 |
-
|
1631 |
-
|
1632 |
-
|
1633 |
-
|
1634 |
-
|
1635 |
-
|
1636 |
-
|
1637 |
-
|
1638 |
-
|
1639 |
-
|
1640 |
-
|
1641 |
-
|
1642 |
-
|
1643 |
-
|
1644 |
-
|
1645 |
-
|
1646 |
-
|
1647 |
-
|
1648 |
-
|
1649 |
-
|
1650 |
-
|
1651 |
-
|
1652 |
-
|
1653 |
-
|
1654 |
-
|
1655 |
-
|
1656 |
-
|
1657 |
-
|
1658 |
-
|
1659 |
-
|
1660 |
-
|
1661 |
-
|
1662 |
-
|
1663 |
-
|
1664 |
-
|
1665 |
-
|
1666 |
-
|
1667 |
-
|
1668 |
-
|
1669 |
-
|
1670 |
-
|
1671 |
-
|
1672 |
-
|
1673 |
-
|
1674 |
-
|
1675 |
-
|
1676 |
-
|
1677 |
-
|
1678 |
-
|
1679 |
-
|
1680 |
-
|
1681 |
-
|
1682 |
-
|
1683 |
-
|
1684 |
-
|
1685 |
-
|
1686 |
-
|
1687 |
-
|
1688 |
-
|
1689 |
-
|
1690 |
-
|
1691 |
-
|
1692 |
-
|
1693 |
-
|
1694 |
-
|
1695 |
-
|
1696 |
-
|
1697 |
-
|
1698 |
-
|
1699 |
-
|
1700 |
-
|
1701 |
-
|
1702 |
-
|
1703 |
-
|
1704 |
-
|
1705 |
-
|
1706 |
-
|
1707 |
-
|
1708 |
-
|
1709 |
-
|
1710 |
-
|
1711 |
-
|
1712 |
-
|
1713 |
-
|
1714 |
-
|
1715 |
-
|
1716 |
-
|
1717 |
-
|
1718 |
-
|
1719 |
-
|
1720 |
-
|
|
|
|
|
1721 |
$this.html(value);
|
1722 |
});
|
1723 |
});
|
@@ -1731,36 +1764,36 @@ var g_stbServerSideProcessingIsActive = false;
|
|
1731 |
return false;
|
1732 |
});
|
1733 |
|
1734 |
-
vendor[appName].prepareFormulaToParse = (function
|
1735 |
-
|
1736 |
-
|
1737 |
-
|
1738 |
-
|
1739 |
-
|
1740 |
-
|
1741 |
-
|
1742 |
-
|
1743 |
-
|
1744 |
-
|
1745 |
-
|
1746 |
-
|
1747 |
-
|
1748 |
-
|
1749 |
-
|
1750 |
-
|
1751 |
-
|
1752 |
-
|
1753 |
-
|
1754 |
-
|
1755 |
-
|
1756 |
|
1757 |
vendor[appName].Base64 = {
|
1758 |
-
_keyStr
|
1759 |
-
encode
|
1760 |
var self = vendor[appName].Base64,
|
1761 |
-
|
1762 |
-
|
1763 |
-
|
1764 |
|
1765 |
input = self._utf8_encode(input);
|
1766 |
|
@@ -1780,15 +1813,15 @@ var g_stbServerSideProcessingIsActive = false;
|
|
1780 |
enc4 = 64;
|
1781 |
}
|
1782 |
output = output +
|
1783 |
-
|
1784 |
-
|
1785 |
}
|
1786 |
|
1787 |
return output;
|
1788 |
},
|
1789 |
// private method for UTF-8 encoding
|
1790 |
-
_utf8_encode
|
1791 |
-
string = string.replace(/\r\n/g,"\n");
|
1792 |
var utftext = "";
|
1793 |
|
1794 |
for (var n = 0; n < string.length; n++) {
|
@@ -1797,12 +1830,10 @@ var g_stbServerSideProcessingIsActive = false;
|
|
1797 |
|
1798 |
if (c < 128) {
|
1799 |
utftext += String.fromCharCode(c);
|
1800 |
-
}
|
1801 |
-
else if((c > 127) && (c < 2048)) {
|
1802 |
utftext += String.fromCharCode((c >> 6) | 192);
|
1803 |
utftext += String.fromCharCode((c & 63) | 128);
|
1804 |
-
}
|
1805 |
-
else {
|
1806 |
utftext += String.fromCharCode((c >> 12) | 224);
|
1807 |
utftext += String.fromCharCode(((c >> 6) & 63) | 128);
|
1808 |
utftext += String.fromCharCode((c & 63) | 128);
|
@@ -1814,147 +1845,165 @@ var g_stbServerSideProcessingIsActive = false;
|
|
1814 |
}
|
1815 |
};
|
1816 |
|
1817 |
-
|
1818 |
-
|
1819 |
-
|
1820 |
-
|
1821 |
-
|
1822 |
-
|
1823 |
-
|
1824 |
-
|
1825 |
-
|
1826 |
-
|
1827 |
-
|
1828 |
-
|
1829 |
-
|
1830 |
-
|
1831 |
-
|
1832 |
-
|
1833 |
-
|
1834 |
-
|
1835 |
-
|
1836 |
-
|
1837 |
-
|
1838 |
-
|
1839 |
-
|
1840 |
-
|
1841 |
-
|
1842 |
-
|
1843 |
-
|
1844 |
-
|
1845 |
-
|
1846 |
-
|
1847 |
-
|
1848 |
-
|
1849 |
-
|
1850 |
-
|
1851 |
-
|
1852 |
-
|
1853 |
-
|
1854 |
-
|
1855 |
-
|
1856 |
-
|
1857 |
-
|
1858 |
-
|
1859 |
-
|
1860 |
-
|
1861 |
-
|
1862 |
-
|
1863 |
-
|
1864 |
-
|
1865 |
-
|
1866 |
-
|
1867 |
-
|
1868 |
-
|
1869 |
-
|
1870 |
-
|
1871 |
-
|
1872 |
-
|
1873 |
-
|
1874 |
-
|
1875 |
-
|
1876 |
-
|
1877 |
-
|
1878 |
-
|
1879 |
-
|
1880 |
-
|
1881 |
-
|
1882 |
-
|
1883 |
-
|
1884 |
-
|
1885 |
-
|
1886 |
-
|
1887 |
-
|
1888 |
-
|
1889 |
-
|
1890 |
-
|
1891 |
-
|
1892 |
-
|
1893 |
-
|
1894 |
-
|
1895 |
-
|
1896 |
-
|
1897 |
-
|
1898 |
-
|
1899 |
-
|
1900 |
-
|
1901 |
-
|
1902 |
-
|
1903 |
-
|
1904 |
-
|
1905 |
-
|
1906 |
-
|
1907 |
-
|
1908 |
-
|
1909 |
-
|
1910 |
-
|
1911 |
-
|
1912 |
-
|
1913 |
-
|
1914 |
-
|
1915 |
-
|
1916 |
-
|
1917 |
-
|
1918 |
-
|
1919 |
-
|
1920 |
-
|
1921 |
-
|
1922 |
-
|
1923 |
-
|
1924 |
-
|
1925 |
-
|
1926 |
-
|
1927 |
-
|
1928 |
-
|
1929 |
-
|
1930 |
-
|
1931 |
-
|
1932 |
-
|
1933 |
-
|
1934 |
-
|
1935 |
-
|
1936 |
-
|
1937 |
-
|
1938 |
-
|
1939 |
-
|
1940 |
-
|
1941 |
-
|
1942 |
-
|
1943 |
-
|
1944 |
-
|
1945 |
-
|
1946 |
-
|
1947 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1948 |
}
|
1949 |
|
1950 |
}(window.supsystic = window.supsystic || {}, window.jQuery, window));
|
1951 |
|
1952 |
// For compatibility to old PRO versions
|
1953 |
function classesRegexp() {
|
1954 |
-
|
1955 |
}
|
|
|
1956 |
function getAdminCellStylesElem() {
|
1957 |
-
|
1958 |
}
|
1959 |
|
1960 |
/**
|
@@ -1962,12 +2011,12 @@ function getAdminCellStylesElem() {
|
|
1962 |
* @return mixed - key that was found element or -1 if not
|
1963 |
*/
|
1964 |
function toeInArray(needle, haystack) {
|
1965 |
-
if(typeof(haystack) == 'object') {
|
1966 |
-
for(var k in haystack) {
|
1967 |
-
if(haystack[
|
1968 |
return k;
|
1969 |
}
|
1970 |
-
} else if(typeof(haystack) == 'array') {
|
1971 |
return jQuery.inArray(needle, haystack);
|
1972 |
}
|
1973 |
return -1;
|
@@ -2018,7 +2067,7 @@ function toeInArray(needle, haystack) {
|
|
2018 |
return false;
|
2019 |
};
|
2020 |
|
2021 |
-
$.extend($.expr.pseudos || $.expr[
|
2022 |
"vertically-scrollable": function(a, i, m) {
|
2023 |
return $(a).isVerticallyScrollable();
|
2024 |
},
|
@@ -2027,95 +2076,96 @@ function toeInArray(needle, haystack) {
|
|
2027 |
}
|
2028 |
});
|
2029 |
|
2030 |
-
$.fn.removeStyle = function(style)
|
2031 |
-
{
|
2032 |
var search = new RegExp(style + '[^;]+;?', 'g');
|
2033 |
|
2034 |
-
return this.each(function()
|
2035 |
-
|
2036 |
-
$(this).attr('style', function(i, style)
|
2037 |
-
{
|
2038 |
return style && style.replace(search, '');
|
2039 |
});
|
2040 |
});
|
2041 |
};
|
2042 |
|
2043 |
-
|
2044 |
-
|
2045 |
-
|
2046 |
-
|
2047 |
-
|
2048 |
-
|
2049 |
-
|
2050 |
-
|
2051 |
-
|
2052 |
-
|
2053 |
-
|
2054 |
-
|
2055 |
-
|
2056 |
-
|
2057 |
-
|
2058 |
-
|
2059 |
-
|
2060 |
-
|
2061 |
-
|
2062 |
-
|
2063 |
-
|
2064 |
-
|
2065 |
-
|
2066 |
-
|
2067 |
-
|
2068 |
-
|
2069 |
-
|
2070 |
-
|
2071 |
-
|
2072 |
-
|
2073 |
-
|
2074 |
-
|
2075 |
-
|
2076 |
-
|
2077 |
-
|
2078 |
-
|
2079 |
-
|
2080 |
-
|
2081 |
-
|
2082 |
-
|
2083 |
-
|
2084 |
-
|
2085 |
-
|
2086 |
-
|
2087 |
-
|
2088 |
-
|
2089 |
-
|
2090 |
-
|
2091 |
-
|
2092 |
-
|
2093 |
-
|
2094 |
-
|
2095 |
-
|
2096 |
-
|
2097 |
-
|
2098 |
-
|
2099 |
-
|
2100 |
-
|
2101 |
-
|
2102 |
-
|
2103 |
-
|
2104 |
-
|
2105 |
-
|
2106 |
-
|
2107 |
-
|
2108 |
-
|
2109 |
-
|
2110 |
-
|
2111 |
-
|
2112 |
-
|
2113 |
-
|
2114 |
-
|
2115 |
-
|
2116 |
-
|
2117 |
-
|
2118 |
-
|
2119 |
-
|
2120 |
-
|
|
|
|
|
|
|
|
|
2121 |
}(jQuery));
|
1 |
+
if (typeof(SDT_DATA) == 'undefined') {
|
2 |
var SDT_DATA = {};
|
3 |
}
|
4 |
var g_stbServerSideProcessing = false;
|
5 |
var g_stbServerSideProcessingIsActive = false;
|
6 |
|
7 |
+
(function(vendor, $, window) {
|
8 |
|
9 |
var appName = 'Tables';
|
10 |
var dataTableInstances = [];
|
11 |
var ruleJSInstances = [];
|
12 |
+
var extraConfig = {};
|
13 |
|
14 |
if (!(appName in vendor)) {
|
15 |
vendor[appName] = {};
|
18 |
return appName;
|
19 |
});
|
20 |
|
21 |
+
vendor[appName].setExtraConfig = (function(param, value) {
|
22 |
+
extraConfig[param] = value;
|
23 |
+
});
|
24 |
|
25 |
vendor[appName].getParameterByName = (function(name) {
|
26 |
name = name.replace(/[\[]/, "\\[").replace(/[\]]/, "\\]");
|
32 |
});
|
33 |
|
34 |
vendor[appName].replaceParameterByName = (function(url, paramName, paramValue) {
|
35 |
+
var pattern = new RegExp('\\b(' + paramName + '=).*?(&|$)');
|
36 |
if (url.search(pattern) >= 0) {
|
37 |
+
return url.replace(pattern, '$1' + paramValue + '$2');
|
38 |
}
|
39 |
+
return url + (url.indexOf('?') > 0 ? '&' : '?') + paramName + '=' + paramValue;
|
40 |
});
|
41 |
|
42 |
vendor[appName].getAllTableInstances = (function() {
|
43 |
return dataTableInstances;
|
44 |
});
|
45 |
|
46 |
+
vendor[appName].removeAllTableInstances = (function() {
|
47 |
+
dataTableInstances = [];
|
48 |
+
});
|
49 |
|
50 |
vendor[appName].setTableInstance = (function(instance) {
|
51 |
dataTableInstances.push(instance);
|
54 |
vendor[appName].getTableInstanceById = (function(id) {
|
55 |
var allTables = this.getAllTableInstances();
|
56 |
|
57 |
+
for (var i = 0; i < allTables.length; i++) {
|
58 |
+
if (allTables[i].table_id == id) {
|
59 |
return allTables[i];
|
60 |
}
|
61 |
}
|
65 |
vendor[appName].getTableInstanceByViewId = (function(viewId) {
|
66 |
var allTables = this.getAllTableInstances();
|
67 |
|
68 |
+
for (var i = 0; i < allTables.length; i++) {
|
69 |
+
if (allTables[i].table_view_id == viewId) {
|
70 |
return allTables[i];
|
71 |
}
|
72 |
}
|
76 |
vendor[appName].removeTableInstanceByViewId = (function(viewId) {
|
77 |
var allTables = this.getAllTableInstances();
|
78 |
|
79 |
+
for (var i = 0; i < allTables.length; i++) {
|
80 |
+
if (allTables[i].table_view_id == viewId) {
|
81 |
allTables.splice(i, 1);
|
82 |
return true;
|
83 |
}
|
102 |
var allRuleJS = this.getAllRuleJSInstances(),
|
103 |
viewId = table.data('view-id');
|
104 |
|
105 |
+
if (!allRuleJS[viewId]) {
|
106 |
+
this.setRuleJSInstance(table);
|
107 |
}
|
108 |
return allRuleJS[viewId];
|
109 |
});
|
110 |
|
111 |
vendor[appName].request = (function(route, data) {
|
112 |
+
if (!$.isPlainObject(route) || !('module' in route) || !('action' in route)) {
|
113 |
+
throw new Error('Request route is not specified.');
|
114 |
+
}
|
115 |
if (!$.isPlainObject(data)) {
|
116 |
data = {};
|
117 |
}
|
120 |
}
|
121 |
data.action = 'supsystic-tables';
|
122 |
|
123 |
+
var url = window.ajaxurl ? window.ajaxurl : ajax_obj.ajaxurl,
|
124 |
+
deferred = $.Deferred();
|
125 |
+
|
126 |
+
$.post(url, $.extend({}, {
|
127 |
+
route: route
|
128 |
+
}, data))
|
129 |
+
.done(function(response, textStatus, jqXHR) {
|
130 |
+
if (response.success) {
|
131 |
+
deferred.resolve(response, textStatus, jqXHR);
|
132 |
+
} else {
|
133 |
+
if (data._maxIter) {
|
134 |
+
retryAjax(deferred, url, route, data, 1, data._maxIter);
|
135 |
+
} else {
|
136 |
+
var message = typeof response.message !== 'undefined' ? response.message : 'There are errors during the request.';
|
137 |
+
|
138 |
+
deferred.reject(message, textStatus, jqXHR);
|
139 |
+
}
|
140 |
+
}
|
141 |
+
}).fail(function(jqXHR, textStatus, errorThrown) {
|
142 |
+
if (data._maxIter) {
|
143 |
+
retryAjax(deferred, url, route, data, 1, data._maxIter);
|
144 |
+
} else {
|
145 |
+
deferred.reject(errorThrown, textStatus, jqXHR);
|
146 |
+
}
|
147 |
+
});
|
148 |
+
|
149 |
+
function retryAjax(def, url, route, data, curIter, maxIter) {
|
150 |
+
$.post(url, $.extend({}, {
|
151 |
+
route: route
|
152 |
+
}, data))
|
153 |
+
.done(function(response, textStatus, jqXHR) {
|
154 |
+
if (response.success) {
|
155 |
+
def.resolve(response, textStatus, jqXHR);
|
156 |
+
} else {
|
157 |
+
var message = typeof response.message !== 'undefined' ? response.message : 'There are errors during the request.';
|
158 |
+
|
159 |
+
retryErrorHandler(def, url, route, data, curIter, maxIter, message, textStatus, jqXHR);
|
160 |
+
}
|
161 |
+
}).fail(function(jqXHR, textStatus, errorThrown) {
|
162 |
+
retryErrorHandler(def, url, route, data, curIter, maxIter, errorThrown, textStatus, jqXHR);
|
163 |
+
});
|
164 |
+
}
|
165 |
+
|
166 |
+
function retryErrorHandler(def, url, route, data, curIter, maxIter, errorThrown, textStatus, jqXHR) {
|
167 |
+
curIter++;
|
168 |
+
if (curIter < maxIter) {
|
169 |
+
retryAjax(def, url, route, data, curIter, maxIter);
|
170 |
+
} else {
|
171 |
+
def.reject(errorThrown, textStatus, jqXHR);
|
172 |
+
}
|
173 |
+
}
|
174 |
|
175 |
return deferred.promise();
|
176 |
});
|
177 |
|
178 |
+
vendor[appName].setTableMobileWidth = (function(isMobile) {
|
179 |
+
$('div .supsystic-tables-wrap').each(function() {
|
180 |
+
isMobile = (typeof(isMobile) == 'undefined' ? true : isMobile);
|
181 |
+
var ssDiv = $(this),
|
182 |
+
widthAttr = ssDiv.data('table-width-' + (isMobile ? 'mobile' : 'fixed'));
|
183 |
+
if (typeof(widthAttr) != 'undefined') {
|
184 |
+
ssDiv.css('display', (widthAttr == 'auto' ? 'inline-block' : '')).css('width', widthAttr);
|
185 |
+
}
|
186 |
+
});
|
187 |
+
});
|
188 |
+
|
189 |
+
vendor[appName].initTablesOnPage = (function(id) {
|
190 |
+
this._initTablesOnPage(id);
|
191 |
+
});
|
192 |
+
|
193 |
+
vendor[appName]._initTablesOnPage = (function(id) {
|
194 |
+
var tables = $(typeof id != 'undefined' ? '#supsystic-table-' + id + ':not(.dataTable)' : '.supsystic-table');
|
195 |
+
if (tables.length == 0) return;
|
196 |
+
if (typeof this._initTablesOnPageWoo === 'function') this._initTablesOnPageWoo(id);
|
197 |
+
|
198 |
+
var self = this,
|
199 |
+
firstTableId = '',
|
200 |
+
firstTableViewId = '',
|
201 |
+
firstTable = '',
|
202 |
+
firstTableWrapper = '',
|
203 |
+
firstTableFirstRow = '';
|
204 |
+
|
205 |
+
if ($(window).width() <= 991) {
|
206 |
+
self.setTableMobileWidth();
|
207 |
+
}
|
208 |
+
|
209 |
+
tables.each(function() {
|
210 |
+
self.initializeTable(this, self.showTable, function(table) {
|
211 |
+
// This is used when table is hidden in tabs and can't calculate itself width to adjust on small screens
|
212 |
+
if (table.is(':visible')) {
|
213 |
+
// Fix bug in FF and IE which not supporting max-width 100% for images in td
|
214 |
+
self._calculateImages(table);
|
215 |
+
} else {
|
216 |
+
table.data('isVisible', setInterval(function() {
|
217 |
+
if (table.is(':visible')) {
|
218 |
+
clearInterval(table.data('isVisible'));
|
219 |
+
self._calculateImages(table);
|
220 |
+
}
|
221 |
+
}, 250));
|
222 |
+
}
|
223 |
+
// Align all tables on page by the columns width depending on the columns width of first table on page
|
224 |
+
if (table.data('align-by-first-table')) {
|
225 |
+
firstTableId = firstTableId || $('.supsystic-table:first').data('id');
|
226 |
+
firstTable = firstTable || $('#supsystic-table-' + firstTableId);
|
227 |
+
firstTableViewId = firstTable.data('view-id');
|
228 |
+
firstTableWrapper = firstTableWrapper || firstTable.parents('#supsystic-table-' + firstTableViewId);
|
229 |
+
firstTableFirstRow = firstTable.data('head') ? firstTable.find('thead tr:first-child th') : firstTable.find('tbody tr:first-child td');
|
230 |
+
|
231 |
+
if (firstTableViewId != table.data('view-id')) {
|
232 |
+
var currentTableWrapper = table.parents('#supsystic-table-' + table.data('view-id'));
|
233 |
+
|
234 |
+
currentTableWrapper.css({
|
235 |
+
width: firstTableWrapper.get(0).style.width
|
236 |
+
});
|
237 |
+
table.css({
|
238 |
+
width: firstTable.get(0).style.width
|
239 |
+
});
|
240 |
+
currentTableWrapper.find('.supsystic-table').each(function() {
|
241 |
+
var curTable = $(this),
|
242 |
+
curTableFirstRow = curTable.data('head') ? curTable.find('thead tr:first-child th') : curTable.find('tbody tr:first-child td');
|
243 |
+
|
244 |
+
$.each(curTableFirstRow, function(index, element) {
|
245 |
+
if (firstTableFirstRow[index]) {
|
246 |
+
$(this).width($(firstTableFirstRow[index]).get(0).style.width);
|
247 |
+
}
|
248 |
+
});
|
249 |
+
});
|
250 |
+
}
|
251 |
+
}
|
252 |
+
//if row has merged cells no need place header there
|
253 |
+
if (table.data('merged') && table.hasClass('ColWithMergeCellsAlign')) {
|
254 |
+
var mergedData = table.data('merged');
|
255 |
+
$.each(mergedData, function(index, value) {
|
256 |
+
var rowNumWithMergeCell = value.row;
|
257 |
+
var numForEq = Number(rowNumWithMergeCell) - 1;
|
258 |
+
table.find('tbody tr:eq(' + numForEq + ')').closest('tr').addClass('haveMergedCell');
|
259 |
+
});
|
260 |
+
self.setCellAttributes(table.parents('.supsystic-tables-wrap:first').find('.DTFC_LeftWrapper, DTFC_RightWrapper, .dataTables_scrollHead, .dataTables_scrollFoot').find('th, td'));
|
261 |
+
}
|
262 |
+
if (typeof self.getTableInstanceById(table.data('id')).fnAdjustColumnSizing == 'function') {
|
263 |
+
table.trigger('responsive-resize.dt');
|
264 |
+
setTimeout(function() {
|
265 |
+
table.trigger('responsive-resize.dt');
|
266 |
+
self.getTableInstanceById(table.data('id')).fnAdjustColumnSizing(false);
|
267 |
+
}, 500);
|
268 |
+
}
|
269 |
+
self.initShortcodesInTable(table);
|
270 |
+
});
|
271 |
+
//self.initShortcodesInTable($(this));
|
272 |
+
});
|
273 |
+
});
|
274 |
+
|
275 |
+
vendor[appName].initShortcodesInTable = (function(table) {
|
276 |
+
var tableViewId = table.data('view-id');
|
277 |
+
//google-maps-easy
|
278 |
+
if (typeof(gmpAllMapsInfo) !== 'undefined' && gmpAllMapsInfo && gmpAllMapsInfo.length) {
|
279 |
+
for (var i = 0; i < gmpAllMapsInfo.length; i++) {
|
280 |
+
var mapData = gmpAllMapsInfo[i],
|
281 |
+
map = $('#' + mapData.view_html_id);
|
282 |
+
if (map.length && map.closest('#supsystic-table-' + tableViewId).length) {
|
283 |
+
var mapViewId = mapData.view_id;
|
284 |
+
setTimeout(function(mapData, mapViewId) {
|
285 |
+
g_gmpAllMaps = $.grep(g_gmpAllMaps, function(value) {
|
286 |
+
if (value.getViewId() == mapViewId) {
|
287 |
+
if (mapData.heatmap && mapData.heatmap.coords) {
|
288 |
+
var coord = [],
|
289 |
+
oldCoord = mapData.heatmap.coords;
|
290 |
+
for (var c = 0; c < oldCoord.length; c++) {
|
291 |
+
var data = oldCoord[c];
|
292 |
+
coord.push(typeof data == 'object' ? data.join(',') : data);
|
293 |
+
}
|
294 |
+
mapData.heatmap.coords = coord;
|
295 |
+
}
|
296 |
+
if (value._mapParams.simple_slider_id) {
|
297 |
+
$('#' + value._mapParams.simple_slider_id).html(value._mapParams.original_slider_html);
|
298 |
+
}
|
299 |
+
}
|
300 |
+
return value.getViewId() != mapViewId;
|
301 |
+
});
|
302 |
+
gmpInitMapOnPage(mapData);
|
303 |
+
}, 50, mapData, mapViewId);
|
304 |
+
}
|
305 |
+
}
|
306 |
+
$(document).trigger('gmpAmiVarInited');
|
307 |
+
}
|
308 |
+
//ultimate-maps
|
309 |
+
if (typeof(umsAllMapsInfo) !== 'undefined' && umsAllMapsInfo && umsAllMapsInfo.length) {
|
310 |
+
for (var i = 0; i < umsAllMapsInfo.length; i++) {
|
311 |
+
var mapData = umsAllMapsInfo[i],
|
312 |
+
map = $('#' + mapData.view_html_id);
|
313 |
+
if (map.length && map.closest('#supsystic-table-' + tableViewId).length) {
|
314 |
+
var mapViewId = mapData.view_id;
|
315 |
+
setTimeout(function(mapData, mapViewId) {
|
316 |
+
g_umsAllMaps = $.grep(g_umsAllMaps, function(value) {
|
317 |
+
if (value.getViewId() == mapViewId) {
|
318 |
+
value._mapObj.remove();
|
319 |
+
}
|
320 |
+
return value.getViewId() != mapViewId;
|
321 |
+
});
|
322 |
+
umsInitMapOnPage(mapData);
|
323 |
+
}, 600, mapData, mapViewId);
|
324 |
+
}
|
325 |
+
}
|
326 |
+
$(document).trigger('umsAmiVarInited');
|
327 |
+
}
|
328 |
+
});
|
329 |
+
|
330 |
+
vendor[appName]._getOriginalImageSizes = (function(img) {
|
331 |
+
var tempImage = new Image(),
|
332 |
+
width,
|
333 |
+
height;
|
334 |
+
if ('naturalWidth' in tempImage && 'naturalHeight' in tempImage) {
|
335 |
+
width = img.naturalWidth;
|
336 |
+
height = img.naturalHeight;
|
337 |
+
} else {
|
338 |
+
tempImage.src = img.src;
|
339 |
+
width = tempImage.width;
|
340 |
+
height = tempImage.height;
|
341 |
+
}
|
342 |
+
return {
|
343 |
+
width: width,
|
344 |
+
height: height
|
345 |
+
};
|
346 |
+
});
|
347 |
+
|
348 |
+
vendor[appName]._calculateImages = (function($table) {
|
349 |
+
var self = this,
|
350 |
+
$images = $table.find('img');
|
351 |
+
if ($images.length > 0 && /firefox|trident|msie/i.test(navigator.userAgent)) {
|
352 |
+
$images.hide();
|
353 |
+
$.each($images, function(index, el) {
|
354 |
+
var $img = $(this),
|
355 |
+
originalSizes = self._getOriginalImageSizes(this);
|
356 |
+
if ($img.closest('td, th').width() < originalSizes.width) {
|
357 |
+
$img.css('width', '100%');
|
358 |
+
}
|
359 |
+
});
|
360 |
+
$images.show();
|
361 |
+
|
362 |
+
}
|
363 |
+
});
|
364 |
|
365 |
vendor[appName].createSpinner = (function(elem) {
|
366 |
elem = typeof(elem) != 'undefined' ? elem : false;
|
367 |
|
368 |
+
if (elem) {
|
369 |
var icon = elem.attr('disabled', true).find('.fa');
|
370 |
|
371 |
+
if (icon) {
|
372 |
icon.data('icon', icon.attr('class'));
|
373 |
icon.attr('class', 'fa fa-spinner fa-spin');
|
374 |
}
|
375 |
} else {
|
376 |
+
return $('<i/>', {
|
377 |
+
class: 'fa fa-spinner fa-spin'
|
378 |
+
});
|
379 |
}
|
380 |
});
|
381 |
|
382 |
vendor[appName].deleteSpinner = (function(elem) {
|
383 |
var icon = elem.attr('disabled', false).find('.fa');
|
384 |
|
385 |
+
if (icon) {
|
386 |
icon.attr('class', icon.data('icon'));
|
387 |
icon.data('icon', '');
|
388 |
}
|
393 |
addInstance = typeof addInstance != 'undefined' ? addInstance : true;
|
394 |
|
395 |
var self = this,
|
396 |
+
$table = (table instanceof $ ? table : $(table)),
|
397 |
features = $table.data('features'),
|
398 |
config = {},
|
399 |
responsiveMode = $table.data('responsive-mode'),
|
400 |
searchingSettings = $table.data('searching-settings'),
|
401 |
tableInstance = {},
|
402 |
defaultFeatures = {
|
403 |
+
autoWidth: false,
|
404 |
+
info: false,
|
405 |
+
ordering: false,
|
406 |
+
paging: false,
|
407 |
responsive: false,
|
408 |
+
searching: false,
|
409 |
+
stateSave: false,
|
410 |
bJQueryUI: true,
|
411 |
+
api: true,
|
412 |
+
retrieve: true,
|
413 |
processing: true,
|
414 |
initComplete: callback,
|
415 |
+
headerCallback: function(thead, data, start, end, display) {
|
416 |
$(thead).closest('thead').find('th').each(function() {
|
417 |
+
self.setStylesToCell(this);
|
418 |
});
|
419 |
},
|
420 |
+
footerCallback: function(tfoot, data, start, end, display) {
|
421 |
$(tfoot).closest('tfoot').find('th').each(function() {
|
422 |
+
self.setStylesToCell(this);
|
423 |
});
|
424 |
},
|
425 |
+
// order param disable the default table sorting.
|
426 |
+
// it should be here because of Woocommerce addon:
|
427 |
+
// it has no hidden header for tables without header
|
428 |
+
// and in triggers an error during initializing.
|
429 |
+
// order param should be disabled later during sorting activation
|
430 |
+
order: []
|
431 |
};
|
432 |
|
433 |
+
g_stbServerSideProcessing = $table.data('server-side-processing') && $table.data('server-side-processing') == 'on';
|
434 |
+
|
435 |
+
// Fix for searching by merged cells
|
436 |
+
$table.find('tbody td[data-colspan], tbody td[data-rowspan]').each(function(index, item) {
|
437 |
+
var cell = $(item),
|
438 |
+
cellData = cell.html();
|
439 |
+
|
440 |
+
// prevent of copy cell data if it contains tags with id attribute - it must be unique on page
|
441 |
+
if (!cellData.toString().match(/<.*?id=['|"].*?['|"].*?>/g)) {
|
442 |
+
var cellOrValue = cell.data('original-value'),
|
443 |
+
cellFormula = cell.data('formula'),
|
444 |
+
cellOrder = cell.data('order'),
|
445 |
+
table = cell.parents('table:first'),
|
446 |
+
colIndex = cell.index(),
|
447 |
+
rowIndex = cell.parents('tr:first').index(),
|
448 |
+
colspan = cell.data('colspan'),
|
449 |
+
rowspan = cell.data('rowspan');
|
450 |
+
|
451 |
+
for (var i = rowIndex + 1; i <= rowIndex + rowspan; i++) {
|
452 |
+
for (var j = colIndex + 1; j <= colIndex + colspan; j++) {
|
453 |
+
var hiddenCell = table.find('tbody tr:nth-child(' + i + ') td:nth-child(' + j + ')');
|
454 |
+
|
455 |
+
if (hiddenCell.data('hide') && !$table.data('merged')) {
|
456 |
+
hiddenCell.html(cellData);
|
457 |
+
hiddenCell.data('original-value', cellOrValue);
|
458 |
+
hiddenCell.attr('data-original-value', cellOrValue);
|
459 |
+
hiddenCell.data('order', cellOrder);
|
460 |
+
hiddenCell.attr('data-order', cellOrder);
|
461 |
+
if (cellFormula) {
|
462 |
+
hiddenCell.data('formula', cellFormula);
|
463 |
+
hiddenCell.attr('data-formula', cellFormula);
|
464 |
+
}
|
465 |
+
}
|
466 |
+
}
|
467 |
+
}
|
468 |
+
}
|
469 |
+
});
|
470 |
+
|
471 |
+
// Set features
|
472 |
+
$.each(features, function() {
|
473 |
+
var featureName = this.replace(/[-_]([a-z])/g, function(g) {
|
474 |
+
return g[1].toUpperCase();
|
475 |
+
});
|
476 |
config[featureName] = true;
|
477 |
});
|
478 |
+
if ($table.data('search-value') && !config['searching']) {
|
479 |
+
config['searching'] = true;
|
480 |
+
}
|
481 |
+
if (!config['searching'] && (typeof this.setTableAddSearching === 'function')) {
|
482 |
+
config['searching'] = this.setTableAddSearching($table);
|
483 |
+
}
|
484 |
if (toeInArray('searching', features) != -1 && searchingSettings) {
|
485 |
if (searchingSettings.minChars > 0 ||
|
486 |
searchingSettings.resultOnly ||
|
514 |
return data.join(' ').toLowerCase().indexOf(searchValue.toLowerCase()) !== -1
|
515 |
}
|
516 |
});
|
517 |
+
$table.on('init.dt', function(event, settings) {
|
518 |
if (!settings) {
|
519 |
return;
|
520 |
}
|
549 |
});
|
550 |
}
|
551 |
if (searchingSettings.columnSearch) {
|
552 |
+
var inputTop = (searchingSettings.columnSearchPosition && searchingSettings.columnSearchPosition == 'top'),
|
553 |
tPosition = inputTop ? 'thead' : 'tfoot';
|
554 |
+
if (!$table.find('.stbColumnsSearchWrapper').length) {
|
555 |
var headerRow = $table.find('thead tr:first').find('th');
|
556 |
+
if (headerRow.length) {
|
557 |
+
var searchRow = '<tr class="stbColumnsSearchWrapper">',
|
558 |
+
func = inputTop ? 'prepend' : 'append';
|
559 |
+
for (var i = 0; i < headerRow.length; i++) {
|
560 |
+
var cellItem = $(headerRow[i]),
|
561 |
+
cellClass = '',
|
562 |
+
cellStyle = '';
|
563 |
+
if (!g_stbServerSideProcessing) {
|
564 |
+
cellStyle = cellItem.is(':visible') ? '' : 'style="display: none;"';
|
565 |
+
}
|
566 |
+
if (cellItem.hasClass('invisibleCell')) {
|
567 |
+
cellClass = ' class="invisibleCell"'
|
568 |
+
}
|
569 |
+
searchRow += '<th ' + cellClass + cellStyle + '><input class="search-column" type="text" data-column-num="' + i + '"/></th>';
|
570 |
+
}
|
571 |
+
searchRow += '</tr>';
|
572 |
+
if ($table.find(tPosition).length == 0) {
|
573 |
+
$table.append($('<' + tPosition + '>'));
|
574 |
+
}
|
575 |
+
$table.find(tPosition)[func](searchRow);
|
576 |
+
}
|
577 |
+
}
|
578 |
+
if ($table.data('auto-index') !== 'off') {
|
579 |
+
$('.stbColumnsSearchWrapper th:first-child input').css({
|
580 |
+
'visibility': 'hidden'
|
581 |
+
});
|
582 |
+
}
|
583 |
+
}
|
584 |
}
|
585 |
if (toeInArray('ordering', features) != -1) {
|
586 |
var sortingEnable = ['_all'],
|
589 |
multipleSorting = $table.data('multiple-sorting'),
|
590 |
disableSorting = $table.data('disable-sorting');
|
591 |
|
592 |
+
if (!$table.data('head')) {
|
593 |
sortingDisable = ['_all'];
|
594 |
}
|
595 |
+
if (disableSorting && disableSorting.length) {
|
596 |
sortingDisable = disableSorting;
|
597 |
}
|
598 |
+
if (multipleSorting && multipleSorting.length) {
|
599 |
aaSorting = multipleSorting;
|
600 |
} else {
|
601 |
var columnsCount = $table.find('tr:first th').length,
|
603 |
sortOrder = $table.data('sort-order') || 'asc',
|
604 |
columnNumber = sortColumn - 1;
|
605 |
|
606 |
+
if (columnNumber >= 0 && columnNumber < columnsCount) {
|
607 |
aaSorting.push([columnNumber, sortOrder]);
|
608 |
}
|
609 |
}
|
614 |
// ];
|
615 |
config.aoColumnDefs = {};
|
616 |
config.aaSorting = aaSorting;
|
617 |
+
delete defaultFeatures.order;
|
618 |
}
|
619 |
if ($table.data('pagination-length')) {
|
620 |
var paginationLength = String($table.data('pagination-length'));
|
621 |
|
622 |
+
config.aLengthMenu = [];
|
623 |
+
config.aLengthMenu.push(paginationLength.replace('All', -1).split(',').map(Number));
|
624 |
+
config.aLengthMenu.push(paginationLength.split(','));
|
625 |
+
}
|
626 |
+
if ($table.data('auto-index') && $table.data('auto-index') !== 'off') {
|
627 |
+
$table.on('draw.dt', function() {
|
628 |
+
var isFirst = true,
|
629 |
+
index = 1;
|
630 |
+
$table.api().column(0).nodes().each(function(cell, i) {
|
631 |
+
var style = window.getComputedStyle(cell);
|
632 |
+
if (isFirst) {
|
633 |
+
index = i + 1;
|
634 |
+
isFirst = false;
|
635 |
+
}
|
636 |
+
if (style.display !== 'none' && !cell.classList.contains('invisibleCell')) {
|
637 |
+
cell.innerHTML = index;
|
638 |
+
index++;
|
639 |
+
}
|
640 |
+
});
|
641 |
+
});
|
642 |
+
}
|
643 |
+
|
644 |
+
// Set responsive mode
|
645 |
if (responsiveMode == 0) {
|
646 |
// Responsive Mode: Standart Responsive Mode
|
647 |
var labelStyles = '<style>',
|
671 |
}
|
672 |
}
|
673 |
}, 150));
|
674 |
+
if (g_stbServerSideProcessing) {
|
675 |
$table.find('td').each(function() {
|
676 |
+
$(this).css({
|
677 |
+
'width': '',
|
678 |
+
'min-width': ''
|
679 |
+
});
|
680 |
});
|
681 |
}
|
682 |
});
|
684 |
// Responsive Mode: Automatic Column Hiding
|
685 |
config.responsive = {
|
686 |
details: {
|
687 |
+
renderer: function(api, rowIdx, columns) {
|
688 |
var $table = $(api.table().node()),
|
689 |
$subTable = $('<table/>');
|
690 |
|
691 |
+
$.each(columns, function(i, col) {
|
692 |
if (col.hidden) {
|
693 |
var $cell = $(api.cell(col.rowIndex, col.columnIndex).node()).clone(),
|
694 |
+
markup = '<tr data-dt-row="' + col.rowIndex + '" data-dt-column="' + col.columnIndex + '">';
|
695 |
if ($table.data('head') == 'on') {
|
696 |
+
var tableHeadTr = $(api.table().header()).find('tr:not(.stbColumnsSearchWrapper)').eq(0);
|
697 |
var $headerContent = tableHeadTr.find('th').eq(col.columnIndex).html();
|
698 |
markup += '<td>';
|
699 |
if ($headerContent) {
|
704 |
markup += '</tr>';
|
705 |
$cell.after(
|
706 |
$('<td>')
|
707 |
+
.addClass('collapsed-cell-holder')
|
708 |
+
.attr('data-cell-row', col.rowIndex)
|
709 |
+
.attr('data-cell-column', col.columnIndex)
|
710 |
+
.hide()
|
711 |
);
|
712 |
$subTable.append($(markup).append($cell.addClass('collapsed').show()));
|
713 |
}
|
717 |
}
|
718 |
};
|
719 |
$table.on('responsive-resize.dt', function(event, api, columns) {
|
720 |
+
if (typeof api == 'undefined' || typeof columns == 'undefined') {
|
721 |
+
var tbl = $(this),
|
722 |
+
instance = vendor[appName].getTableInstanceById(tbl.data('id'));
|
723 |
+
|
724 |
+
if (instance) {
|
725 |
+
api = typeof api != 'undefined' ? api : instance.api();
|
726 |
+
columns = typeof columns != 'undefined' ? columns : instance.api().columns();
|
727 |
+
}
|
728 |
+
}
|
729 |
+
var autoHiding = [],
|
730 |
+
searchColumn = $table.find('.stbColumnsSearchWrapper input.search-column');
|
731 |
+
for (var i = 0, len = columns.length; i < len; i++) {
|
732 |
+
autoHiding[i] = columns[i] ? 1 : 0;
|
733 |
+
}
|
734 |
+
$table.find('th input.search-column').each(function() {
|
735 |
+
var th = $(this).parents('th:first'),
|
736 |
+
i = th.index();
|
737 |
+
if (columns.length > i) {
|
738 |
+
th.css('display', columns[i] ? '' : 'none');
|
739 |
+
}
|
740 |
+
});
|
741 |
+
if (typeof columns[0] == 'boolean') {
|
742 |
+
$table.attr('data-auto-hiding', autoHiding.join());
|
743 |
+
}
|
744 |
if ($table.width() > $table.parent().width()) {
|
745 |
+
$table.css('width', '100%');
|
746 |
+
$table.css('max-width', '100%');
|
747 |
api.responsive.recalc();
|
748 |
return;
|
749 |
}
|
750 |
for (var i = 0, len = columns.length; i < len; i++) {
|
751 |
if (columns[i]) {
|
752 |
+
$table.find('tr > td.collapsed-cell-holder[data-cell-column="' + i + '"]').each(function(index, el) {
|
753 |
var $this = $(this);
|
754 |
var $cell = $(api.cell(
|
755 |
$this.data('cell-row'),
|
764 |
}
|
765 |
}
|
766 |
if ($table.data('merged')) {
|
767 |
+
// if has merged cells remove them, with autohidding they not working
|
768 |
$table.find('td[data-hide]').show();
|
769 |
+
$table.find('td[data-rowspan]').attr({
|
770 |
+
'data-rowspan': 1,
|
771 |
+
rowspan: 1,
|
772 |
+
'data-colspan': 1,
|
773 |
+
colspan: 1
|
774 |
+
});
|
775 |
+
}
|
776 |
});
|
777 |
} else if (responsiveMode === 2) {
|
778 |
// Responsive Mode: Horizontal Scroll
|
779 |
config.scrollX = true;
|
780 |
config.bAutoWidth = false;
|
781 |
var firstRow = $table.find('tbody tr:first-child td');
|
782 |
+
if (firstRow.length) {
|
783 |
+
var cntCols = firstRow.length;
|
784 |
+
$table.find('thead tr:first-child th').each(function(i, th) {
|
785 |
+
if (cntCols > i && $(th).css('width')) {
|
786 |
+
firstRow.eq(i).css('width', $(th).css('width'));
|
787 |
+
}
|
788 |
+
});
|
789 |
}
|
790 |
}
|
791 |
+
if (responsiveMode === 2 || responsiveMode === 3) {
|
792 |
// Responsive Mode: 2 - Horizontal Scroll, 3 - Disable Responsivity
|
793 |
var fixedHead = $table.data('head') && $table.data('fixed-head'),
|
794 |
fixedFoot = $table.data('foot') && $table.data('fixed-foot'),
|
807 |
//if (fixedFoot) {
|
808 |
// config.fixedHeader.footer = true;
|
809 |
//}
|
810 |
+
if (fixedHead || fixedFoot) {
|
811 |
config.scrollY = $table.data('fixed-height');
|
812 |
config.scrollCollapse = true;
|
813 |
}
|
827 |
translation = langData || {},
|
828 |
override = $table.data('override');
|
829 |
|
830 |
+
if (typeof translation != 'object') {
|
831 |
+
translation = {}; // for just to be sure that it is object
|
832 |
}
|
833 |
$.each(override, function(key, value) {
|
834 |
+
if (value.length) {
|
835 |
translation[key] = value;
|
836 |
// We need to support old DT format, cuz some languages use it
|
837 |
translation['s' + key.charAt(0).toUpperCase() + key.substr(1)] = value;
|
841 |
|
842 |
var ajaxSource = {};
|
843 |
|
844 |
+
if (g_stbServerSideProcessing) {
|
845 |
var nonce = (typeof DTGS_NONCE !== "undefined") ? DTGS_NONCE : DTGS_NONCE_FRONTEND;
|
846 |
+
var route = {
|
847 |
+
"action": "getPageRows",
|
848 |
+
"module": "tables",
|
849 |
+
"nonce": nonce
|
850 |
+
},
|
851 |
loadedRows = [],
|
852 |
loadedCells = [],
|
853 |
headerRowsCount = ($table.data('head') == 'on' ? $table.data('head-rows-count') : 0),
|
863 |
route: route,
|
864 |
id: $table.data('id'),
|
865 |
searchParams: searchingSettings,
|
866 |
+
searchValue: function() {
|
867 |
var input = $('#' + $table.attr('id') + '_filter.dataTables_filter').find('input');
|
868 |
return (input.length ? input.val() : '');
|
869 |
},
|
870 |
header: headerRowsCount,
|
871 |
footer: footerRowsCount,
|
872 |
+
beforeSend: function() {
|
873 |
+
g_stbServerSideProcessingIsActive = true;
|
874 |
+
}
|
875 |
+
},
|
876 |
+
dataFilter: function(data) {
|
877 |
var json = jQuery.parseJSON(data),
|
878 |
rows = $(json.rows).find('tr'),
|
879 |
aData = [];
|
880 |
|
881 |
loadedRows = [];
|
882 |
loadedCells = [];
|
883 |
+
for (var i = 0; i < rows.length; i++) {
|
884 |
var row = rows[i];
|
885 |
loadedRows.push(row.attributes);
|
886 |
var cells = $(row).find('td'),
|
887 |
attrs = [],
|
888 |
vals = [];
|
889 |
+
for (var j = 0; j < cells.length; j++) {
|
890 |
var cell = cells[j];
|
891 |
attrs.push(cell.attributes);
|
892 |
vals.push(cell.innerHTML);
|
896 |
}
|
897 |
json.rows = '';
|
898 |
json.data = aData;
|
899 |
+
g_stbServerSideProcessingIsActive = false;
|
900 |
return JSON.stringify(json);
|
901 |
}
|
902 |
},
|
903 |
+
createdRow: function(row, data, dataIndex) {
|
904 |
+
if (typeof(loadedRows[dataIndex]) != 'undefined') {
|
905 |
+
$(loadedRows[dataIndex]).each(function() {
|
906 |
$(row).attr(this.name, this.value);
|
907 |
});
|
908 |
}
|
909 |
}
|
910 |
};
|
911 |
+
if (typeof(config.aoColumnDefs) == 'undefined' || jQuery.isEmptyObject(config.aoColumnDefs)) {
|
912 |
config.aoColumnDefs = [];
|
913 |
}
|
914 |
config.aoColumnDefs.push({
|
915 |
targets: '_all',
|
916 |
cellType: 'td',
|
917 |
+
createdCell: function(td, cellData, rowData, row, col) {
|
918 |
+
if (typeof(loadedCells[row][col]) != 'undefined') {
|
919 |
var rowspan = 1,
|
920 |
colspan = 1;
|
921 |
+
$(loadedCells[row][col]).each(function() {
|
922 |
if (this.name == 'data-rowspan' && this.value > 1) {
|
923 |
rowspan = this.value;
|
924 |
}
|
925 |
+
if (this.name == 'data-colspan' && this.value > 1) {
|
926 |
colspan = this.value;
|
927 |
}
|
928 |
});
|
929 |
+
if (rowspan > 1 || colspan > 1) {
|
930 |
var stopRow = row + parseInt(rowspan),
|
931 |
stopCol = col + parseInt(colspan),
|
932 |
startRow = colspan > 1 ? row : row + 1,
|
933 |
hide;
|
934 |
+
if (stopRow >= loadedCells.length) {
|
935 |
stopRow = loadedCells.length;
|
936 |
}
|
937 |
+
if (stopCol >= loadedCells[row].length) {
|
938 |
stopCol = loadedCells[row].length;
|
939 |
}
|
940 |
|
941 |
+
for (i = startRow; i < stopRow; i++) {
|
942 |
+
if (i > row) {
|
943 |
hide = document.createAttribute('data-hide');
|
944 |
hide.value = 'true';
|
945 |
loadedCells[i][col].setNamedItem(hide);
|
946 |
}
|
947 |
+
for (j = col + 1; j < stopCol; j++) {
|
948 |
hide = document.createAttribute('data-hide');
|
949 |
hide.value = 'true';
|
950 |
loadedCells[i][j].setNamedItem(hide);
|
951 |
}
|
952 |
}
|
953 |
}
|
954 |
+
$(loadedCells[row][col]).each(function() {
|
955 |
//if(this.name != 'data-formula') {
|
956 |
+
$(td).attr(this.name, this.value);
|
957 |
//}
|
958 |
});
|
959 |
}
|
960 |
}
|
961 |
});
|
962 |
}
|
963 |
+
$table.trigger('beforeInitializeTable', $table);
|
964 |
+
var dateFormat = $table.data('date-format');
|
965 |
+
$table.dataTable.moment(dateFormat);
|
966 |
+
tableInstance = $table.dataTable($.extend({}, defaultFeatures, config, extraConfig, ajaxSource, reinit));
|
967 |
+
tableInstance.table_id = $table.data('id');
|
968 |
+
tableInstance.table_view_id = $table.data('view-id');
|
969 |
+
tableInstance.fnFakeRowspan();
|
970 |
+
self._checkOnClickPopups($table);
|
971 |
+
window.table = $table;
|
972 |
+
if ($table.data('remove-rows')) {
|
973 |
+
|
974 |
+
$(function() {
|
975 |
+
|
976 |
+
$.contextMenu({
|
977 |
+
selector: '.dataTable td',
|
978 |
+
animation: {
|
979 |
+
duration: 250,
|
980 |
+
show: 'fadeIn',
|
981 |
+
hide: 'fadeOut'
|
982 |
+
},
|
983 |
+
callback: function(key, options) {
|
984 |
+
var m = "clicked: " + key;
|
985 |
+
},
|
986 |
+
items: {
|
987 |
"remove_row": {
|
988 |
+
name: "Remove row",
|
989 |
+
callback: function(itemKey, opt, e) {
|
990 |
+
contextMenuAction(this, 'remove_row');
|
991 |
+
}
|
992 |
},
|
993 |
"add_row_before": {
|
994 |
+
name: "Add row before",
|
995 |
+
callback: function(itemKey, opt, e) {
|
996 |
+
contextMenuAction(this, 'add_row', 'before');
|
997 |
+
}
|
998 |
},
|
999 |
"add_row_after": {
|
1000 |
+
name: "Add row after",
|
1001 |
+
callback: function(itemKey, opt, e) {
|
1002 |
+
contextMenuAction(this, 'add_row', 'after');
|
1003 |
+
}
|
1004 |
},
|
1005 |
"sep1": "---------",
|
1006 |
+
"quit": {
|
1007 |
+
name: "Quit"
|
1008 |
+
}
|
1009 |
+
}
|
1010 |
+
});
|
1011 |
+
|
1012 |
+
function contextMenuAction(e, action, second) {
|
1013 |
+
var coltext = e.text();
|
1014 |
+
var colvindex = e.parent().children().index(e);
|
1015 |
+
var colindex = $('table.dataTable thead tr th:eq(' + colvindex + ')').data('column-index');
|
1016 |
+
|
1017 |
+
/* Global var for counter */
|
1018 |
+
var giCount = 1;
|
1019 |
+
switch (action) {
|
1020 |
+
case "remove_row":
|
1021 |
+
$table.fnDeleteRow(e.parent('tr'));
|
1022 |
+
$table.fnUpdate();
|
1023 |
+
break;
|
1024 |
+
case "add_row":
|
1025 |
+
var tr = e.parent('tr').clone(true, true);
|
1026 |
+
tr.find('td').html('').addClass('menu-injected').addClass('editable').addClass('justCloned');
|
1027 |
+
tr.find('td').data('original-value', '').attr('data-original-value', '');
|
1028 |
+
var order = tr.find('td').data('order');
|
1029 |
+
if (second == 'before') {
|
1030 |
+
order = order - 1;
|
1031 |
+
tr.find('td').data('order', order).attr('data-order', order);
|
1032 |
+
} else {
|
1033 |
+
order = order + 1;
|
1034 |
+
tr.find('td').data('order', order).attr('data-order', order);
|
1035 |
+
}
|
1036 |
+
tr.find('td').data('cell-type', 'text').attr('data-cell-type', 'text');
|
1037 |
+
tr.find('td').data('cell-format-type', '').attr('data-cell-format-type', '');
|
1038 |
+
$table.append(tr);
|
1039 |
+
$table.fnAddData(tr, true);
|
1040 |
+
tr.find('td.justCloned').data('y', '9999').attr('data-y', '9999').removeClass('justCloned');
|
1041 |
+
// $table.fnUpdate();
|
1042 |
+
// $table.trigger('draw.dt');
|
1043 |
+
break;
|
1044 |
+
}
|
1045 |
+
}
|
1046 |
|
1047 |
+
});
|
1048 |
|
1049 |
+
}
|
1050 |
|
1051 |
+
if (g_stbServerSideProcessing) {
|
1052 |
jQuery('.dataTables_processing').css('z-index', '10');
|
1053 |
} else {
|
1054 |
self.setColumnSearch($table);
|
1055 |
}
|
1056 |
+
$table.on('draw.dt', function() {
|
1057 |
+
var searching = $table.data('searching-settings');
|
1058 |
+
if (searching && ('columnSearch' in searching) && searching.columnSearch == 'on') {
|
1059 |
+
self.setColumnSearch($table);
|
1060 |
+
}
|
1061 |
+
if (!g_stbServerSideProcessing && $table.data('merged')) {
|
1062 |
+
tableInstance.fnResetFakeRowspan();
|
1063 |
+
}
|
1064 |
+
self.initShortcodesInTable($table);
|
1065 |
+
});
|
1066 |
+
if (responsiveMode === 1) {
|
1067 |
+
$table.on('responsive-resize.dt', function(event, api, columns) {
|
1068 |
+
if (!g_stbServerSideProcessing && $table.data('merged')) {
|
1069 |
+
tableInstance.fnResetFakeRowspan();
|
1070 |
+
}
|
1071 |
+
});
|
1072 |
+
}
|
1073 |
if (typeof $table.data('fixed-cols') !== 'undefined') {
|
1074 |
tableInstance.api().fixedColumns().update();
|
1075 |
}
|
1076 |
+
if (addInstance) {
|
1077 |
+
this.setTableInstance(tableInstance);
|
1078 |
}
|
1079 |
+
return typeof finalCallback == "function" ? finalCallback(tableInstance) : tableInstance;
|
1080 |
});
|
1081 |
|
1082 |
/** Callback for displaying table after initializing
|
1084 |
* @param {object} json - JSON data retrieved from the server if the ajax option was set. Otherwise undefined.
|
1085 |
*/
|
1086 |
vendor[appName].showTable = (function(settings, json) {
|
1087 |
+
var self = vendor[appName], // it is callback so "this" does not equal vendor[appName] object
|
1088 |
+
$table = this instanceof $ ? this : settings, // for compatibility with old pro versions
|
1089 |
$tableWrap = $table.closest('.supsystic-tables-wrap'),
|
1090 |
+
tableSelector = '#supsystic-table-' + $table.data('view-id') + ' #supsystic-table-' + $table.data('id'),
|
1091 |
afterTableLoadedScriptString = $table.attr('data-after-table-loaded-script'),
|
1092 |
_ruleJS = self.setRuleJSInstance($table),
|
1093 |
responsiveMode = $table.data('responsive-mode'),
|
1096 |
fixedColumns = $table.data('fixed-right') > 0 || $table.data('fixed-left') > 0,
|
1097 |
viewId = $table.data('view-id');
|
1098 |
|
1099 |
+
// Apply custom CSS styles, which have been set through the table editor
|
1100 |
+
$table.find('th, td').each(function() {
|
1101 |
+
self.setStylesToCell(this);
|
1102 |
+
});
|
1103 |
+
$table.bind('column-visibility.dt draw.dt', function(e) {
|
1104 |
+
$(this).find('th, td').each(function() {
|
1105 |
+
self.setStylesToCell(this);
|
1106 |
+
});
|
1107 |
+
});
|
1108 |
+
|
1109 |
+
// Remove sorting visual elements from the tags if there is no header on table
|
1110 |
if (!$table.data('head')) {
|
1111 |
$table.find('th').removeClass('sorting sorting_asc sorting_desc sorting_disabled');
|
1112 |
}
|
1115 |
_ruleJS.init();
|
1116 |
|
1117 |
// Set formats
|
1118 |
+
self.formatDataAtTable($table, true);
|
1119 |
|
1120 |
|
1121 |
+
// Apply shortcode param "search"
|
1122 |
+
if ($table.data('search-value')) {
|
1123 |
+
$table.api().search($table.data('search-value')).draw();
|
1124 |
+
}
|
1125 |
|
1126 |
// Show comments on tap
|
1127 |
if ('ontouchstart' in window || navigator.msMaxTouchPoints) {
|
1128 |
+
$table.parents('.supsystic-tables-wrap:first').find('td, th').on('click', self.applyMobileTableComments);
|
1129 |
+
}
|
1130 |
+
|
1131 |
+
// Prepare Contact Form by Supsystic buttons
|
1132 |
+
$table.parents('.supsystic-tables-wrap:first').find('th, td').each(self._contactFormBtnCellClb);
|
1133 |
+
|
1134 |
+
// Page change callback
|
1135 |
+
$table.on('page.dt', function() {
|
1136 |
+
if (g_stbServerSideProcessing) {
|
1137 |
+
g_stbServerSideProcessingIsActive = true;
|
1138 |
+
}
|
1139 |
+
var table = $(this),
|
1140 |
+
tableSelector = '#supsystic-table-' + table.data('view-id') + ' #supsystic-table-' + table.data('id');
|
1141 |
+
self.applyTableEventClb(self.pageEvent, 50, tableSelector);
|
1142 |
+
if ($table.data('pagination-scroll') == 'on') {
|
1143 |
+
$('html, body').animate({
|
1144 |
+
scrollTop: table.closest('.dataTables_wrapper').offset().top
|
1145 |
+
}, 100);
|
1146 |
+
}
|
1147 |
+
if (typeof(self.setImgLightbox) == 'function') {
|
1148 |
self.setImgLightbox($table);
|
1149 |
}
|
1150 |
+
});
|
1151 |
|
1152 |
// Frontend fields
|
1153 |
+
if (typeof(self.createEditableFields) == 'function') { // for compatibility with old pro versions
|
1154 |
var $editableFields = $tableWrap.find('.editable'),
|
1155 |
$editfileFields = $tableWrap.find('.editfile'),
|
1156 |
$selectableFields = $tableWrap.find('.selectable'),
|
1157 |
$tableId = $table.data('id'),
|
1158 |
+
useEditableFields = typeof(useEdit) != 'undefined' && typeof(useEdit[$tableId]) != 'undefined' ?
|
1159 |
+
useEdit[$tableId] :
|
1160 |
+
false;
|
1161 |
|
1162 |
+
if (useEditableFields || (SDT_DATA.isAdmin && SDT_DATA.isPro)) {
|
1163 |
if (typeof(self.setFrontendFields) == 'function') {
|
1164 |
+
self.setFrontendFields($table);
|
1165 |
} else if (typeof(self.setAllFields) == 'function') {
|
1166 |
self.setAllFields($table, $editableFields, $selectableFields);
|
1167 |
} else {
|
1168 |
self.createEditableFields($table, $editableFields);
|
1169 |
self.createEditableFileFields($table, $editfileFields);
|
1170 |
}
|
1171 |
+
$table.on('init.dt', function() {
|
1172 |
+
$table.on('responsive-resize.dt responsive-display.dt draw.dt', function() {
|
1173 |
+
$editableFields.off('click.sup'); // for compatibility with old pro versions
|
1174 |
$editfileFields.off('click.sup');
|
1175 |
+
self.updateAfterRedraw($table);
|
1176 |
+
});
|
1177 |
+
});
|
1178 |
}
|
1179 |
}
|
1180 |
+
if (typeof(self.setImgLightbox) == 'function') {
|
1181 |
+
self.setImgLightbox($table);
|
1182 |
}
|
1183 |
|
1184 |
+
// apply page.dt event by change table pagination via select
|
1185 |
+
var paginationSelect = $tableWrap.find('.dataTables_length select');
|
1186 |
+
if (paginationSelect.length) {
|
1187 |
+
paginationSelect.on('change', function() {
|
1188 |
+
$table.trigger('page.dt');
|
1189 |
+
});
|
1190 |
+
}
|
1191 |
|
1192 |
+
self.applyTableEventClb(self.fixHeaderOfHiddenColumns, 50, tableSelector);
|
1193 |
|
1194 |
+
$table.trigger('beforeShowTable', $table);
|
1195 |
|
1196 |
// Show table
|
1197 |
$tableWrap.prev('.supsystic-table-loader').hide();
|
1199 |
|
1200 |
self.fixSortingForMultipleHeader($table);
|
1201 |
|
1202 |
+
if (responsiveMode === 2 || fixedHeader || fixedFooter) {
|
1203 |
// Responsive Mode: Horizontal Scroll
|
1204 |
$(window).on('load resize orientationchange', $table, function(event) {
|
1205 |
+
var tBody = $tableWrap.find('.dataTables_scrollBody'),
|
1206 |
tBodyTable = tBody.find('.supsystic-table');
|
1207 |
|
1208 |
+
if (tBody.width() > tBodyTable.width() || $tableWrap.width() > tBodyTable.width()) {
|
1209 |
+
tBody.width(tBodyTable.width());
|
1210 |
+
$tableWrap.find('.dataTables_scrollHead, .dataTables_scrollFoot, .dataTables_scrollBody').width(tBodyTable.width() + 1);
|
1211 |
+
/*
|
1212 |
+
var scrollTables = $tableWrap.find('.dataTables_scrollHead, .dataTables_scrollFoot');
|
1213 |
+
scrollTables.width(tBodyTable.width() + 1);
|
1214 |
+
scrollTables.find('table').width(tBodyTable.width() + 1);*/
|
1215 |
+
}
|
1216 |
+
if (tBody.isHorizontallyScrollable()) {
|
1217 |
+
tBody.css({
|
1218 |
+
'border-bottom': 'none'
|
1219 |
+
});
|
1220 |
+
} else {
|
1221 |
tBody.removeStyle('border-bottom');
|
1222 |
}
|
1223 |
var table = self.getTableInstanceById($table.data('id'));
|
1224 |
+
if (typeof table.fnAdjustColumnSizing == 'function') {
|
1225 |
+
setTimeout(function() {
|
1226 |
+
table.fnAdjustColumnSizing(false);
|
1227 |
+
}, 350);
|
1228 |
+
}
|
1229 |
});
|
1230 |
|
1231 |
// need resize twice to get better frontend view
|
1232 |
var tBody = $tableWrap.find('.dataTables_scrollBody'),
|
1233 |
+
tBodyTable = tBody.find('.supsystic-table');
|
1234 |
|
1235 |
+
if (tBodyTable.is(":visible")) {
|
1236 |
setTimeout(function() {
|
1237 |
$(window).trigger('load');
|
1238 |
}, 200);
|
1239 |
}
|
1240 |
var $tHeadTable = $tableWrap.find('.dataTables_scrollHead .supsystic-table');
|
1241 |
+
if ($tHeadTable.length) {
|
1242 |
self.formatDataAtTable($tHeadTable, true);
|
1243 |
}
|
1244 |
+
var $tFootTable = $tableWrap.find('.dataTables_scrollFoot .supsystic-table');
|
1245 |
+
if ($tFootTable.length) {
|
1246 |
self.formatDataAtTable($tFootTable, true);
|
1247 |
}
|
1248 |
}
|
1249 |
// Correct width of fixed header / footer
|
1250 |
+
if (fixedHeader || fixedFooter) {
|
1251 |
$table.api().fixedHeader.adjust();
|
1252 |
|
1253 |
+
var i = 1;
|
1254 |
setTimeout(function() {
|
1255 |
+
var flag = fixedHeader,
|
1256 |
+
el = fixedHeader ?
|
1257 |
+
$tableWrap.find('.dataTables_scrollHead table thead tr:first-child th') :
|
1258 |
+
$tableWrap.find('.dataTables_scrollFoot table tfoot tr:first-child th');
|
1259 |
|
1260 |
el.each(function() {
|
1261 |
+
var thWidth = $tableWrap.find('.dataTables_scrollBody table tbody tr:first-child td:nth-child(' + i + ')');
|
1262 |
+
|
1263 |
+
$(this).css({
|
1264 |
+
'width': thWidth.outerWidth(),
|
1265 |
+
'min-width': thWidth.outerWidth(),
|
1266 |
+
'box-sizing': 'border-box'
|
1267 |
+
});
|
1268 |
+
if (fixedFooter && flag) {
|
1269 |
+
var footerEl = $tableWrap.find('.dataTables_scrollFoot table tfoot tr:first-child th:nth-child(' + i + ')');
|
1270 |
+
footerEl.css({
|
1271 |
+
'width': thWidth.outerWidth(),
|
1272 |
+
'min-width': thWidth.outerWidth(),
|
1273 |
+
'box-sizing': 'border-box'
|
1274 |
+
});
|
1275 |
+
}
|
1276 |
+
i++;
|
1277 |
+
});
|
1278 |
+
}, 200);
|
1279 |
}
|
1280 |
|
1281 |
// Correct width of fixed columns
|
1282 |
+
if (fixedColumns) {
|
1283 |
$table.api().fixedColumns().relayout();
|
1284 |
|
1285 |
//var tableCaption = $('.dataTables_scrollHead caption');
|
1286 |
+
//
|
1287 |
//if(tableCaption.length) {
|
1288 |
+
//self._fixTableCaption(tableCaption.height(), viewId, 10);
|
1289 |
//}
|
1290 |
}
|
1291 |
/* Fix for Horizontal scroll responsive mode if table has different width for one column in header and body */
|
1292 |
+
if (!fixedHeader && !fixedFooter && responsiveMode === 2 && toeInArray('auto_width', $table.data('features')) == -1) {
|
1293 |
$tableWrap.find('.dataTables_scrollBody table thead tr:first-child th').each(function() {
|
1294 |
var tableWidth = $table.width(),
|
1295 |
tableWrapWidth = $tableWrap.width();
|
1296 |
|
1297 |
+
if (tableWrapWidth > tableWidth) {
|
1298 |
$tableWrap
|
1299 |
.find('.dataTables_scrollHeadInner, .dataTables_scrollBody, .dataTables_scrollFootInner')
|
1300 |
.addClass('fit-content');
|
1316 |
}
|
1317 |
}
|
1318 |
|
1319 |
+
if (g_stbServerSideProcessing) {
|
1320 |
+
$table.on('draw.dt', function(e) {
|
1321 |
var searching = $table.data('searching-settings');
|
1322 |
+
if (searching && ('columnSearch' in searching) && searching.columnSearch == 'on') {
|
1323 |
self.setColumnSearch($table);
|
1324 |
}
|
1325 |
self.getTableInstanceByViewId(viewId).fnFakeRowspan();
|
1326 |
+
if (responsiveMode === 0 || responsiveMode === 2) {
|
1327 |
$(window).trigger('load');
|
1328 |
}
|
1329 |
}).trigger('draw.dt');
|
1330 |
}
|
1331 |
|
1332 |
+
var tblEditLink = 'g_stbTblEditLink_' + $table.data('id'),
|
1333 |
+
showTblEditLink = eval("typeof " + tblEditLink) !== 'undefined' ? jQuery(window.atob(eval(tblEditLink))) : false;
|
1334 |
|
1335 |
if (showTblEditLink && jQuery(tableSelector).closest('.supsystic-tables-wrap').find('.tblEditLink').length === 0) {
|
1336 |
jQuery(tableSelector).closest('.supsystic-tables-wrap').append(showTblEditLink);
|
1337 |
+
}
|
1338 |
|
1339 |
function b64DecodeUnicode(str) {
|
1340 |
return decodeURIComponent(Array.prototype.map.call(atob(str), function(c) {
|
1343 |
}
|
1344 |
});
|
1345 |
|
1346 |
+
vendor[appName].applyTableEventClb = (function(clb, timeout) {
|
1347 |
+
// Callback for applying events' actions and other functions to tables with server side processing (SSP)
|
1348 |
+
timeout = timeout ? timeout : 0;
|
1349 |
+
var self = this,
|
1350 |
+
args = Array.from(arguments);
|
1351 |
+
|
1352 |
+
if (g_stbServerSideProcessing && g_stbServerSideProcessingIsActive) {
|
1353 |
+
setTimeout(function() {
|
1354 |
+
self.applyTableEventClb.apply(self, args);
|
1355 |
+
}, 50);
|
1356 |
+
} else {
|
1357 |
+
if (typeof clb == 'function') {
|
1358 |
+
args = args.slice(2);
|
1359 |
+
setTimeout(function() {
|
1360 |
+
clb.apply(self, args);
|
1361 |
+
}, timeout);
|
1362 |
+
}
|
1363 |
+
}
|
1364 |
+
});
|
1365 |
+
|
1366 |
+
vendor[appName].pageEvent = (function(tableSelector) {
|
1367 |
+
var table = $(tableSelector),
|
1368 |
+
tableWrapper = table.parents('.supsystic-tables-wrap:first');
|
1369 |
+
|
1370 |
+
this.getRuleJSInstance(table).init();
|
1371 |
+
this.formatDataAtTable(table, true);
|
1372 |
+
this.fixHeaderOfHiddenColumns(table);
|
1373 |
+
if ('ontouchstart' in window || navigator.msMaxTouchPoints) {
|
1374 |
+
tableWrapper.find('td, th').on('click', this.applyMobileTableComments);
|
1375 |
+
}
|
1376 |
+
tableWrapper.find('td, th').each(this._contactFormBtnCellClb);
|
1377 |
+
this.initShortcodesInTable(table);
|
1378 |
+
});
|
1379 |
+
|
1380 |
+
vendor[appName].fixHeaderOfHiddenColumns = (function($table) {
|
1381 |
+
$table = $table instanceof $ ? $table : $($table);
|
1382 |
+
|
1383 |
+
var tableWrapper = $table.parents('.supsystic-tables-wrap:first');
|
1384 |
+
|
1385 |
+
if (!$table.data('head')) {
|
1386 |
+
tableWrapper.find('thead').each(function() {
|
1387 |
+
var thead = $(this);
|
1388 |
+
thead.find('th').each(function(iter, item) {
|
1389 |
+
var th = $(this),
|
1390 |
+
itemIndex = iter + 1,
|
1391 |
+
columnAllTd = thead.parents('table:first').find('tbody td:nth-child(' + itemIndex + ')'),
|
1392 |
+
columnInvTd = columnAllTd.filter('.invisibleCell'),
|
1393 |
+
hidden = columnAllTd.length > 0 && columnAllTd.length == columnInvTd.length;
|
1394 |
+
if (hidden) {
|
1395 |
+
// Fix of correct displaying of tables with hidden rows / columns for tables without headers
|
1396 |
+
th.addClass('invisibleCell');
|
1397 |
+
}
|
1398 |
+
});
|
1399 |
+
});
|
1400 |
+
}
|
1401 |
+
});
|
1402 |
+
|
1403 |
+
vendor[appName].applyMobileTableComments = (function(e) {
|
1404 |
+
var $elem = $(this),
|
1405 |
+
title = $elem.attr('title');
|
1406 |
+
|
1407 |
+
if (title) {
|
1408 |
+
var tableViewId = $elem.parents('table.supsystic-table:first').data('view-id'),
|
1409 |
+
cellId = $elem.data('cell-id'),
|
1410 |
+
comment = $('.stbMobileComment[data-table="' + tableViewId + '"][data-cell="' + cellId + '"]');
|
1411 |
+
|
1412 |
+
if (!comment.length) {
|
1413 |
+
comment = $('<div class="stbMobileComment" style="display:none;"/>');
|
1414 |
+
comment.text(title)
|
1415 |
+
.data('table', tableViewId)
|
1416 |
+
.attr('data-table', tableViewId)
|
1417 |
+
.data('cell', cellId)
|
1418 |
+
.attr('data-cell', cellId)
|
1419 |
+
.appendTo('body');
|
1420 |
+
}
|
1421 |
+
comment.css({
|
1422 |
+
top: (e.pageY - 70) + 'px',
|
1423 |
+
left: (e.pageX + 20) + 'px'
|
1424 |
+
}).fadeIn('slow');
|
1425 |
+
|
1426 |
+
setTimeout(function() {
|
1427 |
+
comment.fadeOut('slow');
|
1428 |
+
}, 2500);
|
1429 |
+
}
|
1430 |
+
});
|
1431 |
|
1432 |
vendor[appName]._contactFormBtnCellClb = (function(e) {
|
1433 |
+
var cell = $(this),
|
1434 |
+
y = cell.data('y'),
|
1435 |
+
pair,
|
1436 |
+
valueCell;
|
1437 |
+
if (cell.html().indexOf('cfsPreFill') != -1) {
|
1438 |
+
var cellHtml = cell.html().replace(/href=["|']([^"]*?)["|']/g, function(a, b) {
|
1439 |
+
if (b.indexOf('cfsPreFill') != -1) {
|
1440 |
+
var newB = b.split('&');
|
1441 |
+
if (newB.length) {
|
1442 |
+
for (var i = 0; i < newB.length; i++) {
|
1443 |
+
pair = newB[i].split('=');
|
1444 |
+
if (pair.length && pair[1].match(/[A-Za-z]/)) {
|
1445 |
+
valueCell = cell.parents('tr:first').find('[data-cell-id="' + pair[1] + y + '"]');
|
1446 |
+
if (valueCell.length) {
|
1447 |
+
pair[1] = $.trim(valueCell.html());
|
1448 |
+
}
|
1449 |
+
}
|
1450 |
+
newB[i] = pair.join('=');
|
1451 |
+
}
|
1452 |
+
newB = newB.join('&');
|
1453 |
+
a = a.replace(b, newB);
|
1454 |
+
}
|
1455 |
+
return a;
|
1456 |
+
}
|
1457 |
+
});
|
1458 |
+
cell.html(cellHtml);
|
1459 |
+
}
|
1460 |
+
});
|
1461 |
|
1462 |
vendor[appName].setColumnSearch = (function(table) {
|
1463 |
+
if (typeof this.setTableAddFilters === 'function') this.setTableAddFilters(table);
|
1464 |
|
1465 |
+
var self = this,
|
1466 |
+
searchingSettings = table.data('searching-settings'),
|
1467 |
inputs = table.parents('.dataTables_wrapper:first').find('.stbColumnsSearchWrapper .search-column');
|
1468 |
+
if (inputs.length == 0) {
|
1469 |
return;
|
1470 |
+
}
|
1471 |
+
//$(document).off('keyup change', ".dataTables_wrapper:first .stbColumnsSearchWrapper .search-column")
|
1472 |
+
// .on('keyup change', ".dataTables_wrapper:first .stbColumnsSearchWrapper .search-column",function () {
|
1473 |
+
inputs.off('keyup.dtg change.dtg').on('keyup.dtg change.dtg', function() {
|
1474 |
+
var input = $(this),
|
1475 |
+
position = input.parents('th:first').index(),
|
1476 |
+
value = this.value,
|
1477 |
+
column = table.api().column(position);
|
1478 |
+
if (typeof self.resetTableAddFilters === 'function') self.resetTableAddFilters(table);
|
1479 |
+
if (column.search() !== value) {
|
1480 |
+
column.search(value.replace(/;/g, "|"), true, false).draw();
|
1481 |
+
setTimeout(function() {
|
1482 |
+
column.draw();
|
1483 |
+
}, 50);
|
1484 |
+
}
|
1485 |
+
});
|
1486 |
});
|
1487 |
|
1488 |
vendor[appName].setCopyEvents = (function(obj, events) {
|
1489 |
+
$.each(events, function(event, handlers) {
|
1490 |
+
$.each(handlers, function(j, handler) {
|
1491 |
$(obj).unbind(event).bind(event, handler);
|
1492 |
});
|
1493 |
});
|
1498 |
var $table = (table instanceof $ ? table : $(table)),
|
1499 |
$tableWrap = $table.closest('.supsystic-tables-wrap');
|
1500 |
|
1501 |
+
this.getRuleJSInstance($table).init();
|
1502 |
$tableWrap.prev('.supsystic-table-loader').hide();
|
1503 |
$tableWrap.css('visibility', 'visible');
|
1504 |
});
|
1505 |
|
1506 |
vendor[appName].fixSortingForMultipleHeader = (function(table) {
|
1507 |
+
if (table.data('head-rows-count') > 1 && table.data('sort-order')) {
|
1508 |
var thead = table.find('thead tr').get().reverse();
|
1509 |
|
1510 |
// Fix of sorting for table with multiple header (when header has more than 1 row)
|
1511 |
+
if (table.data('head')) {
|
1512 |
+
$.each(table.find('thead tr:last-child th'), function(index, element) {
|
1513 |
var th = $(element),
|
1514 |
nthChild = index + 1;
|
1515 |
|
1516 |
+
if (th.data('hide')) {
|
1517 |
$(thead).each(function() {
|
1518 |
var item = $(this).find('th:nth-child(' + nthChild + ')');
|
1519 |
|
1520 |
+
if (!item.data('hide')) {
|
1521 |
item.addClass('sorting');
|
1522 |
item.click(function() {
|
1523 |
th.trigger('click');
|
1524 |
+
if (th.hasClass('sorting')) {
|
1525 |
item.removeClass('sorting_asc');
|
1526 |
item.removeClass('sorting_desc');
|
1527 |
item.addClass('sorting');
|
1528 |
+
} else if (th.hasClass('sorting_asc')) {
|
1529 |
item.removeClass('sorting');
|
1530 |
item.removeClass('sorting_desc');
|
1531 |
item.addClass('sorting_asc');
|
1532 |
+
} else if (th.hasClass('sorting_desc')) {
|
1533 |
item.removeClass('sorting');
|
1534 |
item.removeClass('sorting_asc');
|
1535 |
item.addClass('sorting_desc');
|
1545 |
});
|
1546 |
|
1547 |
vendor[appName].formatDataAtTable = (function(table, correctSorting) {
|
1548 |
+
correctSorting = correctSorting ? correctSorting : false;
|
1549 |
|
1550 |
var self = this,
|
1551 |
+
numberFormat = table.data('number-format'),
|
1552 |
generalCurrencyFormat = table.data('currency-format'),
|
1553 |
generalPercentFormat = table.data('percent-format'),
|
1554 |
generalDateFormat = table.data('date-format'),
|
1557 |
table.find('th, td').each(function(index, el) {
|
1558 |
var $this = $(this);
|
1559 |
|
1560 |
+
if ((table.data('auto-index') != 'off' && $this.is(':first-child')) ||
|
1561 |
+
(table.data('responsive-mode') == 1 && table.hasClass('collapsed') && $this.hasClass('child')) ||
|
1562 |
+
$this.find('.search-column').length ||
|
1563 |
+
$this.hasClass('tooltipCell') ||
|
1564 |
+
$this.data('hide')
|
1565 |
+
) {
|
1566 |
// Break current .each iteration
|
1567 |
return;
|
1568 |
}
|
1575 |
value = $.trim($this.html()),
|
1576 |
noFormat = false;
|
1577 |
|
1578 |
+
// function checkIfDate(parts) {
|
1579 |
+
// var newDate = new Date(parts[0], parts[1]-1, parts[2]);
|
1580 |
+
// if (newDate.getTime() === newDate.getTime()) {
|
1581 |
+
// $this.attr('data-cell-format-type', 'date');
|
1582 |
+
// $this.data('cell-format-type', 'date');
|
1583 |
+
// formatType = $this.data('cell-format-type');
|
1584 |
+
// console.log(parts);
|
1585 |
+
// }
|
1586 |
+
// }
|
1587 |
+
// var parts = value.split('.');
|
1588 |
+
// if (parts.length > 0) {
|
1589 |
+
// checkIfDate(parts);
|
1590 |
+
// }
|
1591 |
+
// var parts = value.split('-');
|
1592 |
+
// if (parts.length > 0) {
|
1593 |
+
// checkIfDate(parts);
|
1594 |
+
// }
|
1595 |
+
// var parts = value.split('/');
|
1596 |
+
// if (parts.length > 0) {
|
1597 |
+
// checkIfDate(parts);
|
1598 |
+
// }
|
1599 |
+
|
1600 |
+
|
1601 |
+
// Fix data params for cells which use formulas, which depended on cells with shortcodes inside
|
1602 |
+
if (correctSorting && toeInArray(formatType, ['date', 'time_duration']) == -1) {
|
1603 |
+
var dataTableInstance = typeof table.api == 'function' ? table : self.getTableInstanceById(table.data('id'));
|
1604 |
+
|
1605 |
+
if ($this.data('original-value') != value) {
|
1606 |
+
$this.data('original-value', value);
|
1607 |
+
$this.attr('data-original-value', value);
|
1608 |
+
}
|
1609 |
+
if ($this.data('data-order') != value) {
|
1610 |
+
$this.data('order');
|
1611 |
+
$this.attr('data-order', value);
|
1612 |
+
if (dataTableInstance) {
|
1613 |
+
dataTableInstance.api().cell($this).invalidate();
|
1614 |
+
}
|
1615 |
+
}
|
1616 |
+
}
|
1617 |
+
if (value) {
|
1618 |
+
if ($this.data('cell-reformat')) {
|
1619 |
+
switch (formatType) {
|
1620 |
+
case 'date':
|
1621 |
+
var newDate = moment(value, format);
|
1622 |
+
if (newDate.isValid()) {
|
1623 |
+
value = newDate.format(generalDateFormat);
|
1624 |
+
|
1625 |
+
$this.data('cell-format', generalDateFormat);
|
1626 |
+
$this.attr('data-cell-format', generalDateFormat);
|
1627 |
+
|
1628 |
+
$this.data('original-value', value);
|
1629 |
+
$this.attr('data-original-value', value);
|
1630 |
+
|
1631 |
+
$this.data('order', value);
|
1632 |
+
$this.attr('data-order', value);
|
1633 |
+
|
1634 |
+
if (!g_stbServerSideProcessing) {
|
1635 |
+
$this.data('cell-reformat', false);
|
1636 |
+
$this.attr('data-cell-reformat', 0);
|
1637 |
+
}
|
1638 |
+
}
|
1639 |
+
break;
|
1640 |
+
case 'time_duration':
|
1641 |
+
var newTime = moment(value, format),
|
1642 |
+
isValid = false;
|
1643 |
+
// console.log(newTime);
|
1644 |
+
|
1645 |
+
if (newTime.isValid()) {
|
1646 |
+
value = newTime.format(generalTimeFormat);
|
1647 |
+
isValid = true;
|
1648 |
+
} else {
|
1649 |
+
newTime = moment.duration(value);
|
1650 |
+
if (newTime._milliseconds || value == 0) {
|
1651 |
+
value = newTime.format(generalTimeFormat);
|
1652 |
+
isValid = true;
|
1653 |
+
}
|
1654 |
+
}
|
1655 |
+
if (isValid) {
|
1656 |
+
$this.data('cell-format', generalTimeFormat);
|
1657 |
+
$this.attr('data-cell-format', generalTimeFormat);
|
1658 |
+
|
1659 |
+
$this.data('original-value', value);
|
1660 |
+
$this.attr('data-original-value', value);
|
1661 |
+
|
1662 |
+
$this.data('order', value);
|
1663 |
+
$this.attr('data-order', value);
|
1664 |
+
|
1665 |
+
if (!g_stbServerSideProcessing) {
|
1666 |
+
$this.data('cell-reformat', false);
|
1667 |
+
$this.attr('data-cell-reformat', 0);
|
1668 |
+
}
|
1669 |
+
}
|
1670 |
+
break;
|
1671 |
+
default:
|
1672 |
+
break;
|
1673 |
+
}
|
1674 |
+
} else if (self.isNumber(value) && !isNaN(value)) {
|
1675 |
+
numberFormat = numberFormat ? numberFormat.toString() : '';
|
1676 |
+
|
1677 |
+
switch (formatType) {
|
1678 |
+
case 'percent':
|
1679 |
+
format = format ? format : generalPercentFormat;
|
1680 |
+
|
1681 |
+
if (format) {
|
1682 |
+
format = format.toString();
|
1683 |
+
|
1684 |
+
var clearFormat = format.indexOf('%') > -1 ? format.replace('%', '') : format;
|
1685 |
+
|
1686 |
+
value = value.indexOf('%') > -1 ? $this.data('original-value') : value;
|
1687 |
+
delimiters = (clearFormat.match(/[^\d]/g) || [',', '.']).reverse();
|
1688 |
+
languageData.delimiters = {
|
1689 |
+
decimal: delimiters[0],
|
1690 |
+
thousands: delimiters[1]
|
1691 |
+
};
|
1692 |
+
|
1693 |
+
// We need to use dafault delimiters for format string
|
1694 |
+
preparedFormat = format.replace(clearFormat, clearFormat.replace(delimiters[0], '.').replace(delimiters[1], ','));
|
1695 |
+
} else {
|
1696 |
+
noFormat = true;
|
1697 |
+
}
|
1698 |
+
break;
|
1699 |
+
case 'currency':
|
1700 |
+
format = format ? format : generalCurrencyFormat;
|
1701 |
+
|
1702 |
+
if (format) {
|
1703 |
+
format = format.toString();
|
1704 |
+
|
1705 |
+
var formatWithoutCurrency = format.match(/\d.?\d*.?\d*/)[0],
|
1706 |
+
currencySymbol = format.replace(formatWithoutCurrency, '') || '$'; // We need to set currency symbol in any case for normal work of numeraljs
|
1707 |
+
|
1708 |
+
delimiters = (formatWithoutCurrency.match(/[^\d]/g) || [',', '.']).reverse();
|
1709 |
+
|
1710 |
+
languageData.delimiters = {
|
1711 |
+
decimal: delimiters[0],
|
1712 |
+
thousands: delimiters[1]
|
1713 |
+
};
|
1714 |
+
languageData.currency.symbol = currencySymbol;
|
1715 |
+
// We need to use dafault delimiters for format string
|
1716 |
+
preparedFormat = format
|
1717 |
+
.replace(formatWithoutCurrency, formatWithoutCurrency
|
1718 |
+
.replace(delimiters[0], '.')
|
1719 |
+
.replace(delimiters[1], ','))
|
1720 |
+
.replace(currencySymbol, '$');
|
1721 |
+
} else {
|
1722 |
+
noFormat = true;
|
1723 |
+
}
|
1724 |
+
break;
|
1725 |
+
case 'date':
|
1726 |
+
case 'time_duration':
|
1727 |
+
noFormat = true;
|
1728 |
+
break;
|
1729 |
+
default:
|
1730 |
+
if (numberFormat) {
|
1731 |
+
format = numberFormat;
|
1732 |
+
delimiters = (format.match(/[^\d]/g) || [',', '.']).reverse();
|
1733 |
+
languageData.delimiters = {
|
1734 |
+
decimal: delimiters[0],
|
1735 |
+
thousands: delimiters[1]
|
1736 |
+
};
|
1737 |
+
|
1738 |
+
// We need to use dafault delimiters for format string
|
1739 |
+
preparedFormat = format.replace(format, format.replace(delimiters[0], '.').replace(delimiters[1], ','));
|
1740 |
+
break;
|
1741 |
+
} else {
|
1742 |
+
noFormat = true;
|
1743 |
+
}
|
1744 |
+
break;
|
1745 |
+
}
|
1746 |
+
if (noFormat) {
|
1747 |
+
noFormat = false;
|
1748 |
+
} else {
|
1749 |
+
numeral.language('en', languageData);
|
1750 |
+
value = numeral(value).format(preparedFormat);
|
1751 |
+
}
|
1752 |
+
}
|
1753 |
+
}
|
1754 |
$this.html(value);
|
1755 |
});
|
1756 |
});
|
1764 |
return false;
|
1765 |
});
|
1766 |
|
1767 |
+
vendor[appName].prepareFormulaToParse = (function(value) {
|
1768 |
+
var stringsInFormula = value.match(/".+?"|'.+?'/g);
|
1769 |
+
|
1770 |
+
if (stringsInFormula && stringsInFormula.length) {
|
1771 |
+
var clearValue = value.replace(/".+?"|'.+?'/g, '%STR%'),
|
1772 |
+
index = 0;
|
1773 |
+
|
1774 |
+
clearValue = clearValue.toUpperCase();
|
1775 |
+
value = clearValue.replace(/%STR%/g, function(match) {
|
1776 |
+
var val = match;
|
1777 |
+
|
1778 |
+
if (index < stringsInFormula.length) {
|
1779 |
+
val = stringsInFormula[index];
|
1780 |
+
index++;
|
1781 |
+
}
|
1782 |
+
return val;
|
1783 |
+
});
|
1784 |
+
} else {
|
1785 |
+
value = value.toUpperCase();
|
1786 |
+
}
|
1787 |
+
return value;
|
1788 |
+
});
|
1789 |
|
1790 |
vendor[appName].Base64 = {
|
1791 |
+
_keyStr: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",
|
1792 |
+
encode: function(input) {
|
1793 |
var self = vendor[appName].Base64,
|
1794 |
+
output = "",
|
1795 |
+
i = 0,
|
1796 |
+
chr1, chr2, chr3, enc1, enc2, enc3, enc4;
|
1797 |
|
1798 |
input = self._utf8_encode(input);
|
1799 |
|
1813 |
enc4 = 64;
|
1814 |
}
|
1815 |
output = output +
|
1816 |
+
self._keyStr.charAt(enc1) + self._keyStr.charAt(enc2) +
|
1817 |
+
self._keyStr.charAt(enc3) + self._keyStr.charAt(enc4);
|
1818 |
}
|
1819 |
|
1820 |
return output;
|
1821 |
},
|
1822 |
// private method for UTF-8 encoding
|
1823 |
+
_utf8_encode: function(string) {
|
1824 |
+
string = string.replace(/\r\n/g, "\n");
|
1825 |
var utftext = "";
|
1826 |
|
1827 |
for (var n = 0; n < string.length; n++) {
|
1830 |
|
1831 |
if (c < 128) {
|
1832 |
utftext += String.fromCharCode(c);
|
1833 |
+
} else if ((c > 127) && (c < 2048)) {
|
|
|
1834 |
utftext += String.fromCharCode((c >> 6) | 192);
|
1835 |
utftext += String.fromCharCode((c & 63) | 128);
|
1836 |
+
} else {
|
|
|
1837 |
utftext += String.fromCharCode((c >> 12) | 224);
|
1838 |
utftext += String.fromCharCode(((c >> 6) & 63) | 128);
|
1839 |
utftext += String.fromCharCode((c & 63) | 128);
|
1845 |
}
|
1846 |
};
|
1847 |
|
1848 |
+
vendor[appName].getClassesRegexp = (function() {
|
1849 |
+
return {
|
1850 |
+
color: /color\-([0-9a-f]{6})/,
|
1851 |
+
background: /bg\-([0-9a-f]{6})/,
|
1852 |
+
fontFamily: /ffamily\-([a-z_]+)/i,
|
1853 |
+
fontSize: /fsize\-([0-9]+)/
|
1854 |
+
}
|
1855 |
+
});
|
1856 |
+
|
1857 |
+
vendor[appName].setStylesToCell = (function(cell) {
|
1858 |
+
var $cell = cell instanceof jQuery ? cell : $(cell),
|
1859 |
+
viewId = $cell.parents('.supsystic-table:first').data('view-id'),
|
1860 |
+
classes = this.getClassesRegexp(),
|
1861 |
+
cellClassNames = $cell.get(0).className,
|
1862 |
+
color = classes.color.exec(cellClassNames),
|
1863 |
+
background = classes.background.exec(cellClassNames),
|
1864 |
+
fontFamily = classes.fontFamily.exec(cellClassNames),
|
1865 |
+
fontSize = classes.fontSize.exec(cellClassNames);
|
1866 |
+
|
1867 |
+
if (null !== color) {
|
1868 |
+
$cell.css({
|
1869 |
+
color: '#' + color[1]
|
1870 |
+
});
|
1871 |
+
}
|
1872 |
+
if (null !== background) {
|
1873 |
+
$cell.css({
|
1874 |
+
backgroundColor: '#' + background[1]
|
1875 |
+
});
|
1876 |
+
}
|
1877 |
+
if (null !== fontFamily) {
|
1878 |
+
var family = fontFamily[1].replace(/_/g, ' '),
|
1879 |
+
familyName = fontFamily[1].replace(/_/g, '+'),
|
1880 |
+
familyString = '@import url("//fonts.googleapis.com/css?family=' + familyName + '");';
|
1881 |
+
|
1882 |
+
if (g_stbStandartFontsList &&
|
1883 |
+
toeInArray(family, g_stbStandartFontsList) == -1 &&
|
1884 |
+
g_stbAllFontsList &&
|
1885 |
+
toeInArray(family, g_stbAllFontsList) != -1
|
1886 |
+
) {
|
1887 |
+
var style = this.getFrontendCellStylesElem(viewId);
|
1888 |
+
|
1889 |
+
if (style.text().indexOf(familyString) == -1) {
|
1890 |
+
style.text(familyString + '\n' + style.text());
|
1891 |
+
}
|
1892 |
+
}
|
1893 |
+
$cell.css({
|
1894 |
+
fontFamily: family
|
1895 |
+
});
|
1896 |
+
}
|
1897 |
+
if (null !== fontSize) {
|
1898 |
+
var lineHeight = +fontSize[1] + 6;
|
1899 |
+
$cell.css({
|
1900 |
+
fontSize: fontSize[1] + 'px',
|
1901 |
+
lineHeight: lineHeight + 'px'
|
1902 |
+
});
|
1903 |
+
}
|
1904 |
+
});
|
1905 |
+
|
1906 |
+
vendor[appName].getAdminCellStylesElem = (function() {
|
1907 |
+
var $style = $('#supsystic-tables-style');
|
1908 |
+
|
1909 |
+
if (!$style.length) {
|
1910 |
+
$style = $('<style/>', {
|
1911 |
+
id: 'supsystic-tables-style'
|
1912 |
+
});
|
1913 |
+
$('head').append($style);
|
1914 |
+
}
|
1915 |
+
return $style;
|
1916 |
+
});
|
1917 |
+
|
1918 |
+
vendor[appName].getFrontendCellStylesElem = (function(viewId) {
|
1919 |
+
var $style = $('#supsystic-table-' + viewId + '-css');
|
1920 |
+
|
1921 |
+
if (!$style.length) {
|
1922 |
+
$style = $('<style/>', {
|
1923 |
+
id: 'supsystic-table-' + viewId + '-css'
|
1924 |
+
});
|
1925 |
+
$('head').append($style);
|
1926 |
+
}
|
1927 |
+
return $style;
|
1928 |
+
});
|
1929 |
+
|
1930 |
+
vendor[appName]._fixTableCaption = (function(captionHeight, viewId, counter) {
|
1931 |
+
if (counter < 0) return false;
|
1932 |
+
|
1933 |
+
// Fix for displaying of caption for tables with fixed columns
|
1934 |
+
var self = this,
|
1935 |
+
tableViewHtmlId = '#supsystic-table-' + viewId,
|
1936 |
+
fixedColumnsWrapper = $(tableViewHtmlId + ' .DTFC_LeftWrapper, ' + tableViewHtmlId + ' .DTFC_RightWrapper');
|
1937 |
+
|
1938 |
+
if (fixedColumnsWrapper.length) {
|
1939 |
+
fixedColumnsWrapper.find('caption').css({
|
1940 |
+
display: 'none'
|
1941 |
+
});
|
1942 |
+
fixedColumnsWrapper.css({
|
1943 |
+
top: captionHeight + 'px'
|
1944 |
+
});
|
1945 |
+
} else {
|
1946 |
+
counter--;
|
1947 |
+
setTimeout(function() {
|
1948 |
+
self._fixTableCaption(captionHeight, viewId, counter);
|
1949 |
+
}, 50);
|
1950 |
+
}
|
1951 |
+
});
|
1952 |
+
|
1953 |
+
vendor[appName]._getChunksArray = (function(arr, len) {
|
1954 |
+
var chunks = [],
|
1955 |
+
i = 0,
|
1956 |
+
n = arr.length;
|
1957 |
+
|
1958 |
+
while (i < n) {
|
1959 |
+
chunks.push(arr.slice(i, i += len));
|
1960 |
+
}
|
1961 |
+
|
1962 |
+
return chunks;
|
1963 |
+
});
|
1964 |
+
|
1965 |
+
vendor[appName]._checkOnClickPopups = (function($table) {
|
1966 |
+
// Integration with our PopUp plugin
|
1967 |
+
// Only after table was inited - we can do this, and only in that way it will work
|
1968 |
+
if (typeof(_ppsBindOnElementClickPopups) !== 'undefined' && $table && $table.size()) {
|
1969 |
+
var $bindedLinks = $table.find('[href*="#ppsShowPopUp_"].ppsClickBinded');
|
1970 |
+
if ($bindedLinks && $bindedLinks.size()) {
|
1971 |
+
$bindedLinks.removeClass('ppsClickBinded').unbind('click');
|
1972 |
+
}
|
1973 |
+
_ppsBindOnElementClickPopups();
|
1974 |
+
}
|
1975 |
+
});
|
1976 |
+
|
1977 |
+
vendor[appName].setCellAttributes = function(cells) {
|
1978 |
+
var colspan, rowspan;
|
1979 |
+
for (var i = 0; i < cells.length; i++) {
|
1980 |
+
if (cells[i].getAttribute('data-hide')) {
|
1981 |
+
cells[i].style.display = 'none';
|
1982 |
+
}
|
1983 |
+
if (colspan = cells[i].getAttribute('data-colspan')) {
|
1984 |
+
if (colspan > 1) {
|
1985 |
+
cells[i].setAttribute('colspan', colspan);
|
1986 |
+
$(cells[i]).attr('colspan', colspan);
|
1987 |
+
}
|
1988 |
+
}
|
1989 |
+
if (rowspan = cells[i].getAttribute('data-rowspan')) {
|
1990 |
+
if (rowspan > 1) {
|
1991 |
+
cells[i].setAttribute('rowspan', rowspan);
|
1992 |
+
}
|
1993 |
+
}
|
1994 |
+
}
|
1995 |
+
};
|
1996 |
}
|
1997 |
|
1998 |
}(window.supsystic = window.supsystic || {}, window.jQuery, window));
|
1999 |
|
2000 |
// For compatibility to old PRO versions
|
2001 |
function classesRegexp() {
|
2002 |
+
return window.supsystic.Tables.getClassesRegexp();
|
2003 |
}
|
2004 |
+
|
2005 |
function getAdminCellStylesElem() {
|
2006 |
+
return window.supsystic.Tables.getAdminCellStylesElem();
|
2007 |
}
|
2008 |
|
2009 |
/**
|
2011 |
* @return mixed - key that was found element or -1 if not
|
2012 |
*/
|
2013 |
function toeInArray(needle, haystack) {
|
2014 |
+
if (typeof(haystack) == 'object') {
|
2015 |
+
for (var k in haystack) {
|
2016 |
+
if (haystack[k] == needle)
|
2017 |
return k;
|
2018 |
}
|
2019 |
+
} else if (typeof(haystack) == 'array') {
|
2020 |
return jQuery.inArray(needle, haystack);
|
2021 |
}
|
2022 |
return -1;
|
2067 |
return false;
|
2068 |
};
|
2069 |
|
2070 |
+
$.extend($.expr.pseudos || $.expr[":"], {
|
2071 |
"vertically-scrollable": function(a, i, m) {
|
2072 |
return $(a).isVerticallyScrollable();
|
2073 |
},
|
2076 |
}
|
2077 |
});
|
2078 |
|
2079 |
+
$.fn.removeStyle = function(style) {
|
|
|
2080 |
var search = new RegExp(style + '[^;]+;?', 'g');
|
2081 |
|
2082 |
+
return this.each(function() {
|
2083 |
+
$(this).attr('style', function(i, style) {
|
|
|
|
|
2084 |
return style && style.replace(search, '');
|
2085 |
});
|
2086 |
});
|
2087 |
};
|
2088 |
|
2089 |
+
if (!Array.from) {
|
2090 |
+
// Fix of compatibility with IE browser to use ES6 feature
|
2091 |
+
Array.from = (function() {
|
2092 |
+
var toStr = Object.prototype.toString;
|
2093 |
+
var isCallable = function(fn) {
|
2094 |
+
return typeof fn === 'function' || toStr.call(fn) === '[object Function]';
|
2095 |
+
};
|
2096 |
+
var toInteger = function(value) {
|
2097 |
+
var number = Number(value);
|
2098 |
+
if (isNaN(number)) {
|
2099 |
+
return 0;
|
2100 |
+
}
|
2101 |
+
if (number === 0 || !isFinite(number)) {
|
2102 |
+
return number;
|
2103 |
+
}
|
2104 |
+
return (number > 0 ? 1 : -1) * Math.floor(Math.abs(number));
|
2105 |
+
};
|
2106 |
+
var maxSafeInteger = Math.pow(2, 53) - 1;
|
2107 |
+
var toLength = function(value) {
|
2108 |
+
var len = toInteger(value);
|
2109 |
+
return Math.min(Math.max(len, 0), maxSafeInteger);
|
2110 |
+
};
|
2111 |
+
|
2112 |
+
// The length property of the from method is 1.
|
2113 |
+
return function from(arrayLike /*, mapFn, thisArg */ ) {
|
2114 |
+
// 1. Let C be the this value.
|
2115 |
+
var C = this;
|
2116 |
+
|
2117 |
+
// 2. Let items be ToObject(arrayLike).
|
2118 |
+
var items = Object(arrayLike);
|
2119 |
+
|
2120 |
+
// 3. ReturnIfAbrupt(items).
|
2121 |
+
if (arrayLike == null) {
|
2122 |
+
throw new TypeError('Array.from requires an array-like object - not null or undefined');
|
2123 |
+
}
|
2124 |
+
|
2125 |
+
// 4. If mapfn is undefined, then let mapping be false.
|
2126 |
+
var mapFn = arguments.length > 1 ? arguments[1] : void undefined;
|
2127 |
+
var T;
|
2128 |
+
if (typeof mapFn !== 'undefined') {
|
2129 |
+
// 5. else
|
2130 |
+
// 5. a If IsCallable(mapfn) is false, throw a TypeError exception.
|
2131 |
+
if (!isCallable(mapFn)) {
|
2132 |
+
throw new TypeError('Array.from: when provided, the second argument must be a function');
|
2133 |
+
}
|
2134 |
+
|
2135 |
+
// 5. b. If thisArg was supplied, let T be thisArg; else let T be undefined.
|
2136 |
+
if (arguments.length > 2) {
|
2137 |
+
T = arguments[2];
|
2138 |
+
}
|
2139 |
+
}
|
2140 |
+
|
2141 |
+
// 10. Let lenValue be Get(items, "length").
|
2142 |
+
// 11. Let len be ToLength(lenValue).
|
2143 |
+
var len = toLength(items.length);
|
2144 |
+
|
2145 |
+
// 13. If IsConstructor(C) is true, then
|
2146 |
+
// 13. a. Let A be the result of calling the [[Construct]] internal method
|
2147 |
+
// of C with an argument list containing the single item len.
|
2148 |
+
// 14. a. Else, Let A be ArrayCreate(len).
|
2149 |
+
var A = isCallable(C) ? Object(new C(len)) : new Array(len);
|
2150 |
+
|
2151 |
+
// 16. Let k be 0.
|
2152 |
+
var k = 0;
|
2153 |
+
// 17. Repeat, while k < len… (also steps a - h)
|
2154 |
+
var kValue;
|
2155 |
+
while (k < len) {
|
2156 |
+
kValue = items[k];
|
2157 |
+
if (mapFn) {
|
2158 |
+
A[k] = typeof T === 'undefined' ? mapFn(kValue, k) : mapFn.call(T, kValue, k);
|
2159 |
+
} else {
|
2160 |
+
A[k] = kValue;
|
2161 |
+
}
|
2162 |
+
k += 1;
|
2163 |
+
}
|
2164 |
+
// 18. Let putStatus be Put(A, "length", len, true).
|
2165 |
+
A.length = len;
|
2166 |
+
// 20. Return A.
|
2167 |
+
return A;
|
2168 |
+
};
|
2169 |
+
}());
|
2170 |
+
}
|
2171 |
}(jQuery));
|
src/SupsysticTables/Core/assets/js/lib/jquery.dataTables.min.js
CHANGED
@@ -1,166 +1,184 @@
|
|
1 |
/*!
|
2 |
-
|
3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
*/
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
(
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
function
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
[
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
e)
|
49 |
-
|
50 |
-
h
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
"
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
"
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
b)}
|
73 |
-
d.
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
(
|
80 |
-
|
81 |
-
|
82 |
-
function(
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
"")
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
d;
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
function(a
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
return c};
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
b.
|
128 |
-
|
129 |
-
a.
|
130 |
-
|
131 |
-
|
132 |
-
"
|
133 |
-
|
134 |
-
this
|
135 |
-
null;
|
136 |
-
(
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
this
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
/*!
|
2 |
+
Copyright 2008-2020 SpryMedia Ltd.
|
3 |
+
|
4 |
+
This source file is free software, available under the following license:
|
5 |
+
MIT license - http://datatables.net/license
|
6 |
+
|
7 |
+
This source file is distributed in the hope that it will be useful, but
|
8 |
+
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
9 |
+
or FITNESS FOR A PARTICULAR PURPOSE. See the license files for details.
|
10 |
+
|
11 |
+
For details please refer to: http://www.datatables.net
|
12 |
+
DataTables 1.10.23
|
13 |
+
©2008-2020 SpryMedia Ltd - datatables.net/license
|
14 |
*/
|
15 |
+
var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.findInternal=function(k,y,z){k instanceof String&&(k=String(k));for(var q=k.length,G=0;G<q;G++){var O=k[G];if(y.call(z,O,G,k))return{i:G,v:O}}return{i:-1,v:void 0}};$jscomp.ASSUME_ES5=!1;$jscomp.ASSUME_NO_NATIVE_MAP=!1;$jscomp.ASSUME_NO_NATIVE_SET=!1;$jscomp.SIMPLE_FROUND_POLYFILL=!1;$jscomp.ISOLATE_POLYFILLS=!1;
|
16 |
+
$jscomp.defineProperty=$jscomp.ASSUME_ES5||"function"==typeof Object.defineProperties?Object.defineProperty:function(k,y,z){if(k==Array.prototype||k==Object.prototype)return k;k[y]=z.value;return k};$jscomp.getGlobal=function(k){k=["object"==typeof globalThis&&globalThis,k,"object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof global&&global];for(var y=0;y<k.length;++y){var z=k[y];if(z&&z.Math==Math)return z}throw Error("Cannot find global object");};$jscomp.global=$jscomp.getGlobal(this);
|
17 |
+
$jscomp.IS_SYMBOL_NATIVE="function"===typeof Symbol&&"symbol"===typeof Symbol("x");$jscomp.TRUST_ES6_POLYFILLS=!$jscomp.ISOLATE_POLYFILLS||$jscomp.IS_SYMBOL_NATIVE;$jscomp.polyfills={};$jscomp.propertyToPolyfillSymbol={};$jscomp.POLYFILL_PREFIX="$jscp$";var $jscomp$lookupPolyfilledValue=function(k,y){var z=$jscomp.propertyToPolyfillSymbol[y];if(null==z)return k[y];z=k[z];return void 0!==z?z:k[y]};
|
18 |
+
$jscomp.polyfill=function(k,y,z,q){y&&($jscomp.ISOLATE_POLYFILLS?$jscomp.polyfillIsolated(k,y,z,q):$jscomp.polyfillUnisolated(k,y,z,q))};$jscomp.polyfillUnisolated=function(k,y,z,q){z=$jscomp.global;k=k.split(".");for(q=0;q<k.length-1;q++){var G=k[q];if(!(G in z))return;z=z[G]}k=k[k.length-1];q=z[k];y=y(q);y!=q&&null!=y&&$jscomp.defineProperty(z,k,{configurable:!0,writable:!0,value:y})};
|
19 |
+
$jscomp.polyfillIsolated=function(k,y,z,q){var G=k.split(".");k=1===G.length;q=G[0];q=!k&&q in $jscomp.polyfills?$jscomp.polyfills:$jscomp.global;for(var O=0;O<G.length-1;O++){var ma=G[O];if(!(ma in q))return;q=q[ma]}G=G[G.length-1];z=$jscomp.IS_SYMBOL_NATIVE&&"es6"===z?q[G]:null;y=y(z);null!=y&&(k?$jscomp.defineProperty($jscomp.polyfills,G,{configurable:!0,writable:!0,value:y}):y!==z&&($jscomp.propertyToPolyfillSymbol[G]=$jscomp.IS_SYMBOL_NATIVE?$jscomp.global.Symbol(G):$jscomp.POLYFILL_PREFIX+G,
|
20 |
+
G=$jscomp.propertyToPolyfillSymbol[G],$jscomp.defineProperty(q,G,{configurable:!0,writable:!0,value:y})))};$jscomp.polyfill("Array.prototype.find",function(k){return k?k:function(y,z){return $jscomp.findInternal(this,y,z).v}},"es6","es3");
|
21 |
+
(function(k){"function"===typeof define&&define.amd?define(["jquery"],function(y){return k(y,window,document)}):"object"===typeof exports?module.exports=function(y,z){y||(y=window);z||(z="undefined"!==typeof window?require("jquery"):require("jquery")(y));return k(z,y,y.document)}:k(jQuery,window,document)})(function(k,y,z,q){function G(a){var b,c,d={};k.each(a,function(e,f){(b=e.match(/^([^A-Z]+?)([A-Z])/))&&-1!=="a aa ai ao as b fn i m o s ".indexOf(b[1]+" ")&&(c=e.replace(b[0],b[2].toLowerCase()),
|
22 |
+
d[c]=e,"o"===b[1]&&G(a[e]))});a._hungarianMap=d}function O(a,b,c){a._hungarianMap||G(a);var d;k.each(b,function(e,f){d=a._hungarianMap[e];d===q||!c&&b[d]!==q||("o"===d.charAt(0)?(b[d]||(b[d]={}),k.extend(!0,b[d],b[e]),O(a[d],b[d],c)):b[d]=b[e])})}function ma(a){var b=u.defaults.oLanguage,c=b.sDecimal;c&&Va(c);if(a){var d=a.sZeroRecords;!a.sEmptyTable&&d&&"No data available in table"===b.sEmptyTable&&V(a,a,"sZeroRecords","sEmptyTable");!a.sLoadingRecords&&d&&"Loading..."===b.sLoadingRecords&&V(a,a,
|
23 |
+
"sZeroRecords","sLoadingRecords");a.sInfoThousands&&(a.sThousands=a.sInfoThousands);(a=a.sDecimal)&&c!==a&&Va(a)}}function yb(a){R(a,"ordering","bSort");R(a,"orderMulti","bSortMulti");R(a,"orderClasses","bSortClasses");R(a,"orderCellsTop","bSortCellsTop");R(a,"order","aaSorting");R(a,"orderFixed","aaSortingFixed");R(a,"paging","bPaginate");R(a,"pagingType","sPaginationType");R(a,"pageLength","iDisplayLength");R(a,"searching","bFilter");"boolean"===typeof a.sScrollX&&(a.sScrollX=a.sScrollX?"100%":
|
24 |
+
"");"boolean"===typeof a.scrollX&&(a.scrollX=a.scrollX?"100%":"");if(a=a.aoSearchCols)for(var b=0,c=a.length;b<c;b++)a[b]&&O(u.models.oSearch,a[b])}function zb(a){R(a,"orderable","bSortable");R(a,"orderData","aDataSort");R(a,"orderSequence","asSorting");R(a,"orderDataType","sortDataType");var b=a.aDataSort;"number"!==typeof b||Array.isArray(b)||(a.aDataSort=[b])}function Ab(a){if(!u.__browser){var b={};u.__browser=b;var c=k("<div/>").css({position:"fixed",top:0,left:-1*k(y).scrollLeft(),height:1,
|
25 |
+
width:1,overflow:"hidden"}).append(k("<div/>").css({position:"absolute",top:1,left:1,width:100,overflow:"scroll"}).append(k("<div/>").css({width:"100%",height:10}))).appendTo("body"),d=c.children(),e=d.children();b.barWidth=d[0].offsetWidth-d[0].clientWidth;b.bScrollOversize=100===e[0].offsetWidth&&100!==d[0].clientWidth;b.bScrollbarLeft=1!==Math.round(e.offset().left);b.bBounding=c[0].getBoundingClientRect().width?!0:!1;c.remove()}k.extend(a.oBrowser,u.__browser);a.oScroll.iBarWidth=u.__browser.barWidth}
|
26 |
+
function Bb(a,b,c,d,e,f){var g=!1;if(c!==q){var h=c;g=!0}for(;d!==e;)a.hasOwnProperty(d)&&(h=g?b(h,a[d],d,a):a[d],g=!0,d+=f);return h}function Wa(a,b){var c=u.defaults.column,d=a.aoColumns.length;c=k.extend({},u.models.oColumn,c,{nTh:b?b:z.createElement("th"),sTitle:c.sTitle?c.sTitle:b?b.innerHTML:"",aDataSort:c.aDataSort?c.aDataSort:[d],mData:c.mData?c.mData:d,idx:d});a.aoColumns.push(c);c=a.aoPreSearchCols;c[d]=k.extend({},u.models.oSearch,c[d]);Da(a,d,k(b).data())}function Da(a,b,c){b=a.aoColumns[b];
|
27 |
+
var d=a.oClasses,e=k(b.nTh);if(!b.sWidthOrig){b.sWidthOrig=e.attr("width")||null;var f=(e.attr("style")||"").match(/width:\s*(\d+[pxem%]+)/);f&&(b.sWidthOrig=f[1])}c!==q&&null!==c&&(zb(c),O(u.defaults.column,c,!0),c.mDataProp===q||c.mData||(c.mData=c.mDataProp),c.sType&&(b._sManualType=c.sType),c.className&&!c.sClass&&(c.sClass=c.className),c.sClass&&e.addClass(c.sClass),k.extend(b,c),V(b,c,"sWidth","sWidthOrig"),c.iDataSort!==q&&(b.aDataSort=[c.iDataSort]),V(b,c,"aDataSort"));var g=b.mData,h=ia(g),
|
28 |
+
l=b.mRender?ia(b.mRender):null;c=function(n){return"string"===typeof n&&-1!==n.indexOf("@")};b._bAttrSrc=k.isPlainObject(g)&&(c(g.sort)||c(g.type)||c(g.filter));b._setter=null;b.fnGetData=function(n,m,p){var t=h(n,m,q,p);return l&&m?l(t,m,n,p):t};b.fnSetData=function(n,m,p){return da(g)(n,m,p)};"number"!==typeof g&&(a._rowReadObject=!0);a.oFeatures.bSort||(b.bSortable=!1,e.addClass(d.sSortableNone));a=-1!==k.inArray("asc",b.asSorting);c=-1!==k.inArray("desc",b.asSorting);b.bSortable&&(a||c)?a&&!c?
|
29 |
+
(b.sSortingClass=d.sSortableAsc,b.sSortingClassJUI=d.sSortJUIAscAllowed):!a&&c?(b.sSortingClass=d.sSortableDesc,b.sSortingClassJUI=d.sSortJUIDescAllowed):(b.sSortingClass=d.sSortable,b.sSortingClassJUI=d.sSortJUI):(b.sSortingClass=d.sSortableNone,b.sSortingClassJUI="")}function ra(a){if(!1!==a.oFeatures.bAutoWidth){var b=a.aoColumns;Xa(a);for(var c=0,d=b.length;c<d;c++)b[c].nTh.style.width=b[c].sWidth}b=a.oScroll;""===b.sY&&""===b.sX||Ea(a);I(a,null,"column-sizing",[a])}function sa(a,b){a=Fa(a,"bVisible");
|
30 |
+
return"number"===typeof a[b]?a[b]:null}function ta(a,b){a=Fa(a,"bVisible");b=k.inArray(b,a);return-1!==b?b:null}function na(a){var b=0;k.each(a.aoColumns,function(c,d){d.bVisible&&"none"!==k(d.nTh).css("display")&&b++});return b}function Fa(a,b){var c=[];k.map(a.aoColumns,function(d,e){d[b]&&c.push(e)});return c}function Ya(a){var b=a.aoColumns,c=a.aoData,d=u.ext.type.detect,e,f,g;var h=0;for(e=b.length;h<e;h++){var l=b[h];var n=[];if(!l.sType&&l._sManualType)l.sType=l._sManualType;else if(!l.sType){var m=
|
31 |
+
0;for(f=d.length;m<f;m++){var p=0;for(g=c.length;p<g;p++){n[p]===q&&(n[p]=S(a,p,h,"type"));var t=d[m](n[p],a);if(!t&&m!==d.length-1)break;if("html"===t)break}if(t){l.sType=t;break}}l.sType||(l.sType="string")}}}function Cb(a,b,c,d){var e,f,g,h=a.aoColumns;if(b)for(e=b.length-1;0<=e;e--){var l=b[e];var n=l.targets!==q?l.targets:l.aTargets;Array.isArray(n)||(n=[n]);var m=0;for(f=n.length;m<f;m++)if("number"===typeof n[m]&&0<=n[m]){for(;h.length<=n[m];)Wa(a);d(n[m],l)}else if("number"===typeof n[m]&&
|
32 |
+
0>n[m])d(h.length+n[m],l);else if("string"===typeof n[m]){var p=0;for(g=h.length;p<g;p++)("_all"==n[m]||k(h[p].nTh).hasClass(n[m]))&&d(p,l)}}if(c)for(e=0,a=c.length;e<a;e++)d(e,c[e])}function ea(a,b,c,d){var e=a.aoData.length,f=k.extend(!0,{},u.models.oRow,{src:c?"dom":"data",idx:e});f._aData=b;a.aoData.push(f);for(var g=a.aoColumns,h=0,l=g.length;h<l;h++)g[h].sType=null;a.aiDisplayMaster.push(e);b=a.rowIdFn(b);b!==q&&(a.aIds[b]=f);!c&&a.oFeatures.bDeferRender||Za(a,e,c,d);return e}function Ga(a,
|
33 |
+
b){var c;b instanceof k||(b=k(b));return b.map(function(d,e){c=$a(a,e);return ea(a,c.data,e,c.cells)})}function S(a,b,c,d){var e=a.iDraw,f=a.aoColumns[c],g=a.aoData[b]._aData,h=f.sDefaultContent,l=f.fnGetData(g,d,{settings:a,row:b,col:c});if(l===q)return a.iDrawError!=e&&null===h&&(aa(a,0,"Requested unknown parameter "+("function"==typeof f.mData?"{function}":"'"+f.mData+"'")+" for row "+b+", column "+c,4),a.iDrawError=e),h;if((l===g||null===l)&&null!==h&&d!==q)l=h;else if("function"===typeof l)return l.call(g);
|
34 |
+
return null===l&&"display"==d?"":l}function Db(a,b,c,d){a.aoColumns[c].fnSetData(a.aoData[b]._aData,d,{settings:a,row:b,col:c})}function ab(a){return k.map(a.match(/(\\.|[^\.])+/g)||[""],function(b){return b.replace(/\\\./g,".")})}function ia(a){if(k.isPlainObject(a)){var b={};k.each(a,function(d,e){e&&(b[d]=ia(e))});return function(d,e,f,g){var h=b[e]||b._;return h!==q?h(d,e,f,g):d}}if(null===a)return function(d){return d};if("function"===typeof a)return function(d,e,f,g){return a(d,e,f,g)};if("string"!==
|
35 |
+
typeof a||-1===a.indexOf(".")&&-1===a.indexOf("[")&&-1===a.indexOf("("))return function(d,e){return d[a]};var c=function(d,e,f){if(""!==f){var g=ab(f);for(var h=0,l=g.length;h<l;h++){f=g[h].match(ua);var n=g[h].match(oa);if(f){g[h]=g[h].replace(ua,"");""!==g[h]&&(d=d[g[h]]);n=[];g.splice(0,h+1);g=g.join(".");if(Array.isArray(d))for(h=0,l=d.length;h<l;h++)n.push(c(d[h],e,g));d=f[0].substring(1,f[0].length-1);d=""===d?n:n.join(d);break}else if(n){g[h]=g[h].replace(oa,"");d=d[g[h]]();continue}if(null===
|
36 |
+
d||d[g[h]]===q)return q;d=d[g[h]]}}return d};return function(d,e){return c(d,e,a)}}function da(a){if(k.isPlainObject(a))return da(a._);if(null===a)return function(){};if("function"===typeof a)return function(c,d,e){a(c,"set",d,e)};if("string"!==typeof a||-1===a.indexOf(".")&&-1===a.indexOf("[")&&-1===a.indexOf("("))return function(c,d){c[a]=d};var b=function(c,d,e){e=ab(e);var f=e[e.length-1];for(var g,h,l=0,n=e.length-1;l<n;l++){if("__proto__"===e[l]||"constructor"===e[l])throw Error("Cannot set prototype values");
|
37 |
+
g=e[l].match(ua);h=e[l].match(oa);if(g){e[l]=e[l].replace(ua,"");c[e[l]]=[];f=e.slice();f.splice(0,l+1);g=f.join(".");if(Array.isArray(d))for(h=0,n=d.length;h<n;h++)f={},b(f,d[h],g),c[e[l]].push(f);else c[e[l]]=d;return}h&&(e[l]=e[l].replace(oa,""),c=c[e[l]](d));if(null===c[e[l]]||c[e[l]]===q)c[e[l]]={};c=c[e[l]]}if(f.match(oa))c[f.replace(oa,"")](d);else c[f.replace(ua,"")]=d};return function(c,d){return b(c,d,a)}}function bb(a){return T(a.aoData,"_aData")}function Ha(a){a.aoData.length=0;a.aiDisplayMaster.length=
|
38 |
+
0;a.aiDisplay.length=0;a.aIds={}}function Ia(a,b,c){for(var d=-1,e=0,f=a.length;e<f;e++)a[e]==b?d=e:a[e]>b&&a[e]--; -1!=d&&c===q&&a.splice(d,1)}function va(a,b,c,d){var e=a.aoData[b],f,g=function(l,n){for(;l.childNodes.length;)l.removeChild(l.firstChild);l.innerHTML=S(a,b,n,"display")};if("dom"!==c&&(c&&"auto"!==c||"dom"!==e.src)){var h=e.anCells;if(h)if(d!==q)g(h[d],d);else for(c=0,f=h.length;c<f;c++)g(h[c],c)}else e._aData=$a(a,e,d,d===q?q:e._aData).data;e._aSortData=null;e._aFilterData=null;g=
|
39 |
+
a.aoColumns;if(d!==q)g[d].sType=null;else{c=0;for(f=g.length;c<f;c++)g[c].sType=null;cb(a,e)}}function $a(a,b,c,d){var e=[],f=b.firstChild,g,h=0,l,n=a.aoColumns,m=a._rowReadObject;d=d!==q?d:m?{}:[];var p=function(x,r){if("string"===typeof x){var A=x.indexOf("@");-1!==A&&(A=x.substring(A+1),da(x)(d,r.getAttribute(A)))}},t=function(x){if(c===q||c===h)g=n[h],l=x.innerHTML.trim(),g&&g._bAttrSrc?(da(g.mData._)(d,l),p(g.mData.sort,x),p(g.mData.type,x),p(g.mData.filter,x)):m?(g._setter||(g._setter=da(g.mData)),
|
40 |
+
g._setter(d,l)):d[h]=l;h++};if(f)for(;f;){var v=f.nodeName.toUpperCase();if("TD"==v||"TH"==v)t(f),e.push(f);f=f.nextSibling}else for(e=b.anCells,f=0,v=e.length;f<v;f++)t(e[f]);(b=b.firstChild?b:b.nTr)&&(b=b.getAttribute("id"))&&da(a.rowId)(d,b);return{data:d,cells:e}}function Za(a,b,c,d){var e=a.aoData[b],f=e._aData,g=[],h,l;if(null===e.nTr){var n=c||z.createElement("tr");e.nTr=n;e.anCells=g;n._DT_RowIndex=b;cb(a,e);var m=0;for(h=a.aoColumns.length;m<h;m++){var p=a.aoColumns[m];e=(l=c?!1:!0)?z.createElement(p.sCellType):
|
41 |
+
d[m];e._DT_CellIndex={row:b,column:m};g.push(e);if(l||!(!p.mRender&&p.mData===m||k.isPlainObject(p.mData)&&p.mData._===m+".display"))e.innerHTML=S(a,b,m,"display");p.sClass&&(e.className+=" "+p.sClass);p.bVisible&&!c?n.appendChild(e):!p.bVisible&&c&&e.parentNode.removeChild(e);p.fnCreatedCell&&p.fnCreatedCell.call(a.oInstance,e,S(a,b,m),f,b,m)}I(a,"aoRowCreatedCallback",null,[n,f,b,g])}}function cb(a,b){var c=b.nTr,d=b._aData;if(c){if(a=a.rowIdFn(d))c.id=a;d.DT_RowClass&&(a=d.DT_RowClass.split(" "),
|
42 |
+
b.__rowc=b.__rowc?Ja(b.__rowc.concat(a)):a,k(c).removeClass(b.__rowc.join(" ")).addClass(d.DT_RowClass));d.DT_RowAttr&&k(c).attr(d.DT_RowAttr);d.DT_RowData&&k(c).data(d.DT_RowData)}}function Eb(a){var b,c,d=a.nTHead,e=a.nTFoot,f=0===k("th, td",d).length,g=a.oClasses,h=a.aoColumns;f&&(c=k("<tr/>").appendTo(d));var l=0;for(b=h.length;l<b;l++){var n=h[l];var m=k(n.nTh).addClass(n.sClass);f&&m.appendTo(c);a.oFeatures.bSort&&(m.addClass(n.sSortingClass),!1!==n.bSortable&&(m.attr("tabindex",a.iTabIndex).attr("aria-controls",
|
43 |
+
a.sTableId),db(a,n.nTh,l)));n.sTitle!=m[0].innerHTML&&m.html(n.sTitle);eb(a,"header")(a,m,n,g)}f&&wa(a.aoHeader,d);k(d).children("tr").attr("role","row");k(d).children("tr").children("th, td").addClass(g.sHeaderTH);k(e).children("tr").children("th, td").addClass(g.sFooterTH);if(null!==e)for(a=a.aoFooter[0],l=0,b=a.length;l<b;l++)n=h[l],n.nTf=a[l].cell,n.sClass&&k(n.nTf).addClass(n.sClass)}function xa(a,b,c){var d,e,f=[],g=[],h=a.aoColumns.length;if(b){c===q&&(c=!1);var l=0;for(d=b.length;l<d;l++){f[l]=
|
44 |
+
b[l].slice();f[l].nTr=b[l].nTr;for(e=h-1;0<=e;e--)a.aoColumns[e].bVisible||c||f[l].splice(e,1);g.push([])}l=0;for(d=f.length;l<d;l++){if(a=f[l].nTr)for(;e=a.firstChild;)a.removeChild(e);e=0;for(b=f[l].length;e<b;e++){var n=h=1;if(g[l][e]===q){a.appendChild(f[l][e].cell);for(g[l][e]=1;f[l+h]!==q&&f[l][e].cell==f[l+h][e].cell;)g[l+h][e]=1,h++;for(;f[l][e+n]!==q&&f[l][e].cell==f[l][e+n].cell;){for(c=0;c<h;c++)g[l+c][e+n]=1;n++}k(f[l][e].cell).attr("rowspan",h).attr("colspan",n)}}}}}function fa(a){var b=
|
45 |
+
I(a,"aoPreDrawCallback","preDraw",[a]);if(-1!==k.inArray(!1,b))U(a,!1);else{b=[];var c=0,d=a.asStripeClasses,e=d.length,f=a.oLanguage,g=a.iInitDisplayStart,h="ssp"==P(a),l=a.aiDisplay;a.bDrawing=!0;g!==q&&-1!==g&&(a._iDisplayStart=h?g:g>=a.fnRecordsDisplay()?0:g,a.iInitDisplayStart=-1);g=a._iDisplayStart;var n=a.fnDisplayEnd();if(a.bDeferLoading)a.bDeferLoading=!1,a.iDraw++,U(a,!1);else if(!h)a.iDraw++;else if(!a.bDestroying&&!Fb(a))return;if(0!==l.length)for(f=h?a.aoData.length:n,h=h?0:g;h<f;h++){var m=
|
46 |
+
l[h],p=a.aoData[m];null===p.nTr&&Za(a,m);var t=p.nTr;if(0!==e){var v=d[c%e];p._sRowStripe!=v&&(k(t).removeClass(p._sRowStripe).addClass(v),p._sRowStripe=v)}I(a,"aoRowCallback",null,[t,p._aData,c,h,m]);b.push(t);c++}else c=f.sZeroRecords,1==a.iDraw&&"ajax"==P(a)?c=f.sLoadingRecords:f.sEmptyTable&&0===a.fnRecordsTotal()&&(c=f.sEmptyTable),b[0]=k("<tr/>",{"class":e?d[0]:""}).append(k("<td />",{valign:"top",colSpan:na(a),"class":a.oClasses.sRowEmpty}).html(c))[0];I(a,"aoHeaderCallback","header",[k(a.nTHead).children("tr")[0],
|
47 |
+
bb(a),g,n,l]);I(a,"aoFooterCallback","footer",[k(a.nTFoot).children("tr")[0],bb(a),g,n,l]);d=k(a.nTBody);d.children().detach();d.append(k(b));I(a,"aoDrawCallback","draw",[a]);a.bSorted=!1;a.bFiltered=!1;a.bDrawing=!1}}function ja(a,b){var c=a.oFeatures,d=c.bFilter;c.bSort&&Gb(a);d?ya(a,a.oPreviousSearch):a.aiDisplay=a.aiDisplayMaster.slice();!0!==b&&(a._iDisplayStart=0);a._drawHold=b;fa(a);a._drawHold=!1}function Hb(a){var b=a.oClasses,c=k(a.nTable);c=k("<div/>").insertBefore(c);var d=a.oFeatures,
|
48 |
+
e=k("<div/>",{id:a.sTableId+"_wrapper","class":b.sWrapper+(a.nTFoot?"":" "+b.sNoFooter)});a.nHolding=c[0];a.nTableWrapper=e[0];a.nTableReinsertBefore=a.nTable.nextSibling;for(var f=a.sDom.split(""),g,h,l,n,m,p,t=0;t<f.length;t++){g=null;h=f[t];if("<"==h){l=k("<div/>")[0];n=f[t+1];if("'"==n||'"'==n){m="";for(p=2;f[t+p]!=n;)m+=f[t+p],p++;"H"==m?m=b.sJUIHeader:"F"==m&&(m=b.sJUIFooter);-1!=m.indexOf(".")?(n=m.split("."),l.id=n[0].substr(1,n[0].length-1),l.className=n[1]):"#"==m.charAt(0)?l.id=m.substr(1,
|
49 |
+
m.length-1):l.className=m;t+=p}e.append(l);e=k(l)}else if(">"==h)e=e.parent();else if("l"==h&&d.bPaginate&&d.bLengthChange)g=Ib(a);else if("f"==h&&d.bFilter)g=Jb(a);else if("r"==h&&d.bProcessing)g=Kb(a);else if("t"==h)g=Lb(a);else if("i"==h&&d.bInfo)g=Mb(a);else if("p"==h&&d.bPaginate)g=Nb(a);else if(0!==u.ext.feature.length)for(l=u.ext.feature,p=0,n=l.length;p<n;p++)if(h==l[p].cFeature){g=l[p].fnInit(a);break}g&&(l=a.aanFeatures,l[h]||(l[h]=[]),l[h].push(g),e.append(g))}c.replaceWith(e);a.nHolding=
|
50 |
+
null}function wa(a,b){b=k(b).children("tr");var c,d,e;a.splice(0,a.length);var f=0;for(e=b.length;f<e;f++)a.push([]);f=0;for(e=b.length;f<e;f++){var g=b[f];for(c=g.firstChild;c;){if("TD"==c.nodeName.toUpperCase()||"TH"==c.nodeName.toUpperCase()){var h=1*c.getAttribute("colspan");var l=1*c.getAttribute("rowspan");h=h&&0!==h&&1!==h?h:1;l=l&&0!==l&&1!==l?l:1;var n=0;for(d=a[f];d[n];)n++;var m=n;var p=1===h?!0:!1;for(d=0;d<h;d++)for(n=0;n<l;n++)a[f+n][m+d]={cell:c,unique:p},a[f+n].nTr=g}c=c.nextSibling}}}
|
51 |
+
function Ka(a,b,c){var d=[];c||(c=a.aoHeader,b&&(c=[],wa(c,b)));b=0;for(var e=c.length;b<e;b++)for(var f=0,g=c[b].length;f<g;f++)!c[b][f].unique||d[f]&&a.bSortCellsTop||(d[f]=c[b][f].cell);return d}function La(a,b,c){I(a,"aoServerParams","serverParams",[b]);if(b&&Array.isArray(b)){var d={},e=/(.*?)\[\]$/;k.each(b,function(m,p){(m=p.name.match(e))?(m=m[0],d[m]||(d[m]=[]),d[m].push(p.value)):d[p.name]=p.value});b=d}var f=a.ajax,g=a.oInstance,h=function(m){I(a,null,"xhr",[a,m,a.jqXHR]);c(m)};if(k.isPlainObject(f)&&
|
52 |
+
f.data){var l=f.data;var n="function"===typeof l?l(b,a):l;b="function"===typeof l&&n?n:k.extend(!0,b,n);delete f.data}n={data:b,success:function(m){var p=m.error||m.sError;p&&aa(a,0,p);a.json=m;h(m)},dataType:"json",cache:!1,type:a.sServerMethod,error:function(m,p,t){t=I(a,null,"xhr",[a,null,a.jqXHR]);-1===k.inArray(!0,t)&&("parsererror"==p?aa(a,0,"Invalid JSON response",1):4===m.readyState&&aa(a,0,"Ajax error",7));U(a,!1)}};a.oAjaxData=b;I(a,null,"preXhr",[a,b]);a.fnServerData?a.fnServerData.call(g,
|
53 |
+
a.sAjaxSource,k.map(b,function(m,p){return{name:p,value:m}}),h,a):a.sAjaxSource||"string"===typeof f?a.jqXHR=k.ajax(k.extend(n,{url:f||a.sAjaxSource})):"function"===typeof f?a.jqXHR=f.call(g,b,h,a):(a.jqXHR=k.ajax(k.extend(n,f)),f.data=l)}function Fb(a){return a.bAjaxDataGet?(a.iDraw++,U(a,!0),La(a,Ob(a),function(b){Pb(a,b)}),!1):!0}function Ob(a){var b=a.aoColumns,c=b.length,d=a.oFeatures,e=a.oPreviousSearch,f=a.aoPreSearchCols,g=[],h=pa(a);var l=a._iDisplayStart;var n=!1!==d.bPaginate?a._iDisplayLength:
|
54 |
+
-1;var m=function(x,r){g.push({name:x,value:r})};m("sEcho",a.iDraw);m("iColumns",c);m("sColumns",T(b,"sName").join(","));m("iDisplayStart",l);m("iDisplayLength",n);var p={draw:a.iDraw,columns:[],order:[],start:l,length:n,search:{value:e.sSearch,regex:e.bRegex}};for(l=0;l<c;l++){var t=b[l];var v=f[l];n="function"==typeof t.mData?"function":t.mData;p.columns.push({data:n,name:t.sName,searchable:t.bSearchable,orderable:t.bSortable,search:{value:v.sSearch,regex:v.bRegex}});m("mDataProp_"+l,n);d.bFilter&&
|
55 |
+
(m("sSearch_"+l,v.sSearch),m("bRegex_"+l,v.bRegex),m("bSearchable_"+l,t.bSearchable));d.bSort&&m("bSortable_"+l,t.bSortable)}d.bFilter&&(m("sSearch",e.sSearch),m("bRegex",e.bRegex));d.bSort&&(k.each(h,function(x,r){p.order.push({column:r.col,dir:r.dir});m("iSortCol_"+x,r.col);m("sSortDir_"+x,r.dir)}),m("iSortingCols",h.length));b=u.ext.legacy.ajax;return null===b?a.sAjaxSource?g:p:b?g:p}function Pb(a,b){var c=function(g,h){return b[g]!==q?b[g]:b[h]},d=Ma(a,b),e=c("sEcho","draw"),f=c("iTotalRecords",
|
56 |
+
"recordsTotal");c=c("iTotalDisplayRecords","recordsFiltered");if(e!==q){if(1*e<a.iDraw)return;a.iDraw=1*e}Ha(a);a._iRecordsTotal=parseInt(f,10);a._iRecordsDisplay=parseInt(c,10);e=0;for(f=d.length;e<f;e++)ea(a,d[e]);a.aiDisplay=a.aiDisplayMaster.slice();a.bAjaxDataGet=!1;fa(a);a._bInitComplete||Na(a,b);a.bAjaxDataGet=!0;U(a,!1)}function Ma(a,b){a=k.isPlainObject(a.ajax)&&a.ajax.dataSrc!==q?a.ajax.dataSrc:a.sAjaxDataProp;return"data"===a?b.aaData||b[a]:""!==a?ia(a)(b):b}function Jb(a){var b=a.oClasses,
|
57 |
+
c=a.sTableId,d=a.oLanguage,e=a.oPreviousSearch,f=a.aanFeatures,g='<input type="search" class="'+b.sFilterInput+'"/>',h=d.sSearch;h=h.match(/_INPUT_/)?h.replace("_INPUT_",g):h+g;b=k("<div/>",{id:f.f?null:c+"_filter","class":b.sFilter}).append(k("<label/>").append(h));var l=function(){var m=this.value?this.value:"";m!=e.sSearch&&(ya(a,{sSearch:m,bRegex:e.bRegex,bSmart:e.bSmart,bCaseInsensitive:e.bCaseInsensitive}),a._iDisplayStart=0,fa(a))};f=null!==a.searchDelay?a.searchDelay:"ssp"===P(a)?400:0;var n=
|
58 |
+
k("input",b).val(e.sSearch).attr("placeholder",d.sSearchPlaceholder).on("keyup.DT search.DT input.DT paste.DT cut.DT",f?fb(l,f):l).on("mouseup",function(m){setTimeout(function(){l.call(n[0])},10)}).on("keypress.DT",function(m){if(13==m.keyCode)return!1}).attr("aria-controls",c);k(a.nTable).on("search.dt.DT",function(m,p){if(a===p)try{n[0]!==z.activeElement&&n.val(e.sSearch)}catch(t){}});return b[0]}function ya(a,b,c){var d=a.oPreviousSearch,e=a.aoPreSearchCols,f=function(h){d.sSearch=h.sSearch;d.bRegex=
|
59 |
+
h.bRegex;d.bSmart=h.bSmart;d.bCaseInsensitive=h.bCaseInsensitive},g=function(h){return h.bEscapeRegex!==q?!h.bEscapeRegex:h.bRegex};Ya(a);if("ssp"!=P(a)){Qb(a,b.sSearch,c,g(b),b.bSmart,b.bCaseInsensitive);f(b);for(b=0;b<e.length;b++)Rb(a,e[b].sSearch,b,g(e[b]),e[b].bSmart,e[b].bCaseInsensitive);Sb(a)}else f(b);a.bFiltered=!0;I(a,null,"search",[a])}function Sb(a){for(var b=u.ext.search,c=a.aiDisplay,d,e,f=0,g=b.length;f<g;f++){for(var h=[],l=0,n=c.length;l<n;l++)e=c[l],d=a.aoData[e],b[f](a,d._aFilterData,
|
60 |
+
e,d._aData,l)&&h.push(e);c.length=0;k.merge(c,h)}}function Rb(a,b,c,d,e,f){if(""!==b){var g=[],h=a.aiDisplay;d=gb(b,d,e,f);for(e=0;e<h.length;e++)b=a.aoData[h[e]]._aFilterData[c],d.test(b)&&g.push(h[e]);a.aiDisplay=g}}function Qb(a,b,c,d,e,f){e=gb(b,d,e,f);var g=a.oPreviousSearch.sSearch,h=a.aiDisplayMaster;f=[];0!==u.ext.search.length&&(c=!0);var l=Tb(a);if(0>=b.length)a.aiDisplay=h.slice();else{if(l||c||d||g.length>b.length||0!==b.indexOf(g)||a.bSorted)a.aiDisplay=h.slice();b=a.aiDisplay;for(c=
|
61 |
+
0;c<b.length;c++)e.test(a.aoData[b[c]]._sFilterRow)&&f.push(b[c]);a.aiDisplay=f}}function gb(a,b,c,d){a=b?a:hb(a);c&&(a="^(?=.*?"+k.map(a.match(/"[^"]+"|[^ ]+/g)||[""],function(e){if('"'===e.charAt(0)){var f=e.match(/^"(.*)"$/);e=f?f[1]:e}return e.replace('"',"")}).join(")(?=.*?")+").*$");return new RegExp(a,d?"i":"")}function Tb(a){var b=a.aoColumns,c,d,e=u.ext.type.search;var f=!1;var g=0;for(c=a.aoData.length;g<c;g++){var h=a.aoData[g];if(!h._aFilterData){var l=[];var n=0;for(d=b.length;n<d;n++){f=
|
62 |
+
b[n];if(f.bSearchable){var m=S(a,g,n,"filter");e[f.sType]&&(m=e[f.sType](m));null===m&&(m="");"string"!==typeof m&&m.toString&&(m=m.toString())}else m="";m.indexOf&&-1!==m.indexOf("&")&&(Oa.innerHTML=m,m=rc?Oa.textContent:Oa.innerText);m.replace&&(m=m.replace(/[\r\n\u2028]/g,""));l.push(m)}h._aFilterData=l;h._sFilterRow=l.join(" ");f=!0}}return f}function Ub(a){return{search:a.sSearch,smart:a.bSmart,regex:a.bRegex,caseInsensitive:a.bCaseInsensitive}}function Vb(a){return{sSearch:a.search,bSmart:a.smart,
|
63 |
+
bRegex:a.regex,bCaseInsensitive:a.caseInsensitive}}function Mb(a){var b=a.sTableId,c=a.aanFeatures.i,d=k("<div/>",{"class":a.oClasses.sInfo,id:c?null:b+"_info"});c||(a.aoDrawCallback.push({fn:Wb,sName:"information"}),d.attr("role","status").attr("aria-live","polite"),k(a.nTable).attr("aria-describedby",b+"_info"));return d[0]}function Wb(a){var b=a.aanFeatures.i;if(0!==b.length){var c=a.oLanguage,d=a._iDisplayStart+1,e=a.fnDisplayEnd(),f=a.fnRecordsTotal(),g=a.fnRecordsDisplay(),h=g?c.sInfo:c.sInfoEmpty;
|
64 |
+
g!==f&&(h+=" "+c.sInfoFiltered);h+=c.sInfoPostFix;h=Xb(a,h);c=c.fnInfoCallback;null!==c&&(h=c.call(a.oInstance,a,d,e,f,g,h));k(b).html(h)}}function Xb(a,b){var c=a.fnFormatNumber,d=a._iDisplayStart+1,e=a._iDisplayLength,f=a.fnRecordsDisplay(),g=-1===e;return b.replace(/_START_/g,c.call(a,d)).replace(/_END_/g,c.call(a,a.fnDisplayEnd())).replace(/_MAX_/g,c.call(a,a.fnRecordsTotal())).replace(/_TOTAL_/g,c.call(a,f)).replace(/_PAGE_/g,c.call(a,g?1:Math.ceil(d/e))).replace(/_PAGES_/g,c.call(a,g?1:Math.ceil(f/
|
65 |
+
e)))}function za(a){var b=a.iInitDisplayStart,c=a.aoColumns;var d=a.oFeatures;var e=a.bDeferLoading;if(a.bInitialised){Hb(a);Eb(a);xa(a,a.aoHeader);xa(a,a.aoFooter);U(a,!0);d.bAutoWidth&&Xa(a);var f=0;for(d=c.length;f<d;f++){var g=c[f];g.sWidth&&(g.nTh.style.width=K(g.sWidth))}I(a,null,"preInit",[a]);ja(a);c=P(a);if("ssp"!=c||e)"ajax"==c?La(a,[],function(h){var l=Ma(a,h);for(f=0;f<l.length;f++)ea(a,l[f]);a.iInitDisplayStart=b;ja(a);U(a,!1);Na(a,h)},a):(U(a,!1),Na(a))}else setTimeout(function(){za(a)},
|
66 |
+
200)}function Na(a,b){a._bInitComplete=!0;(b||a.oInit.aaData)&&ra(a);I(a,null,"plugin-init",[a,b]);I(a,"aoInitComplete","init",[a,b])}function ib(a,b){b=parseInt(b,10);a._iDisplayLength=b;jb(a);I(a,null,"length",[a,b])}function Ib(a){var b=a.oClasses,c=a.sTableId,d=a.aLengthMenu,e=Array.isArray(d[0]),f=e?d[0]:d;d=e?d[1]:d;e=k("<select/>",{name:c+"_length","aria-controls":c,"class":b.sLengthSelect});for(var g=0,h=f.length;g<h;g++)e[0][g]=new Option("number"===typeof d[g]?a.fnFormatNumber(d[g]):d[g],
|
67 |
+
f[g]);var l=k("<div><label/></div>").addClass(b.sLength);a.aanFeatures.l||(l[0].id=c+"_length");l.children().append(a.oLanguage.sLengthMenu.replace("_MENU_",e[0].outerHTML));k("select",l).val(a._iDisplayLength).on("change.DT",function(n){ib(a,k(this).val());fa(a)});k(a.nTable).on("length.dt.DT",function(n,m,p){a===m&&k("select",l).val(p)});return l[0]}function Nb(a){var b=a.sPaginationType,c=u.ext.pager[b],d="function"===typeof c,e=function(g){fa(g)};b=k("<div/>").addClass(a.oClasses.sPaging+b)[0];
|
68 |
+
var f=a.aanFeatures;d||c.fnInit(a,b,e);f.p||(b.id=a.sTableId+"_paginate",a.aoDrawCallback.push({fn:function(g){if(d){var h=g._iDisplayStart,l=g._iDisplayLength,n=g.fnRecordsDisplay(),m=-1===l;h=m?0:Math.ceil(h/l);l=m?1:Math.ceil(n/l);n=c(h,l);var p;m=0;for(p=f.p.length;m<p;m++)eb(g,"pageButton")(g,f.p[m],m,n,h,l)}else c.fnUpdate(g,e)},sName:"pagination"}));return b}function kb(a,b,c){var d=a._iDisplayStart,e=a._iDisplayLength,f=a.fnRecordsDisplay();0===f||-1===e?d=0:"number"===typeof b?(d=b*e,d>f&&
|
69 |
+
(d=0)):"first"==b?d=0:"previous"==b?(d=0<=e?d-e:0,0>d&&(d=0)):"next"==b?d+e<f&&(d+=e):"last"==b?d=Math.floor((f-1)/e)*e:aa(a,0,"Unknown paging action: "+b,5);b=a._iDisplayStart!==d;a._iDisplayStart=d;b&&(I(a,null,"page",[a]),c&&fa(a));return b}function Kb(a){return k("<div/>",{id:a.aanFeatures.r?null:a.sTableId+"_processing","class":a.oClasses.sProcessing}).html(a.oLanguage.sProcessing).insertBefore(a.nTable)[0]}function U(a,b){a.oFeatures.bProcessing&&k(a.aanFeatures.r).css("display",b?"block":"none");
|
70 |
+
I(a,null,"processing",[a,b])}function Lb(a){var b=k(a.nTable);b.attr("role","grid");var c=a.oScroll;if(""===c.sX&&""===c.sY)return a.nTable;var d=c.sX,e=c.sY,f=a.oClasses,g=b.children("caption"),h=g.length?g[0]._captionSide:null,l=k(b[0].cloneNode(!1)),n=k(b[0].cloneNode(!1)),m=b.children("tfoot");m.length||(m=null);l=k("<div/>",{"class":f.sScrollWrapper}).append(k("<div/>",{"class":f.sScrollHead}).css({overflow:"hidden",position:"relative",border:0,width:d?d?K(d):null:"100%"}).append(k("<div/>",
|
71 |
+
{"class":f.sScrollHeadInner}).css({"box-sizing":"content-box",width:c.sXInner||"100%"}).append(l.removeAttr("id").css("margin-left",0).append("top"===h?g:null).append(b.children("thead"))))).append(k("<div/>",{"class":f.sScrollBody}).css({position:"relative",overflow:"auto",width:d?K(d):null}).append(b));m&&l.append(k("<div/>",{"class":f.sScrollFoot}).css({overflow:"hidden",border:0,width:d?d?K(d):null:"100%"}).append(k("<div/>",{"class":f.sScrollFootInner}).append(n.removeAttr("id").css("margin-left",
|
72 |
+
0).append("bottom"===h?g:null).append(b.children("tfoot")))));b=l.children();var p=b[0];f=b[1];var t=m?b[2]:null;if(d)k(f).on("scroll.DT",function(v){v=this.scrollLeft;p.scrollLeft=v;m&&(t.scrollLeft=v)});k(f).css("max-height",e);c.bCollapse||k(f).css("height",e);a.nScrollHead=p;a.nScrollBody=f;a.nScrollFoot=t;a.aoDrawCallback.push({fn:Ea,sName:"scrolling"});return l[0]}function Ea(a){var b=a.oScroll,c=b.sX,d=b.sXInner,e=b.sY;b=b.iBarWidth;var f=k(a.nScrollHead),g=f[0].style,h=f.children("div"),l=
|
73 |
+
h[0].style,n=h.children("table");h=a.nScrollBody;var m=k(h),p=h.style,t=k(a.nScrollFoot).children("div"),v=t.children("table"),x=k(a.nTHead),r=k(a.nTable),A=r[0],E=A.style,H=a.nTFoot?k(a.nTFoot):null,W=a.oBrowser,M=W.bScrollOversize,C=T(a.aoColumns,"nTh"),B=[],ba=[],X=[],lb=[],Aa,Yb=function(F){F=F.style;F.paddingTop="0";F.paddingBottom="0";F.borderTopWidth="0";F.borderBottomWidth="0";F.height=0};var ha=h.scrollHeight>h.clientHeight;if(a.scrollBarVis!==ha&&a.scrollBarVis!==q)a.scrollBarVis=ha,ra(a);
|
74 |
+
else{a.scrollBarVis=ha;r.children("thead, tfoot").remove();if(H){var ka=H.clone().prependTo(r);var la=H.find("tr");ka=ka.find("tr")}var mb=x.clone().prependTo(r);x=x.find("tr");ha=mb.find("tr");mb.find("th, td").removeAttr("tabindex");c||(p.width="100%",f[0].style.width="100%");k.each(Ka(a,mb),function(F,Y){Aa=sa(a,F);Y.style.width=a.aoColumns[Aa].sWidth});H&&Z(function(F){F.style.width=""},ka);f=r.outerWidth();""===c?(E.width="100%",M&&(r.find("tbody").height()>h.offsetHeight||"scroll"==m.css("overflow-y"))&&
|
75 |
+
(E.width=K(r.outerWidth()-b)),f=r.outerWidth()):""!==d&&(E.width=K(d),f=r.outerWidth());Z(Yb,ha);Z(function(F){X.push(F.innerHTML);B.push(K(k(F).css("width")))},ha);Z(function(F,Y){-1!==k.inArray(F,C)&&(F.style.width=B[Y])},x);k(ha).height(0);H&&(Z(Yb,ka),Z(function(F){lb.push(F.innerHTML);ba.push(K(k(F).css("width")))},ka),Z(function(F,Y){F.style.width=ba[Y]},la),k(ka).height(0));Z(function(F,Y){F.innerHTML='<div class="dataTables_sizing">'+X[Y]+"</div>";F.childNodes[0].style.height="0";F.childNodes[0].style.overflow=
|
76 |
+
"hidden";F.style.width=B[Y]},ha);H&&Z(function(F,Y){F.innerHTML='<div class="dataTables_sizing">'+lb[Y]+"</div>";F.childNodes[0].style.height="0";F.childNodes[0].style.overflow="hidden";F.style.width=ba[Y]},ka);r.outerWidth()<f?(la=h.scrollHeight>h.offsetHeight||"scroll"==m.css("overflow-y")?f+b:f,M&&(h.scrollHeight>h.offsetHeight||"scroll"==m.css("overflow-y"))&&(E.width=K(la-b)),""!==c&&""===d||aa(a,1,"Possible column misalignment",6)):la="100%";p.width=K(la);g.width=K(la);H&&(a.nScrollFoot.style.width=
|
77 |
+
K(la));!e&&M&&(p.height=K(A.offsetHeight+b));c=r.outerWidth();n[0].style.width=K(c);l.width=K(c);d=r.height()>h.clientHeight||"scroll"==m.css("overflow-y");e="padding"+(W.bScrollbarLeft?"Left":"Right");l[e]=d?b+"px":"0px";H&&(v[0].style.width=K(c),t[0].style.width=K(c),t[0].style[e]=d?b+"px":"0px");r.children("colgroup").insertBefore(r.children("thead"));m.trigger("scroll");!a.bSorted&&!a.bFiltered||a._drawHold||(h.scrollTop=0)}}function Z(a,b,c){for(var d=0,e=0,f=b.length,g,h;e<f;){g=b[e].firstChild;
|
78 |
+
for(h=c?c[e].firstChild:null;g;)1===g.nodeType&&(c?a(g,h,d):a(g,d),d++),g=g.nextSibling,h=c?h.nextSibling:null;e++}}function Xa(a){var b=a.nTable,c=a.aoColumns,d=a.oScroll,e=d.sY,f=d.sX,g=d.sXInner,h=c.length,l=Fa(a,"bVisible"),n=k("th",a.nTHead),m=b.getAttribute("width"),p=b.parentNode,t=!1,v,x=a.oBrowser;d=x.bScrollOversize;(v=b.style.width)&&-1!==v.indexOf("%")&&(m=v);for(v=0;v<l.length;v++){var r=c[l[v]];null!==r.sWidth&&(r.sWidth=Zb(r.sWidthOrig,p),t=!0)}if(d||!t&&!f&&!e&&h==na(a)&&h==n.length)for(v=
|
79 |
+
0;v<h;v++)l=sa(a,v),null!==l&&(c[l].sWidth=K(n.eq(v).width()));else{h=k(b).clone().css("visibility","hidden").removeAttr("id");h.find("tbody tr").remove();var A=k("<tr/>").appendTo(h.find("tbody"));h.find("thead, tfoot").remove();h.append(k(a.nTHead).clone()).append(k(a.nTFoot).clone());h.find("tfoot th, tfoot td").css("width","");n=Ka(a,h.find("thead")[0]);for(v=0;v<l.length;v++)r=c[l[v]],n[v].style.width=null!==r.sWidthOrig&&""!==r.sWidthOrig?K(r.sWidthOrig):"",r.sWidthOrig&&f&&k(n[v]).append(k("<div/>").css({width:r.sWidthOrig,
|
80 |
+
margin:0,padding:0,border:0,height:1}));if(a.aoData.length)for(v=0;v<l.length;v++)t=l[v],r=c[t],k($b(a,t)).clone(!1).append(r.sContentPadding).appendTo(A);k("[name]",h).removeAttr("name");r=k("<div/>").css(f||e?{position:"absolute",top:0,left:0,height:1,right:0,overflow:"hidden"}:{}).append(h).appendTo(p);f&&g?h.width(g):f?(h.css("width","auto"),h.removeAttr("width"),h.width()<p.clientWidth&&m&&h.width(p.clientWidth)):e?h.width(p.clientWidth):m&&h.width(m);for(v=e=0;v<l.length;v++)p=k(n[v]),g=p.outerWidth()-
|
81 |
+
p.width(),p=x.bBounding?Math.ceil(n[v].getBoundingClientRect().width):p.outerWidth(),e+=p,c[l[v]].sWidth=K(p-g);b.style.width=K(e);r.remove()}m&&(b.style.width=K(m));!m&&!f||a._reszEvt||(b=function(){k(y).on("resize.DT-"+a.sInstance,fb(function(){ra(a)}))},d?setTimeout(b,1E3):b(),a._reszEvt=!0)}function Zb(a,b){if(!a)return 0;a=k("<div/>").css("width",K(a)).appendTo(b||z.body);b=a[0].offsetWidth;a.remove();return b}function $b(a,b){var c=ac(a,b);if(0>c)return null;var d=a.aoData[c];return d.nTr?d.anCells[b]:
|
82 |
+
k("<td/>").html(S(a,c,b,"display"))[0]}function ac(a,b){for(var c,d=-1,e=-1,f=0,g=a.aoData.length;f<g;f++)c=S(a,f,b,"display")+"",c=c.replace(sc,""),c=c.replace(/ /g," "),c.length>d&&(d=c.length,e=f);return e}function K(a){return null===a?"0px":"number"==typeof a?0>a?"0px":a+"px":a.match(/\d$/)?a+"px":a}function pa(a){var b=[],c=a.aoColumns;var d=a.aaSortingFixed;var e=k.isPlainObject(d);var f=[];var g=function(m){m.length&&!Array.isArray(m[0])?f.push(m):k.merge(f,m)};Array.isArray(d)&&g(d);
|
83 |
+
e&&d.pre&&g(d.pre);g(a.aaSorting);e&&d.post&&g(d.post);for(a=0;a<f.length;a++){var h=f[a][0];g=c[h].aDataSort;d=0;for(e=g.length;d<e;d++){var l=g[d];var n=c[l].sType||"string";f[a]._idx===q&&(f[a]._idx=k.inArray(f[a][1],c[l].asSorting));b.push({src:h,col:l,dir:f[a][1],index:f[a]._idx,type:n,formatter:u.ext.type.order[n+"-pre"]})}}return b}function Gb(a){var b,c=[],d=u.ext.type.order,e=a.aoData,f=0,g=a.aiDisplayMaster;Ya(a);var h=pa(a);var l=0;for(b=h.length;l<b;l++){var n=h[l];n.formatter&&f++;bc(a,
|
84 |
+
n.col)}if("ssp"!=P(a)&&0!==h.length){l=0;for(b=g.length;l<b;l++)c[g[l]]=l;f===h.length?g.sort(function(m,p){var t,v=h.length,x=e[m]._aSortData,r=e[p]._aSortData;for(t=0;t<v;t++){var A=h[t];var E=x[A.col];var H=r[A.col];E=E<H?-1:E>H?1:0;if(0!==E)return"asc"===A.dir?E:-E}E=c[m];H=c[p];return E<H?-1:E>H?1:0}):g.sort(function(m,p){var t,v=h.length,x=e[m]._aSortData,r=e[p]._aSortData;for(t=0;t<v;t++){var A=h[t];var E=x[A.col];var H=r[A.col];A=d[A.type+"-"+A.dir]||d["string-"+A.dir];E=A(E,H);if(0!==E)return E}E=
|
85 |
+
c[m];H=c[p];return E<H?-1:E>H?1:0})}a.bSorted=!0}function cc(a){var b=a.aoColumns,c=pa(a);a=a.oLanguage.oAria;for(var d=0,e=b.length;d<e;d++){var f=b[d];var g=f.asSorting;var h=f.sTitle.replace(/<.*?>/g,"");var l=f.nTh;l.removeAttribute("aria-sort");f.bSortable&&(0<c.length&&c[0].col==d?(l.setAttribute("aria-sort","asc"==c[0].dir?"ascending":"descending"),f=g[c[0].index+1]||g[0]):f=g[0],h+="asc"===f?a.sSortAscending:a.sSortDescending);l.setAttribute("aria-label",h)}}function nb(a,b,c,d){var e=a.aaSorting,
|
86 |
+
f=a.aoColumns[b].asSorting,g=function(h,l){var n=h._idx;n===q&&(n=k.inArray(h[1],f));return n+1<f.length?n+1:l?null:0};"number"===typeof e[0]&&(e=a.aaSorting=[e]);c&&a.oFeatures.bSortMulti?(c=k.inArray(b,T(e,"0")),-1!==c?(b=g(e[c],!0),null===b&&1===e.length&&(b=0),null===b?e.splice(c,1):(e[c][1]=f[b],e[c]._idx=b)):(e.push([b,f[0],0]),e[e.length-1]._idx=0)):e.length&&e[0][0]==b?(b=g(e[0]),e.length=1,e[0][1]=f[b],e[0]._idx=b):(e.length=0,e.push([b,f[0]]),e[0]._idx=0);ja(a);"function"==typeof d&&d(a)}
|
87 |
+
function db(a,b,c,d){var e=a.aoColumns[c];ob(b,{},function(f){!1!==e.bSortable&&(a.oFeatures.bProcessing?(U(a,!0),setTimeout(function(){nb(a,c,f.shiftKey,d);"ssp"!==P(a)&&U(a,!1)},0)):nb(a,c,f.shiftKey,d))})}function Pa(a){var b=a.aLastSort,c=a.oClasses.sSortColumn,d=pa(a),e=a.oFeatures,f;if(e.bSort&&e.bSortClasses){e=0;for(f=b.length;e<f;e++){var g=b[e].src;k(T(a.aoData,"anCells",g)).removeClass(c+(2>e?e+1:3))}e=0;for(f=d.length;e<f;e++)g=d[e].src,k(T(a.aoData,"anCells",g)).addClass(c+(2>e?e+1:3))}a.aLastSort=
|
88 |
+
d}function bc(a,b){var c=a.aoColumns[b],d=u.ext.order[c.sSortDataType],e;d&&(e=d.call(a.oInstance,a,b,ta(a,b)));for(var f,g=u.ext.type.order[c.sType+"-pre"],h=0,l=a.aoData.length;h<l;h++)if(c=a.aoData[h],c._aSortData||(c._aSortData=[]),!c._aSortData[b]||d)f=d?e[h]:S(a,h,b,"sort"),c._aSortData[b]=g?g(f):f}function Qa(a){if(a.oFeatures.bStateSave&&!a.bDestroying){var b={time:+new Date,start:a._iDisplayStart,length:a._iDisplayLength,order:k.extend(!0,[],a.aaSorting),search:Ub(a.oPreviousSearch),columns:k.map(a.aoColumns,
|
89 |
+
function(c,d){return{visible:c.bVisible,search:Ub(a.aoPreSearchCols[d])}})};I(a,"aoStateSaveParams","stateSaveParams",[a,b]);a.oSavedState=b;a.fnStateSaveCallback.call(a.oInstance,a,b)}}function dc(a,b,c){var d,e,f=a.aoColumns;b=function(h){if(h&&h.time){var l=I(a,"aoStateLoadParams","stateLoadParams",[a,h]);if(-1===k.inArray(!1,l)&&(l=a.iStateDuration,!(0<l&&h.time<+new Date-1E3*l||h.columns&&f.length!==h.columns.length))){a.oLoadedState=k.extend(!0,{},h);h.start!==q&&(a._iDisplayStart=h.start,a.iInitDisplayStart=
|
90 |
+
h.start);h.length!==q&&(a._iDisplayLength=h.length);h.order!==q&&(a.aaSorting=[],k.each(h.order,function(n,m){a.aaSorting.push(m[0]>=f.length?[0,m[1]]:m)}));h.search!==q&&k.extend(a.oPreviousSearch,Vb(h.search));if(h.columns)for(d=0,e=h.columns.length;d<e;d++)l=h.columns[d],l.visible!==q&&(f[d].bVisible=l.visible),l.search!==q&&k.extend(a.aoPreSearchCols[d],Vb(l.search));I(a,"aoStateLoaded","stateLoaded",[a,h])}}c()};if(a.oFeatures.bStateSave){var g=a.fnStateLoadCallback.call(a.oInstance,a,b);g!==
|
91 |
+
q&&b(g)}else c()}function Ra(a){var b=u.settings;a=k.inArray(a,T(b,"nTable"));return-1!==a?b[a]:null}function aa(a,b,c,d){c="DataTables warning: "+(a?"table id="+a.sTableId+" - ":"")+c;d&&(c+=". For more information about this error, please see http://datatables.net/tn/"+d);if(b)y.console&&console.log&&console.log(c);else if(b=u.ext,b=b.sErrMode||b.errMode,a&&I(a,null,"error",[a,d,c]),"alert"==b)alert(c);else{if("throw"==b)throw Error(c);"function"==typeof b&&b(a,d,c)}}function V(a,b,c,d){Array.isArray(c)?
|
92 |
+
k.each(c,function(e,f){Array.isArray(f)?V(a,b,f[0],f[1]):V(a,b,f)}):(d===q&&(d=c),b[c]!==q&&(a[d]=b[c]))}function pb(a,b,c){var d;for(d in b)if(b.hasOwnProperty(d)){var e=b[d];k.isPlainObject(e)?(k.isPlainObject(a[d])||(a[d]={}),k.extend(!0,a[d],e)):c&&"data"!==d&&"aaData"!==d&&Array.isArray(e)?a[d]=e.slice():a[d]=e}return a}function ob(a,b,c){k(a).on("click.DT",b,function(d){k(a).trigger("blur");c(d)}).on("keypress.DT",b,function(d){13===d.which&&(d.preventDefault(),c(d))}).on("selectstart.DT",function(){return!1})}
|
93 |
+
function Q(a,b,c,d){c&&a[b].push({fn:c,sName:d})}function I(a,b,c,d){var e=[];b&&(e=k.map(a[b].slice().reverse(),function(f,g){return f.fn.apply(a.oInstance,d)}));null!==c&&(b=k.Event(c+".dt"),k(a.nTable).trigger(b,d),e.push(b.result));return e}function jb(a){var b=a._iDisplayStart,c=a.fnDisplayEnd(),d=a._iDisplayLength;b>=c&&(b=c-d);b-=b%d;if(-1===d||0>b)b=0;a._iDisplayStart=b}function eb(a,b){a=a.renderer;var c=u.ext.renderer[b];return k.isPlainObject(a)&&a[b]?c[a[b]]||c._:"string"===typeof a?c[a]||
|
94 |
+
c._:c._}function P(a){return a.oFeatures.bServerSide?"ssp":a.ajax||a.sAjaxSource?"ajax":"dom"}function Ba(a,b){var c=ec.numbers_length,d=Math.floor(c/2);b<=c?a=qa(0,b):a<=d?(a=qa(0,c-2),a.push("ellipsis"),a.push(b-1)):(a>=b-1-d?a=qa(b-(c-2),b):(a=qa(a-d+2,a+d-1),a.push("ellipsis"),a.push(b-1)),a.splice(0,0,"ellipsis"),a.splice(0,0,0));a.DT_el="span";return a}function Va(a){k.each({num:function(b){return Sa(b,a)},"num-fmt":function(b){return Sa(b,a,qb)},"html-num":function(b){return Sa(b,a,Ta)},"html-num-fmt":function(b){return Sa(b,
|
95 |
+
a,Ta,qb)}},function(b,c){L.type.order[b+a+"-pre"]=c;b.match(/^html\-/)&&(L.type.search[b+a]=L.type.search.html)})}function fc(a){return function(){var b=[Ra(this[u.ext.iApiIndex])].concat(Array.prototype.slice.call(arguments));return u.ext.internal[a].apply(this,b)}}var u=function(a){this.$=function(f,g){return this.api(!0).$(f,g)};this._=function(f,g){return this.api(!0).rows(f,g).data()};this.api=function(f){return f?new D(Ra(this[L.iApiIndex])):new D(this)};this.fnAddData=function(f,g){var h=this.api(!0);
|
96 |
+
f=Array.isArray(f)&&(Array.isArray(f[0])||k.isPlainObject(f[0]))?h.rows.add(f):h.row.add(f);(g===q||g)&&h.draw();return f.flatten().toArray()};this.fnAdjustColumnSizing=function(f){var g=this.api(!0).columns.adjust(),h=g.settings()[0],l=h.oScroll;f===q||f?g.draw(!1):(""!==l.sX||""!==l.sY)&&Ea(h)};this.fnClearTable=function(f){var g=this.api(!0).clear();(f===q||f)&&g.draw()};this.fnClose=function(f){this.api(!0).row(f).child.hide()};this.fnDeleteRow=function(f,g,h){var l=this.api(!0);f=l.rows(f);var n=
|
97 |
+
f.settings()[0],m=n.aoData[f[0][0]];f.remove();g&&g.call(this,n,m);(h===q||h)&&l.draw();return m};this.fnDestroy=function(f){this.api(!0).destroy(f)};this.fnDraw=function(f){this.api(!0).draw(f)};this.fnFilter=function(f,g,h,l,n,m){n=this.api(!0);null===g||g===q?n.search(f,h,l,m):n.column(g).search(f,h,l,m);n.draw()};this.fnGetData=function(f,g){var h=this.api(!0);if(f!==q){var l=f.nodeName?f.nodeName.toLowerCase():"";return g!==q||"td"==l||"th"==l?h.cell(f,g).data():h.row(f).data()||null}return h.data().toArray()};
|
98 |
+
this.fnGetNodes=function(f){var g=this.api(!0);return f!==q?g.row(f).node():g.rows().nodes().flatten().toArray()};this.fnGetPosition=function(f){var g=this.api(!0),h=f.nodeName.toUpperCase();return"TR"==h?g.row(f).index():"TD"==h||"TH"==h?(f=g.cell(f).index(),[f.row,f.columnVisible,f.column]):null};this.fnIsOpen=function(f){return this.api(!0).row(f).child.isShown()};this.fnOpen=function(f,g,h){return this.api(!0).row(f).child(g,h).show().child()[0]};this.fnPageChange=function(f,g){f=this.api(!0).page(f);
|
99 |
+
(g===q||g)&&f.draw(!1)};this.fnSetColumnVis=function(f,g,h){f=this.api(!0).column(f).visible(g);(h===q||h)&&f.columns.adjust().draw()};this.fnSettings=function(){return Ra(this[L.iApiIndex])};this.fnSort=function(f){this.api(!0).order(f).draw()};this.fnSortListener=function(f,g,h){this.api(!0).order.listener(f,g,h)};this.fnUpdate=function(f,g,h,l,n){var m=this.api(!0);h===q||null===h?m.row(g).data(f):m.cell(g,h).data(f);(n===q||n)&&m.columns.adjust();(l===q||l)&&m.draw();return 0};this.fnVersionCheck=
|
100 |
+
L.fnVersionCheck;var b=this,c=a===q,d=this.length;c&&(a={});this.oApi=this.internal=L.internal;for(var e in u.ext.internal)e&&(this[e]=fc(e));this.each(function(){var f={},g=1<d?pb(f,a,!0):a,h=0,l;f=this.getAttribute("id");var n=!1,m=u.defaults,p=k(this);if("table"!=this.nodeName.toLowerCase())aa(null,0,"Non-table node initialisation ("+this.nodeName+")",2);else{yb(m);zb(m.column);O(m,m,!0);O(m.column,m.column,!0);O(m,k.extend(g,p.data()),!0);var t=u.settings;h=0;for(l=t.length;h<l;h++){var v=t[h];
|
101 |
+
if(v.nTable==this||v.nTHead&&v.nTHead.parentNode==this||v.nTFoot&&v.nTFoot.parentNode==this){var x=g.bRetrieve!==q?g.bRetrieve:m.bRetrieve;if(c||x)return v.oInstance;if(g.bDestroy!==q?g.bDestroy:m.bDestroy){v.oInstance.fnDestroy();break}else{aa(v,0,"Cannot reinitialise DataTable",3);return}}if(v.sTableId==this.id){t.splice(h,1);break}}if(null===f||""===f)this.id=f="DataTables_Table_"+u.ext._unique++;var r=k.extend(!0,{},u.models.oSettings,{sDestroyWidth:p[0].style.width,sInstance:f,sTableId:f});r.nTable=
|
102 |
+
this;r.oApi=b.internal;r.oInit=g;t.push(r);r.oInstance=1===b.length?b:p.dataTable();yb(g);ma(g.oLanguage);g.aLengthMenu&&!g.iDisplayLength&&(g.iDisplayLength=Array.isArray(g.aLengthMenu[0])?g.aLengthMenu[0][0]:g.aLengthMenu[0]);g=pb(k.extend(!0,{},m),g);V(r.oFeatures,g,"bPaginate bLengthChange bFilter bSort bSortMulti bInfo bProcessing bAutoWidth bSortClasses bServerSide bDeferRender".split(" "));V(r,g,["asStripeClasses","ajax","fnServerData","fnFormatNumber","sServerMethod","aaSorting","aaSortingFixed",
|
103 |
+
"aLengthMenu","sPaginationType","sAjaxSource","sAjaxDataProp","iStateDuration","sDom","bSortCellsTop","iTabIndex","fnStateLoadCallback","fnStateSaveCallback","renderer","searchDelay","rowId",["iCookieDuration","iStateDuration"],["oSearch","oPreviousSearch"],["aoSearchCols","aoPreSearchCols"],["iDisplayLength","_iDisplayLength"]]);V(r.oScroll,g,[["sScrollX","sX"],["sScrollXInner","sXInner"],["sScrollY","sY"],["bScrollCollapse","bCollapse"]]);V(r.oLanguage,g,"fnInfoCallback");Q(r,"aoDrawCallback",g.fnDrawCallback,
|
104 |
+
"user");Q(r,"aoServerParams",g.fnServerParams,"user");Q(r,"aoStateSaveParams",g.fnStateSaveParams,"user");Q(r,"aoStateLoadParams",g.fnStateLoadParams,"user");Q(r,"aoStateLoaded",g.fnStateLoaded,"user");Q(r,"aoRowCallback",g.fnRowCallback,"user");Q(r,"aoRowCreatedCallback",g.fnCreatedRow,"user");Q(r,"aoHeaderCallback",g.fnHeaderCallback,"user");Q(r,"aoFooterCallback",g.fnFooterCallback,"user");Q(r,"aoInitComplete",g.fnInitComplete,"user");Q(r,"aoPreDrawCallback",g.fnPreDrawCallback,"user");r.rowIdFn=
|
105 |
+
ia(g.rowId);Ab(r);var A=r.oClasses;k.extend(A,u.ext.classes,g.oClasses);p.addClass(A.sTable);r.iInitDisplayStart===q&&(r.iInitDisplayStart=g.iDisplayStart,r._iDisplayStart=g.iDisplayStart);null!==g.iDeferLoading&&(r.bDeferLoading=!0,f=Array.isArray(g.iDeferLoading),r._iRecordsDisplay=f?g.iDeferLoading[0]:g.iDeferLoading,r._iRecordsTotal=f?g.iDeferLoading[1]:g.iDeferLoading);var E=r.oLanguage;k.extend(!0,E,g.oLanguage);E.sUrl&&(k.ajax({dataType:"json",url:E.sUrl,success:function(C){ma(C);O(m.oLanguage,
|
106 |
+
C);k.extend(!0,E,C);za(r)},error:function(){za(r)}}),n=!0);null===g.asStripeClasses&&(r.asStripeClasses=[A.sStripeOdd,A.sStripeEven]);f=r.asStripeClasses;var H=p.children("tbody").find("tr").eq(0);-1!==k.inArray(!0,k.map(f,function(C,B){return H.hasClass(C)}))&&(k("tbody tr",this).removeClass(f.join(" ")),r.asDestroyStripes=f.slice());f=[];t=this.getElementsByTagName("thead");0!==t.length&&(wa(r.aoHeader,t[0]),f=Ka(r));if(null===g.aoColumns)for(t=[],h=0,l=f.length;h<l;h++)t.push(null);else t=g.aoColumns;
|
107 |
+
h=0;for(l=t.length;h<l;h++)Wa(r,f?f[h]:null);Cb(r,g.aoColumnDefs,t,function(C,B){Da(r,C,B)});if(H.length){var W=function(C,B){return null!==C.getAttribute("data-"+B)?B:null};k(H[0]).children("th, td").each(function(C,B){var ba=r.aoColumns[C];if(ba.mData===C){var X=W(B,"sort")||W(B,"order");B=W(B,"filter")||W(B,"search");if(null!==X||null!==B)ba.mData={_:C+".display",sort:null!==X?C+".@data-"+X:q,type:null!==X?C+".@data-"+X:q,filter:null!==B?C+".@data-"+B:q},Da(r,C)}})}var M=r.oFeatures;f=function(){if(g.aaSorting===
|
108 |
+
q){var C=r.aaSorting;h=0;for(l=C.length;h<l;h++)C[h][1]=r.aoColumns[h].asSorting[0]}Pa(r);M.bSort&&Q(r,"aoDrawCallback",function(){if(r.bSorted){var ba=pa(r),X={};k.each(ba,function(lb,Aa){X[Aa.src]=Aa.dir});I(r,null,"order",[r,ba,X]);cc(r)}});Q(r,"aoDrawCallback",function(){(r.bSorted||"ssp"===P(r)||M.bDeferRender)&&Pa(r)},"sc");C=p.children("caption").each(function(){this._captionSide=k(this).css("caption-side")});var B=p.children("thead");0===B.length&&(B=k("<thead/>").appendTo(p));r.nTHead=B[0];
|
109 |
+
B=p.children("tbody");0===B.length&&(B=k("<tbody/>").appendTo(p));r.nTBody=B[0];B=p.children("tfoot");0===B.length&&0<C.length&&(""!==r.oScroll.sX||""!==r.oScroll.sY)&&(B=k("<tfoot/>").appendTo(p));0===B.length||0===B.children().length?p.addClass(A.sNoFooter):0<B.length&&(r.nTFoot=B[0],wa(r.aoFooter,r.nTFoot));if(g.aaData)for(h=0;h<g.aaData.length;h++)ea(r,g.aaData[h]);else(r.bDeferLoading||"dom"==P(r))&&Ga(r,k(r.nTBody).children("tr"));r.aiDisplay=r.aiDisplayMaster.slice();r.bInitialised=!0;!1===
|
110 |
+
n&&za(r)};g.bStateSave?(M.bStateSave=!0,Q(r,"aoDrawCallback",Qa,"state_save"),dc(r,g,f)):f()}});b=null;return this},L,w,J,rb={},gc=/[\r\n\u2028]/g,Ta=/<.*?>/g,tc=/^\d{2,4}[\.\/\-]\d{1,2}[\.\/\-]\d{1,2}([T ]{1}\d{1,2}[:\.]\d{2}([\.:]\d{2})?)?$/,uc=/(\/|\.|\*|\+|\?|\||\(|\)|\[|\]|\{|\}|\\|\$|\^|\-)/g,qb=/['\u00A0,$£€¥%\u2009\u202F\u20BD\u20a9\u20BArfkɃΞ]/gi,ca=function(a){return a&&!0!==a&&"-"!==a?!1:!0},hc=function(a){var b=parseInt(a,10);return!isNaN(b)&&isFinite(a)?b:null},ic=function(a,b){rb[b]||
|
111 |
+
(rb[b]=new RegExp(hb(b),"g"));return"string"===typeof a&&"."!==b?a.replace(/\./g,"").replace(rb[b],"."):a},sb=function(a,b,c){var d="string"===typeof a;if(ca(a))return!0;b&&d&&(a=ic(a,b));c&&d&&(a=a.replace(qb,""));return!isNaN(parseFloat(a))&&isFinite(a)},jc=function(a,b,c){return ca(a)?!0:ca(a)||"string"===typeof a?sb(a.replace(Ta,""),b,c)?!0:null:null},T=function(a,b,c){var d=[],e=0,f=a.length;if(c!==q)for(;e<f;e++)a[e]&&a[e][b]&&d.push(a[e][b][c]);else for(;e<f;e++)a[e]&&d.push(a[e][b]);return d},
|
112 |
+
Ca=function(a,b,c,d){var e=[],f=0,g=b.length;if(d!==q)for(;f<g;f++)a[b[f]][c]&&e.push(a[b[f]][c][d]);else for(;f<g;f++)e.push(a[b[f]][c]);return e},qa=function(a,b){var c=[];if(b===q){b=0;var d=a}else d=b,b=a;for(a=b;a<d;a++)c.push(a);return c},kc=function(a){for(var b=[],c=0,d=a.length;c<d;c++)a[c]&&b.push(a[c]);return b},Ja=function(a){a:{if(!(2>a.length)){var b=a.slice().sort();for(var c=b[0],d=1,e=b.length;d<e;d++){if(b[d]===c){b=!1;break a}c=b[d]}}b=!0}if(b)return a.slice();b=[];e=a.length;var f,
|
113 |
+
g=0;d=0;a:for(;d<e;d++){c=a[d];for(f=0;f<g;f++)if(b[f]===c)continue a;b.push(c);g++}return b},lc=function(a,b){if(Array.isArray(b))for(var c=0;c<b.length;c++)lc(a,b[c]);else a.push(b);return a};Array.isArray||(Array.isArray=function(a){return"[object Array]"===Object.prototype.toString.call(a)});String.prototype.trim||(String.prototype.trim=function(){return this.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")});u.util={throttle:function(a,b){var c=b!==q?b:200,d,e;return function(){var f=this,g=
|
114 |
+
+new Date,h=arguments;d&&g<d+c?(clearTimeout(e),e=setTimeout(function(){d=q;a.apply(f,h)},c)):(d=g,a.apply(f,h))}},escapeRegex:function(a){return a.replace(uc,"\\$1")}};var R=function(a,b,c){a[b]!==q&&(a[c]=a[b])},ua=/\[.*?\]$/,oa=/\(\)$/,hb=u.util.escapeRegex,Oa=k("<div>")[0],rc=Oa.textContent!==q,sc=/<.*?>/g,fb=u.util.throttle,mc=[],N=Array.prototype,vc=function(a){var b,c=u.settings,d=k.map(c,function(f,g){return f.nTable});if(a){if(a.nTable&&a.oApi)return[a];if(a.nodeName&&"table"===a.nodeName.toLowerCase()){var e=
|
115 |
+
k.inArray(a,d);return-1!==e?[c[e]]:null}if(a&&"function"===typeof a.settings)return a.settings().toArray();"string"===typeof a?b=k(a):a instanceof k&&(b=a)}else return[];if(b)return b.map(function(f){e=k.inArray(this,d);return-1!==e?c[e]:null}).toArray()};var D=function(a,b){if(!(this instanceof D))return new D(a,b);var c=[],d=function(g){(g=vc(g))&&c.push.apply(c,g)};if(Array.isArray(a))for(var e=0,f=a.length;e<f;e++)d(a[e]);else d(a);this.context=Ja(c);b&&k.merge(this,b);this.selector={rows:null,
|
116 |
+
cols:null,opts:null};D.extend(this,this,mc)};u.Api=D;k.extend(D.prototype,{any:function(){return 0!==this.count()},concat:N.concat,context:[],count:function(){return this.flatten().length},each:function(a){for(var b=0,c=this.length;b<c;b++)a.call(this,this[b],b,this);return this},eq:function(a){var b=this.context;return b.length>a?new D(b[a],this[a]):null},filter:function(a){var b=[];if(N.filter)b=N.filter.call(this,a,this);else for(var c=0,d=this.length;c<d;c++)a.call(this,this[c],c,this)&&b.push(this[c]);
|
117 |
+
return new D(this.context,b)},flatten:function(){var a=[];return new D(this.context,a.concat.apply(a,this.toArray()))},join:N.join,indexOf:N.indexOf||function(a,b){b=b||0;for(var c=this.length;b<c;b++)if(this[b]===a)return b;return-1},iterator:function(a,b,c,d){var e=[],f,g,h=this.context,l,n=this.selector;"string"===typeof a&&(d=c,c=b,b=a,a=!1);var m=0;for(f=h.length;m<f;m++){var p=new D(h[m]);if("table"===b){var t=c.call(p,h[m],m);t!==q&&e.push(t)}else if("columns"===b||"rows"===b)t=c.call(p,h[m],
|
118 |
+
this[m],m),t!==q&&e.push(t);else if("column"===b||"column-rows"===b||"row"===b||"cell"===b){var v=this[m];"column-rows"===b&&(l=Ua(h[m],n.opts));var x=0;for(g=v.length;x<g;x++)t=v[x],t="cell"===b?c.call(p,h[m],t.row,t.column,m,x):c.call(p,h[m],t,m,x,l),t!==q&&e.push(t)}}return e.length||d?(a=new D(h,a?e.concat.apply([],e):e),b=a.selector,b.rows=n.rows,b.cols=n.cols,b.opts=n.opts,a):this},lastIndexOf:N.lastIndexOf||function(a,b){return this.indexOf.apply(this.toArray.reverse(),arguments)},length:0,
|
119 |
+
map:function(a){var b=[];if(N.map)b=N.map.call(this,a,this);else for(var c=0,d=this.length;c<d;c++)b.push(a.call(this,this[c],c));return new D(this.context,b)},pluck:function(a){return this.map(function(b){return b[a]})},pop:N.pop,push:N.push,reduce:N.reduce||function(a,b){return Bb(this,a,b,0,this.length,1)},reduceRight:N.reduceRight||function(a,b){return Bb(this,a,b,this.length-1,-1,-1)},reverse:N.reverse,selector:null,shift:N.shift,slice:function(){return new D(this.context,this)},sort:N.sort,
|
120 |
+
splice:N.splice,toArray:function(){return N.slice.call(this)},to$:function(){return k(this)},toJQuery:function(){return k(this)},unique:function(){return new D(this.context,Ja(this))},unshift:N.unshift});D.extend=function(a,b,c){if(c.length&&b&&(b instanceof D||b.__dt_wrapper)){var d,e=function(h,l,n){return function(){var m=l.apply(h,arguments);D.extend(m,m,n.methodExt);return m}};var f=0;for(d=c.length;f<d;f++){var g=c[f];b[g.name]="function"===g.type?e(a,g.val,g):"object"===g.type?{}:g.val;b[g.name].__dt_wrapper=
|
121 |
+
!0;D.extend(a,b[g.name],g.propExt)}}};D.register=w=function(a,b){if(Array.isArray(a))for(var c=0,d=a.length;c<d;c++)D.register(a[c],b);else{d=a.split(".");var e=mc,f;a=0;for(c=d.length;a<c;a++){var g=(f=-1!==d[a].indexOf("()"))?d[a].replace("()",""):d[a];a:{var h=0;for(var l=e.length;h<l;h++)if(e[h].name===g){h=e[h];break a}h=null}h||(h={name:g,val:{},methodExt:[],propExt:[],type:"object"},e.push(h));a===c-1?(h.val=b,h.type="function"===typeof b?"function":k.isPlainObject(b)?"object":"other"):e=f?
|
122 |
+
h.methodExt:h.propExt}}};D.registerPlural=J=function(a,b,c){D.register(a,c);D.register(b,function(){var d=c.apply(this,arguments);return d===this?this:d instanceof D?d.length?Array.isArray(d[0])?new D(d.context,d[0]):d[0]:q:d})};var nc=function(a,b){if(Array.isArray(a))return k.map(a,function(d){return nc(d,b)});if("number"===typeof a)return[b[a]];var c=k.map(b,function(d,e){return d.nTable});return k(c).filter(a).map(function(d){d=k.inArray(this,c);return b[d]}).toArray()};w("tables()",function(a){return a!==
|
123 |
+
q&&null!==a?new D(nc(a,this.context)):this});w("table()",function(a){a=this.tables(a);var b=a.context;return b.length?new D(b[0]):a});J("tables().nodes()","table().node()",function(){return this.iterator("table",function(a){return a.nTable},1)});J("tables().body()","table().body()",function(){return this.iterator("table",function(a){return a.nTBody},1)});J("tables().header()","table().header()",function(){return this.iterator("table",function(a){return a.nTHead},1)});J("tables().footer()","table().footer()",
|
124 |
+
function(){return this.iterator("table",function(a){return a.nTFoot},1)});J("tables().containers()","table().container()",function(){return this.iterator("table",function(a){return a.nTableWrapper},1)});w("draw()",function(a){return this.iterator("table",function(b){"page"===a?fa(b):("string"===typeof a&&(a="full-hold"===a?!1:!0),ja(b,!1===a))})});w("page()",function(a){return a===q?this.page.info().page:this.iterator("table",function(b){kb(b,a)})});w("page.info()",function(a){if(0===this.context.length)return q;
|
125 |
+
a=this.context[0];var b=a._iDisplayStart,c=a.oFeatures.bPaginate?a._iDisplayLength:-1,d=a.fnRecordsDisplay(),e=-1===c;return{page:e?0:Math.floor(b/c),pages:e?1:Math.ceil(d/c),start:b,end:a.fnDisplayEnd(),length:c,recordsTotal:a.fnRecordsTotal(),recordsDisplay:d,serverSide:"ssp"===P(a)}});w("page.len()",function(a){return a===q?0!==this.context.length?this.context[0]._iDisplayLength:q:this.iterator("table",function(b){ib(b,a)})});var oc=function(a,b,c){if(c){var d=new D(a);d.one("draw",function(){c(d.ajax.json())})}if("ssp"==
|
126 |
+
P(a))ja(a,b);else{U(a,!0);var e=a.jqXHR;e&&4!==e.readyState&&e.abort();La(a,[],function(f){Ha(a);f=Ma(a,f);for(var g=0,h=f.length;g<h;g++)ea(a,f[g]);ja(a,b);U(a,!1)})}};w("ajax.json()",function(){var a=this.context;if(0<a.length)return a[0].json});w("ajax.params()",function(){var a=this.context;if(0<a.length)return a[0].oAjaxData});w("ajax.reload()",function(a,b){return this.iterator("table",function(c){oc(c,!1===b,a)})});w("ajax.url()",function(a){var b=this.context;if(a===q){if(0===b.length)return q;
|
127 |
+
b=b[0];return b.ajax?k.isPlainObject(b.ajax)?b.ajax.url:b.ajax:b.sAjaxSource}return this.iterator("table",function(c){k.isPlainObject(c.ajax)?c.ajax.url=a:c.ajax=a})});w("ajax.url().load()",function(a,b){return this.iterator("table",function(c){oc(c,!1===b,a)})});var tb=function(a,b,c,d,e){var f=[],g,h,l;var n=typeof b;b&&"string"!==n&&"function"!==n&&b.length!==q||(b=[b]);n=0;for(h=b.length;n<h;n++){var m=b[n]&&b[n].split&&!b[n].match(/[\[\(:]/)?b[n].split(","):[b[n]];var p=0;for(l=m.length;p<l;p++)(g=
|
128 |
+
c("string"===typeof m[p]?m[p].trim():m[p]))&&g.length&&(f=f.concat(g))}a=L.selector[a];if(a.length)for(n=0,h=a.length;n<h;n++)f=a[n](d,e,f);return Ja(f)},ub=function(a){a||(a={});a.filter&&a.search===q&&(a.search=a.filter);return k.extend({search:"none",order:"current",page:"all"},a)},vb=function(a){for(var b=0,c=a.length;b<c;b++)if(0<a[b].length)return a[0]=a[b],a[0].length=1,a.length=1,a.context=[a.context[b]],a;a.length=0;return a},Ua=function(a,b){var c=[],d=a.aiDisplay;var e=a.aiDisplayMaster;
|
129 |
+
var f=b.search;var g=b.order;b=b.page;if("ssp"==P(a))return"removed"===f?[]:qa(0,e.length);if("current"==b)for(g=a._iDisplayStart,a=a.fnDisplayEnd();g<a;g++)c.push(d[g]);else if("current"==g||"applied"==g)if("none"==f)c=e.slice();else if("applied"==f)c=d.slice();else{if("removed"==f){var h={};g=0;for(a=d.length;g<a;g++)h[d[g]]=null;c=k.map(e,function(l){return h.hasOwnProperty(l)?null:l})}}else if("index"==g||"original"==g)for(g=0,a=a.aoData.length;g<a;g++)"none"==f?c.push(g):(e=k.inArray(g,d),(-1===
|
130 |
+
e&&"removed"==f||0<=e&&"applied"==f)&&c.push(g));return c},wc=function(a,b,c){var d;return tb("row",b,function(e){var f=hc(e),g=a.aoData;if(null!==f&&!c)return[f];d||(d=Ua(a,c));if(null!==f&&-1!==k.inArray(f,d))return[f];if(null===e||e===q||""===e)return d;if("function"===typeof e)return k.map(d,function(l){var n=g[l];return e(l,n._aData,n.nTr)?l:null});if(e.nodeName){f=e._DT_RowIndex;var h=e._DT_CellIndex;if(f!==q)return g[f]&&g[f].nTr===e?[f]:[];if(h)return g[h.row]&&g[h.row].nTr===e.parentNode?
|
131 |
+
[h.row]:[];f=k(e).closest("*[data-dt-row]");return f.length?[f.data("dt-row")]:[]}if("string"===typeof e&&"#"===e.charAt(0)&&(f=a.aIds[e.replace(/^#/,"")],f!==q))return[f.idx];f=kc(Ca(a.aoData,d,"nTr"));return k(f).filter(e).map(function(){return this._DT_RowIndex}).toArray()},a,c)};w("rows()",function(a,b){a===q?a="":k.isPlainObject(a)&&(b=a,a="");b=ub(b);var c=this.iterator("table",function(d){return wc(d,a,b)},1);c.selector.rows=a;c.selector.opts=b;return c});w("rows().nodes()",function(){return this.iterator("row",
|
132 |
+
function(a,b){return a.aoData[b].nTr||q},1)});w("rows().data()",function(){return this.iterator(!0,"rows",function(a,b){return Ca(a.aoData,b,"_aData")},1)});J("rows().cache()","row().cache()",function(a){return this.iterator("row",function(b,c){b=b.aoData[c];return"search"===a?b._aFilterData:b._aSortData},1)});J("rows().invalidate()","row().invalidate()",function(a){return this.iterator("row",function(b,c){va(b,c,a)})});J("rows().indexes()","row().index()",function(){return this.iterator("row",function(a,
|
133 |
+
b){return b},1)});J("rows().ids()","row().id()",function(a){for(var b=[],c=this.context,d=0,e=c.length;d<e;d++)for(var f=0,g=this[d].length;f<g;f++){var h=c[d].rowIdFn(c[d].aoData[this[d][f]]._aData);b.push((!0===a?"#":"")+h)}return new D(c,b)});J("rows().remove()","row().remove()",function(){var a=this;this.iterator("row",function(b,c,d){var e=b.aoData,f=e[c],g,h;e.splice(c,1);var l=0;for(g=e.length;l<g;l++){var n=e[l];var m=n.anCells;null!==n.nTr&&(n.nTr._DT_RowIndex=l);if(null!==m)for(n=0,h=m.length;n<
|
134 |
+
h;n++)m[n]._DT_CellIndex.row=l}Ia(b.aiDisplayMaster,c);Ia(b.aiDisplay,c);Ia(a[d],c,!1);0<b._iRecordsDisplay&&b._iRecordsDisplay--;jb(b);c=b.rowIdFn(f._aData);c!==q&&delete b.aIds[c]});this.iterator("table",function(b){for(var c=0,d=b.aoData.length;c<d;c++)b.aoData[c].idx=c});return this});w("rows.add()",function(a){var b=this.iterator("table",function(d){var e,f=[];var g=0;for(e=a.length;g<e;g++){var h=a[g];h.nodeName&&"TR"===h.nodeName.toUpperCase()?f.push(Ga(d,h)[0]):f.push(ea(d,h))}return f},1),
|
135 |
+
c=this.rows(-1);c.pop();k.merge(c,b);return c});w("row()",function(a,b){return vb(this.rows(a,b))});w("row().data()",function(a){var b=this.context;if(a===q)return b.length&&this.length?b[0].aoData[this[0]]._aData:q;var c=b[0].aoData[this[0]];c._aData=a;Array.isArray(a)&&c.nTr&&c.nTr.id&&da(b[0].rowId)(a,c.nTr.id);va(b[0],this[0],"data");return this});w("row().node()",function(){var a=this.context;return a.length&&this.length?a[0].aoData[this[0]].nTr||null:null});w("row.add()",function(a){a instanceof
|
136 |
+
k&&a.length&&(a=a[0]);var b=this.iterator("table",function(c){return a.nodeName&&"TR"===a.nodeName.toUpperCase()?Ga(c,a)[0]:ea(c,a)});return this.row(b[0])});var xc=function(a,b,c,d){var e=[],f=function(g,h){if(Array.isArray(g)||g instanceof k)for(var l=0,n=g.length;l<n;l++)f(g[l],h);else g.nodeName&&"tr"===g.nodeName.toLowerCase()?e.push(g):(l=k("<tr><td></td></tr>").addClass(h),k("td",l).addClass(h).html(g)[0].colSpan=na(a),e.push(l[0]))};f(c,d);b._details&&b._details.detach();b._details=k(e);b._detailsShow&&
|
137 |
+
b._details.insertAfter(b.nTr)},wb=function(a,b){var c=a.context;c.length&&(a=c[0].aoData[b!==q?b:a[0]])&&a._details&&(a._details.remove(),a._detailsShow=q,a._details=q)},pc=function(a,b){var c=a.context;c.length&&a.length&&(a=c[0].aoData[a[0]],a._details&&((a._detailsShow=b)?a._details.insertAfter(a.nTr):a._details.detach(),yc(c[0])))},yc=function(a){var b=new D(a),c=a.aoData;b.off("draw.dt.DT_details column-visibility.dt.DT_details destroy.dt.DT_details");0<T(c,"_details").length&&(b.on("draw.dt.DT_details",
|
138 |
+
function(d,e){a===e&&b.rows({page:"current"}).eq(0).each(function(f){f=c[f];f._detailsShow&&f._details.insertAfter(f.nTr)})}),b.on("column-visibility.dt.DT_details",function(d,e,f,g){if(a===e)for(e=na(e),f=0,g=c.length;f<g;f++)d=c[f],d._details&&d._details.children("td[colspan]").attr("colspan",e)}),b.on("destroy.dt.DT_details",function(d,e){if(a===e)for(d=0,e=c.length;d<e;d++)c[d]._details&&wb(b,d)}))};w("row().child()",function(a,b){var c=this.context;if(a===q)return c.length&&this.length?c[0].aoData[this[0]]._details:
|
139 |
+
q;!0===a?this.child.show():!1===a?wb(this):c.length&&this.length&&xc(c[0],c[0].aoData[this[0]],a,b);return this});w(["row().child.show()","row().child().show()"],function(a){pc(this,!0);return this});w(["row().child.hide()","row().child().hide()"],function(){pc(this,!1);return this});w(["row().child.remove()","row().child().remove()"],function(){wb(this);return this});w("row().child.isShown()",function(){var a=this.context;return a.length&&this.length?a[0].aoData[this[0]]._detailsShow||!1:!1});var zc=
|
140 |
+
/^([^:]+):(name|visIdx|visible)$/,qc=function(a,b,c,d,e){c=[];d=0;for(var f=e.length;d<f;d++)c.push(S(a,e[d],b));return c},Ac=function(a,b,c){var d=a.aoColumns,e=T(d,"sName"),f=T(d,"nTh");return tb("column",b,function(g){var h=hc(g);if(""===g)return qa(d.length);if(null!==h)return[0<=h?h:d.length+h];if("function"===typeof g){var l=Ua(a,c);return k.map(d,function(p,t){return g(t,qc(a,t,0,0,l),f[t])?t:null})}var n="string"===typeof g?g.match(zc):"";if(n)switch(n[2]){case "visIdx":case "visible":h=parseInt(n[1],
|
141 |
+
10);if(0>h){var m=k.map(d,function(p,t){return p.bVisible?t:null});return[m[m.length+h]]}return[sa(a,h)];case "name":return k.map(e,function(p,t){return p===n[1]?t:null});default:return[]}if(g.nodeName&&g._DT_CellIndex)return[g._DT_CellIndex.column];h=k(f).filter(g).map(function(){return k.inArray(this,f)}).toArray();if(h.length||!g.nodeName)return h;h=k(g).closest("*[data-dt-column]");return h.length?[h.data("dt-column")]:[]},a,c)};w("columns()",function(a,b){a===q?a="":k.isPlainObject(a)&&(b=a,
|
142 |
+
a="");b=ub(b);var c=this.iterator("table",function(d){return Ac(d,a,b)},1);c.selector.cols=a;c.selector.opts=b;return c});J("columns().header()","column().header()",function(a,b){return this.iterator("column",function(c,d){return c.aoColumns[d].nTh},1)});J("columns().footer()","column().footer()",function(a,b){return this.iterator("column",function(c,d){return c.aoColumns[d].nTf},1)});J("columns().data()","column().data()",function(){return this.iterator("column-rows",qc,1)});J("columns().dataSrc()",
|
143 |
+
"column().dataSrc()",function(){return this.iterator("column",function(a,b){return a.aoColumns[b].mData},1)});J("columns().cache()","column().cache()",function(a){return this.iterator("column-rows",function(b,c,d,e,f){return Ca(b.aoData,f,"search"===a?"_aFilterData":"_aSortData",c)},1)});J("columns().nodes()","column().nodes()",function(){return this.iterator("column-rows",function(a,b,c,d,e){return Ca(a.aoData,e,"anCells",b)},1)});J("columns().visible()","column().visible()",function(a,b){var c=
|
144 |
+
this,d=this.iterator("column",function(e,f){if(a===q)return e.aoColumns[f].bVisible;var g=e.aoColumns,h=g[f],l=e.aoData,n;if(a!==q&&h.bVisible!==a){if(a){var m=k.inArray(!0,T(g,"bVisible"),f+1);g=0;for(n=l.length;g<n;g++){var p=l[g].nTr;e=l[g].anCells;p&&p.insertBefore(e[f],e[m]||null)}}else k(T(e.aoData,"anCells",f)).detach();h.bVisible=a}});a!==q&&this.iterator("table",function(e){xa(e,e.aoHeader);xa(e,e.aoFooter);e.aiDisplay.length||k(e.nTBody).find("td[colspan]").attr("colspan",na(e));Qa(e);c.iterator("column",
|
145 |
+
function(f,g){I(f,null,"column-visibility",[f,g,a,b])});(b===q||b)&&c.columns.adjust()});return d});J("columns().indexes()","column().index()",function(a){return this.iterator("column",function(b,c){return"visible"===a?ta(b,c):c},1)});w("columns.adjust()",function(){return this.iterator("table",function(a){ra(a)},1)});w("column.index()",function(a,b){if(0!==this.context.length){var c=this.context[0];if("fromVisible"===a||"toData"===a)return sa(c,b);if("fromData"===a||"toVisible"===a)return ta(c,b)}});
|
146 |
+
w("column()",function(a,b){return vb(this.columns(a,b))});var Bc=function(a,b,c){var d=a.aoData,e=Ua(a,c),f=kc(Ca(d,e,"anCells")),g=k(lc([],f)),h,l=a.aoColumns.length,n,m,p,t,v,x;return tb("cell",b,function(r){var A="function"===typeof r;if(null===r||r===q||A){n=[];m=0;for(p=e.length;m<p;m++)for(h=e[m],t=0;t<l;t++)v={row:h,column:t},A?(x=d[h],r(v,S(a,h,t),x.anCells?x.anCells[t]:null)&&n.push(v)):n.push(v);return n}if(k.isPlainObject(r))return r.column!==q&&r.row!==q&&-1!==k.inArray(r.row,e)?[r]:[];
|
147 |
+
A=g.filter(r).map(function(E,H){return{row:H._DT_CellIndex.row,column:H._DT_CellIndex.column}}).toArray();if(A.length||!r.nodeName)return A;x=k(r).closest("*[data-dt-row]");return x.length?[{row:x.data("dt-row"),column:x.data("dt-column")}]:[]},a,c)};w("cells()",function(a,b,c){k.isPlainObject(a)&&(a.row===q?(c=a,a=null):(c=b,b=null));k.isPlainObject(b)&&(c=b,b=null);if(null===b||b===q)return this.iterator("table",function(m){return Bc(m,a,ub(c))});var d=c?{page:c.page,order:c.order,search:c.search}:
|
148 |
+
{},e=this.columns(b,d),f=this.rows(a,d),g,h,l,n;d=this.iterator("table",function(m,p){m=[];g=0;for(h=f[p].length;g<h;g++)for(l=0,n=e[p].length;l<n;l++)m.push({row:f[p][g],column:e[p][l]});return m},1);d=c&&c.selected?this.cells(d,c):d;k.extend(d.selector,{cols:b,rows:a,opts:c});return d});J("cells().nodes()","cell().node()",function(){return this.iterator("cell",function(a,b,c){return(a=a.aoData[b])&&a.anCells?a.anCells[c]:q},1)});w("cells().data()",function(){return this.iterator("cell",function(a,
|
149 |
+
b,c){return S(a,b,c)},1)});J("cells().cache()","cell().cache()",function(a){a="search"===a?"_aFilterData":"_aSortData";return this.iterator("cell",function(b,c,d){return b.aoData[c][a][d]},1)});J("cells().render()","cell().render()",function(a){return this.iterator("cell",function(b,c,d){return S(b,c,d,a)},1)});J("cells().indexes()","cell().index()",function(){return this.iterator("cell",function(a,b,c){return{row:b,column:c,columnVisible:ta(a,c)}},1)});J("cells().invalidate()","cell().invalidate()",
|
150 |
+
function(a){return this.iterator("cell",function(b,c,d){va(b,c,a,d)})});w("cell()",function(a,b,c){return vb(this.cells(a,b,c))});w("cell().data()",function(a){var b=this.context,c=this[0];if(a===q)return b.length&&c.length?S(b[0],c[0].row,c[0].column):q;Db(b[0],c[0].row,c[0].column,a);va(b[0],c[0].row,"data",c[0].column);return this});w("order()",function(a,b){var c=this.context;if(a===q)return 0!==c.length?c[0].aaSorting:q;"number"===typeof a?a=[[a,b]]:a.length&&!Array.isArray(a[0])&&(a=Array.prototype.slice.call(arguments));
|
151 |
+
return this.iterator("table",function(d){d.aaSorting=a.slice()})});w("order.listener()",function(a,b,c){return this.iterator("table",function(d){db(d,a,b,c)})});w("order.fixed()",function(a){if(!a){var b=this.context;b=b.length?b[0].aaSortingFixed:q;return Array.isArray(b)?{pre:b}:b}return this.iterator("table",function(c){c.aaSortingFixed=k.extend(!0,{},a)})});w(["columns().order()","column().order()"],function(a){var b=this;return this.iterator("table",function(c,d){var e=[];k.each(b[d],function(f,
|
152 |
+
g){e.push([g,a])});c.aaSorting=e})});w("search()",function(a,b,c,d){var e=this.context;return a===q?0!==e.length?e[0].oPreviousSearch.sSearch:q:this.iterator("table",function(f){f.oFeatures.bFilter&&ya(f,k.extend({},f.oPreviousSearch,{sSearch:a+"",bRegex:null===b?!1:b,bSmart:null===c?!0:c,bCaseInsensitive:null===d?!0:d}),1)})});J("columns().search()","column().search()",function(a,b,c,d){return this.iterator("column",function(e,f){var g=e.aoPreSearchCols;if(a===q)return g[f].sSearch;e.oFeatures.bFilter&&
|
153 |
+
(k.extend(g[f],{sSearch:a+"",bRegex:null===b?!1:b,bSmart:null===c?!0:c,bCaseInsensitive:null===d?!0:d}),ya(e,e.oPreviousSearch,1))})});w("state()",function(){return this.context.length?this.context[0].oSavedState:null});w("state.clear()",function(){return this.iterator("table",function(a){a.fnStateSaveCallback.call(a.oInstance,a,{})})});w("state.loaded()",function(){return this.context.length?this.context[0].oLoadedState:null});w("state.save()",function(){return this.iterator("table",function(a){Qa(a)})});
|
154 |
+
u.versionCheck=u.fnVersionCheck=function(a){var b=u.version.split(".");a=a.split(".");for(var c,d,e=0,f=a.length;e<f;e++)if(c=parseInt(b[e],10)||0,d=parseInt(a[e],10)||0,c!==d)return c>d;return!0};u.isDataTable=u.fnIsDataTable=function(a){var b=k(a).get(0),c=!1;if(a instanceof u.Api)return!0;k.each(u.settings,function(d,e){d=e.nScrollHead?k("table",e.nScrollHead)[0]:null;var f=e.nScrollFoot?k("table",e.nScrollFoot)[0]:null;if(e.nTable===b||d===b||f===b)c=!0});return c};u.tables=u.fnTables=function(a){var b=
|
155 |
+
!1;k.isPlainObject(a)&&(b=a.api,a=a.visible);var c=k.map(u.settings,function(d){if(!a||a&&k(d.nTable).is(":visible"))return d.nTable});return b?new D(c):c};u.camelToHungarian=O;w("$()",function(a,b){b=this.rows(b).nodes();b=k(b);return k([].concat(b.filter(a).toArray(),b.find(a).toArray()))});k.each(["on","one","off"],function(a,b){w(b+"()",function(){var c=Array.prototype.slice.call(arguments);c[0]=k.map(c[0].split(/\s/),function(e){return e.match(/\.dt\b/)?e:e+".dt"}).join(" ");var d=k(this.tables().nodes());
|
156 |
+
d[b].apply(d,c);return this})});w("clear()",function(){return this.iterator("table",function(a){Ha(a)})});w("settings()",function(){return new D(this.context,this.context)});w("init()",function(){var a=this.context;return a.length?a[0].oInit:null});w("data()",function(){return this.iterator("table",function(a){return T(a.aoData,"_aData")}).flatten()});w("destroy()",function(a){a=a||!1;return this.iterator("table",function(b){var c=b.nTableWrapper.parentNode,d=b.oClasses,e=b.nTable,f=b.nTBody,g=b.nTHead,
|
157 |
+
h=b.nTFoot,l=k(e);f=k(f);var n=k(b.nTableWrapper),m=k.map(b.aoData,function(t){return t.nTr}),p;b.bDestroying=!0;I(b,"aoDestroyCallback","destroy",[b]);a||(new D(b)).columns().visible(!0);n.off(".DT").find(":not(tbody *)").off(".DT");k(y).off(".DT-"+b.sInstance);e!=g.parentNode&&(l.children("thead").detach(),l.append(g));h&&e!=h.parentNode&&(l.children("tfoot").detach(),l.append(h));b.aaSorting=[];b.aaSortingFixed=[];Pa(b);k(m).removeClass(b.asStripeClasses.join(" "));k("th, td",g).removeClass(d.sSortable+
|
158 |
+
" "+d.sSortableAsc+" "+d.sSortableDesc+" "+d.sSortableNone);f.children().detach();f.append(m);g=a?"remove":"detach";l[g]();n[g]();!a&&c&&(c.insertBefore(e,b.nTableReinsertBefore),l.css("width",b.sDestroyWidth).removeClass(d.sTable),(p=b.asDestroyStripes.length)&&f.children().each(function(t){k(this).addClass(b.asDestroyStripes[t%p])}));c=k.inArray(b,u.settings);-1!==c&&u.settings.splice(c,1)})});k.each(["column","row","cell"],function(a,b){w(b+"s().every()",function(c){var d=this.selector.opts,e=
|
159 |
+
this;return this.iterator(b,function(f,g,h,l,n){c.call(e[b](g,"cell"===b?h:d,"cell"===b?d:q),g,h,l,n)})})});w("i18n()",function(a,b,c){var d=this.context[0];a=ia(a)(d.oLanguage);a===q&&(a=b);c!==q&&k.isPlainObject(a)&&(a=a[c]!==q?a[c]:a._);return a.replace("%d",c)});u.version="1.10.23";u.settings=[];u.models={};u.models.oSearch={bCaseInsensitive:!0,sSearch:"",bRegex:!1,bSmart:!0};u.models.oRow={nTr:null,anCells:null,_aData:[],_aSortData:null,_aFilterData:null,_sFilterRow:null,_sRowStripe:"",src:null,
|
160 |
+
idx:-1};u.models.oColumn={idx:null,aDataSort:null,asSorting:null,bSearchable:null,bSortable:null,bVisible:null,_sManualType:null,_bAttrSrc:!1,fnCreatedCell:null,fnGetData:null,fnSetData:null,mData:null,mRender:null,nTh:null,nTf:null,sClass:null,sContentPadding:null,sDefaultContent:null,sName:null,sSortDataType:"std",sSortingClass:null,sSortingClassJUI:null,sTitle:null,sType:null,sWidth:null,sWidthOrig:null};u.defaults={aaData:null,aaSorting:[[0,"asc"]],aaSortingFixed:[],ajax:null,aLengthMenu:[10,
|
161 |
+
25,50,100],aoColumns:null,aoColumnDefs:null,aoSearchCols:[],asStripeClasses:null,bAutoWidth:!0,bDeferRender:!1,bDestroy:!1,bFilter:!0,bInfo:!0,bLengthChange:!0,bPaginate:!0,bProcessing:!1,bRetrieve:!1,bScrollCollapse:!1,bServerSide:!1,bSort:!0,bSortMulti:!0,bSortCellsTop:!1,bSortClasses:!0,bStateSave:!1,fnCreatedRow:null,fnDrawCallback:null,fnFooterCallback:null,fnFormatNumber:function(a){return a.toString().replace(/\B(?=(\d{3})+(?!\d))/g,this.oLanguage.sThousands)},fnHeaderCallback:null,fnInfoCallback:null,
|
162 |
+
fnInitComplete:null,fnPreDrawCallback:null,fnRowCallback:null,fnServerData:null,fnServerParams:null,fnStateLoadCallback:function(a){try{return JSON.parse((-1===a.iStateDuration?sessionStorage:localStorage).getItem("DataTables_"+a.sInstance+"_"+location.pathname))}catch(b){return{}}},fnStateLoadParams:null,fnStateLoaded:null,fnStateSaveCallback:function(a,b){try{(-1===a.iStateDuration?sessionStorage:localStorage).setItem("DataTables_"+a.sInstance+"_"+location.pathname,JSON.stringify(b))}catch(c){}},
|
163 |
+
fnStateSaveParams:null,iStateDuration:7200,iDeferLoading:null,iDisplayLength:10,iDisplayStart:0,iTabIndex:0,oClasses:{},oLanguage:{oAria:{sSortAscending:": activate to sort column ascending",sSortDescending:": activate to sort column descending"},oPaginate:{sFirst:"First",sLast:"Last",sNext:"Next",sPrevious:"Previous"},sEmptyTable:"No data available in table",sInfo:"Showing _START_ to _END_ of _TOTAL_ entries",sInfoEmpty:"Showing 0 to 0 of 0 entries",sInfoFiltered:"(filtered from _MAX_ total entries)",
|
164 |
+
sInfoPostFix:"",sDecimal:"",sThousands:",",sLengthMenu:"Show _MENU_ entries",sLoadingRecords:"Loading...",sProcessing:"Processing...",sSearch:"Search:",sSearchPlaceholder:"",sUrl:"",sZeroRecords:"No matching records found"},oSearch:k.extend({},u.models.oSearch),sAjaxDataProp:"data",sAjaxSource:null,sDom:"lfrtip",searchDelay:null,sPaginationType:"simple_numbers",sScrollX:"",sScrollXInner:"",sScrollY:"",sServerMethod:"GET",renderer:null,rowId:"DT_RowId"};G(u.defaults);u.defaults.column={aDataSort:null,
|
165 |
+
iDataSort:-1,asSorting:["asc","desc"],bSearchable:!0,bSortable:!0,bVisible:!0,fnCreatedCell:null,mData:null,mRender:null,sCellType:"td",sClass:"",sContentPadding:"",sDefaultContent:null,sName:"",sSortDataType:"std",sTitle:null,sType:null,sWidth:null};G(u.defaults.column);u.models.oSettings={oFeatures:{bAutoWidth:null,bDeferRender:null,bFilter:null,bInfo:null,bLengthChange:null,bPaginate:null,bProcessing:null,bServerSide:null,bSort:null,bSortMulti:null,bSortClasses:null,bStateSave:null},oScroll:{bCollapse:null,
|
166 |
+
iBarWidth:0,sX:null,sXInner:null,sY:null},oLanguage:{fnInfoCallback:null},oBrowser:{bScrollOversize:!1,bScrollbarLeft:!1,bBounding:!1,barWidth:0},ajax:null,aanFeatures:[],aoData:[],aiDisplay:[],aiDisplayMaster:[],aIds:{},aoColumns:[],aoHeader:[],aoFooter:[],oPreviousSearch:{},aoPreSearchCols:[],aaSorting:null,aaSortingFixed:[],asStripeClasses:null,asDestroyStripes:[],sDestroyWidth:0,aoRowCallback:[],aoHeaderCallback:[],aoFooterCallback:[],aoDrawCallback:[],aoRowCreatedCallback:[],aoPreDrawCallback:[],
|
167 |
+
aoInitComplete:[],aoStateSaveParams:[],aoStateLoadParams:[],aoStateLoaded:[],sTableId:"",nTable:null,nTHead:null,nTFoot:null,nTBody:null,nTableWrapper:null,bDeferLoading:!1,bInitialised:!1,aoOpenRows:[],sDom:null,searchDelay:null,sPaginationType:"two_button",iStateDuration:0,aoStateSave:[],aoStateLoad:[],oSavedState:null,oLoadedState:null,sAjaxSource:null,sAjaxDataProp:null,bAjaxDataGet:!0,jqXHR:null,json:q,oAjaxData:q,fnServerData:null,aoServerParams:[],sServerMethod:null,fnFormatNumber:null,aLengthMenu:null,
|
168 |
+
iDraw:0,bDrawing:!1,iDrawError:-1,_iDisplayLength:10,_iDisplayStart:0,_iRecordsTotal:0,_iRecordsDisplay:0,oClasses:{},bFiltered:!1,bSorted:!1,bSortCellsTop:null,oInit:null,aoDestroyCallback:[],fnRecordsTotal:function(){return"ssp"==P(this)?1*this._iRecordsTotal:this.aiDisplayMaster.length},fnRecordsDisplay:function(){return"ssp"==P(this)?1*this._iRecordsDisplay:this.aiDisplay.length},fnDisplayEnd:function(){var a=this._iDisplayLength,b=this._iDisplayStart,c=b+a,d=this.aiDisplay.length,e=this.oFeatures,
|
169 |
+
f=e.bPaginate;return e.bServerSide?!1===f||-1===a?b+d:Math.min(b+a,this._iRecordsDisplay):!f||c>d||-1===a?d:c},oInstance:null,sInstance:null,iTabIndex:0,nScrollHead:null,nScrollFoot:null,aLastSort:[],oPlugins:{},rowIdFn:null,rowId:null};u.ext=L={buttons:{},classes:{},builder:"-source-",errMode:"alert",feature:[],search:[],selector:{cell:[],column:[],row:[]},internal:{},legacy:{ajax:null},pager:{},renderer:{pageButton:{},header:{}},order:{},type:{detect:[],search:{},order:{}},_unique:0,fnVersionCheck:u.fnVersionCheck,
|
170 |
+
iApiIndex:0,oJUIClasses:{},sVersion:u.version};k.extend(L,{afnFiltering:L.search,aTypes:L.type.detect,ofnSearch:L.type.search,oSort:L.type.order,afnSortData:L.order,aoFeatures:L.feature,oApi:L.internal,oStdClasses:L.classes,oPagination:L.pager});k.extend(u.ext.classes,{sTable:"dataTable",sNoFooter:"no-footer",sPageButton:"paginate_button",sPageButtonActive:"current",sPageButtonDisabled:"disabled",sStripeOdd:"odd",sStripeEven:"even",sRowEmpty:"dataTables_empty",sWrapper:"dataTables_wrapper",sFilter:"dataTables_filter",
|
171 |
+
sInfo:"dataTables_info",sPaging:"dataTables_paginate paging_",sLength:"dataTables_length",sProcessing:"dataTables_processing",sSortAsc:"sorting_asc",sSortDesc:"sorting_desc",sSortable:"sorting",sSortableAsc:"sorting_asc_disabled",sSortableDesc:"sorting_desc_disabled",sSortableNone:"sorting_disabled",sSortColumn:"sorting_",sFilterInput:"",sLengthSelect:"",sScrollWrapper:"dataTables_scroll",sScrollHead:"dataTables_scrollHead",sScrollHeadInner:"dataTables_scrollHeadInner",sScrollBody:"dataTables_scrollBody",
|
172 |
+
sScrollFoot:"dataTables_scrollFoot",sScrollFootInner:"dataTables_scrollFootInner",sHeaderTH:"",sFooterTH:"",sSortJUIAsc:"",sSortJUIDesc:"",sSortJUI:"",sSortJUIAscAllowed:"",sSortJUIDescAllowed:"",sSortJUIWrapper:"",sSortIcon:"",sJUIHeader:"",sJUIFooter:""});var ec=u.ext.pager;k.extend(ec,{simple:function(a,b){return["previous","next"]},full:function(a,b){return["first","previous","next","last"]},numbers:function(a,b){return[Ba(a,b)]},simple_numbers:function(a,b){return["previous",Ba(a,b),"next"]},
|
173 |
+
full_numbers:function(a,b){return["first","previous",Ba(a,b),"next","last"]},first_last_numbers:function(a,b){return["first",Ba(a,b),"last"]},_numbers:Ba,numbers_length:7});k.extend(!0,u.ext.renderer,{pageButton:{_:function(a,b,c,d,e,f){var g=a.oClasses,h=a.oLanguage.oPaginate,l=a.oLanguage.oAria.paginate||{},n,m,p=0,t=function(x,r){var A,E=g.sPageButtonDisabled,H=function(B){kb(a,B.data.action,!0)};var W=0;for(A=r.length;W<A;W++){var M=r[W];if(Array.isArray(M)){var C=k("<"+(M.DT_el||"div")+"/>").appendTo(x);
|
174 |
+
t(C,M)}else{n=null;m=M;C=a.iTabIndex;switch(M){case "ellipsis":x.append('<span class="ellipsis">…</span>');break;case "first":n=h.sFirst;0===e&&(C=-1,m+=" "+E);break;case "previous":n=h.sPrevious;0===e&&(C=-1,m+=" "+E);break;case "next":n=h.sNext;if(0===f||e===f-1)C=-1,m+=" "+E;break;case "last":n=h.sLast;if(0===f||e===f-1)C=-1,m+=" "+E;break;default:n=a.fnFormatNumber(M+1),m=e===M?g.sPageButtonActive:""}null!==n&&(C=k("<a>",{"class":g.sPageButton+" "+m,"aria-controls":a.sTableId,"aria-label":l[M],
|
175 |
+
"data-dt-idx":p,tabindex:C,id:0===c&&"string"===typeof M?a.sTableId+"_"+M:null}).html(n).appendTo(x),ob(C,{action:M},H),p++)}}};try{var v=k(b).find(z.activeElement).data("dt-idx")}catch(x){}t(k(b).empty(),d);v!==q&&k(b).find("[data-dt-idx="+v+"]").trigger("focus")}}});k.extend(u.ext.type.detect,[function(a,b){b=b.oLanguage.sDecimal;return sb(a,b)?"num"+b:null},function(a,b){if(a&&!(a instanceof Date)&&!tc.test(a))return null;b=Date.parse(a);return null!==b&&!isNaN(b)||ca(a)?"date":null},function(a,
|
176 |
+
b){b=b.oLanguage.sDecimal;return sb(a,b,!0)?"num-fmt"+b:null},function(a,b){b=b.oLanguage.sDecimal;return jc(a,b)?"html-num"+b:null},function(a,b){b=b.oLanguage.sDecimal;return jc(a,b,!0)?"html-num-fmt"+b:null},function(a,b){return ca(a)||"string"===typeof a&&-1!==a.indexOf("<")?"html":null}]);k.extend(u.ext.type.search,{html:function(a){return ca(a)?a:"string"===typeof a?a.replace(gc," ").replace(Ta,""):""},string:function(a){return ca(a)?a:"string"===typeof a?a.replace(gc," "):a}});var Sa=function(a,
|
177 |
+
b,c,d){if(0!==a&&(!a||"-"===a))return-Infinity;b&&(a=ic(a,b));a.replace&&(c&&(a=a.replace(c,"")),d&&(a=a.replace(d,"")));return 1*a};k.extend(L.type.order,{"date-pre":function(a){a=Date.parse(a);return isNaN(a)?-Infinity:a},"html-pre":function(a){return ca(a)?"":a.replace?a.replace(/<.*?>/g,"").toLowerCase():a+""},"string-pre":function(a){return ca(a)?"":"string"===typeof a?a.toLowerCase():a.toString?a.toString():""},"string-asc":function(a,b){return a<b?-1:a>b?1:0},"string-desc":function(a,b){return a<
|
178 |
+
b?1:a>b?-1:0}});Va("");k.extend(!0,u.ext.renderer,{header:{_:function(a,b,c,d){k(a.nTable).on("order.dt.DT",function(e,f,g,h){a===f&&(e=c.idx,b.removeClass(c.sSortingClass+" "+d.sSortAsc+" "+d.sSortDesc).addClass("asc"==h[e]?d.sSortAsc:"desc"==h[e]?d.sSortDesc:c.sSortingClass))})},jqueryui:function(a,b,c,d){k("<div/>").addClass(d.sSortJUIWrapper).append(b.contents()).append(k("<span/>").addClass(d.sSortIcon+" "+c.sSortingClassJUI)).appendTo(b);k(a.nTable).on("order.dt.DT",function(e,f,g,h){a===f&&
|
179 |
+
(e=c.idx,b.removeClass(d.sSortAsc+" "+d.sSortDesc).addClass("asc"==h[e]?d.sSortAsc:"desc"==h[e]?d.sSortDesc:c.sSortingClass),b.find("span."+d.sSortIcon).removeClass(d.sSortJUIAsc+" "+d.sSortJUIDesc+" "+d.sSortJUI+" "+d.sSortJUIAscAllowed+" "+d.sSortJUIDescAllowed).addClass("asc"==h[e]?d.sSortJUIAsc:"desc"==h[e]?d.sSortJUIDesc:c.sSortingClassJUI))})}}});var xb=function(a){return"string"===typeof a?a.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,"""):a};u.render=
|
180 |
+
{number:function(a,b,c,d,e){return{display:function(f){if("number"!==typeof f&&"string"!==typeof f)return f;var g=0>f?"-":"",h=parseFloat(f);if(isNaN(h))return xb(f);h=h.toFixed(c);f=Math.abs(h);h=parseInt(f,10);f=c?b+(f-h).toFixed(c).substring(2):"";return g+(d||"")+h.toString().replace(/\B(?=(\d{3})+(?!\d))/g,a)+f+(e||"")}}},text:function(){return{display:xb,filter:xb}}};k.extend(u.ext.internal,{_fnExternApiFunc:fc,_fnBuildAjax:La,_fnAjaxUpdate:Fb,_fnAjaxParameters:Ob,_fnAjaxUpdateDraw:Pb,_fnAjaxDataSrc:Ma,
|
181 |
+
_fnAddColumn:Wa,_fnColumnOptions:Da,_fnAdjustColumnSizing:ra,_fnVisibleToColumnIndex:sa,_fnColumnIndexToVisible:ta,_fnVisbleColumns:na,_fnGetColumns:Fa,_fnColumnTypes:Ya,_fnApplyColumnDefs:Cb,_fnHungarianMap:G,_fnCamelToHungarian:O,_fnLanguageCompat:ma,_fnBrowserDetect:Ab,_fnAddData:ea,_fnAddTr:Ga,_fnNodeToDataIndex:function(a,b){return b._DT_RowIndex!==q?b._DT_RowIndex:null},_fnNodeToColumnIndex:function(a,b,c){return k.inArray(c,a.aoData[b].anCells)},_fnGetCellData:S,_fnSetCellData:Db,_fnSplitObjNotation:ab,
|
182 |
+
_fnGetObjectDataFn:ia,_fnSetObjectDataFn:da,_fnGetDataMaster:bb,_fnClearTable:Ha,_fnDeleteIndex:Ia,_fnInvalidate:va,_fnGetRowElements:$a,_fnCreateTr:Za,_fnBuildHead:Eb,_fnDrawHead:xa,_fnDraw:fa,_fnReDraw:ja,_fnAddOptionsHtml:Hb,_fnDetectHeader:wa,_fnGetUniqueThs:Ka,_fnFeatureHtmlFilter:Jb,_fnFilterComplete:ya,_fnFilterCustom:Sb,_fnFilterColumn:Rb,_fnFilter:Qb,_fnFilterCreateSearch:gb,_fnEscapeRegex:hb,_fnFilterData:Tb,_fnFeatureHtmlInfo:Mb,_fnUpdateInfo:Wb,_fnInfoMacros:Xb,_fnInitialise:za,_fnInitComplete:Na,
|
183 |
+
_fnLengthChange:ib,_fnFeatureHtmlLength:Ib,_fnFeatureHtmlPaginate:Nb,_fnPageChange:kb,_fnFeatureHtmlProcessing:Kb,_fnProcessingDisplay:U,_fnFeatureHtmlTable:Lb,_fnScrollDraw:Ea,_fnApplyToChildren:Z,_fnCalculateColumnWidths:Xa,_fnThrottle:fb,_fnConvertToWidth:Zb,_fnGetWidestNode:$b,_fnGetMaxLenString:ac,_fnStringToCss:K,_fnSortFlatten:pa,_fnSort:Gb,_fnSortAria:cc,_fnSortListener:nb,_fnSortAttachListener:db,_fnSortingClasses:Pa,_fnSortData:bc,_fnSaveState:Qa,_fnLoadState:dc,_fnSettingsFromNode:Ra,_fnLog:aa,
|
184 |
+
_fnMap:V,_fnBindAction:ob,_fnCallbackReg:Q,_fnCallbackFire:I,_fnLengthOverflow:jb,_fnRenderer:eb,_fnDataSource:P,_fnRowAttributes:cb,_fnExtend:pb,_fnCalculateEnd:function(){}});k.fn.dataTable=u;u.$=k;k.fn.dataTableSettings=u.settings;k.fn.dataTableExt=u.ext;k.fn.DataTable=function(a){return k(this).dataTable(a).api()};k.each(u,function(a,b){k.fn.DataTable[a]=b});return k.fn.dataTable});
|
src/SupsysticTables/Tables/Controller.php
CHANGED
@@ -29,7 +29,7 @@ class SupsysticTables_Tables_Controller extends SupsysticTables_Core_BaseControl
|
|
29 |
public function createAction(Rsc_Http_Request $request)
|
30 |
{
|
31 |
if (!$this->_checkNonce($request)) die();
|
32 |
-
$title = trim($request->post->get('title'));
|
33 |
$rowsCount = (int) $request->post->get('rows');
|
34 |
$colsCount = (int) $request->post->get('cols');
|
35 |
|
@@ -174,7 +174,7 @@ class SupsysticTables_Tables_Controller extends SupsysticTables_Core_BaseControl
|
|
174 |
{
|
175 |
if (!$this->_checkNonce($request)) die();
|
176 |
$id = $request->post->get('id');
|
177 |
-
$title = trim($request->post->get('title'));
|
178 |
|
179 |
try {
|
180 |
$this->getModel('tables')->set($id, array(
|
29 |
public function createAction(Rsc_Http_Request $request)
|
30 |
{
|
31 |
if (!$this->_checkNonce($request)) die();
|
32 |
+
$title = sanitize_text_field(trim($request->post->get('title')));
|
33 |
$rowsCount = (int) $request->post->get('rows');
|
34 |
$colsCount = (int) $request->post->get('cols');
|
35 |
|
174 |
{
|
175 |
if (!$this->_checkNonce($request)) die();
|
176 |
$id = $request->post->get('id');
|
177 |
+
$title = sanitize_text_field(trim($request->post->get('title')));
|
178 |
|
179 |
try {
|
180 |
$this->getModel('tables')->set($id, array(
|
src/SupsysticTables/Tables/Model/Tables.php
CHANGED
@@ -42,37 +42,22 @@ class SupsysticTables_Tables_Model_Tables extends SupsysticTables_Core_BaseModel
|
|
42 |
|
43 |
public function getListTbl($params)
|
44 |
{
|
45 |
-
|
46 |
-
$
|
47 |
-
$
|
48 |
-
$
|
49 |
-
$
|
50 |
-
|
51 |
-
$
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
$v = trim($v);
|
62 |
-
$v = sanitize_text_field($v);
|
63 |
-
if(empty($v)) continue;
|
64 |
-
if($k == 'text_like') {
|
65 |
-
if(!empty($v)) {
|
66 |
-
$query->where( 'title', 'LIKE', '%'.$v.'%' )->orWhere( 'id', 'LIKE', '%'.$v.'%' );
|
67 |
-
|
68 |
-
}
|
69 |
-
} else {
|
70 |
-
$query->where( 'title', '=', '%'.$v.'%' )->orWhere( 'id', 'LIKE', '%'.$v.'%' );
|
71 |
-
}
|
72 |
-
}
|
73 |
-
}
|
74 |
-
|
75 |
-
return $this->db->get_results($query->build(), ARRAY_A);
|
76 |
}
|
77 |
|
78 |
public function getTablesCount()
|
@@ -1186,4 +1171,4 @@ class SupsysticTables_Tables_Model_Tables extends SupsysticTables_Core_BaseModel
|
|
1186 |
return $rows;
|
1187 |
}
|
1188 |
|
1189 |
-
}
|
42 |
|
43 |
public function getListTbl($params)
|
44 |
{
|
45 |
+
global $wpdb;
|
46 |
+
$dbTable = $this->db->prefix . 'supsystic_tbl_tables';
|
47 |
+
$textLike = !empty($params['search']['text_like']) ? sanitize_text_field($params['search']['text_like']) : '';
|
48 |
+
$orderBy = !empty($params['orderBy']) ? sanitize_text_field($params['orderBy']) : '';
|
49 |
+
$sortOrder = !empty($params['sortOrder']) ? sanitize_text_field($params['sortOrder']) : '';
|
50 |
+
$rowsLimit = !empty($params['rowsLimit']) ? sanitize_text_field($params['rowsLimit']) : '';
|
51 |
+
$limitStart = !empty($params['limitStart']) ? sanitize_text_field($params['limitStart']) : 0;
|
52 |
+
$prepare = $wpdb->prepare( "SELECT * FROM $dbTable WHERE `id` LIKE '%%%s%%' OR `title` LIKE '%%%s%%' ORDER BY %s ASC LIMIT %d OFFSET %d",
|
53 |
+
$textLike,
|
54 |
+
$textLike,
|
55 |
+
$orderBy,
|
56 |
+
(int)$rowsLimit,
|
57 |
+
(int)$limitStart
|
58 |
+
);
|
59 |
+
$results = $wpdb->get_results($prepare, ARRAY_A);
|
60 |
+
return $results;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
61 |
}
|
62 |
|
63 |
public function getTablesCount()
|
1171 |
return $rows;
|
1172 |
}
|
1173 |
|
1174 |
+
}
|
src/SupsysticTables/Tables/Module.php
CHANGED
@@ -1119,7 +1119,7 @@ class SupsysticTables_Tables_Module extends SupsysticTables_Core_BaseModule
|
|
1119 |
$ui->createStyle('supsystic-tables-datatables-css')
|
1120 |
->setHookName($dynamicHookName)
|
1121 |
->setSource($coreModulePath . '/assets/css/lib/jquery.dataTables.min.css')
|
1122 |
-
->setVersion('1.10.
|
1123 |
->setCachingAllowed(true)
|
1124 |
);
|
1125 |
|
@@ -1151,7 +1151,7 @@ class SupsysticTables_Tables_Module extends SupsysticTables_Core_BaseModule
|
|
1151 |
$ui->createScript('supsystic-tables-datatables-js')
|
1152 |
->setHookName($dynamicHookName)
|
1153 |
->setSource($coreModulePath . '/assets/js/lib/jquery.dataTables.min.js')
|
1154 |
-
->setVersion('1.10.
|
1155 |
->setCachingAllowed(true)
|
1156 |
->addDependency('jquery')
|
1157 |
);
|
1119 |
$ui->createStyle('supsystic-tables-datatables-css')
|
1120 |
->setHookName($dynamicHookName)
|
1121 |
->setSource($coreModulePath . '/assets/css/lib/jquery.dataTables.min.css')
|
1122 |
+
->setVersion('1.10.23')
|
1123 |
->setCachingAllowed(true)
|
1124 |
);
|
1125 |
|
1151 |
$ui->createScript('supsystic-tables-datatables-js')
|
1152 |
->setHookName($dynamicHookName)
|
1153 |
->setSource($coreModulePath . '/assets/js/lib/jquery.dataTables.min.js')
|
1154 |
+
->setVersion('1.10.23')
|
1155 |
->setCachingAllowed(true)
|
1156 |
->addDependency('jquery')
|
1157 |
);
|
src/SupsysticTables/Tables/assets/js/tables.model.js
CHANGED
@@ -1003,7 +1003,11 @@ var g_stbPreviewTimeoutSet = false;
|
|
1003 |
this.renameTableRequest(app.getParameterByName('id'), $labelTxt.val())
|
1004 |
.done(function (res) {
|
1005 |
if(!res.error) {
|
1006 |
-
|
|
|
|
|
|
|
|
|
1007 |
$labelTxt.hide( g_stbAnimationSpeed ).data('ready', 0);
|
1008 |
$labelHtml.show( g_stbAnimationSpeed );
|
1009 |
$labelShell.data('edit-on', 0);
|
1003 |
this.renameTableRequest(app.getParameterByName('id'), $labelTxt.val())
|
1004 |
.done(function (res) {
|
1005 |
if(!res.error) {
|
1006 |
+
labelFormattedText = $.trim($labelTxt.val());
|
1007 |
+
if (/script/i.test(labelFormattedText)) {
|
1008 |
+
labelFormattedText = 'empty name';
|
1009 |
+
}
|
1010 |
+
$labelHtml.html( labelFormattedText );
|
1011 |
$labelTxt.hide( g_stbAnimationSpeed ).data('ready', 0);
|
1012 |
$labelHtml.show( g_stbAnimationSpeed );
|
1013 |
$labelShell.data('edit-on', 0);
|
src/SupsysticTables/Tables/views/index.twig
CHANGED
@@ -62,7 +62,7 @@
|
|
62 |
{# PRO notification dialogs #}
|
63 |
<div id="import_exportProFeatureDialog" class="supsystic-plugin" style="display: none;">
|
64 |
{% set url = '<a target="_blank" href="' ~ build_pro_url({ 'utm_medium': notify }) ~ '" style="color: #000;">' ~ environment.translate('PRO version') ~ '</a>' %}
|
65 |
-
{% set url2 = '<a target="_blank" href="' ~ build_pro_url({ 'utm_medium': notify }) ~ '" style="color: #000;" class="button
|
66 |
<p>{{ environment.translate('Please be advised that this feature available only in %s.')|format(url)|raw }}</p>
|
67 |
<p>{{ environment.translate('You can %s today and have all PRO features of data tables!')|format(url2)|raw }}</p>
|
68 |
</div>
|
62 |
{# PRO notification dialogs #}
|
63 |
<div id="import_exportProFeatureDialog" class="supsystic-plugin" style="display: none;">
|
64 |
{% set url = '<a target="_blank" href="' ~ build_pro_url({ 'utm_medium': notify }) ~ '" style="color: #000;">' ~ environment.translate('PRO version') ~ '</a>' %}
|
65 |
+
{% set url2 = '<a target="_blank" href="' ~ build_pro_url({ 'utm_medium': notify }) ~ '" style="color: #000;" class="button"><span class="ui-button-text">' ~ environment.translate('Get PRO') ~ '</span></a>' %}
|
66 |
<p>{{ environment.translate('Please be advised that this feature available only in %s.')|format(url)|raw }}</p>
|
67 |
<p>{{ environment.translate('You can %s today and have all PRO features of data tables!')|format(url2)|raw }}</p>
|
68 |
</div>
|
src/SupsysticTables/Tables/views/shortcode.twig
CHANGED
@@ -62,30 +62,31 @@
|
|
62 |
{% else %}
|
63 |
data-order="{{ data | e }}"
|
64 |
{% endif %}
|
65 |
-
|
|
|
66 |
and (context.table.settings.styling.compact is not defined
|
67 |
or (context.table.settings.styling.compact is defined and context.table.settings.tableWidthType != 'auto'))
|
68 |
and (rowIndex == '1' or context.widthForAll)
|
69 |
%}
|
70 |
-
{
|
71 |
and context.table.meta.columnsFixedWidth[cellIndex] is defined
|
72 |
and context.table.meta.columnsFixedWidth[cellIndex] is not empty
|
73 |
%}
|
74 |
style="min-width: {{ context.table.meta.columnsFixedWidth[cellIndex] }}; width: {{ context.table.meta.columnsFixedWidth[cellIndex] }};"
|
75 |
-
{
|
76 |
and context.table.meta.columnsWidth[cellIndex] is defined
|
77 |
and context.table.meta.columnsWidth[cellIndex] is not empty
|
78 |
%}
|
79 |
{#style="min-width: {{ context.table.meta.columnsWidth[cellIndex] }}%; width: {{ context.table.meta.columnsWidth[cellIndex] }}%;"#}
|
80 |
-
{
|
81 |
style="min-width: {{ context.table.meta.columnsWidth[cellIndex] }}%; width: {{ context.table.meta.columnsWidth[cellIndex] }}%;"
|
82 |
-
{
|
83 |
style="min-width: {{ context.table.meta.columnsWidth[cellIndex] }}%; "
|
84 |
-
{
|
85 |
-
{
|
86 |
style="width: {{ cell.width }}px"
|
87 |
-
{
|
88 |
-
{
|
89 |
|
90 |
{# cell.hidden is true if this cell was merged with another cell #}
|
91 |
{% if cell.hidden == true %}
|
@@ -211,6 +212,7 @@
|
|
211 |
<table
|
212 |
id="supsystic-table-{{ table.id }}"
|
213 |
class="{{'supsystic-table'}} {{ ' ' }} {{ table.settings.styling | keys | join(' ') }}
|
|
|
214 |
{% if 'border' in table.settings.styling | keys %}
|
215 |
{{ table.settings.styling.border }}
|
216 |
{% endif %}"
|
@@ -309,19 +311,7 @@
|
|
309 |
{% endif %}
|
310 |
>
|
311 |
|
312 |
-
|
313 |
-
{% if isCaption %}
|
314 |
-
{% set captionStype = fixedRowsCols == true ? 'style="display: none;"' : '' %}
|
315 |
-
<caption {{ captionStype | raw }}>
|
316 |
-
{% if table.settings.elements.caption is defined %}
|
317 |
-
<div class="table-title">{{ table.title }}</div>
|
318 |
-
{% endif %}
|
319 |
-
{% if table.settings.elements.description is defined and table.settings.elements.descriptionText is defined %}
|
320 |
-
<div class="table-desc">{{ table.settings.elements.descriptionText | raw }}</div>
|
321 |
-
{% endif %}
|
322 |
-
</caption>
|
323 |
-
{% endif %}
|
324 |
-
{% endblock %}
|
325 |
|
326 |
{% set head = false %}
|
327 |
{% set headRowsCount = 0 %}
|
62 |
{% else %}
|
63 |
data-order="{{ data | e }}"
|
64 |
{% endif %}
|
65 |
+
|
66 |
+
{# if 'auto_width' not in context.table.settings.features | keys
|
67 |
and (context.table.settings.styling.compact is not defined
|
68 |
or (context.table.settings.styling.compact is defined and context.table.settings.tableWidthType != 'auto'))
|
69 |
and (rowIndex == '1' or context.widthForAll)
|
70 |
%}
|
71 |
+
{# if context.table.meta.columnsFixedWidth is defined
|
72 |
and context.table.meta.columnsFixedWidth[cellIndex] is defined
|
73 |
and context.table.meta.columnsFixedWidth[cellIndex] is not empty
|
74 |
%}
|
75 |
style="min-width: {{ context.table.meta.columnsFixedWidth[cellIndex] }}; width: {{ context.table.meta.columnsFixedWidth[cellIndex] }};"
|
76 |
+
{# elseif context.table.meta.columnsWidth is defined
|
77 |
and context.table.meta.columnsWidth[cellIndex] is defined
|
78 |
and context.table.meta.columnsWidth[cellIndex] is not empty
|
79 |
%}
|
80 |
{#style="min-width: {{ context.table.meta.columnsWidth[cellIndex] }}%; width: {{ context.table.meta.columnsWidth[cellIndex] }}%;"#}
|
81 |
+
{# if context.table.settings.responsiveMode == 2 %}
|
82 |
style="min-width: {{ context.table.meta.columnsWidth[cellIndex] }}%; width: {{ context.table.meta.columnsWidth[cellIndex] }}%;"
|
83 |
+
{# else %}
|
84 |
style="min-width: {{ context.table.meta.columnsWidth[cellIndex] }}%; "
|
85 |
+
{# endif %}
|
86 |
+
{# else %}
|
87 |
style="width: {{ cell.width }}px"
|
88 |
+
{# endif %}
|
89 |
+
{# endif %}
|
90 |
|
91 |
{# cell.hidden is true if this cell was merged with another cell #}
|
92 |
{% if cell.hidden == true %}
|
212 |
<table
|
213 |
id="supsystic-table-{{ table.id }}"
|
214 |
class="{{'supsystic-table'}} {{ ' ' }} {{ table.settings.styling | keys | join(' ') }}
|
215 |
+
{{ ' ' }}
|
216 |
{% if 'border' in table.settings.styling | keys %}
|
217 |
{{ table.settings.styling.border }}
|
218 |
{% endif %}"
|
311 |
{% endif %}
|
312 |
>
|
313 |
|
314 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
315 |
|
316 |
{% set head = false %}
|
317 |
{% set headRowsCount = 0 %}
|
src/SupsysticTables/Tables/views/view.twig
CHANGED
@@ -2330,7 +2330,7 @@ for example:
|
|
2330 |
{% for notify in notifications %}
|
2331 |
<div id="{{ notify }}ProFeatureDialog" class="supsystic-plugin" style="display: none;">
|
2332 |
{% set url = '<a target="_blank" href="' ~ build_pro_url({ 'utm_medium': notify }) ~ '" style="color: #000;">' ~ environment.translate('PRO version') ~ '</a>' %}
|
2333 |
-
{% set url2 = '<a target="_blank" href="' ~ build_pro_url({ 'utm_medium': notify }) ~ '" style="color: #000;" class="button
|
2334 |
<p>{{ environment.translate('Please be advised that this feature available only in %s.')|format(url)|raw }}</p>
|
2335 |
<p>{{ environment.translate('You can %s today and have all PRO features of data tables!')|format(url2)|raw }}</p>
|
2336 |
</div>
|
2330 |
{% for notify in notifications %}
|
2331 |
<div id="{{ notify }}ProFeatureDialog" class="supsystic-plugin" style="display: none;">
|
2332 |
{% set url = '<a target="_blank" href="' ~ build_pro_url({ 'utm_medium': notify }) ~ '" style="color: #000;">' ~ environment.translate('PRO version') ~ '</a>' %}
|
2333 |
+
{% set url2 = '<a target="_blank" href="' ~ build_pro_url({ 'utm_medium': notify }) ~ '" style="color: #000;" class="button"><span class="ui-button-text">' ~ environment.translate('Get PRO') ~ '</span></a>' %}
|
2334 |
<p>{{ environment.translate('Please be advised that this feature available only in %s.')|format(url)|raw }}</p>
|
2335 |
<p>{{ environment.translate('You can %s today and have all PRO features of data tables!')|format(url2)|raw }}</p>
|
2336 |
</div>
|