From 46b6ed4be76ae3b6eeeb70997190aa82cb08d2d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9CRohan=20Shinde?= <“balu.shinde@vowellms.com”> Date: Tue, 5 Nov 2019 11:52:13 +0530 Subject: [PATCH 1/4] Bug #152489 fix: Admin> Reports > Headers get vanished while clicking on it. --- tjreports/site/assets/js/tjrContentUI.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tjreports/site/assets/js/tjrContentUI.js b/tjreports/site/assets/js/tjrContentUI.js index 9927292..a76c1af 100755 --- a/tjreports/site/assets/js/tjrContentUI.js +++ b/tjreports/site/assets/js/tjrContentUI.js @@ -49,7 +49,7 @@ jQuery.extend(tjrContentUI.report, { // If sendEmail plug is enabled then try to add a column of checkboxes if ( - typeof window.tjSendEmail.UI != 'undefined' && + typeof window.tjSendEmail != 'undefined' && jQuery('body').find('.td-sendemail').length > 0 ) { From b362883f61acb1b29d80833a23c2f644f92d1769 Mon Sep 17 00:00:00 2001 From: Vaibhav S Date: Thu, 7 Nov 2019 12:51:13 +0530 Subject: [PATCH 2/4] Issue #152792 fix: After unchecking the column from 'Hide or Show Columns' drop down option, unchecked column gets removed from dropdown --- tjreports/site/models/reports.php | 19 ++++++++++++++++--- tjreports/site/views/reports/view.base.php | 15 ++++++++++++--- 2 files changed, 28 insertions(+), 6 deletions(-) diff --git a/tjreports/site/models/reports.php b/tjreports/site/models/reports.php index 35c566c..fc33b7a 100755 --- a/tjreports/site/models/reports.php +++ b/tjreports/site/models/reports.php @@ -48,7 +48,7 @@ class TjreportsModelReports extends JModelList public $showhideCols = array(); // Columns which will be displayed by default - private $defaultColToShow = array(); + public $defaultColToShow = array(); // Columns which will be hide by default private $defaultColToHide = array(); @@ -85,7 +85,10 @@ class TjreportsModelReports extends JModelList private $filterPiiColumns = array(); - private $filterParamColToshow = array(); + public $filterParamColToshow = array(); + + // Used to get the columns which are hide by default in load params + public $filterDefaultColToHide = array(); /** * Constructor. @@ -1140,7 +1143,7 @@ private function filterReportColumns($queryId, &$selColToshow) } $query = $this->_db->getQuery(true); - $this->filterShowhideCols = $this->filterPiiColumns = $this->filterParamColToshow = array(); + $this->filterDefaultColToHide = $this->filterShowhideCols = $this->filterPiiColumns = $this->filterParamColToshow = array(); // $this->filterSelColToshow = $selColToshow; @@ -1168,6 +1171,11 @@ private function filterReportColumns($queryId, &$selColToshow) } } + if (!empty($this->filterDefaultColToHide)) + { + $this->defaultColToHide = $this->filterDefaultColToHide; + } + if (!empty($this->filterShowhideCols)) { $this->showhideCols = $this->filterShowhideCols; @@ -1240,6 +1248,10 @@ private function processSavedReportColumns($queryId, &$selColToshow) { $this->filterParamColToshow[$cols] = $cols; } + else + { + $this->filterDefaultColToHide[$cols] = $cols; + } if (!empty($param['showHideColumns']) && !in_array($cols, $param['showHideColumns']) && !empty($selColToshow)) { @@ -1253,6 +1265,7 @@ private function processSavedReportColumns($queryId, &$selColToshow) // Check PII permission if (!empty($param['piiColumns']) && !$this->piiPermission) { + $this->filterDefaultColToHide = array_diff($this->filterDefaultColToHide, $param['piiColumns']); $this->filterParamColToshow = array_diff($this->filterParamColToshow, $param['piiColumns']); $this->filterShowhideCols = array_diff($this->filterShowhideCols, $param['piiColumns']); } diff --git a/tjreports/site/views/reports/view.base.php b/tjreports/site/views/reports/view.base.php index bb25a18..9e14e42 100644 --- a/tjreports/site/views/reports/view.base.php +++ b/tjreports/site/views/reports/view.base.php @@ -169,17 +169,26 @@ public function processData($type = 'html') */ $this->showHideColumns = $this->model->showhideCols; + /* To get the columns from loadparams*/ + $this->defaultColToshow = $this->model->filterParamColToshow; + + /* Check the columns in loadparams are available or not & show plugin level columns & custom field columns + * in case if load params are not available*/ + if (empty($this->defaultColToshow)) + { + $this->defaultColToshow = $this->model->defaultColToShow; + } + if (!empty($this->defaultColToHide)) { - $this->showHideColumns = array_intersect($this->model->showhideCols, array_merge($this->model->getState('colToshow'), $this->defaultColToHide)); + $this->showHideColumns = array_intersect($this->model->showhideCols, array_merge($this->defaultColToshow, $this->defaultColToHide)); } $this->sortable = $this->model->sortableColumns; $this->emailColumn = $this->model->getState('emailColumn'); $this->srButton = $this->model->showSearchResetButton; - // Array_intersect - if column present in colToshow as true/false but not in showHideColumns then remove it - $this->colToshow = array_intersect($this->model->getState('colToshow'), $this->model->showhideCols); + $this->colToshow = $this->model->getState('colToshow'); $this->filterValues = $this->model->getState('filters'); From 7a27b3bbacc400386e42a52141203191e7d45bbe Mon Sep 17 00:00:00 2001 From: Vaibhav S Date: Thu, 7 Nov 2019 16:44:36 +0530 Subject: [PATCH 3/4] Issue #152792 chore: Added the code comments --- tjreports/site/models/reports.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tjreports/site/models/reports.php b/tjreports/site/models/reports.php index fc33b7a..2472f24 100755 --- a/tjreports/site/models/reports.php +++ b/tjreports/site/models/reports.php @@ -1171,6 +1171,7 @@ private function filterReportColumns($queryId, &$selColToshow) } } + // Used to get the columns which are hide by default in load params if (!empty($this->filterDefaultColToHide)) { $this->defaultColToHide = $this->filterDefaultColToHide; @@ -1250,6 +1251,7 @@ private function processSavedReportColumns($queryId, &$selColToshow) } else { + // Used to get the columns which are hide (false) by default in load params $this->filterDefaultColToHide[$cols] = $cols; } @@ -1265,7 +1267,10 @@ private function processSavedReportColumns($queryId, &$selColToshow) // Check PII permission if (!empty($param['piiColumns']) && !$this->piiPermission) { + /* Checked the columns which are hide(false) in load params & if set them as piiColumns + * then it only returns the columns which are not available in piiColumns. */ $this->filterDefaultColToHide = array_diff($this->filterDefaultColToHide, $param['piiColumns']); + $this->filterParamColToshow = array_diff($this->filterParamColToshow, $param['piiColumns']); $this->filterShowhideCols = array_diff($this->filterShowhideCols, $param['piiColumns']); } From c954b5c6306fc626c80db60b3aca8dcf6359b65c Mon Sep 17 00:00:00 2001 From: Vaibhav S Date: Mon, 11 Nov 2019 12:56:01 +0530 Subject: [PATCH 4/4] Task #136681 feat: Version changes --- tjreports/plugins/actionlog/tjreports/tjreports.xml | 4 ++-- tjreports/plugins/content/tjreportsfields/tjreportsfields.xml | 4 ++-- tjreports/plugins/privacy/tjreports/tjreports.xml | 4 ++-- tjreports/plugins/user/tjreportsindexer/tjreportsindexer.xml | 4 ++-- tjreports/tjreports.xml | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/tjreports/plugins/actionlog/tjreports/tjreports.xml b/tjreports/plugins/actionlog/tjreports/tjreports.xml index 8c4dd2b..58e7c09 100644 --- a/tjreports/plugins/actionlog/tjreports/tjreports.xml +++ b/tjreports/plugins/actionlog/tjreports/tjreports.xml @@ -2,12 +2,12 @@ plg_actionlog_tjreports Techjoomla - 24th Oct 2019 + 11th Nov 2019 Copyright (C) 2016 - 2019 Techjoomla. All rights reserved. http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL extensions@techjoomla.com https://techjoomla.com - 1.1.3 + 1.1.4 PLG_ACTIONLOG_TJREPORTS_XML_DESCRIPTION tjreports.php diff --git a/tjreports/plugins/content/tjreportsfields/tjreportsfields.xml b/tjreports/plugins/content/tjreportsfields/tjreportsfields.xml index 08dee73..90250ec 100644 --- a/tjreports/plugins/content/tjreportsfields/tjreportsfields.xml +++ b/tjreports/plugins/content/tjreportsfields/tjreportsfields.xml @@ -5,10 +5,10 @@ Techjoomla extensions@techjoomla.com https://techjoomla.com - 24th Oct 2019 + 11th Nov 2019 Copyright (C) 2016 - 2019 Techjoomla. All rights reserved. http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL - 1.1.3 + 1.1.4 tjreportsfields.php diff --git a/tjreports/plugins/privacy/tjreports/tjreports.xml b/tjreports/plugins/privacy/tjreports/tjreports.xml index 870ecbc..db63cec 100644 --- a/tjreports/plugins/privacy/tjreports/tjreports.xml +++ b/tjreports/plugins/privacy/tjreports/tjreports.xml @@ -1,8 +1,8 @@ plg_privacy_tjreports - 1.1.3 - 24th Oct 2019 + 1.1.4 + 11th Nov 2019 Techjoomla extensions@techjoomla.com https://techjoomla.com diff --git a/tjreports/plugins/user/tjreportsindexer/tjreportsindexer.xml b/tjreports/plugins/user/tjreportsindexer/tjreportsindexer.xml index 20007a9..4b2e249 100644 --- a/tjreports/plugins/user/tjreportsindexer/tjreportsindexer.xml +++ b/tjreports/plugins/user/tjreportsindexer/tjreportsindexer.xml @@ -5,10 +5,10 @@ Techjoomla extensions@techjoomla.com https://techjoomla.com - 24th Oct 2019 + 11th Nov 2019 Copyright (C) 2016 - 2019 Techjoomla. All rights reserved. http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL - 1.1.3 + 1.1.4 sql/tjreportsindexer.install.sql diff --git a/tjreports/tjreports.xml b/tjreports/tjreports.xml index a464ec7..ae12368 100644 --- a/tjreports/tjreports.xml +++ b/tjreports/tjreports.xml @@ -6,8 +6,8 @@ https://techjoomla.com Copyright (C) 2016 - 2019 Techjoomla. All rights reserved. http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL - 24th Oct 2019 - 1.1.3 + 11th Nov 2019 + 1.1.4 This component is used to access all the report at single place.