public function renderSwf()
{
if (self::$swfJs === false) {
Yii::app()->clientScript->registerScriptFile(Yii::app()->theme->baseUrl . '/js/jquery.swfobject.1-1-1.min.js', CClientScript::POS_END);
self::$swfJs = true;
}
echo '
<div class="panorama-swf">
<div id="swf-panorama-' . $this->id . '">
This content requires the Flash Player. <a href="http://www.adobe.com/go/getflashplayer" target="_blank">Download Flash Player</a>.
</div>
</div>';
$url = Yii::app()->baseUrl . '/' . $this->url . '/' . $this->apartment_id . '/' . $this->name;
Yii::app()->clientScript->registerScript('swf-panorama-' . $this->id, '
$("#swf-panorama-' . $this->id . '").flash({
swf: "' . $url . '",
width: 890,
height: 500
});
', CClientScript::POS_READY);
}
public function renderImage()
{
if (self::$imageJs === false) {
Yii::app()->clientScript->registerScriptFile(Yii::app()->theme->baseUrl . '/js/jquery.panorama360.js', CClientScript::POS_END);
self::$imageJs = true;
}
echo '
<div class="panorama">
<div class="panorama-view" id="panorama-' . $this->id . '">
<div class="panorama-container">
<img src="' . Yii::app()->baseUrl . '/' . $this->url . '/' . $this->apartment_id . '/' . $this->name . '" alt="" data-width="' . $this->width . '" data-height="' . $this->height . '"/>
</div>
</div>
</div>
';
Yii::app()->clientScript->registerScript('panorama-' . $this->id, '
$("#panorama-' . $this->id . '").panorama360();
', CClientScript::POS_READY);
}
Сейчас этот форум просматривают: нет зарегистрированных пользователей и гости: 41