Skip to content

Commit

Permalink
Updates to release v3.3.6 fix #993
Browse files Browse the repository at this point in the history
  • Loading branch information
kartik-v committed Sep 3, 2021
1 parent 4f21281 commit 61fd749
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 6 deletions.
2 changes: 1 addition & 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.3.6

**Date:** 02-Sep-2021
**Date:** 03-Sep-2021

- (enh #993): Enhancements to support Bootstrap v5.x.
- (enh #971): Correct `kv-grid-group.js` version.
Expand Down
13 changes: 12 additions & 1 deletion src/GridView.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,21 @@ class GridView extends YiiGridView implements BootstrapInterface
*/
const TYPE_DEFAULT = 'default';

/**
* @var string the **light** bootstrap contextual color type (applicable only for panel contextual style)
*/
const TYPE_LIGHT = 'light';

/**
* @var string the **dark** bootstrap contextual color type (applicable only for panel contextual style)
*/
const TYPE_DARK = 'dark';

/**
* @var string the **secondary** bootstrap contextual color type
*/
const TYPE_SECONDARY = 'secondary';

/**
* @var string the **primary** bootstrap contextual color type
*/
Expand Down Expand Up @@ -2061,7 +2071,8 @@ protected function initPanel()
static::initCss($options, $this->panelPrefix . $type);
} else {
$this->addCssClass($options, self::BS_PANEL);
Html::addCssClass($options, $notBs3 ? "border-{$type}" : "panel-{$type}");
$border = $type === self::TYPE_LIGHT ? 'border' : "border-{$type}";
Html::addCssClass($options, $notBs3 ? $border : "panel-{$type}");
}
static::initCss($summaryOptions, $this->getCssClass(self::BS_PULL_RIGHT));
$titleTag = ArrayHelper::remove($titleOptions, 'tag', ($notBs3 ? 'h5' : 'h3'));
Expand Down
19 changes: 16 additions & 3 deletions src/assets/css/kv-grid.css
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,16 @@
* Table column heading sort styles for BS4
*/
.kv-grid-bs4 .card .kv-grid-table {
margin: 0
margin: 0;
}

.kv-grid-bs4 .card .kv-grid-table fthfoot,
.kv-grid-bs4 .card .kv-grid-table fthfoot * {
font-size: 0;
line-height: 0;
padding: 0;
margin: 0;
border: 0;
}

.kv-grid-bs4 a.asc:after,
Expand Down Expand Up @@ -49,14 +58,18 @@
* Panel Styles
*/
.kv-panel-pager {
min-height: 34px;
height: 34px;
}

.kv-panel-pager .pagination {
margin: 0 0 -5px 0;
margin: 0 -5px;
padding: 0;
}

.kv-grid-bs4 .kv-panel-pager .pagination {
margin: -3px -9px;
}

.kv-panel-before {
padding: 10px;
border-bottom: 1px solid #ddd;
Expand Down
Loading

0 comments on commit 61fd749

Please sign in to comment.