From 73900b4bd10d8343e87a79ebbe83af6cca6e9764 Mon Sep 17 00:00:00 2001 From: Alexander Kochetov Date: Sun, 26 May 2013 22:03:51 +0400 Subject: [PATCH] jQuery UI tabs rework --- framework/yii/jui/Tabs.php | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/framework/yii/jui/Tabs.php b/framework/yii/jui/Tabs.php index 7b9d4d8..c4ef3c5 100644 --- a/framework/yii/jui/Tabs.php +++ b/framework/yii/jui/Tabs.php @@ -20,19 +20,27 @@ use yii\helpers\Html; * echo Tabs::widget(array( * 'items' => array( * array( - * 'header' => 'Tab one', + * 'label' => 'Tab one', * 'content' => 'Mauris mauris ante, blandit et, ultrices a, suscipit eget...', * ), * array( - * 'header' => 'Tab two', - * 'headerOptions' => array( - * 'tag' => 'li', - * ), + * 'label' => 'Tab two', * 'content' => 'Sed non urna. Phasellus eu ligula. Vestibulum sit amet purus...', * 'options' => array( * 'tag' => 'div', * ), * ), + * array( + * 'label' => 'Tab three', + * 'content' => 'Specific content...', + * 'options' => array( + * 'id' => 'my-tab', + * ), + * ), + * array( + * 'label' => 'Ajax tab', + * 'url' => 'http://www.yiiframework.com', + * ), * ), * 'options' => array( * 'tag' => 'div', @@ -40,9 +48,6 @@ use yii\helpers\Html; * 'itemOptions' => array( * 'tag' => 'div', * ), - * 'headerOptions' => array( - * 'tag' => 'li', - * ), * 'clientOptions' => array( * 'collapsible' => false, * ), @@ -58,7 +63,7 @@ class Tabs extends Widget public $options = array(); public $items = array(); public $itemOptions = array(); - public $headerOptions = array(); + public $headerTemplate = '
  • {label}
  • '; /** @@ -76,6 +81,7 @@ class Tabs extends Widget * Renders tab items as specified on [[items]]. * @return string the rendering result. * @throws InvalidConfigException. + * @todo rework */ protected function renderItems() {