From 637dbefce065dfdf8c5ee6ef3dbbb2354ce5be2b Mon Sep 17 00:00:00 2001 From: Cris Date: Mon, 20 Apr 2020 14:55:01 +0200 Subject: [PATCH] Removed user_language property from FHC_JS_DATA_STORAGE_OBJECT To persist on a consistent translation system, the translation should be performed by phrases system on serversite. Therefore the user_language property is removed from FHC_JS_DATA_STORAGE_OBJECT. --- application/helpers/hlp_header_helper.php | 3 +-- public/js/TableWidget.js | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/application/helpers/hlp_header_helper.php b/application/helpers/hlp_header_helper.php index 8939b4d38..f8bbb9ad2 100644 --- a/application/helpers/hlp_header_helper.php +++ b/application/helpers/hlp_header_helper.php @@ -78,8 +78,7 @@ function generateJSDataStorageObject($indexPage, $calledPath, $calledMethod) app_root: "'.APP_ROOT.'", ci_router: "'.$indexPage.'", called_path: "'.$calledPath.'", - called_method: "'.$calledMethod.'", - user_language: "'.$user_language.'" + called_method: "'.$calledMethod.'" };'; $toPrint .= "\n"; $toPrint .= ''; diff --git a/public/js/TableWidget.js b/public/js/TableWidget.js index 01dad24bb..da0df14f2 100644 --- a/public/js/TableWidget.js +++ b/public/js/TableWidget.js @@ -563,7 +563,7 @@ var FHC_TableWidget = { tableWidgetDiv.find('#tableWidgetHeader').append(tabulatorHeaderHTML); // Render the collapsable div triggered by button in tableWidgetHeader - var tabulatorHeaderCollapseHTML = _renderTabulatorHeaderCollapseHTML(tableWidgetDiv, FHC_JS_DATA_STORAGE_OBJECT.user_language); + var tabulatorHeaderCollapseHTML = _renderTabulatorHeaderCollapseHTML(tableWidgetDiv); tableWidgetDiv.find('#tableWidgetHeader').after(tabulatorHeaderCollapseHTML); /** @@ -777,7 +777,7 @@ function _renderTabulatorHeaderHTML(tableWidgetDiv){ } // Returns collapsable HTML element for TableWidget header buttons -function _renderTabulatorHeaderCollapseHTML(tableWidgetDiv, language){ +function _renderTabulatorHeaderCollapseHTML(tableWidgetDiv){ var tableUniqueId = tableWidgetDiv.attr('tableUniqueId');