Commit 1603a2b0 authored by Klimov Paul's avatar Klimov Paul

`Nav::renderItem()` adjusted

parent b6087e2a
...@@ -4,6 +4,7 @@ Yii Framework 2 bootstrap extension Change Log ...@@ -4,6 +4,7 @@ Yii Framework 2 bootstrap extension Change Log
2.0.6 under development 2.0.6 under development
----------------------- -----------------------
- Bug #68: Fixed `yii\bootstrap\Nav` handling empty items (freezy-sk)
- Bug #81: Fixed `yii\bootstrap\ActiveField::radioList()` and `yii\bootstrap\ActiveField::checkboxList()` ignore `itemOptions` (mikehaertl) - Bug #81: Fixed `yii\bootstrap\ActiveField::radioList()` and `yii\bootstrap\ActiveField::checkboxList()` ignore `itemOptions` (mikehaertl)
- Bug #98: Fixed `yii\bootstrap\ButtonDropdown` setting `href` attribute for non `a` tags (13nightevil) - Bug #98: Fixed `yii\bootstrap\ButtonDropdown` setting `href` attribute for non `a` tags (13nightevil)
- Enh #45: Added support for Bootstrap checkbox/radio toggle buttons (RomeroMsk, klimov-paul) - Enh #45: Added support for Bootstrap checkbox/radio toggle buttons (RomeroMsk, klimov-paul)
......
...@@ -177,7 +177,9 @@ class Nav extends Widget ...@@ -177,7 +177,9 @@ class Nav extends Widget
$active = $this->isItemActive($item); $active = $this->isItemActive($item);
} }
if (!empty($items)) { if (empty($items)) {
$items = '';
} else {
$linkOptions['data-toggle'] = 'dropdown'; $linkOptions['data-toggle'] = 'dropdown';
Html::addCssClass($options, ['widget' => 'dropdown']); Html::addCssClass($options, ['widget' => 'dropdown']);
Html::addCssClass($linkOptions, ['widget' => 'dropdown-toggle']); Html::addCssClass($linkOptions, ['widget' => 'dropdown-toggle']);
...@@ -192,10 +194,6 @@ class Nav extends Widget ...@@ -192,10 +194,6 @@ class Nav extends Widget
} }
} }
if (empty($items)) {
$items = '';
}
if ($this->activateItems && $active) { if ($this->activateItems && $active) {
Html::addCssClass($options, 'active'); Html::addCssClass($options, 'active');
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment