Commit d6866256 by Carsten Brandt

only add navbar-default when no other class is set (e.g. navbar-inverse)

fixes #1553
parent 4ed1c2fc
...@@ -5,6 +5,7 @@ Yii Framework 2 bootstrap extension Change Log ...@@ -5,6 +5,7 @@ Yii Framework 2 bootstrap extension Change Log
---------------------------- ----------------------------
- Enh #1474: Added option to make NavBar 100% width (cebe) - Enh #1474: Added option to make NavBar 100% width (cebe)
- Enh #1553: Only add navbar-default class to NavBar when no other class is specified (cebe)
2.0.0 alpha, December 1, 2013 2.0.0 alpha, December 1, 2013
----------------------------- -----------------------------
......
...@@ -67,7 +67,10 @@ class NavBar extends Widget ...@@ -67,7 +67,10 @@ class NavBar extends Widget
{ {
parent::init(); parent::init();
$this->clientOptions = false; $this->clientOptions = false;
Html::addCssClass($this->options, 'navbar navbar-default'); Html::addCssClass($this->options, 'navbar');
if ($this->options['class'] == 'navbar') {
Html::addCssClass($this->options, 'navbar-default');
}
Html::addCssClass($this->brandOptions, 'navbar-brand'); Html::addCssClass($this->brandOptions, 'navbar-brand');
if (empty($this->options['role'])) { if (empty($this->options['role'])) {
$this->options['role'] = 'navigation'; $this->options['role'] = 'navigation';
......
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