forked from Wavyzz/dolibarr
Fix modify cursor on submit after a confirmation.
This commit is contained in:
@@ -5152,7 +5152,8 @@ class Form
|
||||
var options = "&token='.urlencode(newToken()).'";
|
||||
var inputok = '.json_encode($inputok).'; /* List of fields into form */
|
||||
var pageyes = "'.dol_escape_js(!empty($pageyes) ? $pageyes : '').'";
|
||||
if (inputok.length>0) {
|
||||
|
||||
if (inputok.length > 0) {
|
||||
$.each(inputok, function(i, inputname) {
|
||||
var more = "";
|
||||
var inputvalue;
|
||||
@@ -5168,14 +5169,19 @@ class Form
|
||||
});
|
||||
}
|
||||
var urljump = pageyes + (pageyes.indexOf("?") < 0 ? "?" : "") + options;
|
||||
if (pageyes.length > 0) { location.href = urljump; }
|
||||
$(this).dialog("close");
|
||||
if (pageyes.length > 0) {
|
||||
// The call to urljump can be slow, so we set the wait cursor
|
||||
jQuery("html,body,#id-container").addClass("cursorwait");
|
||||
location.href = urljump;
|
||||
console.log("after location.href");
|
||||
}
|
||||
$(this).dialog("close");
|
||||
},
|
||||
"'.dol_escape_js($langs->transnoentities($labelbuttonno)).'": function() {
|
||||
var options = "&token='.urlencode(newToken()).'";
|
||||
var inputko = '.json_encode($inputko).'; /* List of fields into form */
|
||||
var pageno="'.dol_escape_js(!empty($pageno) ? $pageno : '').'";
|
||||
if (inputko.length>0) {
|
||||
if (inputko.length > 0) {
|
||||
$.each(inputko, function(i, inputname) {
|
||||
var more = "";
|
||||
if ($("#" + inputname).attr("type") == "checkbox") { more = ":checked"; }
|
||||
@@ -5186,7 +5192,10 @@ class Form
|
||||
}
|
||||
var urljump=pageno + (pageno.indexOf("?") < 0 ? "?" : "") + options;
|
||||
//alert(urljump);
|
||||
if (pageno.length > 0) { location.href = urljump; }
|
||||
if (pageno.length > 0) {
|
||||
location.href = urljump;
|
||||
console.log("after location.href");
|
||||
}
|
||||
$(this).dialog("close");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user