From edf19e5eb80e6b8c526928d84b2d5d2eb68ff2e9 Mon Sep 17 00:00:00 2001 From: Manoj L Date: Fri, 12 Jul 2019 11:10:54 +0530 Subject: [PATCH 01/13] Merge `Release 1.1.0` into `release-1.1.1` (#140) * folder structure changed: moved pligins to tjreports folder * Issue #138 fix: Maintainance: move the plugins folder under the tjreports(src) folder * Issue #139 fix:Install the indexer table from plugin * Update indexer.php --- build/bump.php | 8 ++++---- .../plugins}/actionlog/tjreports/index.html | 0 .../en-GB/en-GB.plg_actionlog_tjreports.ini | 0 .../en-GB.plg_actionlog_tjreports.sys.ini | 0 .../actionlog/tjreports/tjreports.php | 0 .../actionlog/tjreports/tjreports.xml | 2 +- .../content/tjreportsfields/index.html | 0 .../en-GB.plg_content_tjreportsfields.ini | 0 .../en-GB.plg_content_tjreportsfields.sys.ini | 0 .../tjreportsfields/tjreportsfields.php | 0 .../tjreportsfields/tjreportsfields.xml | 8 ++++---- .../plugins}/privacy/tjreports/index.html | 0 .../en-GB/en-GB.plg_privacy_tjreports.ini | 0 .../en-GB/en-GB.plg_privacy_tjreports.sys.ini | 0 .../plugins}/privacy/tjreports/tjreports.php | 0 .../plugins}/privacy/tjreports/tjreports.xml | 2 +- .../plugins}/user/tjreportsindexer/index.html | 0 .../en-GB/en-GB.plg_user_tjreportsindexer.ini | 0 .../en-GB.plg_user_tjreportsindexer.sys.ini | 0 .../sql/tjreportsindexer.install.sql | 3 +++ .../sql/updates/mysql/1.1.0.sql | 3 +++ .../tjreportsindexer/tjreportsindexer.php | 0 .../tjreportsindexer/tjreportsindexer.xml | 20 ++++++++++++++----- tjreports/tjreports.xml | 2 +- 24 files changed, 32 insertions(+), 16 deletions(-) rename {plugins => tjreports/plugins}/actionlog/tjreports/index.html (100%) rename {plugins => tjreports/plugins}/actionlog/tjreports/language/en-GB/en-GB.plg_actionlog_tjreports.ini (100%) rename {plugins => tjreports/plugins}/actionlog/tjreports/language/en-GB/en-GB.plg_actionlog_tjreports.sys.ini (100%) rename {plugins => tjreports/plugins}/actionlog/tjreports/tjreports.php (100%) rename {plugins => tjreports/plugins}/actionlog/tjreports/tjreports.xml (97%) rename {plugins => tjreports/plugins}/content/tjreportsfields/index.html (100%) rename {plugins => tjreports/plugins}/content/tjreportsfields/language/en-GB/en-GB.plg_content_tjreportsfields.ini (100%) rename {plugins => tjreports/plugins}/content/tjreportsfields/language/en-GB/en-GB.plg_content_tjreportsfields.sys.ini (100%) rename {plugins => tjreports/plugins}/content/tjreportsfields/tjreportsfields.php (100%) rename {plugins => tjreports/plugins}/content/tjreportsfields/tjreportsfields.xml (81%) rename {plugins => tjreports/plugins}/privacy/tjreports/index.html (100%) rename {plugins => tjreports/plugins}/privacy/tjreports/language/en-GB/en-GB.plg_privacy_tjreports.ini (100%) rename {plugins => tjreports/plugins}/privacy/tjreports/language/en-GB/en-GB.plg_privacy_tjreports.sys.ini (100%) rename {plugins => tjreports/plugins}/privacy/tjreports/tjreports.php (100%) rename {plugins => tjreports/plugins}/privacy/tjreports/tjreports.xml (95%) rename {plugins => tjreports/plugins}/user/tjreportsindexer/index.html (100%) rename {plugins => tjreports/plugins}/user/tjreportsindexer/language/en-GB/en-GB.plg_user_tjreportsindexer.ini (100%) rename {plugins => tjreports/plugins}/user/tjreportsindexer/language/en-GB/en-GB.plg_user_tjreportsindexer.sys.ini (100%) create mode 100755 tjreports/plugins/user/tjreportsindexer/sql/tjreportsindexer.install.sql create mode 100755 tjreports/plugins/user/tjreportsindexer/sql/updates/mysql/1.1.0.sql rename {plugins => tjreports/plugins}/user/tjreportsindexer/tjreportsindexer.php (100%) rename {plugins => tjreports/plugins}/user/tjreportsindexer/tjreportsindexer.xml (64%) diff --git a/build/bump.php b/build/bump.php index e97c595..be4ac5c 100644 --- a/build/bump.php +++ b/build/bump.php @@ -49,10 +49,10 @@ function usage($command) // This file will vary from component to component $coreXmlFiles = array( '/tjreports/tjreports.xml', - '/plugins/actionlog/tjreports/tjreports.xml', - '/plugins/content/tjreportsfields/tjreportsfields.xml', - '/plugins/privacy/tjreports/tjreports.xml', - '/plugins/user/tjreportsindexer/tjreportsindexer.xml' + '/tjreports/plugins/actionlog/tjreports/tjreports.xml', + '/tjreports/plugins/content/tjreportsfields/tjreportsfields.xml', + '/tjreports/plugins/privacy/tjreports/tjreports.xml', + '/tjreports/plugins/user/tjreportsindexer/tjreportsindexer.xml' ); $antJobFile = '/build.xml'; diff --git a/plugins/actionlog/tjreports/index.html b/tjreports/plugins/actionlog/tjreports/index.html similarity index 100% rename from plugins/actionlog/tjreports/index.html rename to tjreports/plugins/actionlog/tjreports/index.html diff --git a/plugins/actionlog/tjreports/language/en-GB/en-GB.plg_actionlog_tjreports.ini b/tjreports/plugins/actionlog/tjreports/language/en-GB/en-GB.plg_actionlog_tjreports.ini similarity index 100% rename from plugins/actionlog/tjreports/language/en-GB/en-GB.plg_actionlog_tjreports.ini rename to tjreports/plugins/actionlog/tjreports/language/en-GB/en-GB.plg_actionlog_tjreports.ini diff --git a/plugins/actionlog/tjreports/language/en-GB/en-GB.plg_actionlog_tjreports.sys.ini b/tjreports/plugins/actionlog/tjreports/language/en-GB/en-GB.plg_actionlog_tjreports.sys.ini similarity index 100% rename from plugins/actionlog/tjreports/language/en-GB/en-GB.plg_actionlog_tjreports.sys.ini rename to tjreports/plugins/actionlog/tjreports/language/en-GB/en-GB.plg_actionlog_tjreports.sys.ini diff --git a/plugins/actionlog/tjreports/tjreports.php b/tjreports/plugins/actionlog/tjreports/tjreports.php similarity index 100% rename from plugins/actionlog/tjreports/tjreports.php rename to tjreports/plugins/actionlog/tjreports/tjreports.php diff --git a/plugins/actionlog/tjreports/tjreports.xml b/tjreports/plugins/actionlog/tjreports/tjreports.xml similarity index 97% rename from plugins/actionlog/tjreports/tjreports.xml rename to tjreports/plugins/actionlog/tjreports/tjreports.xml index 7a55939..a249168 100644 --- a/plugins/actionlog/tjreports/tjreports.xml +++ b/tjreports/plugins/actionlog/tjreports/tjreports.xml @@ -2,7 +2,7 @@ plg_actionlog_tjreports Techjoomla - 24th Jun 2019 + 11th Jul 2019 Copyright (C) 2016 - 2019 Techjoomla. All rights reserved. http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL extensions@techjoomla.com diff --git a/plugins/content/tjreportsfields/index.html b/tjreports/plugins/content/tjreportsfields/index.html similarity index 100% rename from plugins/content/tjreportsfields/index.html rename to tjreports/plugins/content/tjreportsfields/index.html diff --git a/plugins/content/tjreportsfields/language/en-GB/en-GB.plg_content_tjreportsfields.ini b/tjreports/plugins/content/tjreportsfields/language/en-GB/en-GB.plg_content_tjreportsfields.ini similarity index 100% rename from plugins/content/tjreportsfields/language/en-GB/en-GB.plg_content_tjreportsfields.ini rename to tjreports/plugins/content/tjreportsfields/language/en-GB/en-GB.plg_content_tjreportsfields.ini diff --git a/plugins/content/tjreportsfields/language/en-GB/en-GB.plg_content_tjreportsfields.sys.ini b/tjreports/plugins/content/tjreportsfields/language/en-GB/en-GB.plg_content_tjreportsfields.sys.ini similarity index 100% rename from plugins/content/tjreportsfields/language/en-GB/en-GB.plg_content_tjreportsfields.sys.ini rename to tjreports/plugins/content/tjreportsfields/language/en-GB/en-GB.plg_content_tjreportsfields.sys.ini diff --git a/plugins/content/tjreportsfields/tjreportsfields.php b/tjreports/plugins/content/tjreportsfields/tjreportsfields.php similarity index 100% rename from plugins/content/tjreportsfields/tjreportsfields.php rename to tjreports/plugins/content/tjreportsfields/tjreportsfields.php diff --git a/plugins/content/tjreportsfields/tjreportsfields.xml b/tjreports/plugins/content/tjreportsfields/tjreportsfields.xml similarity index 81% rename from plugins/content/tjreportsfields/tjreportsfields.xml rename to tjreports/plugins/content/tjreportsfields/tjreportsfields.xml index 9ffc25a..396f974 100644 --- a/plugins/content/tjreportsfields/tjreportsfields.xml +++ b/tjreports/plugins/content/tjreportsfields/tjreportsfields.xml @@ -3,12 +3,12 @@ plg_content_tjreportsfields PLG_CONTENT_TJREPORTSFIELDS_XML_DESCRIPTION Techjoomla - contact@techjoomla.com + extensions@techjoomla.com https://techjoomla.com - 24th May 2019 - Copyright (C) 2009 - 2019 Techjoomla. All rights reserved. + 11th Jul 2019 + Copyright (C) 2016 - 2019 Techjoomla. All rights reserved. http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL - 1.0.0 + 1.1.0 tjreportsfields.php diff --git a/plugins/privacy/tjreports/index.html b/tjreports/plugins/privacy/tjreports/index.html similarity index 100% rename from plugins/privacy/tjreports/index.html rename to tjreports/plugins/privacy/tjreports/index.html diff --git a/plugins/privacy/tjreports/language/en-GB/en-GB.plg_privacy_tjreports.ini b/tjreports/plugins/privacy/tjreports/language/en-GB/en-GB.plg_privacy_tjreports.ini similarity index 100% rename from plugins/privacy/tjreports/language/en-GB/en-GB.plg_privacy_tjreports.ini rename to tjreports/plugins/privacy/tjreports/language/en-GB/en-GB.plg_privacy_tjreports.ini diff --git a/plugins/privacy/tjreports/language/en-GB/en-GB.plg_privacy_tjreports.sys.ini b/tjreports/plugins/privacy/tjreports/language/en-GB/en-GB.plg_privacy_tjreports.sys.ini similarity index 100% rename from plugins/privacy/tjreports/language/en-GB/en-GB.plg_privacy_tjreports.sys.ini rename to tjreports/plugins/privacy/tjreports/language/en-GB/en-GB.plg_privacy_tjreports.sys.ini diff --git a/plugins/privacy/tjreports/tjreports.php b/tjreports/plugins/privacy/tjreports/tjreports.php similarity index 100% rename from plugins/privacy/tjreports/tjreports.php rename to tjreports/plugins/privacy/tjreports/tjreports.php diff --git a/plugins/privacy/tjreports/tjreports.xml b/tjreports/plugins/privacy/tjreports/tjreports.xml similarity index 95% rename from plugins/privacy/tjreports/tjreports.xml rename to tjreports/plugins/privacy/tjreports/tjreports.xml index 4e15571..635f810 100644 --- a/plugins/privacy/tjreports/tjreports.xml +++ b/tjreports/plugins/privacy/tjreports/tjreports.xml @@ -2,7 +2,7 @@ plg_privacy_tjreports 1.1.0 - 24th Jun 2019 + 11th Jul 2019 Techjoomla extensions@techjoomla.com https://techjoomla.com diff --git a/plugins/user/tjreportsindexer/index.html b/tjreports/plugins/user/tjreportsindexer/index.html similarity index 100% rename from plugins/user/tjreportsindexer/index.html rename to tjreports/plugins/user/tjreportsindexer/index.html diff --git a/plugins/user/tjreportsindexer/language/en-GB/en-GB.plg_user_tjreportsindexer.ini b/tjreports/plugins/user/tjreportsindexer/language/en-GB/en-GB.plg_user_tjreportsindexer.ini similarity index 100% rename from plugins/user/tjreportsindexer/language/en-GB/en-GB.plg_user_tjreportsindexer.ini rename to tjreports/plugins/user/tjreportsindexer/language/en-GB/en-GB.plg_user_tjreportsindexer.ini diff --git a/plugins/user/tjreportsindexer/language/en-GB/en-GB.plg_user_tjreportsindexer.sys.ini b/tjreports/plugins/user/tjreportsindexer/language/en-GB/en-GB.plg_user_tjreportsindexer.sys.ini similarity index 100% rename from plugins/user/tjreportsindexer/language/en-GB/en-GB.plg_user_tjreportsindexer.sys.ini rename to tjreports/plugins/user/tjreportsindexer/language/en-GB/en-GB.plg_user_tjreportsindexer.sys.ini diff --git a/tjreports/plugins/user/tjreportsindexer/sql/tjreportsindexer.install.sql b/tjreports/plugins/user/tjreportsindexer/sql/tjreportsindexer.install.sql new file mode 100755 index 0000000..4e64539 --- /dev/null +++ b/tjreports/plugins/user/tjreportsindexer/sql/tjreportsindexer.install.sql @@ -0,0 +1,3 @@ +CREATE TABLE IF NOT EXISTS `#__tjreports_com_users_user` ( + `record_id` int(11) NOT NULL +)ENGINE=InnoDB DEFAULT CHARSET=utf8; diff --git a/tjreports/plugins/user/tjreportsindexer/sql/updates/mysql/1.1.0.sql b/tjreports/plugins/user/tjreportsindexer/sql/updates/mysql/1.1.0.sql new file mode 100755 index 0000000..f6fe47b --- /dev/null +++ b/tjreports/plugins/user/tjreportsindexer/sql/updates/mysql/1.1.0.sql @@ -0,0 +1,3 @@ +CREATE TABLE IF NOT EXISTS `#__tjreports_com_users_user` ( + `record_id` int(11) NOT NULL, +)ENGINE=InnoDB DEFAULT CHARSET=utf8; diff --git a/plugins/user/tjreportsindexer/tjreportsindexer.php b/tjreports/plugins/user/tjreportsindexer/tjreportsindexer.php similarity index 100% rename from plugins/user/tjreportsindexer/tjreportsindexer.php rename to tjreports/plugins/user/tjreportsindexer/tjreportsindexer.php diff --git a/plugins/user/tjreportsindexer/tjreportsindexer.xml b/tjreports/plugins/user/tjreportsindexer/tjreportsindexer.xml similarity index 64% rename from plugins/user/tjreportsindexer/tjreportsindexer.xml rename to tjreports/plugins/user/tjreportsindexer/tjreportsindexer.xml index d899e0f..dd50538 100644 --- a/plugins/user/tjreportsindexer/tjreportsindexer.xml +++ b/tjreports/plugins/user/tjreportsindexer/tjreportsindexer.xml @@ -3,16 +3,26 @@ plg_user_tjreportsindexer PLG_USER_TJREPORTSINDEXER_XML_DESCRIPTION Techjoomla - contact@techjoomla.com + extensions@techjoomla.com https://techjoomla.com - 24th May 2019 - Copyright (C) 2009 - 2019 Techjoomla. All rights reserved. + 11th Jul 2019 + Copyright (C) 2016 - 2019 Techjoomla. All rights reserved. http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL - 1.0.0 - + 1.1.0 + + + sql/tjreportsindexer.install.sql + + + + + sql/updates/mysql + + tjreportsindexer.php index.html + sql diff --git a/tjreports/tjreports.xml b/tjreports/tjreports.xml index 001c638..ec5b296 100644 --- a/tjreports/tjreports.xml +++ b/tjreports/tjreports.xml @@ -6,7 +6,7 @@ https://techjoomla.com Copyright (C) 2016 - 2019 Techjoomla. All rights reserved. http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL - 24th Jun 2019 + 11th Jul 2019 1.1.0 This component is used to access all the report at single place. From 01b49ea9471988ced8c2f0668a026738167e51ac Mon Sep 17 00:00:00 2001 From: twsvaishali Date: Fri, 12 Jul 2019 11:23:20 +0530 Subject: [PATCH 02/13] Create 1.1.1.sql --- .../plugins/user/tjreportsindexer/sql/updates/mysql/1.1.1.sql | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 tjreports/plugins/user/tjreportsindexer/sql/updates/mysql/1.1.1.sql diff --git a/tjreports/plugins/user/tjreportsindexer/sql/updates/mysql/1.1.1.sql b/tjreports/plugins/user/tjreportsindexer/sql/updates/mysql/1.1.1.sql new file mode 100644 index 0000000..f6fe47b --- /dev/null +++ b/tjreports/plugins/user/tjreportsindexer/sql/updates/mysql/1.1.1.sql @@ -0,0 +1,3 @@ +CREATE TABLE IF NOT EXISTS `#__tjreports_com_users_user` ( + `record_id` int(11) NOT NULL, +)ENGINE=InnoDB DEFAULT CHARSET=utf8; From 2c1009da3ddac23a3da053b3456e8f7051950f60 Mon Sep 17 00:00:00 2001 From: twsvaishali Date: Fri, 12 Jul 2019 11:23:32 +0530 Subject: [PATCH 03/13] Delete 1.1.0.sql --- .../plugins/user/tjreportsindexer/sql/updates/mysql/1.1.0.sql | 3 --- 1 file changed, 3 deletions(-) delete mode 100755 tjreports/plugins/user/tjreportsindexer/sql/updates/mysql/1.1.0.sql diff --git a/tjreports/plugins/user/tjreportsindexer/sql/updates/mysql/1.1.0.sql b/tjreports/plugins/user/tjreportsindexer/sql/updates/mysql/1.1.0.sql deleted file mode 100755 index f6fe47b..0000000 --- a/tjreports/plugins/user/tjreportsindexer/sql/updates/mysql/1.1.0.sql +++ /dev/null @@ -1,3 +0,0 @@ -CREATE TABLE IF NOT EXISTS `#__tjreports_com_users_user` ( - `record_id` int(11) NOT NULL, -)ENGINE=InnoDB DEFAULT CHARSET=utf8; From 1d31dc69722b9d881811964450e43a61adb508ae Mon Sep 17 00:00:00 2001 From: vaishali k Date: Fri, 12 Jul 2019 11:25:29 +0530 Subject: [PATCH 04/13] Version changed to 1.1.1 --- 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 a249168..314baeb 100644 --- a/tjreports/plugins/actionlog/tjreports/tjreports.xml +++ b/tjreports/plugins/actionlog/tjreports/tjreports.xml @@ -2,12 +2,12 @@ plg_actionlog_tjreports Techjoomla - 11th Jul 2019 + 12th Jul 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.0 + 1.1.1 PLG_ACTIONLOG_TJREPORTS_XML_DESCRIPTION tjreports.php diff --git a/tjreports/plugins/content/tjreportsfields/tjreportsfields.xml b/tjreports/plugins/content/tjreportsfields/tjreportsfields.xml index 396f974..f7f33d5 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 - 11th Jul 2019 + 12th Jul 2019 Copyright (C) 2016 - 2019 Techjoomla. All rights reserved. http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL - 1.1.0 + 1.1.1 tjreportsfields.php diff --git a/tjreports/plugins/privacy/tjreports/tjreports.xml b/tjreports/plugins/privacy/tjreports/tjreports.xml index 635f810..45d6501 100644 --- a/tjreports/plugins/privacy/tjreports/tjreports.xml +++ b/tjreports/plugins/privacy/tjreports/tjreports.xml @@ -1,8 +1,8 @@ plg_privacy_tjreports - 1.1.0 - 11th Jul 2019 + 1.1.1 + 12th Jul 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 dd50538..568f885 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 - 11th Jul 2019 + 12th Jul 2019 Copyright (C) 2016 - 2019 Techjoomla. All rights reserved. http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL - 1.1.0 + 1.1.1 sql/tjreportsindexer.install.sql diff --git a/tjreports/tjreports.xml b/tjreports/tjreports.xml index ec5b296..3ddde42 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 - 11th Jul 2019 - 1.1.0 + 12th Jul 2019 + 1.1.1 This component is used to access all the report at single place. From ff5b3c3cf09c5334313409937f233f9b33246716 Mon Sep 17 00:00:00 2001 From: twsvaishali Date: Fri, 12 Jul 2019 11:44:26 +0530 Subject: [PATCH 05/13] Update 1.1.1.sql --- .../plugins/user/tjreportsindexer/sql/updates/mysql/1.1.1.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tjreports/plugins/user/tjreportsindexer/sql/updates/mysql/1.1.1.sql b/tjreports/plugins/user/tjreportsindexer/sql/updates/mysql/1.1.1.sql index f6fe47b..4e64539 100644 --- a/tjreports/plugins/user/tjreportsindexer/sql/updates/mysql/1.1.1.sql +++ b/tjreports/plugins/user/tjreportsindexer/sql/updates/mysql/1.1.1.sql @@ -1,3 +1,3 @@ CREATE TABLE IF NOT EXISTS `#__tjreports_com_users_user` ( - `record_id` int(11) NOT NULL, + `record_id` int(11) NOT NULL )ENGINE=InnoDB DEFAULT CHARSET=utf8; From cfcf1231c84d649668b0aa82c0b3296bcac237bb Mon Sep 17 00:00:00 2001 From: praneettekdi Date: Thu, 8 Aug 2019 10:57:30 +0530 Subject: [PATCH 06/13] Issue #141 fix: Fixed issue that was creating extra columns if comma present in heading titles (#142) * Issue #141 fix: Fixed issue that was creating extra columns if comma present in heading titles * Issue #141 chore: Remove encoding as it is not needed --- tjreports/site/controllers/reports.php | 39 ++++++++++++-------------- 1 file changed, 18 insertions(+), 21 deletions(-) diff --git a/tjreports/site/controllers/reports.php b/tjreports/site/controllers/reports.php index c885f77..5cd560b 100644 --- a/tjreports/site/controllers/reports.php +++ b/tjreports/site/controllers/reports.php @@ -67,8 +67,7 @@ public function csvexport() $columns = $model->columns; $colToshow = $model->getState('colToshow'); - $csvData = null; - $csvData_arr = $colTitleArray = array(); + $colTitleArray = array(); foreach ($colToshow as $index => $detail) { @@ -111,19 +110,23 @@ public function csvexport() } } - $csvData .= implode(',', $colTitleArray); - $csvData .= "\n"; - echo $csvData; - - $csvData = ''; $pluginTitle = $reportData->title; $filename = strtolower($pluginTitle) . "_report_" . date("Y-m-d_H-i", time()); + // Create a file pointer connected to the output stream + $output = fopen('php://output', 'w'); + + // Put CSV headings first + fputcsv($output, $colTitleArray); + // Set CSV headers - header("Content-type: text/csv"); - header("Content-Disposition: attachment; filename=" . $filename . ".csv"); - header("Pragma: no-cache"); - header("Expires: 0"); + header('Pragma: no-cache'); + header('Expires: 0'); + header('Cache-Control: must-revalidate, post-check=0, pre-check=0'); + header('Content-Description: File Transfer'); + header('Content-Type: text/csv;'); + header('Content-Disposition: attachment; filename=' . $filename . '.csv'); + header('Content-Transfer-Encoding: binary'); // Loop through items foreach ((array) $items as $itemKey => $item) @@ -136,25 +139,19 @@ public function csvexport() { foreach ($key as $subkey => $subVal) { - $final_text_value = $this->filterValue($item[$arrayKey][$subkey]); - - // Add data in the Quotes and asign it in the csv array - $itemCSV[] = '"' . $final_text_value . '"'; + $itemCSV[] = $this->filterValue($item[$arrayKey][$subkey]); } } else { - $final_text_value = $this->filterValue($item[$key]); - - // Add data in the Quotes and asign it in the csv array - $itemCSV[] = '"' . $final_text_value . '"'; + $itemCSV[] = $this->filterValue($item[$key]); } } - // TRIGGER After csv body add extra fields - echo implode(',', $itemCSV) . "\n"; + fputcsv($output, $itemCSV); } + fclose($output); jexit(); } From d42cbf1fdf2df96f5ab3155d0450d3296ddd67a1 Mon Sep 17 00:00:00 2001 From: komal mane Date: Thu, 19 Sep 2019 10:46:00 +0530 Subject: [PATCH 07/13] Task #150780 --- tjreports/administrator/models/tjreport.php | 1 + tjreports/site/models/reports.php | 38 ++++++++++++++++--- tjreports/site/views/reports/tmpl/default.php | 9 ++++- tjreports/site/views/reports/view.base.php | 1 + 4 files changed, 42 insertions(+), 7 deletions(-) diff --git a/tjreports/administrator/models/tjreport.php b/tjreports/administrator/models/tjreport.php index 768706b..be8295d 100644 --- a/tjreports/administrator/models/tjreport.php +++ b/tjreports/administrator/models/tjreport.php @@ -177,6 +177,7 @@ public function getReportPluginData($pluginId, $pluginName = null) $params['filter_order'] = $plgModel->getState('list.ordering'); $params['filter_order_Dir'] = $plgModel->getState('list.direction'); $params['limit'] = $plgModel->getState('list.limit'); + $params['sendEmail'] = $plgModel->sendEmail; $params['colToshow'] = $plgModel->getState('colToshow'); $params['colToshow'] = array_combine($params['colToshow'], array_fill(0, count($params['colToshow']), true)); $params['showHideColumns'] = $plgModel->showhideCols; diff --git a/tjreports/site/models/reports.php b/tjreports/site/models/reports.php index c74b626..97f08a1 100755 --- a/tjreports/site/models/reports.php +++ b/tjreports/site/models/reports.php @@ -37,6 +37,9 @@ class TjreportsModelReports extends JModelList // Columns array contain columns data public $columns = array(); + // Columns array contain columns data + public $sendEmail = array(); + // Columns that a user can select to display public $showhideCols = array(); @@ -344,6 +347,12 @@ private function initData() unset($this->showhideCols[$key]); } + if ((isset($column['sendEmail']) && $column['sendEmail'] === true) + || (strpos($key, '::') !== false && !isset($column['sendEmail']))) + { + array_push($this->sendEmail, $key); + } + if ((isset($column['disable_sorting']) && $column['disable_sorting']) || (strpos($key, '::') !== false && !isset($column['disable_sorting']))) { @@ -362,10 +371,12 @@ private function initData() } } + $this->sendEmail = array_values($this->sendEmail); $this->showhideCols = array_values($this->showhideCols); $this->sortableColumns = array_values($this->sortableColumns); $this->sortableWoQuery = array_values($this->sortableWoQuery); $this->defaultColToShow = array_values($this->defaultColToShow); + } /** @@ -1065,15 +1076,15 @@ private function filterReportColumns($queryId, &$selColToshow) } $query = $this->_db->getQuery(true); - $showhideCols = $paramColToshow = array(); + $showhideCols = $paramColToshow = $sendEmail = array(); // Process plugin params - $parentId = $this->processSavedReportColumns($queryId, $showhideCols, $paramColToshow, $selColToshow); + $parentId = $this->processSavedReportColumns($queryId, $showhideCols, $paramColToshow, $selColToshow, $sendEmail); // Process if user has saved query is for a plugin if (!empty($parentId)) { - $this->processSavedReportColumns($parentId, $showhideCols, $paramColToshow, $selColToshow); + $this->processSavedReportColumns($parentId, $showhideCols, $paramColToshow, $selColToshow, $sendEmail); } // If plugin has save any column assign that otherwise default plugin param will be applied @@ -1095,6 +1106,11 @@ private function filterReportColumns($queryId, &$selColToshow) { $this->showhideCols = $showhideCols; } + + if (!empty($sendEmail)) + { + $this->sendEmail = $sendEmail; + } } /** @@ -1109,7 +1125,7 @@ private function filterReportColumns($queryId, &$selColToshow) * * @since 3.0 */ - private function processSavedReportColumns($queryId, &$showhideCols, &$colToshow, &$selColToshow) + private function processSavedReportColumns($queryId, &$showhideCols, &$colToshow, &$selColToshow, &$sendEmail) { $query = $this->_db->getQuery(true); $query->select(array('param', 'parent')) @@ -1135,6 +1151,18 @@ private function processSavedReportColumns($queryId, &$showhideCols, &$colToshow } } + if (isset($param['sendEmail'])) + { + if (empty($sendEmail)) + { + $sendEmail = (array) $param['sendEmail']; + } + else + { + $sendEmail = array_intersect($sendEmail, (array) $param['sendEmail']); + } + } + if (isset($param['colToshow'])) { foreach ((array) $param['colToshow'] as $cols => $show) @@ -1228,7 +1256,7 @@ public function getReportParams($reportId) JTable::addIncludePath(JPATH_ROOT . '/administrator/components/com_tjreports/tables'); $reportTable = JTable::getInstance('Tjreport', 'TjreportsTable', array('dbo', $db)); $reportTable->load($reportId); - + return new JRegistry($reportTable->param); } diff --git a/tjreports/site/views/reports/tmpl/default.php b/tjreports/site/views/reports/tmpl/default.php index 8ae974f..734370f 100644 --- a/tjreports/site/views/reports/tmpl/default.php +++ b/tjreports/site/views/reports/tmpl/default.php @@ -289,7 +289,7 @@ for($i = $headerLevel; $i > 0 ; $i--) { - echo ''; + echo ''; foreach($this->colToshow as $index=>$detail) { @@ -431,7 +431,12 @@ } else { - echo ''. $item[$key] .''; + $isSendEmailClass = ''; + if (in_array($key, $this->sendEmail)) + { + $isSendEmailClass = 'td-sendemail'; + } + echo ''. $item[$key] .''; } } diff --git a/tjreports/site/views/reports/view.base.php b/tjreports/site/views/reports/view.base.php index 06c348f..fda835a 100644 --- a/tjreports/site/views/reports/view.base.php +++ b/tjreports/site/views/reports/view.base.php @@ -162,6 +162,7 @@ public function processData($type = 'html') $this->columns = $this->model->columns; $this->showHideColumns = $this->model->showhideCols; $this->sortable = $this->model->sortableColumns; + $this->sendEmail = $this->model->sendEmail; $this->srButton = $this->model->showSearchResetButton; $this->colToshow = $this->model->getState('colToshow'); From c8708a119336b1f834162ba7301f1dceab93de3a Mon Sep 17 00:00:00 2001 From: komal mane Date: Mon, 23 Sep 2019 14:46:36 +0530 Subject: [PATCH 08/13] Task #150780 feat: Add sendemail config colum level. --- tjreports/site/assets/js/tjrContentUI.js | 9 +++++++++ tjreports/site/models/reports.php | 14 +++++--------- 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/tjreports/site/assets/js/tjrContentUI.js b/tjreports/site/assets/js/tjrContentUI.js index 2797b01..67214bf 100755 --- a/tjreports/site/assets/js/tjrContentUI.js +++ b/tjreports/site/assets/js/tjrContentUI.js @@ -28,6 +28,7 @@ jQuery.extend(tjrContentUI.report, { } jQuery(".hasPopover").popover('destroy') var promise = tjrContentService.postData(this.url, this.$form.serialize());//, {'datatype':'html'} + promise.fail( function(response) { console.log('Something went wrong.'); @@ -45,6 +46,14 @@ jQuery.extend(tjrContentUI.report, { var responseHTML = jQuery(response['html']).find(containerSel).html(); jQuery(containerSel).html(responseHTML); + // If sendEmail plug is enable then call the below funcation. To show checkboxes + var isSendEmail = jQuery('body').find('.td-sendemail').length; + if (isSendEmail) + { + tjutilitysendemail.addColumn('report-table'); + } + // END + // Reinitialze some js like for calandar, tooltip, chosen jQuery(".hasPopover").popover({"html": true,"trigger": "hover focus","container": "body"}); diff --git a/tjreports/site/models/reports.php b/tjreports/site/models/reports.php index 97f08a1..7a267e3 100755 --- a/tjreports/site/models/reports.php +++ b/tjreports/site/models/reports.php @@ -37,8 +37,8 @@ class TjreportsModelReports extends JModelList // Columns array contain columns data public $columns = array(); - // Columns array contain columns data - public $sendEmail = array(); + // Columns array contain email columns + private $emailColumn = ''; // Columns that a user can select to display public $showhideCols = array(); @@ -94,6 +94,9 @@ public function __construct($config = array()) $this->setCustomFieldsColumns(); } + // Get email column + $this->emailColumn = array_search(1, array_map(function ($ar) {return $ar['emailColumn'];}, $this->columns)); + $this->initData(); parent::__construct($config); @@ -347,12 +350,6 @@ private function initData() unset($this->showhideCols[$key]); } - if ((isset($column['sendEmail']) && $column['sendEmail'] === true) - || (strpos($key, '::') !== false && !isset($column['sendEmail']))) - { - array_push($this->sendEmail, $key); - } - if ((isset($column['disable_sorting']) && $column['disable_sorting']) || (strpos($key, '::') !== false && !isset($column['disable_sorting']))) { @@ -371,7 +368,6 @@ private function initData() } } - $this->sendEmail = array_values($this->sendEmail); $this->showhideCols = array_values($this->showhideCols); $this->sortableColumns = array_values($this->sortableColumns); $this->sortableWoQuery = array_values($this->sortableWoQuery); From de6f4711e55681ed07400da392bd85d43d343ec4 Mon Sep 17 00:00:00 2001 From: komal mane Date: Mon, 23 Sep 2019 15:11:39 +0530 Subject: [PATCH 09/13] Task #150780 feat: Add sendemail config colum level. --- tjreports/administrator/models/tjreport.php | 2 +- tjreports/site/models/reports.php | 36 +++++++++++-------- tjreports/site/views/reports/tmpl/default.php | 6 ++-- tjreports/site/views/reports/view.base.php | 2 +- 4 files changed, 27 insertions(+), 19 deletions(-) diff --git a/tjreports/administrator/models/tjreport.php b/tjreports/administrator/models/tjreport.php index be8295d..ece6446 100644 --- a/tjreports/administrator/models/tjreport.php +++ b/tjreports/administrator/models/tjreport.php @@ -177,7 +177,7 @@ public function getReportPluginData($pluginId, $pluginName = null) $params['filter_order'] = $plgModel->getState('list.ordering'); $params['filter_order_Dir'] = $plgModel->getState('list.direction'); $params['limit'] = $plgModel->getState('list.limit'); - $params['sendEmail'] = $plgModel->sendEmail; + $params['emailColumn'] = $plgModel->getState('emailColumn'); $params['colToshow'] = $plgModel->getState('colToshow'); $params['colToshow'] = array_combine($params['colToshow'], array_fill(0, count($params['colToshow']), true)); $params['showHideColumns'] = $plgModel->showhideCols; diff --git a/tjreports/site/models/reports.php b/tjreports/site/models/reports.php index 7a267e3..8479c9c 100755 --- a/tjreports/site/models/reports.php +++ b/tjreports/site/models/reports.php @@ -532,6 +532,11 @@ protected function populateState($ordering = '', $direction = 'ASC') $value = $input->get('limitstart', 0, 'uint'); $this->setState('list.start', $value); + if ($this->emailColumn) + { + $this->setState('emailColumn', $this->emailColumn); + } + // Ordering $this->default_order = $input->get('filter_order', $this->default_order, 'STRING'); @@ -1072,15 +1077,15 @@ private function filterReportColumns($queryId, &$selColToshow) } $query = $this->_db->getQuery(true); - $showhideCols = $paramColToshow = $sendEmail = array(); + $showhideCols = $paramColToshow = $emailColumn = array(); // Process plugin params - $parentId = $this->processSavedReportColumns($queryId, $showhideCols, $paramColToshow, $selColToshow, $sendEmail); + $parentId = $this->processSavedReportColumns($queryId, $showhideCols, $paramColToshow, $selColToshow, $emailColumn); // Process if user has saved query is for a plugin if (!empty($parentId)) { - $this->processSavedReportColumns($parentId, $showhideCols, $paramColToshow, $selColToshow, $sendEmail); + $this->processSavedReportColumns($parentId, $showhideCols, $paramColToshow, $selColToshow, $emailColumn); } // If plugin has save any column assign that otherwise default plugin param will be applied @@ -1103,25 +1108,26 @@ private function filterReportColumns($queryId, &$selColToshow) $this->showhideCols = $showhideCols; } - if (!empty($sendEmail)) + if (!empty($emailColumn)) { - $this->sendEmail = $sendEmail; + $this->emailColumn = $emailColumn; } } /** * Method to Process parent Report columns * - * @param INT $queryId Query Id - * @param ARRAY &$showhideCols Show Hide columns - * @param ARRAY &$colToshow Columns to show - * @param ARRAY &$selColToshow Selected Cols + * @param INT $queryId Query Id + * @param ARRAY &$showhideCols Show Hide columns + * @param ARRAY &$colToshow Columns to show + * @param ARRAY &$selColToshow Selected Cols + * @param STRING &$emailColumn emailColumn * * @return Void * * @since 3.0 */ - private function processSavedReportColumns($queryId, &$showhideCols, &$colToshow, &$selColToshow, &$sendEmail) + private function processSavedReportColumns($queryId, &$showhideCols, &$colToshow, &$selColToshow, &$emailColumn) { $query = $this->_db->getQuery(true); $query->select(array('param', 'parent')) @@ -1147,15 +1153,15 @@ private function processSavedReportColumns($queryId, &$showhideCols, &$colToshow } } - if (isset($param['sendEmail'])) + if (isset($param['emailColumn'])) { - if (empty($sendEmail)) + if (empty($emailColumn)) { - $sendEmail = (array) $param['sendEmail']; + $emailColumn = (array) $param['emailColumn']; } else { - $sendEmail = array_intersect($sendEmail, (array) $param['sendEmail']); + $emailColumn = array_intersect($emailColumn, (array) $param['emailColumn']); } } @@ -1240,7 +1246,7 @@ public function getReportLink($reportToLink, $filters) /** * Method to get id of the report having default set as 1 * - * @param STRING $pluginName Plugin Name + * @param STRING $reportId Report id * * @return Integer * diff --git a/tjreports/site/views/reports/tmpl/default.php b/tjreports/site/views/reports/tmpl/default.php index 734370f..580ca38 100644 --- a/tjreports/site/views/reports/tmpl/default.php +++ b/tjreports/site/views/reports/tmpl/default.php @@ -12,6 +12,8 @@ JHtml::addIncludePath(JPATH_COMPONENT . '/helpers/html'); +$emailColmClass = 'td-sendemail'; + $app = JFactory::getApplication(); $headerLevel = $this->headerLevel; $this->listOrder = $this->state->get('list.ordering'); @@ -432,9 +434,9 @@ else { $isSendEmailClass = ''; - if (in_array($key, $this->sendEmail)) + if (in_array($key, $this->emailColumn)) { - $isSendEmailClass = 'td-sendemail'; + $isSendEmailClass = $emailColmClass; } echo ''. $item[$key] .''; } diff --git a/tjreports/site/views/reports/view.base.php b/tjreports/site/views/reports/view.base.php index fda835a..d8809a9 100644 --- a/tjreports/site/views/reports/view.base.php +++ b/tjreports/site/views/reports/view.base.php @@ -162,7 +162,7 @@ public function processData($type = 'html') $this->columns = $this->model->columns; $this->showHideColumns = $this->model->showhideCols; $this->sortable = $this->model->sortableColumns; - $this->sendEmail = $this->model->sendEmail; + $this->emailColumn = $this->model->getState('emailColumn'); $this->srButton = $this->model->showSearchResetButton; $this->colToshow = $this->model->getState('colToshow'); From c8718dbb23101ed31efc9ce199912b896f978da0 Mon Sep 17 00:00:00 2001 From: komal mane Date: Mon, 23 Sep 2019 17:19:53 +0530 Subject: [PATCH 10/13] Task #150780 feat: Add sendemail config colum level. --- tjreports/site/assets/js/tjrContentUI.js | 15 ++++++++++----- tjreports/site/views/reports/tmpl/default.php | 8 ++------ 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/tjreports/site/assets/js/tjrContentUI.js b/tjreports/site/assets/js/tjrContentUI.js index 67214bf..e75a371 100755 --- a/tjreports/site/assets/js/tjrContentUI.js +++ b/tjreports/site/assets/js/tjrContentUI.js @@ -12,6 +12,7 @@ tjrContentUI.root_url = (typeof root_url == 'undefined') ? '' : root_url; tjrContentUI.base_url = (typeof root_url == 'undefined') ? '' : root_url; tjrContentUI.report = tjrContentUI.report ? tjrContentUI.report : {}; + jQuery.extend(tjrContentUI.report, { searchToggle: true, $form: null, @@ -46,13 +47,17 @@ jQuery.extend(tjrContentUI.report, { var responseHTML = jQuery(response['html']).find(containerSel).html(); jQuery(containerSel).html(responseHTML); - // If sendEmail plug is enable then call the below funcation. To show checkboxes - var isSendEmail = jQuery('body').find('.td-sendemail').length; - if (isSendEmail) + // If plg_system_sendemail enable + if (typeof tjutilitysendemail != 'undefined') { - tjutilitysendemail.addColumn('report-table'); + // If sendEmail plug is enable then call the below funcation. To show checkboxes + var isSendEmail = jQuery('body').find('.td-sendemail').length; + if (isSendEmail) + { + tjutilitysendemail.addColumn('report-table'); + } + // END } - // END // Reinitialze some js like for calandar, tooltip, chosen jQuery(".hasPopover").popover({"html": true,"trigger": "hover focus","container": "body"}); diff --git a/tjreports/site/views/reports/tmpl/default.php b/tjreports/site/views/reports/tmpl/default.php index 580ca38..50adb48 100644 --- a/tjreports/site/views/reports/tmpl/default.php +++ b/tjreports/site/views/reports/tmpl/default.php @@ -433,12 +433,8 @@ } else { - $isSendEmailClass = ''; - if (in_array($key, $this->emailColumn)) - { - $isSendEmailClass = $emailColmClass; - } - echo ''. $item[$key] .''; + $isSendEmailClass = (in_array($key, $this->emailColumn)) ? $emailColmClass : ''; + echo "{$item[$key]}"; } } From 436b2d87f9b2d96b022a514510a5c5eff0fac26b Mon Sep 17 00:00:00 2001 From: komal mane Date: Mon, 23 Sep 2019 17:31:11 +0530 Subject: [PATCH 11/13] Task #150780 feat: Add sendemail config colum level. --- tjreports/site/models/reports.php | 21 ++++--------------- tjreports/site/views/reports/tmpl/default.php | 2 +- 2 files changed, 5 insertions(+), 18 deletions(-) diff --git a/tjreports/site/models/reports.php b/tjreports/site/models/reports.php index 8479c9c..5614ff4 100755 --- a/tjreports/site/models/reports.php +++ b/tjreports/site/models/reports.php @@ -1077,15 +1077,15 @@ private function filterReportColumns($queryId, &$selColToshow) } $query = $this->_db->getQuery(true); - $showhideCols = $paramColToshow = $emailColumn = array(); + $showhideCols = $paramColToshow = array(); // Process plugin params - $parentId = $this->processSavedReportColumns($queryId, $showhideCols, $paramColToshow, $selColToshow, $emailColumn); + $parentId = $this->processSavedReportColumns($queryId, $showhideCols, $paramColToshow, $selColToshow); // Process if user has saved query is for a plugin if (!empty($parentId)) { - $this->processSavedReportColumns($parentId, $showhideCols, $paramColToshow, $selColToshow, $emailColumn); + $this->processSavedReportColumns($parentId, $showhideCols, $paramColToshow, $selColToshow); } // If plugin has save any column assign that otherwise default plugin param will be applied @@ -1121,13 +1121,12 @@ private function filterReportColumns($queryId, &$selColToshow) * @param ARRAY &$showhideCols Show Hide columns * @param ARRAY &$colToshow Columns to show * @param ARRAY &$selColToshow Selected Cols - * @param STRING &$emailColumn emailColumn * * @return Void * * @since 3.0 */ - private function processSavedReportColumns($queryId, &$showhideCols, &$colToshow, &$selColToshow, &$emailColumn) + private function processSavedReportColumns($queryId, &$showhideCols, &$colToshow, &$selColToshow) { $query = $this->_db->getQuery(true); $query->select(array('param', 'parent')) @@ -1153,18 +1152,6 @@ private function processSavedReportColumns($queryId, &$showhideCols, &$colToshow } } - if (isset($param['emailColumn'])) - { - if (empty($emailColumn)) - { - $emailColumn = (array) $param['emailColumn']; - } - else - { - $emailColumn = array_intersect($emailColumn, (array) $param['emailColumn']); - } - } - if (isset($param['colToshow'])) { foreach ((array) $param['colToshow'] as $cols => $show) diff --git a/tjreports/site/views/reports/tmpl/default.php b/tjreports/site/views/reports/tmpl/default.php index 50adb48..b63d2b3 100644 --- a/tjreports/site/views/reports/tmpl/default.php +++ b/tjreports/site/views/reports/tmpl/default.php @@ -433,7 +433,7 @@ } else { - $isSendEmailClass = (in_array($key, $this->emailColumn)) ? $emailColmClass : ''; + $isSendEmailClass = ($key == $this->emailColumn) ? $emailColmClass : ''; echo "{$item[$key]}"; } } From e8cbf896db077ed6a33ca01d832308bc90a42107 Mon Sep 17 00:00:00 2001 From: Ashwin Date Date: Mon, 23 Sep 2019 17:43:38 +0530 Subject: [PATCH 12/13] Update tjrContentUI.js --- tjreports/site/assets/js/tjrContentUI.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/tjreports/site/assets/js/tjrContentUI.js b/tjreports/site/assets/js/tjrContentUI.js index e75a371..4334811 100755 --- a/tjreports/site/assets/js/tjrContentUI.js +++ b/tjreports/site/assets/js/tjrContentUI.js @@ -50,13 +50,11 @@ jQuery.extend(tjrContentUI.report, { // If plg_system_sendemail enable if (typeof tjutilitysendemail != 'undefined') { - // If sendEmail plug is enable then call the below funcation. To show checkboxes - var isSendEmail = jQuery('body').find('.td-sendemail').length; - if (isSendEmail) + // If sendEmail plug is enabled then try to add a column of checkboxes + if (jQuery('body').find('.td-sendemail').length) { tjutilitysendemail.addColumn('report-table'); } - // END } // Reinitialze some js like for calandar, tooltip, chosen From 8a9c4456395074fe1be9012cf0ba067a89734fd4 Mon Sep 17 00:00:00 2001 From: Ashwin Date Date: Mon, 23 Sep 2019 17:45:22 +0530 Subject: [PATCH 13/13] Update tjrContentUI.js --- tjreports/site/assets/js/tjrContentUI.js | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/tjreports/site/assets/js/tjrContentUI.js b/tjreports/site/assets/js/tjrContentUI.js index 4334811..5c16ad2 100755 --- a/tjreports/site/assets/js/tjrContentUI.js +++ b/tjreports/site/assets/js/tjrContentUI.js @@ -47,14 +47,13 @@ jQuery.extend(tjrContentUI.report, { var responseHTML = jQuery(response['html']).find(containerSel).html(); jQuery(containerSel).html(responseHTML); - // If plg_system_sendemail enable - if (typeof tjutilitysendemail != 'undefined') + // If sendEmail plug is enabled then try to add a column of checkboxes + if ( + typeof tjutilitysendemail != 'undefined' && + jQuery('body').find('.td-sendemail').length > 0 + ) { - // If sendEmail plug is enabled then try to add a column of checkboxes - if (jQuery('body').find('.td-sendemail').length) - { - tjutilitysendemail.addColumn('report-table'); - } + tjutilitysendemail.addColumn('report-table'); } // Reinitialze some js like for calandar, tooltip, chosen