Fix: Confirm boxes with jmobile

This commit is contained in:
Laurent Destailleur
2013-08-01 04:20:08 +02:00
parent a334b96469
commit 53672dff75
2 changed files with 6 additions and 5 deletions

View File

@@ -2475,7 +2475,7 @@ class Form
* @param string $action Action
* @param array $formquestion An array with complementary inputs to add into forms: array(array('label'=> ,'type'=> , ))
* @param string $selectedchoice "" or "no" or "yes"
* @param int $useajax 0=No, 1=Yes, 2=Yes but submit page with &confirm=no if choice is No, 'xxx'=preoutput confirm box with div id=dialog-confirm-xxx
* @param int $useajax 0=No, 1 or 'xxx'=Yes, 2=Yes but submit page with &confirm=no if choice is No, 'xxx'=preoutput confirm box with div id=dialog-confirm-xxx
* @param int $height Force height of box
* @param int $width Force width of bow
* @return string HTML ajax code if a confirm ajax popup is required, Pure HTML code if it's an html form
@@ -2563,6 +2563,8 @@ class Form
$more.='</table>'."\n";
}
if (! empty($conf->dol_use_jmobile)) $useajax=0; // JQUI method dialog is broken with jmobile, we use standard HTML. We also change code for button to have get on url with action=xxx and output confirm only when action=xxx
if ($useajax && $conf->use_javascript_ajax)
{
$autoOpen=true;
@@ -2654,9 +2656,8 @@ class Form
}
});
var button = "'.$button.'";
if (button.length > 0) {
if (button.length > 0) {
$( "#" + button ).click(function() {
$("#'.$dialogconfirm.'").dialog("open");
});