Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

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

…dget
  • Loading branch information...
commit a21c61d726242fb3ebe308840147386dbbaec898 1 parent ecd5ac4
@jfragoulis authored
Showing with 6 additions and 2 deletions.
  1. +6 −2 EMetabox.php
View
8 EMetabox.php
@@ -34,7 +34,7 @@ class EMetabox extends CWidget
/**
* @var string the initial contents of the div
*/
- public $initHtml = ' ';
+ public $initHtml;
/**
* @var type
@@ -67,6 +67,9 @@ 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;
}
/**
@@ -74,8 +77,9 @@ public function init()
*/
public function run()
{
+ echo '</div>';
+
$id = $this->id;
- echo CHtml::tag('div', $this->htmlOptions, $this->initHtml);
/* @var $cs CClientScript */
$cs = Yii::app()->getClientScript();
Please sign in to comment.
Something went wrong with that request. Please try again.