|
|
@ -154,7 +154,7 @@ class Tabs extends Widget |
|
|
|
$label .= ' <b class="caret"></b>'; |
|
|
|
$label .= ' <b class="caret"></b>'; |
|
|
|
Html::addCssClass($headerOptions, 'dropdown'); |
|
|
|
Html::addCssClass($headerOptions, 'dropdown'); |
|
|
|
|
|
|
|
|
|
|
|
if ($this->renderDropdown($item['items'], $panes)) { |
|
|
|
if ($this->renderDropdown($n, $item['items'], $panes)) { |
|
|
|
Html::addCssClass($headerOptions, 'active'); |
|
|
|
Html::addCssClass($headerOptions, 'active'); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -202,12 +202,13 @@ class Tabs extends Widget |
|
|
|
/** |
|
|
|
/** |
|
|
|
* Normalizes dropdown item options by removing tab specific keys `content` and `contentOptions`, and also |
|
|
|
* Normalizes dropdown item options by removing tab specific keys `content` and `contentOptions`, and also |
|
|
|
* configure `panes` accordingly. |
|
|
|
* configure `panes` accordingly. |
|
|
|
|
|
|
|
* @param string $itemNumber number of the item |
|
|
|
* @param array $items the dropdown items configuration. |
|
|
|
* @param array $items the dropdown items configuration. |
|
|
|
* @param array $panes the panes reference array. |
|
|
|
* @param array $panes the panes reference array. |
|
|
|
* @return boolean whether any of the dropdown items is `active` or not. |
|
|
|
* @return boolean whether any of the dropdown items is `active` or not. |
|
|
|
* @throws InvalidConfigException |
|
|
|
* @throws InvalidConfigException |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
protected function renderDropdown(&$items, &$panes) |
|
|
|
protected function renderDropdown($itemNumber, &$items, &$panes) |
|
|
|
{ |
|
|
|
{ |
|
|
|
$itemActive = false; |
|
|
|
$itemActive = false; |
|
|
|
|
|
|
|
|
|
|
@ -228,7 +229,7 @@ class Tabs extends Widget |
|
|
|
$itemActive = true; |
|
|
|
$itemActive = true; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
$options['id'] = ArrayHelper::getValue($options, 'id', $this->options['id'] . '-dd-tab' . $n); |
|
|
|
$options['id'] = ArrayHelper::getValue($options, 'id', $this->options['id'] . '-dd' . $itemNumber . '-tab' . $n); |
|
|
|
$item['url'] = '#' . $options['id']; |
|
|
|
$item['url'] = '#' . $options['id']; |
|
|
|
$item['linkOptions']['data-toggle'] = 'tab'; |
|
|
|
$item['linkOptions']['data-toggle'] = 'tab'; |
|
|
|
|
|
|
|
|
|
|
|