I am trying to open a CJuiDialog from the yii Galleria extension using ajaxLink. When I go to the page, the normal view is not rendered in stead the renderPartial from the CjuiDialog is triggered as the view. Everything works as expected from the page outside of the extension.
What is rendered
What should be rendered on initial load
Working on another page
CJuiDialog code snippet
//Comments
$bookID = Yii::app()->request->getParam('bookID', 0); //set default value
$this->beginWidget('zii.widgets.jui.CJuiDialog', array(
'id'=>'comments',
'cssFile'=>false,
'options'=>array(
//'title'=>'Dialog',
'autoOpen'=>false,
'modal'=>true,
//http://api.jqueryui.com/position/
//http://www.yiiframework.com/forum/index.php/topic/35188-yii-syntax-to-customize-position-of-cjuidialog-on-screen/
'width'=>'900',
'position'=>array('my'=>'left','at'=>'left+350px','of'=>'#yw0',
'my'=>'top','at'=>'top'),
'resizable'=>false,
'closeText'=>'[ close x ]',
'dialogClass'=>'preview',
),
));
$this->renderPartial('//books/_comments',array('bookID'=>$bookID)); //
$this->endWidget('zii.widgets.jui.CJuiDialog');
ajazLink view code
CHtml::ajaxLink('Comments',Yii::app()->createUrl('books/comments/bookID/'.urlencode($image->$bind["bookID"]).'/title/'.urlencode($image->$bind["title"])),array('success'=>'function(r){$("#comments").html(r).dialog("open"); return false;}'),array('id'=>'showComments'.urlencode($image->$bind["bookID"])
Any ideas why the CJuiDialog is not working as expected?