From a0abad558604dedebca901133d256e29103b30e8 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 16 Sep 2022 14:47:12 +0200 Subject: [PATCH] Fix mouse cursor --- htdocs/core/class/html.form.class.php | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 683289833c5..7fb707f3402 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -4919,7 +4919,7 @@ class Form * 'type' can be 'text', 'password', 'checkbox', 'radio', 'date', 'select', 'multiselect', 'morecss', * 'other', 'onecolumn' or 'hidden'... * @param int|string $selectedchoice '' or 'no', or 'yes' or '1', 1, '0' or 0 - * @param int|string $useajax 0=No, 1=Yes, 2=Yes but submit page with &confirm=no if choice is No, 'xxx'=Yes and preoutput confirm box with div id=dialog-confirm-xxx + * @param int|string $useajax 0=No, 1=Yes use Ajax to show the popup, 2=Yes and also submit page with &confirm=no if choice is No, 'xxx'=Yes and preoutput confirm box with div id=dialog-confirm-xxx * @param int|string $height Force height of box (0 = auto) * @param int $width Force width of box ('999' or '90%'). Ignored and forced to 90% on smartphones. * @param int $disableformtag 1=Disable form tag. Can be used if we are already inside a
section. @@ -5151,10 +5151,8 @@ class Form } $jsforcursor = ''; - if (empty($useajax)) { $jsforcursor = '// The call to urljump can be slow, so we set the wait cursor'."\n"; $jsforcursor .= 'jQuery("html,body,#id-container").addClass("cursorwait");'."\n"; - } $formconfirm .= ' resizable: false, @@ -5190,9 +5188,10 @@ class Form var post = $.post( pageyes, options, - (data) => {$("body").html(data)} + function(data) { $("body").html(data); jQuery("html,body,#id-container").removeClass("cursorwait"); } ); - console.log("after post"); + + console.log("after post ok"); } $(this).dialog("close"); }, @@ -5216,9 +5215,9 @@ class Form var post = $.post( pageno, options, - (data) => {$("body").html(data)} + function(data) { $("body").html(data); jQuery("html,body,#id-container").removeClass("cursorwait"); } ); - console.log("after location.href"); + console.log("after post ko"); } $(this).dialog("close"); }