From 48cd737bd960cc5610481dcac2656e74ec1e0768 Mon Sep 17 00:00:00 2001 From: Paolo Date: Wed, 29 Oct 2025 13:50:05 +0100 Subject: [PATCH] - Added phrases for the Extension manager - Fixed public/js/TableWidget.js --- public/js/TableWidget.js | 74 +++++++++++++++------------- system/phrasesupdate.php | 101 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 141 insertions(+), 34 deletions(-) diff --git a/public/js/TableWidget.js b/public/js/TableWidget.js index 1b9712ddd..c60270b96 100644 --- a/public/js/TableWidget.js +++ b/public/js/TableWidget.js @@ -171,34 +171,37 @@ var FHC_TableWidget = { _onTableBuilt: function (tableWidgetDiv, data) { var options = FHC_TableWidget._getRepresentationOptions(data); - tableWidgetDiv - .find("#tableWidgetTabulator") - .tabulator("on", "tableBuilt", () => { - if ( - typeof options.tableWidgetHeader == "undefined" || - (typeof options.tableWidgetHeader != "undefined" && - options.tableWidgetHeader != false) - ) { - // renders the table headers - var tabulatorHeaderCollapseHTML = - _renderTabulatorHeaderCollapseHTML(tableWidgetDiv); - tableWidgetDiv - .find("#tableWidgetHeader") - .after(tabulatorHeaderCollapseHTML); - } + if (typeof tableWidgetDiv.find("#tableWidgetTabulator").tabulator.on == 'function') + { + tableWidgetDiv + .find("#tableWidgetTabulator") + .tabulator("on", "tableBuilt", () => { + if ( + typeof options.tableWidgetHeader == "undefined" || + (typeof options.tableWidgetHeader != "undefined" && + options.tableWidgetHeader != false) + ) { + // renders the table headers + var tabulatorHeaderCollapseHTML = + _renderTabulatorHeaderCollapseHTML(tableWidgetDiv); + tableWidgetDiv + .find("#tableWidgetHeader") + .after(tabulatorHeaderCollapseHTML); + } - // makes the table headers toggle visibility when clicking on them - tableWidgetDiv.find(".btn-select-col").on("click", function () { - var selected = this.value; + // makes the table headers toggle visibility when clicking on them + tableWidgetDiv.find(".btn-select-col").on("click", function () { + var selected = this.value; - tableWidgetDiv - .find("#tableWidgetTabulator") - .tabulator("toggleColumn", selected); + tableWidgetDiv + .find("#tableWidgetTabulator") + .tabulator("toggleColumn", selected); - // toggle class to color button as selected / deselected - $(this).toggleClass("btn-select-col-selected").blur(); // blur removes automatic focus + // toggle class to color button as selected / deselected + $(this).toggleClass("btn-select-col-selected").blur(); // blur removes automatic focus + }); }); - }); + } }, /** @@ -601,16 +604,19 @@ var FHC_TableWidget = { tableWidgetDiv.find("#tableWidgetTabulator").tabulator(options); //! callbacks that need to be attached after the table has built in tabulator version 5+ - tableWidgetDiv - .find("#tableWidgetTabulator") - .tabulator("on", "rowSelectionChanged", _func_rowSelectionChanged); - tableWidgetDiv - .find("#tableWidgetTabulator") - .tabulator( - "on", - "columnVisibilityChanged", - _func_columnVisibilityChanged - ); + if (typeof tableWidgetDiv.find("#tableWidgetTabulator").tabulator.on == 'function') + { + tableWidgetDiv + .find("#tableWidgetTabulator") + .tabulator("on", "rowSelectionChanged", _func_rowSelectionChanged); + tableWidgetDiv + .find("#tableWidgetTabulator") + .tabulator( + "on", + "columnVisibilityChanged", + _func_columnVisibilityChanged + ); + } } } diff --git a/system/phrasesupdate.php b/system/phrasesupdate.php index 5d3833dc9..522d9f02f 100644 --- a/system/phrasesupdate.php +++ b/system/phrasesupdate.php @@ -49982,6 +49982,107 @@ I have been informed that I am under no obligation to consent to the transmissio 'insertvon' => 'system' ) ) + ), + + array( + 'app' => 'core', + 'category' => 'extensions', + 'phrase' => 'title', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Extensions manager', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Extensions manager', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'extensions', + 'phrase' => 'uploadExtension', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Upload extensions package', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Upload extensions package', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'extensions', + 'phrase' => 'performSql', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Execute SQL?', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Execute SQL?', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'extensions', + 'phrase' => 'changeSuccess', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Changes applied successfully', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Changes applied successfully', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'extensions', + 'phrase' => 'changeError', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'An error occurred while applying the changes', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'An error occurred while applying the changes', + 'description' => '', + 'insertvon' => 'system' + ) + ) ) );