Fix mouse cursor

This commit is contained in:
Laurent Destailleur 2022-09-16 14:47:12 +02:00
parent 18ce5e62e8
commit a0abad5586

View File

@ -4919,7 +4919,7 @@ class Form
* 'type' can be 'text', 'password', 'checkbox', 'radio', 'date', 'select', 'multiselect', 'morecss', * 'type' can be 'text', 'password', 'checkbox', 'radio', 'date', 'select', 'multiselect', 'morecss',
* 'other', 'onecolumn' or 'hidden'... * 'other', 'onecolumn' or 'hidden'...
* @param int|string $selectedchoice '' or 'no', or 'yes' or '1', 1, '0' or 0 * @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|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 $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 <form> section. * @param int $disableformtag 1=Disable form tag. Can be used if we are already inside a <form> section.
@ -5151,10 +5151,8 @@ class Form
} }
$jsforcursor = ''; $jsforcursor = '';
if (empty($useajax)) {
$jsforcursor = '// The call to urljump can be slow, so we set the wait cursor'."\n"; $jsforcursor = '// The call to urljump can be slow, so we set the wait cursor'."\n";
$jsforcursor .= 'jQuery("html,body,#id-container").addClass("cursorwait");'."\n"; $jsforcursor .= 'jQuery("html,body,#id-container").addClass("cursorwait");'."\n";
}
$formconfirm .= ' $formconfirm .= '
resizable: false, resizable: false,
@ -5190,9 +5188,10 @@ class Form
var post = $.post( var post = $.post(
pageyes, pageyes,
options, 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"); $(this).dialog("close");
}, },
@ -5216,9 +5215,9 @@ class Form
var post = $.post( var post = $.post(
pageno, pageno,
options, 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"); $(this).dialog("close");
} }