Commit 63a3de8a by Crisu83

Fix some bugs in affix, alert and collapse widgets

parent 95aba6a2
...@@ -53,6 +53,7 @@ ...@@ -53,6 +53,7 @@
<?php $this->widget('bootstrap.widgets.TbNavbar',array( <?php $this->widget('bootstrap.widgets.TbNavbar',array(
'type'=>'inverse', 'type'=>'inverse',
'brand'=>CHtml::encode(Yii::app()->name), 'brand'=>CHtml::encode(Yii::app()->name),
'brandUrl'=>false,
'collapse'=>true, 'collapse'=>true,
'items'=>array( 'items'=>array(
array( array(
......
...@@ -36,7 +36,7 @@ class TbAffix extends CWidget ...@@ -36,7 +36,7 @@ class TbAffix extends CWidget
*/ */
public function init() public function init()
{ {
echo CHtml::tag($this->tagName, $this->htmlOptions); echo CHtml::openTag($this->tagName, $this->htmlOptions);
} }
/** /**
......
...@@ -115,8 +115,10 @@ class TbAlert extends CWidget ...@@ -115,8 +115,10 @@ class TbAlert extends CWidget
if ($this->closeText !== false && !isset($alert['closeText'])) if ($this->closeText !== false && !isset($alert['closeText']))
$alert['closeText'] = $this->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 '<a class="close" data-dismiss="alert">'.$alert['closeText'].'</a>';
echo Yii::app()->user->getFlash($type); echo Yii::app()->user->getFlash($type);
......
...@@ -57,7 +57,7 @@ class TbCollapse extends CWidget ...@@ -57,7 +57,7 @@ class TbCollapse extends CWidget
if (isset($this->toggle) && !isset($this->options['toggle'])) if (isset($this->toggle) && !isset($this->options['toggle']))
$this->options['toggle'] = $this->toggle; $this->options['toggle'] = $this->toggle;
echo CHtml::tag($this->tagName, $this->htmlOptions); echo CHtml::openTag($this->tagName, $this->htmlOptions);
} }
/** /**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment