Is it possible to delete the ‘x’ in the upper right corner to close the dialog. Or is it possible for me to redirect to previous page when the ‘x’ is click?
Is it possible to delete the ‘x’ in the upper right corner to close the dialog. Or is it possible for me to redirect to previous page when the ‘x’ is click?
Yes, it is.
Look here: http://jqueryui.com/demos/dialog/ … set the options like this:
$this->beginWidget('zii.widgets.jui.CJuiDialog', array(
'id' => 'myDialog',
// additional javascript options for the dialog plugin
'options' => array(
'autoOpen' => true,
'modal' => true,
'width' => '350px',
'resizable' => false,
'closeOnEscape' => true,
...
),
));
Also see here: http://stackoverflow.com/questions/896777/remove-close-button-on-jqueryui-dialog
thanks mayjestic~but i wonder why it is still not working with me…
here is my code
$this->beginWidget('zii.widgets.jui.CJuiDialog', array(
'id'=>'mydialog',
// additional javascript options for the dialog plugin
'options'=>array(
'title'=>'Booking Info',
'autoOpen'=>true,
'modal'=>true,
'width' => 1300,
'closeOnEscape: false',
'open: function(event, ui) { $(".ui-dialog-titlebar-close").hide(); }',
),
));
I don’t know if thats the problem, but try to change this to:
'width' => '1300px',
'closeOnEscape' => false,
'width' => '1300px',
'closeOnEscape'=> false,
'open'=> 'function(event, ui) { $(".ui-dialog-titlebar-close").hide(); }',
it is not working either~(>.<)
This should work
'open'=> 'js:function(event, ui) { $(".ui-dialog-titlebar-close").hide(); }',
/Tommy
Thanks Mayjestic and Tommy.
I had follow the exact way you guys mention. It still not working.
<?php
$this->beginWidget('zii.widgets.jui.CJuiDialog', array(
'id'=>'mydialog',
// additional javascript options for the dialog plugin
'options'=>array(
'title'=>'Booking Info',
'autoOpen'=>true,
'modal'=>true,
'width' => '1300px',
'closeOnEscape'=> false,
'dialogclose'=>'js:function(event, ui) { $(".ui-dialog-titlebar-close").hide(); }',
),
));
?>
<?php
Do I still missing anything?
check again the answer from @tri
he set that function on the "open" event and you set that same function on the "dialogclose" event…
basically what your code does is that it hides the x button when the dialog is closing
thanks mdomba and tri. my fault that not realise the single word mistake. problem solved!!