Hi,
I want to set CJuiDialog option ‘buttons’ to display a close and a OK button.
But how do I set this?
As stated here: http://jqueryui.com/demos/dialog/#option-buttons
It should be an object, but the best result I get - displaying a button, but without fuctionality - is this by using an array:
<?php
$this->beginWidget('system.zii.widgets.jui.CJuiDialog',
array(
'id'=>'dialog'.$this->id,
// additional javascript options for the dialog plugin
'options'=>array(
'title'=>$this->id.' Dialog box 1',
'width'=> '800px',
'height' => '600',
#'position' => 'top',
'top' => '50px',
'modal' => true,
'buttons' => array("Ok"=>'function(){alert("xxx")}'),
'autoOpen'=>false,
)));
?>
Which generates:
jQuery('#dialogmain').dialog({'title':'main Dialog box 1','width':'800px','height':'600','top':'50px','modal':true,'buttons':{'Ok':'function(){alert(\"xxx\")}'},'autoOpen':false});
Operating system
OS X
Web server
Apache
Browser type
Firefox 3.5, Safari 4
Yii version or SVN revision
1.1-beta
Best regards,
schmunk