Hello, my trouble is while i try to load CTabView (or CJuiTabs) content into CJuiDialog using ajax, it doesn’t work correct, all HTML tags are ok, but no correct styles and js.
I have code like this for the VIEW:
$this->beginWidget('zii.widgets.jui.CJuiDialog', array(
'id'=>'mydialog',
'options'=>array(
'width'=>500,
'height'=>500,
'title'=>'View order',
'autoOpen'=>false,
),
));
echo 'dialog content here';
$this->endWidget('zii.widgets.jui.CJuiDialog');
echo CHtml::link('open dialog', '#', array(
'onclick'=>'$("#mydialog").load("/admin/orders/getorder/id/1").dialog("open"); return false;',
));
And this is for controller:
public function actionGetOrder()
{
$orderId = $_GET['id'];
$order = Order::model()->with('goods')->findByPk($orderId);
if ($order!==null) $this->renderPartial('_orderForm',array('order'=>$order));
else echo 'Wrong order ID';
}
_orderForm is a following view:
<?php $this->widget('CTabView', array(
'viewData'=>array('order'=>$order),
'tabs'=>array(
'tab1'=>array(
'title'=>'Order',
'view'=>'_orderDetails'
),
'tab2' => array(
'title'=>'Cart',
'content'=>'Content',
),
),
));
I think the issue is because of i call renderPartial, which do not insert CSS and JS files which belongs to CTabView, or CJuiTabs into my layout. Am i right? So how to deal with this?
Register them manually before rendering the main view ?