Skip to content

Commit

Permalink
Updates to release v3.2.0 fix #818 fix #819
Browse files Browse the repository at this point in the history
  • Loading branch information
kartik-v committed Sep 9, 2018
1 parent f8bb896 commit c03ff96
Show file tree
Hide file tree
Showing 31 changed files with 46 additions and 38 deletions.
2 changes: 1 addition & 1 deletion .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ When [reporting bugs][reporting-bugs] or
[issue tracker on GitHub][issue-tracker] is the recommended channel to use.

The issue tracker **is not** a place for support requests. Refer the
[extension documentation and demos](http://demos.krajee.com/dynagrid) and/or refer to the
[extension documentation and demos](http://demos.krajee.com/grid) and/or refer to the
[webtips Q & A forum](http://webtips.krajee.com/questions) which are the better places to get help.

How to contribute via a pull request?
Expand Down
8 changes: 8 additions & 0 deletions CHANGE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
Change Log: `yii2-grid`
=======================

## Version 3.2.0

**Date:** _under development_

- (enh #819): Enhance grid export generation for PJAX grids (correct timestamp).
- (enh #818): Correct PDF Export Generation response.
- (enh #816): Fix typo in check if has `xlFormat`.

## Version 3.1.9

**Date:** 07-Sep-2018
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
},
"extra": {
"branch-alias": {
"dev-master": "3.1.x-dev"
"dev-master": "3.2.x-dev"
}
}
}
3 changes: 1 addition & 2 deletions src/ActionColumn.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,11 @@
/**
* @copyright Copyright © Kartik Visweswaran, Krajee.com, 2014 - 2018
* @package yii2-grid
* @version 3.1.9
* @version 3.2.0
*/

namespace kartik\grid;

use Closure;
use Yii;
use yii\grid\ActionColumn as YiiActionColumn;
use yii\helpers\ArrayHelper;
Expand Down
2 changes: 1 addition & 1 deletion src/ActionColumnAsset.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* @package yii2-grid
* @author Kartik Visweswaran <[email protected]>
* @copyright Copyright &copy; Kartik Visweswaran, Krajee.com, 2014 - 2018
* @version 3.1.9
* @version 3.2.0
*/

namespace kartik\grid;
Expand Down
2 changes: 1 addition & 1 deletion src/BooleanColumn.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* @package yii2-grid
* @author Kartik Visweswaran <[email protected]>
* @copyright Copyright &copy; Kartik Visweswaran, Krajee.com, 2014 - 2018
* @version 3.1.9
* @version 3.2.0
*/

namespace kartik\grid;
Expand Down
2 changes: 1 addition & 1 deletion src/CheckboxColumn.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* @package yii2-grid
* @author Kartik Visweswaran <[email protected]>
* @copyright Copyright &copy; Kartik Visweswaran, Krajee.com, 2014 - 2018
* @version 3.1.9
* @version 3.2.0
*/

namespace kartik\grid;
Expand Down
2 changes: 1 addition & 1 deletion src/CheckboxColumnAsset.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* @package yii2-grid
* @author Kartik Visweswaran <[email protected]>
* @copyright Copyright &copy; Kartik Visweswaran, Krajee.com, 2014 - 2018
* @version 3.1.9
* @version 3.2.0
*/

namespace kartik\grid;
Expand Down
2 changes: 1 addition & 1 deletion src/ColumnTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* @package yii2-grid
* @author Kartik Visweswaran <[email protected]>
* @copyright Copyright &copy; Kartik Visweswaran, Krajee.com, 2014 - 2018
* @version 3.1.9
* @version 3.2.0
*/

namespace kartik\grid;
Expand Down
2 changes: 1 addition & 1 deletion src/DataColumn.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* @package yii2-grid
* @author Kartik Visweswaran <[email protected]>
* @copyright Copyright &copy; Kartik Visweswaran, Krajee.com, 2014 - 2018
* @version 3.1.9
* @version 3.2.0
*/

namespace kartik\grid;
Expand Down
2 changes: 1 addition & 1 deletion src/Demo.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* @package yii2-grid
* @author Kartik Visweswaran <[email protected]>
* @copyright Copyright &copy; Kartik Visweswaran, Krajee.com, 2014 - 2018
* @version 3.1.9
* @version 3.2.0
*/

namespace kartik\grid;
Expand Down
2 changes: 1 addition & 1 deletion src/EditableColumn.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* @package yii2-grid
* @author Kartik Visweswaran <[email protected]>
* @copyright Copyright &copy; Kartik Visweswaran, Krajee.com, 2014 - 2018
* @version 3.1.9
* @version 3.2.0
*/

namespace kartik\grid;
Expand Down
2 changes: 1 addition & 1 deletion src/EditableColumnAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* @package yii2-grid
* @author Kartik Visweswaran <[email protected]>
* @copyright Copyright &copy; Kartik Visweswaran, Krajee.com, 2014 - 2018
* @version 3.1.9
* @version 3.2.0
*/

namespace kartik\grid;
Expand Down
2 changes: 1 addition & 1 deletion src/EditableColumnAsset.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* @package yii2-grid
* @author Kartik Visweswaran <[email protected]>
* @copyright Copyright &copy; Kartik Visweswaran, Krajee.com, 2014 - 2018
* @version 3.1.9
* @version 3.2.0
*/

namespace kartik\grid;
Expand Down
2 changes: 1 addition & 1 deletion src/ExpandRowColumn.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* @package yii2-grid
* @author Kartik Visweswaran <[email protected]>
* @copyright Copyright &copy; Kartik Visweswaran, Krajee.com, 2014 - 2018
* @version 3.1.9
* @version 3.2.0
*/

namespace kartik\grid;
Expand Down
2 changes: 1 addition & 1 deletion src/ExpandRowColumnAsset.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* @package yii2-grid
* @author Kartik Visweswaran <[email protected]>
* @copyright Copyright &copy; Kartik Visweswaran, Krajee.com, 2014 - 2018
* @version 3.1.9
* @version 3.2.0
*/

namespace kartik\grid;
Expand Down
2 changes: 1 addition & 1 deletion src/FormulaColumn.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* @package yii2-grid
* @author Kartik Visweswaran <[email protected]>
* @copyright Copyright &copy; Kartik Visweswaran, Krajee.com, 2014 - 2018
* @version 3.1.9
* @version 3.2.0
*/

namespace kartik\grid;
Expand Down
2 changes: 1 addition & 1 deletion src/GridExportAsset.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* @package yii2-grid
* @author Kartik Visweswaran <[email protected]>
* @copyright Copyright &copy; Kartik Visweswaran, Krajee.com, 2014 - 2018
* @version 3.1.9
* @version 3.2.0
*/

namespace kartik\grid;
Expand Down
2 changes: 1 addition & 1 deletion src/GridFloatHeadAsset.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* @package yii2-grid
* @author Kartik Visweswaran <[email protected]>
* @copyright Copyright &copy; Kartik Visweswaran, Krajee.com, 2014 - 2018
* @version 3.1.9
* @version 3.2.0
*/

namespace kartik\grid;
Expand Down
2 changes: 1 addition & 1 deletion src/GridGroupAsset.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* @package yii2-grid
* @author Kartik Visweswaran <[email protected]>
* @copyright Copyright &copy; Kartik Visweswaran, Krajee.com, 2014 - 2018
* @version 3.1.9
* @version 3.2.0
*/

namespace kartik\grid;
Expand Down
2 changes: 1 addition & 1 deletion src/GridPerfectScrollbarAsset.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* @package yii2-grid
* @author Kartik Visweswaran <[email protected]>
* @copyright Copyright &copy; Kartik Visweswaran, Krajee.com, 2014 - 2018
* @version 3.1.9
* @version 3.2.0
*/

namespace kartik\grid;
Expand Down
2 changes: 1 addition & 1 deletion src/GridResizeColumnsAsset.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* @package yii2-grid
* @author Kartik Visweswaran <[email protected]>
* @copyright Copyright &copy; Kartik Visweswaran, Krajee.com, 2014 - 2018
* @version 3.1.9
* @version 3.2.0
*/

namespace kartik\grid;
Expand Down
2 changes: 1 addition & 1 deletion src/GridResizeStoreAsset.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* @package yii2-grid
* @author Kartik Visweswaran <[email protected]>
* @copyright Copyright &copy; Kartik Visweswaran, Krajee.com, 2014 - 2018
* @version 3.1.9
* @version 3.2.0
*/

namespace kartik\grid;
Expand Down
2 changes: 1 addition & 1 deletion src/GridToggleDataAsset.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* @package yii2-grid
* @author Kartik Visweswaran <[email protected]>
* @copyright Copyright &copy; Kartik Visweswaran, Krajee.com, 2014 - 2018
* @version 3.1.9
* @version 3.2.0
*/

namespace kartik\grid;
Expand Down
8 changes: 5 additions & 3 deletions src/GridView.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* @package yii2-grid
* @author Kartik Visweswaran <[email protected]>
* @copyright Copyright &copy; Kartik Visweswaran, Krajee.com, 2014 - 2018
* @version 3.1.9
* @version 3.2.0
*/

namespace kartik\grid;
Expand Down Expand Up @@ -1537,7 +1537,7 @@ protected function initExport()
'color' => '#333333',
],
'R' => [
'content' => Yii::t('kvgrid', 'Generated') . ': ' . date('D, d-M-Y g:i a T'),
'content' => Yii::t('kvgrid', 'Generated') . ': ' . date('D, d-M-Y'),
'font-size' => 8,
'color' => '#333333',
],
Expand Down Expand Up @@ -1572,7 +1572,9 @@ protected function initExport()
'options' => ['title' => Yii::t('kvgrid', 'Hyper Text Markup Language')],
'mime' => 'text/html',
'config' => [
'cssFile' => 'https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css',
'cssFile' => $this->isBs4() ?
'https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css' :
'https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css',
],
],
self::CSV => [
Expand Down
2 changes: 1 addition & 1 deletion src/GridViewAsset.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* @package yii2-grid
* @author Kartik Visweswaran <[email protected]>
* @copyright Copyright &copy; Kartik Visweswaran, Krajee.com, 2014 - 2018
* @version 3.1.9
* @version 3.2.0
*/

namespace kartik\grid;
Expand Down
2 changes: 1 addition & 1 deletion src/Module.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* @package yii2-grid
* @author Kartik Visweswaran <[email protected]>
* @copyright Copyright &copy; Kartik Visweswaran, Krajee.com, 2014 - 2018
* @version 3.1.9
* @version 3.2.0
*/

namespace kartik\grid;
Expand Down
2 changes: 1 addition & 1 deletion src/RadioColumn.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* @package yii2-grid
* @author Kartik Visweswaran <[email protected]>
* @copyright Copyright &copy; Kartik Visweswaran, Krajee.com, 2014 - 2018
* @version 3.1.9
* @version 3.2.0
*/

namespace kartik\grid;
Expand Down
2 changes: 1 addition & 1 deletion src/RadioColumnAsset.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* @package yii2-grid
* @author Kartik Visweswaran <[email protected]>
* @copyright Copyright &copy; Kartik Visweswaran, Krajee.com, 2014 - 2018
* @version 3.1.9
* @version 3.2.0
*/

namespace kartik\grid;
Expand Down
2 changes: 1 addition & 1 deletion src/SerialColumn.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* @package yii2-grid
* @author Kartik Visweswaran <[email protected]>
* @copyright Copyright &copy; Kartik Visweswaran, Krajee.com, 2014 - 2018
* @version 3.1.9
* @version 3.2.0
*/

namespace kartik\grid;
Expand Down
11 changes: 5 additions & 6 deletions src/controllers/ExportController.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* @package yii2-grid
* @author Kartik Visweswaran <[email protected]>
* @copyright Copyright &copy; Kartik Visweswaran, Krajee.com, 2014 - 2018
* @version 3.1.9
* @version 3.2.0
*/

namespace kartik\grid\controllers;
Expand Down Expand Up @@ -60,9 +60,7 @@ public function actionDownload()
}
if ($type == GridView::PDF) {
$config = Json::decode($config);
$this->generatePDF($content, "{$name}.pdf", $config);
/** @noinspection PhpInconsistentReturnPointsInspection */
return;
return $this->generatePDF($content, "{$name}.pdf", $config);
} elseif ($type == GridView::HTML) {
$content = HtmlPurifier::process($content);
} elseif ($type == GridView::CSV || $type == GridView::TEXT) {
Expand All @@ -83,7 +81,7 @@ public function actionDownload()
* @param string $filename the file name
* @param array $config the configuration for yii2-mpdf component
*
* @return void
* @return Response
*/
protected function generatePDF($content, $filename, $config = [])
{
Expand All @@ -93,7 +91,8 @@ protected function generatePDF($content, $filename, $config = [])
$config['methods']['SetCreator'] = [Yii::t('kvgrid', 'Krajee Yii2 Grid Export Extension')];
$config['content'] = $content;
$pdf = new Pdf($config);
echo $pdf->render();
Yii::$app->response->format = \yii\web\Response::FORMAT_RAW;
return $pdf->render();
}

/**
Expand Down

0 comments on commit c03ff96

Please sign in to comment.