Permalink
Browse files

Added support for initial html to render when using beginWidget/endWi…

…dget
  • Loading branch information...
jfragoulis committed Dec 19, 2012
1 parent ecd5ac4 commit a21c61d726242fb3ebe308840147386dbbaec898
Showing with 6 additions and 2 deletions.
  1. +6 −2 EMetabox.php
View
@@ -34,7 +34,7 @@ class EMetabox extends CWidget
/**
* @var string the initial contents of the div
*/
- public $initHtml = ' ';
+ public $initHtml;
/**
* @var type
@@ -67,15 +67,19 @@ public function init()
$this->options['url'] = $this->url;
$this->options['loadingText'] = $this->loadingIndicator;
$this->options['refreshOnInit'] = $this->refreshOnInit;
+
+ echo CHtml::openTag('div', $this->htmlOptions);
+ echo $this->initHtml;
}
/**
* Register extension assets
*/
public function run()
{
+ echo '</div>';
+
$id = $this->id;
- echo CHtml::tag('div', $this->htmlOptions, $this->initHtml);
/* @var $cs CClientScript */
$cs = Yii::app()->getClientScript();

0 comments on commit a21c61d

Please sign in to comment.