Skip to content

Commit

Permalink
bug fix for Table and Google Chart widgets
Browse files Browse the repository at this point in the history
  • Loading branch information
dongnl committed Feb 14, 2019
1 parent c72f068 commit 1109f96
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 19 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
16 changes: 9 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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__]
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
9 changes: 0 additions & 9 deletions src/widgets/google/Chart.php
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
5 changes: 4 additions & 1 deletion src/widgets/koolphp/Table.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ class Table extends Widget
protected $group;
protected $sorting;

protected $emptyValue;

/**
* Return the resource settings for table
*
Expand All @@ -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());

Expand Down Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/widgets/koolphp/Table.tpl.php
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@
$tdStyle = is_string($cssStyle)?$cssStyle:Utility::get($cssStyle, "td");
?>
<td rv="<?php echo ($cKey!=="#")?$row[$cKey]:($i+$meta["columns"][$cKey]["start"]);?>" <?php echo ($tdStyle)?"style='$tdStyle'":""; ?> <?php if($tdClass){echo " class='".((gettype($tdClass)=="string")?$tdClass:$tdClass($row,$cKey))."'";} ?>>
<?php echo Table::formatValue(($cKey!=="#")?$row[$cKey]:($i+$meta["columns"][$cKey]["start"]), $meta["columns"][$cKey], $row);?>
<?php echo Table::formatValue(($cKey!=="#")?Utility::get($row, $cKey, $this->emptyValue):($i+$meta["columns"][$cKey]["start"]), $meta["columns"][$cKey], $row);?>
</td>
<?php
}
Expand Down

0 comments on commit 1109f96

Please sign in to comment.