EDialog usage

Hi
I want to use the EDialog extension available with jui.
I want to use the EDialog as a popup, allowing user to enter some specific data for the form. I want popup to come on the screen only when some click some specific button/link.

// and now we create the EDialog widget with option:"autoOpen" set to false
// and a effect which is triggered when the dialog shows up...
$this->beginWidget('application.extensions.jui.EDialog',
array(
'name' => 'myDialog',
'theme'=>'base',
'compression'=>'packed',
'htmlOptions'=>array('title'=>'Hello dialog'),
'options'=>array(
'autoOpen'=>false,
'show'=>'scale' /* see: http://ui.jquery.com...fects_showhide/ */
)
)
);
// the content of the dialog
echo CHtml::encode("hello world...!");
// and we end the widget...
$this->endWidget('application.extensions.jui.EDialog');
?>

Can you please help to tell how to give the overlay option in EDialog to give opacity and color.

Thanks

Shaan

Good Morning Shaan,
of course I can help you. First off all you need to download and install the most current version of the jui-package.
When you´re finished installing it, take care that you delete the assets-subfolder which got created by the old jui-package.

You should have a look at the most current version of the jui package and the updated documentation...

Quote

.......

Otherwise

'overlay'=>array('opacity'=>'0.5', 'background'=>'black'),

isn't possible.

You should also send a link to your last post to MetaYii via PM, so that he wont miss it.

Funny, but very usefull adddition:
the jQuery UI Development Team has released a "jQuery UI ThemeRoller Developer Tool" for Firefox,
which allows to have the themeroller avaible on any website with a single click.
(for example: your current Yii project...)

When you´re done, download and unpack your own theme to the "jui\jquery\themes" directory...

Open EJqueryUiWidget.php, go to line 400 and add your theme name to the $validThemes array,

from then on you should be able to run the dialog with your own theme.

Thanks for the explanation, ironic. I must add that the addition to the themes array and placing the theme in the themes directory is no longer needed. You can use the use [tt]$useBundledStyleSheet[/tt] set to false and register your own CSS (from jquery ui theme roller, for instance) in the view

I notice that upon registering the extension, it copies all the themes over to assets. That is quite a lot to copy over, is there a way you predefined already to copy over the only specific theme that is needed?

Dialogs are essentially asynchronous so the confirm function is returning before the user clicks either button.You need to put the logic for what to do inside the button functions.

Scott González (He is the jQuery UI accessibility team lead and contributed large parts to the dialog plugin.)

Quote

As Scott mentioned this is not a limitation on how jQuery UI dialog works, but a limitation of javascript itself. If the javascript were to wait and return a value, the browser would lock, allowing no interaction. The built-in browser confirm dialog is unique in this respect. The only way to do this with javascript is with a callback function.