Skip to content

Commit

Permalink
Updates to release v3.1.3
Browse files Browse the repository at this point in the history
  • Loading branch information
kartik-v committed Oct 22, 2016
1 parent 5124301 commit 448db13
Show file tree
Hide file tree
Showing 72 changed files with 4,410 additions and 101 deletions.
14 changes: 13 additions & 1 deletion BooleanColumn.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,21 @@
use Closure;

/**
* A BooleanColumn to convert true/false values as user friendly indicators with an automated drop down filter for the
* A BooleanColumn will convert true/false values as user friendly indicators with an automated drop down filter for the
* [[GridView]] widget.
*
* To add a BooleanColumn to the gridview, add it to the [[GridView::columns|columns]] configuration as follows:
*
* ```php
* 'columns' => [
* // ...
* [
* 'class' => BooleanColumn::className(),
* // you may configure additional properties here
* ],
* ]
* ```
*
* @author Kartik Visweswaran <[email protected]>
* @since 1.0
*/
Expand Down
9 changes: 8 additions & 1 deletion CHANGE.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Change Log: `yii2-grid`

## Version 3.1.3

**Date:** 06-Sep-2016
**Date:** 22-Oct-2016

1. (enh #554): Add ability to configure delete confirmation message within `ActionColumn::deleteOptions`.
2. (bug #556): Correct expandRow behavior when using with `detailUrl` pjax form.
Expand All @@ -13,6 +13,13 @@ Change Log: `yii2-grid`
6. (enh #564): Enhance page summary to render within table body and add new property`GridView::pageSummaryContainer`.
7. Enhance PHP Documentation for all classes and methods in the extension.
8. (enh #565): Better exported content parsing for header, footer, and page summary.
9. (enh #578): Update Italian Translations.
10. (enh #542, #579): Allow `thousandSep` config for grid group summary.
11. (enh #580): Update Dutch Translations.
12. (enh #581): Update Chinese Translations.
13. (enh #583): Add Gujarati and Hindi Translations.
14. (enh #584): Update Vietnamese Translations.
15. Update message config to include all default standard translation files.

## Version 3.1.2

Expand Down
12 changes: 12 additions & 0 deletions CheckboxColumn.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,18 @@
* The CheckboxColumn displays a column of checkboxes in a grid view and extends the [[YiiCheckboxColumn]] with
* various enhancements.
*
* To add a CheckboxColumn to the gridview, add it to the [[GridView::columns|columns]] configuration as follows:
*
* ```php
* 'columns' => [
* // ...
* [
* 'class' => CheckboxColumn::className(),
* // you may configure additional properties here
* ],
* ]
* ```
*
* @author Kartik Visweswaran <[email protected]>
* @since 1.0
*/
Expand Down
9 changes: 6 additions & 3 deletions ColumnTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

namespace kartik\grid;

use \Closure;
use Closure;
use yii\base\Model;
use yii\helpers\ArrayHelper;
use yii\helpers\Html;
Expand Down Expand Up @@ -140,11 +140,14 @@ protected function getPageSummaryCellContent()
*/
protected function calculateSummary()
{
$data = $this->_rows;
$type = $this->pageSummaryFunc;
if ($type instanceof Closure) {
return call_user_func($type, $data);
}
if (empty($this->_rows)) {
return '';
}
$data = $this->_rows;
$type = $this->pageSummaryFunc;
switch ($type) {
case null:
return array_sum($data);
Expand Down
14 changes: 13 additions & 1 deletion EditableColumn.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,19 @@
use kartik\base\Config;

/**
* The EditableColumn converts the data to editable using the Editable widget [[\kartik\editable\Editable]]
* The EditableColumn converts the data to editable using the Editable widget [[\kartik\editable\Editable]].
*
* To add an EditableColumn to the gridview, add it to the [[GridView::columns|columns]] configuration as follows:
*
* ```php
* 'columns' => [
* // ...
* [
* 'class' => EditableColumn::className(),
* // you may configure additional properties here
* ],
* ]
* ```
*
* @author Kartik Visweswaran <[email protected]>
* @since 1.0
Expand Down
12 changes: 12 additions & 0 deletions ExpandRowColumn.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,18 @@
/**
* An ExpandRowColumn can be used to expand a row and add content in a new row below it either directly or via ajax.
*
* To add an ExpandRowColumn to the gridview, add it to the [[GridView::columns|columns]] configuration as follows:
*
* ```php
* 'columns' => [
* // ...
* [
* 'class' => ExpandRowColumn::className(),
* // you may configure additional properties here
* ],
* ]
* ```
*
* @author Kartik Visweswaran <[email protected]>
* @since 1.0
*/
Expand Down
12 changes: 12 additions & 0 deletions FormulaColumn.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,18 @@
* A FormulaColumn to calculate values based on other column indexes for the Grid widget [[\kartik\grid\GridView]].
* This extends and builds upon the [[DataColumn]] in the [[GridView]] widget.
*
* To add a FormulaColumn to the gridview, add it to the [[GridView::columns|columns]] configuration as follows:
*
* ```php
* 'columns' => [
* // ...
* [
* 'class' => FormulaColumn::className(),
* // you may configure additional properties here
* ],
* ]
* ```
*
* @author Kartik Visweswaran <[email protected]>
* @since 1.0
*/
Expand Down
19 changes: 9 additions & 10 deletions GridView.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
*
* A basic usage of the widget looks like the following:
*
* ```php
* ~~~
* <?= GridView::widget([
* 'dataProvider' => $dataProvider,
* 'columns' => [
Expand All @@ -48,7 +48,7 @@
* // ...
* ]
* ]) ?>
* ```
* ~~~
*
* @see http://demos.krajee.com/grid
* @author Kartik Visweswaran <[email protected]>
Expand Down Expand Up @@ -1044,18 +1044,17 @@ public function renderExport()
$iconPrefix = $this->export['fontAwesome'] ? 'fa fa-' : 'glyphicon glyphicon-';
$title = ($icon == '') ? $title : "<i class='{$iconPrefix}{$icon}'></i> {$title}";
$action = $this->_module->downloadAction;
if (!is_array($action)) {
$action = [$action];
}
$encoding = ArrayHelper::getValue($this->export, 'encoding', 'utf-8');
$bom = ArrayHelper::getValue($this->export, 'bom', true);
$target = ArrayHelper::getValue($this->export, 'target', self::TARGET_POPUP);
$form = Html::beginForm(
$action, 'post', [
'class' => 'kv-export-form',
'style' => 'display:none',
'target' => ($target == self::TARGET_POPUP) ? 'kvDownloadDialog' : $target,
]
is_array($action) ? $action : [$action],
'post',
[
'class' => 'kv-export-form',
'style' => 'display:none',
'target' => ($target == self::TARGET_POPUP) ? 'kvDownloadDialog' : $target,
]
) . "\n" .
Html::hiddenInput('export_filetype') . "\n" .
Html::hiddenInput('export_filename') . "\n" .
Expand Down
12 changes: 12 additions & 0 deletions RadioColumn.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,18 @@
* RadioColumn displays a column of radio inputs in a grid view. It is different than the CheckboxColumn in the sense
* that it allows only a single row to be selected at a time.
*
* To add a RadioColumn to the gridview, add it to the [[GridView::columns|columns]] configuration as follows:
*
* ```php
* 'columns' => [
* // ...
* [
* 'class' => RadioColumn::className(),
* // you may configure additional properties here
* ],
* ]
* ```
*
* @author Kartik Visweswaran <[email protected]>
* @since 1.0
*/
Expand Down
12 changes: 12 additions & 0 deletions SerialColumn.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,18 @@
* A SerialColumn displays a column of row numbers (1-based) and extends the [[YiiSerialColumn]] with various
* enhancements.
*
* To add a SerialColumn to the gridview, add it to the [[GridView::columns|columns]] configuration as follows:
*
* ```php
* 'columns' => [
* // ...
* [
* 'class' => SerialColumn::className(),
* // you may configure additional properties here
* ],
* ]
* ```
*
* @author Kartik Visweswaran <[email protected]>
* @since 1.0
*/
Expand Down
Loading

0 comments on commit 448db13

Please sign in to comment.