From fce33a25ddfe47abb4224fe35c5cb8e723cd4b68 Mon Sep 17 00:00:00 2001 From: Antonio Ramirez Date: Wed, 29 May 2013 14:32:33 +0200 Subject: [PATCH] fixed indentation and button group label bug --- framework/yii/bootstrap/Button.php | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/framework/yii/bootstrap/Button.php b/framework/yii/bootstrap/Button.php index 94cdae8..b340a4c 100644 --- a/framework/yii/bootstrap/Button.php +++ b/framework/yii/bootstrap/Button.php @@ -22,18 +22,17 @@ use yii\helpers\Html; * 'label' => 'Action', * 'items' => Dropdown::widget(array( * 'clientOptions' => false, - * 'items' => array( - * array( - * 'label' => 'DropdownA', - * 'url' => '/', - * ), - * array( - * 'label' => 'DropdownB', - * 'url' => '#', - * ), - * ), + * 'items' => array( + * array( + * 'label' => 'DropdownA', + * 'url' => '/', + * ), + * array( + * 'label' => 'DropdownB', + * 'url' => '#', + * ), * ), - * ), + * )), * )); * * // split button group using `items` dropdown configuration @@ -134,10 +133,12 @@ class Button extends Widget $splitButton = Html::tag('button', '', $this->buttonOptions); } else { $tag = 'a'; + $label .= ' '; $options = $this->buttonOptions; if (!isset($options['href'])) { $options['href'] = '#'; } + $this->addCssClass($options, 'dropdown-toggle'); $options['data-toggle'] = 'dropdown'; } return Html::tag($tag, $label, $options) . "\n" . $splitButton;