diff --git a/application/views/templates/FHC-Common.php b/application/views/templates/FHC-Common.php index 245432f46..33f9d4cc9 100644 --- a/application/views/templates/FHC-Common.php +++ b/application/views/templates/FHC-Common.php @@ -23,6 +23,7 @@ $tablesorter2 = isset($tablesorter2) ? $tablesorter2 : false; $tabulator4 = isset($tabulator4) ? $tabulator4 : false; $tabulator5 = isset($tabulator5) ? $tabulator5 : false; + $tabulator6 = isset($tabulator6) ? $tabulator6 : false; $tabulator5JQuery = isset($tabulator5JQuery) ? $tabulator5JQuery : false; $tinymce3 = isset($tinymce3) ? $tinymce3 : false; $tinymce5 = isset($tinymce5) ? $tinymce5 : false; diff --git a/application/views/templates/FHC-Footer.php b/application/views/templates/FHC-Footer.php index 9387cf92c..a64915e98 100644 --- a/application/views/templates/FHC-Footer.php +++ b/application/views/templates/FHC-Footer.php @@ -102,8 +102,12 @@ // Tabulator 5 JS if ($tabulator5 === true) generateJSsInclude('vendor/olifolkerd/tabulator5/dist/js/tabulator.min.js'); + + if ($tabulator6 === true) generateJSsInclude('vendor/olifolkerd/tabulator6/dist/js/tabulator.min.js'); + // Tabulator 5 JQuery if ($tabulator5JQuery === true) generateJSsInclude('public/js/tabulator/jquery_wrapper.js'); + // Tinymce 3 JS if ($tinymce3 === true) generateJSsInclude('include/tiny_mce/tiny_mce.js'); diff --git a/application/views/templates/FHC-Header.php b/application/views/templates/FHC-Header.php index bca75512f..702d1fb09 100644 --- a/application/views/templates/FHC-Header.php +++ b/application/views/templates/FHC-Header.php @@ -78,7 +78,7 @@ } // Tabulator 5 CSS - if ($tabulator5 === true) generateCSSsInclude('public/css/Tabulator5.css'); + if ($tabulator5 || $tabulator6) generateCSSsInclude('public/css/Tabulator5.css'); // Tinymce 5 CSS if ($tinymce5 === true) generateCSSsInclude('public/css/TinyMCE5.css'); @@ -120,7 +120,7 @@ if ($cis === true) generateCSSsInclude(defined('CIS4') ? 'public/css/cis4.css' : 'public/css/cis_bs5.css'); //Tags - if ($tags === true) generateCSSsInclude('public/css/tags.css'); +// if ($tags === true) generateCSSsInclude('public/css/tags.css'); // Eventually required CSS generateCSSsInclude($customCSSs); // Eventually required CSS diff --git a/composer.json b/composer.json index 216d315d9..91b32d4dc 100644 --- a/composer.json +++ b/composer.json @@ -237,6 +237,17 @@ } } }, + { + "type": "package", + "package": { + "name": "olifolkerd/tabulator6", + "version": "6.3.0", + "dist": { + "url": "https://github.com/olifolkerd/tabulator/archive/refs/tags/6.3.0.zip", + "type": "zip" + } + } + }, { "type": "package", "package": { @@ -427,6 +438,7 @@ "olifolkerd/tabulator4": "4.9.*", "olifolkerd/tabulator5": "5.5.*", + "olifolkerd/tabulator6": "6.3.0", "phpseclib/phpseclib": "2.0.*", diff --git a/public/js/components/filter/Filter.js b/public/js/components/filter/Filter.js index c6cb6cdb3..4962863f3 100644 --- a/public/js/components/filter/Filter.js +++ b/public/js/components/filter/Filter.js @@ -104,6 +104,10 @@ export const CoreFilterCmpt = { }; }, computed: { + rowHeight() { + // assumes equal height on all rows + return this.tabulator.options.rowHeight ?? this.tabulator.rowManager.activeRows[0]?.height + }, filteredData() { if (!this.dataset) return []; @@ -189,6 +193,13 @@ export const CoreFilterCmpt = { } }, methods: { + scrollToLastActive() { + const rowIndex = Math.round(this.tabulator.rowManager.scrollTop / this.rowHeight) + 1 + const row = this.tabulator.getRowFromPosition(rowIndex) + if(row) { + this.tabulator.scrollToRow(row, 'top') + } + }, reloadTable() { if (this.tableOnly) this.tabulator.setData();