Commits

Christoffer Niska committed 5d9c03a

Fix some bugs in affix, alert and collapse widgets

Comments (0)

Files changed (4)

demo/protected/views/layouts/main.php

 <?php $this->widget('bootstrap.widgets.TbNavbar',array(
 	'type'=>'inverse',
 	'brand'=>CHtml::encode(Yii::app()->name),
+	'brandUrl'=>false,
 	'collapse'=>true,
 	'items'=>array(
 		array(

widgets/TbAffix.php

 	 */
 	public function init()
 	{
-		echo CHtml::tag($this->tagName, $this->htmlOptions);
+		echo CHtml::openTag($this->tagName, $this->htmlOptions);
 	}
 
 	/**

widgets/TbAlert.php

 
 				if ($this->closeText !== false && !isset($alert['closeText']))
 					$alert['closeText'] = $this->closeText;
+				else
+					$alert['closeText'] = false;
 
-				if (isset($alert['closeText']) && $alert['closeText'] !== false)
+				if ($alert['closeText'] !== false)
 					echo '<a class="close" data-dismiss="alert">'.$alert['closeText'].'</a>';
 
 				echo Yii::app()->user->getFlash($type);

widgets/TbCollapse.php

 		if (isset($this->toggle) && !isset($this->options['toggle']))
 			$this->options['toggle'] = $this->toggle;
 
-		echo CHtml::tag($this->tagName, $this->htmlOptions);
+		echo CHtml::openTag($this->tagName, $this->htmlOptions);
 	}
 
 	/**