Browse Source

subwidgets should be rendered in the same view

tags/2.0.0-beta
Carsten Brandt 11 years ago
parent
commit
1b96342063
  1. 3
      ButtonDropdown.php
  2. 3
      ButtonGroup.php
  3. 1
      Nav.php
  4. 2
      Tabs.php

3
ButtonDropdown.php

@ -87,6 +87,7 @@ class ButtonDropdown extends Widget
'label' => '<span class="caret"></span>',
'encodeLabel' => false,
'options' => $this->options,
'view' => $this->getView(),
]);
} else {
$label .= ' <span class="caret"></span>';
@ -103,6 +104,7 @@ class ButtonDropdown extends Widget
'label' => $label,
'options' => $options,
'encodeLabel' => false,
'view' => $this->getView(),
]) . "\n" . $splitButton;
}
@ -114,6 +116,7 @@ class ButtonDropdown extends Widget
{
$config = $this->dropdown;
$config['clientOptions'] = false;
$config['view'] = $this->getView();
return Dropdown::widget($config);
}
}

3
ButtonGroup.php

@ -86,7 +86,8 @@ class ButtonGroup extends Widget
$buttons[] = Button::widget([
'label' => $label,
'options' => $options,
'encodeLabel' => $this->encodeLabels
'encodeLabel' => $this->encodeLabels,
'view' => $this->getView()
]);
} else {
$buttons[] = $button;

1
Nav.php

@ -171,6 +171,7 @@ class Nav extends Widget
'items' => $items,
'encodeLabels' => $this->encodeLabels,
'clientOptions' => false,
'view' => $this->getView(),
]);
}
}

2
Tabs.php

@ -134,7 +134,7 @@ class Tabs extends Widget
}
$header = Html::a($label, "#", ['class' => 'dropdown-toggle', 'data-toggle' => 'dropdown']) . "\n"
. Dropdown::widget(['items' => $item['items'], 'clientOptions' => false]);
. Dropdown::widget(['items' => $item['items'], 'clientOptions' => false, 'view' => $this->getView()]);
} elseif (isset($item['content'])) {
$options = array_merge($this->itemOptions, ArrayHelper::getValue($item, 'options', []));
$options['id'] = ArrayHelper::getValue($options, 'id', $this->options['id'] . '-tab' . $n);

Loading…
Cancel
Save