From 1109f969667064b6daee0374890cb67232641afa Mon Sep 17 00:00:00 2001 From: dongnl Date: Thu, 14 Feb 2019 10:46:01 +0700 Subject: [PATCH] bug fix for Table and Google Chart widgets --- CHANGELOG.md | 5 +++++ README.md | 16 +++++++++------- composer.json | 2 +- src/widgets/google/Chart.php | 9 --------- src/widgets/koolphp/Table.php | 5 ++++- src/widgets/koolphp/Table.tpl.php | 2 +- 6 files changed, 20 insertions(+), 19 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3ba5836..6407dfe 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # Change Log +## Version 3.25.3 + +1. `Table`: Fix Table warning in PHP 7.2+ when grouping is not set +2. `GoogleCharts`: Remove auto change pointer on select event + ## Version 3.25.1 1. `Utility`: Fix the symbolic path diff --git a/README.md b/README.md index 64597aa..dd9404f 100644 --- a/README.md +++ b/README.md @@ -14,9 +14,10 @@ # Changelog -* [Version 3.25.1 (Feb 13st, 2019)](https://www.koolreport.com/docs/koolreport/change_log/#version-3.25.1) +* [Version 3.25.3 (Feb 14th, 2019)](https://www.koolreport.com/docs/koolreport/change_log/#version-3.25.3) +* [Version 3.25.1 (Feb 13rd, 2019)](https://www.koolreport.com/docs/koolreport/change_log/#version-3.25.1) * [Version 3.25.0 (Feb 11st, 2019)](https://www.koolreport.com/docs/koolreport/change_log/#version-3.25.0) -* [Version 3.1.0 (Nov 17rd, 2018)](https://www.koolreport.com/docs/koolreport/change_log/#version-3.1.0) +* [Version 3.1.0 (Nov 17th, 2018)](https://www.koolreport.com/docs/koolreport/change_log/#version-3.1.0) * [Version 3.0.0 (Nov 13rd, 2018)](https://www.koolreport.com/docs/koolreport/change_log/#version-3.0.0) * [Version 2.78.0 (Jul 16th, 2018)](https://www.koolreport.com/updates#version-2780) * [Version 2.43.0 (Apr 20th, 2018)](https://www.koolreport.com/updates#version-2430) @@ -218,12 +219,13 @@ The KoolReport is licensed under MIT License. * [Statistics](https://www.koolreport.com/packages/statistics): Provide various statistical measures for your data [__Free__] * [Bootstrap3](https://www.koolreport.com/packages/bootstrap3): Create beautiful report with Bootstrap 3 [__Free__] * [Bootstrap4](https://www.koolreport.com/packages/bootstrap3): Create modern report with Bootstrap 4 [__Free__] -* [Excel](https://www.koolreport.com/packages/excel): Import and export data to Excel [__$9__] -* [Cube](https://www.koolreport.com/packages/cube): Turn your data into two dimensions cross-tab table [__$9__] -* [Pivot](https://www.koolreport.com/packages/pivot): Build multi-dimenstional pivot table [__$29__] -* [Export](https://www.koolreport.com/packages/export): Export your report to PDF, JPG, PNG and other formats [__$19__] +* [CloudExport](https://www.koolreport.com/packages/cloudexport): Export your report to PDF, JPG, PNG and other formats using cloud services [__Free__] +* [Excel](https://www.koolreport.com/packages/excel): Import and export data to Excel [__$29__] +* [Cube](https://www.koolreport.com/packages/cube): Turn your data into two dimensions cross-tab table [__$19__] +* [Pivot](https://www.koolreport.com/packages/pivot): Build multi-dimenstional pivot table [__$49__] +* [Export](https://www.koolreport.com/packages/export): Export your report to PDF, JPG, PNG and other formats [__$29__] * [Morris Chart](https://www.koolreport.com/packages/morris_chart): Use morris charts in your report [__$9__] -* [Inputs](https://www.koolreport.com/packages/inputs): A simplest way to build dynamic reports [__$19__] +* [Inputs](https://www.koolreport.com/packages/inputs): A simplest way to build dynamic reports [__$29__] * [BarCode](https://www.koolreport.com/packages/barcode): Generate BarCode and QRCode [__$9__] * [Sparklines](https://www.koolreport.com/packages/sparklines): Create tiny charts [__$9__] * [DataGrid](https://www.koolreport.com/packages/datagrid): Display data in table format, search, sort, group data and more.. [__$19__] diff --git a/composer.json b/composer.json index cb5298d..b3df12a 100644 --- a/composer.json +++ b/composer.json @@ -1,6 +1,6 @@ { "name": "koolphp/koolreport", - "version":"3.25.1", + "version":"3.25.3", "description": "An Open Source PHP Reporting Framework for easier and faster report delivery.", "keywords": ["php reporting framework","php reporting tools","data processing","data visualization","charts and graphs"], "homepage": "https://www.koolreport.com", diff --git a/src/widgets/google/Chart.php b/src/widgets/google/Chart.php index 2ad109a..41b767b 100644 --- a/src/widgets/google/Chart.php +++ b/src/widgets/google/Chart.php @@ -76,15 +76,6 @@ protected function onInit() $this->title = Utility::get($this->params, "title"); $this->pointerOnHover = Utility::get($this->params, "pointerOnHover"); $this->mapsApiKey = Utility::get($this->params, "mapsApiKey", ''); - if ($this->pointerOnHover === null) { - if (isset($this->clientEvents["itemSelect"]) - || isset($this->clientEvents["rowSelect"]) - || isset($this->clientEvents["columnSelect"]) - || isset($this->clientEvents["select"]) - ) { - $this->pointerOnHover = true; - } - } if (!$this->dataStore) { //Backward compatible with setting through "data" diff --git a/src/widgets/koolphp/Table.php b/src/widgets/koolphp/Table.php index bd7d921..1de3ea6 100644 --- a/src/widgets/koolphp/Table.php +++ b/src/widgets/koolphp/Table.php @@ -56,6 +56,8 @@ class Table extends Widget protected $group; protected $sorting; + protected $emptyValue; + /** * Return the resource settings for table * @@ -81,6 +83,7 @@ protected function onInit() $this->useLanguage(); $this->useDataSource(); $this->useAutoName("ktable"); + $this->emptyValue = Utility::get($this->params, "emptyValue", 0); $this->clientEvents = Utility::get($this->params, "clientEvents"); $this->columns = Utility::get($this->params, "columns", array()); @@ -154,8 +157,8 @@ protected function onInit() $this->sorting = Utility::get($this->params, "sorting", array()); $group = Utility::get($this->params, "grouping"); + $this->group = array(); if ($group) { - $this->group = array(); foreach ($group as $cKey => $cValue) { if (gettype($cValue) == "array") { $this->group[$cKey] = $cValue; diff --git a/src/widgets/koolphp/Table.tpl.php b/src/widgets/koolphp/Table.tpl.php index 6cf36d9..ef50b6e 100644 --- a/src/widgets/koolphp/Table.tpl.php +++ b/src/widgets/koolphp/Table.tpl.php @@ -117,7 +117,7 @@ $tdStyle = is_string($cssStyle)?$cssStyle:Utility::get($cssStyle, "td"); ?> " > - + emptyValue):($i+$meta["columns"][$cKey]["start"]), $meta["columns"][$cKey], $row);?>