Quote
@ironic can you also post some example with buttons added to the dialog and a function to those buttons?
I also had some troubles, with adding buttons to the current version of EDialog.
First of all open EDialog.php, go to line 99 and change
'buttons'=>array('type'=>'string'),
to
'buttons'=>array('type'=>'array'),
else there wont be a way to add more than one button.
and use the widget like:
<?php
$this->beginWidget('application.extensions.jui.EDialog',
array(
'name' => 'myDialog',
'theme'=>'base',
'compression'=>'packed',
'htmlOptions'=>array('title'=>'Hello dialog'),
'options'=>array(
'autoOpen'=>false,
'show'=>'scale',
'buttons'=>array(
"Ok"=>'function(){$(this).dialog("close");}',
"Cancel"=>'function(){alert("cancel");}'
)
)
)
);
?>
results in:
$('#myDialog').dialog({'autoOpen':false, 'show':'scale',
'buttons': {
'Ok': 'function(){$(this).dialog("close");}',
'Cancel': 'function(){alert("cancel");}'
}
});
This would work… if no slashes would get added to the functions… no idea, which functions adds them and no idea how to avoid it…
greets from freiburg (ger)
ironic
//edit:
funny, since those modifications the dialog is now resize+dragable and it can now be closed via X (cross or whatever)…