|
|
|
@ -122,7 +122,7 @@ class Tabs extends Widget
|
|
|
|
|
public function 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'])) { |
|
|
|
|
$label .= ' <b class="caret"></b>'; |
|
|
|
|
Html::addCssClass($headerOptions, 'dropdown'); |
|
|
|
|
Html::addCssClass($headerOptions, ['widget' => 'dropdown']); |
|
|
|
|
|
|
|
|
|
if ($this->renderDropdown($n, $item['items'], $panes)) { |
|
|
|
|
Html::addCssClass($headerOptions, 'active'); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
Html::addCssClass($linkOptions, 'dropdown-toggle'); |
|
|
|
|
Html::addCssClass($linkOptions, ['widget' => 'dropdown-toggle']); |
|
|
|
|
$linkOptions['data-toggle'] = 'dropdown'; |
|
|
|
|
$header = Html::a($label, "#", $linkOptions) . "\n" |
|
|
|
|
. 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['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')) { |
|
|
|
|
Html::addCssClass($options, 'active'); |
|
|
|
|
Html::addCssClass($headerOptions, 'active'); |
|
|
|
@ -241,7 +241,7 @@ class Tabs extends Widget
|
|
|
|
|
|
|
|
|
|
$content = ArrayHelper::remove($item, 'content'); |
|
|
|
|
$options = ArrayHelper::remove($item, 'contentOptions', []); |
|
|
|
|
Html::addCssClass($options, 'tab-pane'); |
|
|
|
|
Html::addCssClass($options, ['widget' => 'tab-pane']); |
|
|
|
|
if (ArrayHelper::remove($item, 'active')) { |
|
|
|
|
Html::addCssClass($options, 'active'); |
|
|
|
|
Html::addCssClass($item['options'], 'active'); |
|
|
|
|