|
|
@ -122,7 +122,7 @@ class Tabs extends Widget |
|
|
|
public function init() |
|
|
|
public function init() |
|
|
|
{ |
|
|
|
{ |
|
|
|
parent::init(); |
|
|
|
parent::init(); |
|
|
|
Html::addCssClass($this->options, 'nav ' . $this->navType); |
|
|
|
Html::addCssClass($this->options, ['widget' => 'nav', $this->navType]); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
@ -162,13 +162,13 @@ class Tabs extends Widget |
|
|
|
|
|
|
|
|
|
|
|
if (isset($item['items'])) { |
|
|
|
if (isset($item['items'])) { |
|
|
|
$label .= ' <b class="caret"></b>'; |
|
|
|
$label .= ' <b class="caret"></b>'; |
|
|
|
Html::addCssClass($headerOptions, 'dropdown'); |
|
|
|
Html::addCssClass($headerOptions, ['widget' => 'dropdown']); |
|
|
|
|
|
|
|
|
|
|
|
if ($this->renderDropdown($n, $item['items'], $panes)) { |
|
|
|
if ($this->renderDropdown($n, $item['items'], $panes)) { |
|
|
|
Html::addCssClass($headerOptions, 'active'); |
|
|
|
Html::addCssClass($headerOptions, 'active'); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
Html::addCssClass($linkOptions, 'dropdown-toggle'); |
|
|
|
Html::addCssClass($linkOptions, ['widget' => 'dropdown-toggle']); |
|
|
|
$linkOptions['data-toggle'] = 'dropdown'; |
|
|
|
$linkOptions['data-toggle'] = 'dropdown'; |
|
|
|
$header = Html::a($label, "#", $linkOptions) . "\n" |
|
|
|
$header = Html::a($label, "#", $linkOptions) . "\n" |
|
|
|
. Dropdown::widget(['items' => $item['items'], 'clientOptions' => false, 'view' => $this->getView()]); |
|
|
|
. Dropdown::widget(['items' => $item['items'], 'clientOptions' => false, 'view' => $this->getView()]); |
|
|
@ -176,7 +176,7 @@ class Tabs extends Widget |
|
|
|
$options = array_merge($this->itemOptions, ArrayHelper::getValue($item, 'options', [])); |
|
|
|
$options = array_merge($this->itemOptions, ArrayHelper::getValue($item, 'options', [])); |
|
|
|
$options['id'] = ArrayHelper::getValue($options, 'id', $this->options['id'] . '-tab' . $n); |
|
|
|
$options['id'] = ArrayHelper::getValue($options, 'id', $this->options['id'] . '-tab' . $n); |
|
|
|
|
|
|
|
|
|
|
|
Html::addCssClass($options, 'tab-pane'); |
|
|
|
Html::addCssClass($options, ['widget' => 'tab-pane']); |
|
|
|
if (ArrayHelper::remove($item, 'active')) { |
|
|
|
if (ArrayHelper::remove($item, 'active')) { |
|
|
|
Html::addCssClass($options, 'active'); |
|
|
|
Html::addCssClass($options, 'active'); |
|
|
|
Html::addCssClass($headerOptions, 'active'); |
|
|
|
Html::addCssClass($headerOptions, 'active'); |
|
|
@ -241,7 +241,7 @@ class Tabs extends Widget |
|
|
|
|
|
|
|
|
|
|
|
$content = ArrayHelper::remove($item, 'content'); |
|
|
|
$content = ArrayHelper::remove($item, 'content'); |
|
|
|
$options = ArrayHelper::remove($item, 'contentOptions', []); |
|
|
|
$options = ArrayHelper::remove($item, 'contentOptions', []); |
|
|
|
Html::addCssClass($options, 'tab-pane'); |
|
|
|
Html::addCssClass($options, ['widget' => 'tab-pane']); |
|
|
|
if (ArrayHelper::remove($item, 'active')) { |
|
|
|
if (ArrayHelper::remove($item, 'active')) { |
|
|
|
Html::addCssClass($options, 'active'); |
|
|
|
Html::addCssClass($options, 'active'); |
|
|
|
Html::addCssClass($item['options'], 'active'); |
|
|
|
Html::addCssClass($item['options'], 'active'); |
|
|
|