Fix: Confirm box not opened

This commit is contained in:
Laurent Destailleur 2012-06-06 23:12:33 +02:00
parent f575dd4ae5
commit b120eb9a15

View File

@ -2223,6 +2223,7 @@ class Form
{ {
$autoOpen=true; $autoOpen=true;
$dialogconfirm='dialog-confirm'; $dialogconfirm='dialog-confirm';
$button='';
if (! is_int($useajax)) if (! is_int($useajax))
{ {
$button=$useajax; $button=$useajax;
@ -2256,7 +2257,7 @@ class Form
/* Warning: This function is loaded once and not overwritten if loaded by another ajax page */ /* Warning: This function is loaded once and not overwritten if loaded by another ajax page */
$(function() { $(function() {
$( "#'.$dialogconfirm.'" ).dialog({ $( "#'.$dialogconfirm.'" ).dialog({
autoOpen: '.($autoOpen?'true':'false').', autoOpen: '.($autoOpen?'true':'false').',
resizable: false, resizable: false,
height:'.$height.', height:'.$height.',
@ -2306,6 +2307,13 @@ class Form
} }
} }
}); });
var button=\''.$button.'\';
if (button.length > 0) {
$( "#" + button ).click(function() {
$("#'.$dialogconfirm.'").dialog(\'open\');
});
}
}); });
</script>'; </script>';