From 1b963420633a7ca3dfb8ad5124d0ffda9cb48d45 Mon Sep 17 00:00:00 2001 From: Carsten Brandt Date: Thu, 23 Jan 2014 13:06:18 +0100 Subject: [PATCH] subwidgets should be rendered in the same view --- ButtonDropdown.php | 3 +++ ButtonGroup.php | 3 ++- Nav.php | 1 + Tabs.php | 2 +- 4 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ButtonDropdown.php b/ButtonDropdown.php index 34d3ae2..51b2ddd 100644 --- a/ButtonDropdown.php +++ b/ButtonDropdown.php @@ -87,6 +87,7 @@ class ButtonDropdown extends Widget 'label' => '', 'encodeLabel' => false, 'options' => $this->options, + 'view' => $this->getView(), ]); } else { $label .= ' '; @@ -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); } } diff --git a/ButtonGroup.php b/ButtonGroup.php index 4fc2eb3..e305f8b 100644 --- a/ButtonGroup.php +++ b/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; diff --git a/Nav.php b/Nav.php index ef1dbb5..6c1a176 100644 --- a/Nav.php +++ b/Nav.php @@ -171,6 +171,7 @@ class Nav extends Widget 'items' => $items, 'encodeLabels' => $this->encodeLabels, 'clientOptions' => false, + 'view' => $this->getView(), ]); } } diff --git a/Tabs.php b/Tabs.php index 2e76398..2623a4c 100644 --- a/Tabs.php +++ b/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);