Fix modify cursor on submit after a confirmation.
This commit is contained in:
parent
2ac4103af8
commit
e0f76fd8f9
@ -5152,7 +5152,8 @@ class Form
|
|||||||
var options = "&token='.urlencode(newToken()).'";
|
var options = "&token='.urlencode(newToken()).'";
|
||||||
var inputok = '.json_encode($inputok).'; /* List of fields into form */
|
var inputok = '.json_encode($inputok).'; /* List of fields into form */
|
||||||
var pageyes = "'.dol_escape_js(!empty($pageyes) ? $pageyes : '').'";
|
var pageyes = "'.dol_escape_js(!empty($pageyes) ? $pageyes : '').'";
|
||||||
if (inputok.length>0) {
|
|
||||||
|
if (inputok.length > 0) {
|
||||||
$.each(inputok, function(i, inputname) {
|
$.each(inputok, function(i, inputname) {
|
||||||
var more = "";
|
var more = "";
|
||||||
var inputvalue;
|
var inputvalue;
|
||||||
@ -5168,14 +5169,19 @@ class Form
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
var urljump = pageyes + (pageyes.indexOf("?") < 0 ? "?" : "") + options;
|
var urljump = pageyes + (pageyes.indexOf("?") < 0 ? "?" : "") + options;
|
||||||
if (pageyes.length > 0) { location.href = urljump; }
|
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");
|
$(this).dialog("close");
|
||||||
},
|
},
|
||||||
"'.dol_escape_js($langs->transnoentities($labelbuttonno)).'": function() {
|
"'.dol_escape_js($langs->transnoentities($labelbuttonno)).'": function() {
|
||||||
var options = "&token='.urlencode(newToken()).'";
|
var options = "&token='.urlencode(newToken()).'";
|
||||||
var inputko = '.json_encode($inputko).'; /* List of fields into form */
|
var inputko = '.json_encode($inputko).'; /* List of fields into form */
|
||||||
var pageno="'.dol_escape_js(!empty($pageno) ? $pageno : '').'";
|
var pageno="'.dol_escape_js(!empty($pageno) ? $pageno : '').'";
|
||||||
if (inputko.length>0) {
|
if (inputko.length > 0) {
|
||||||
$.each(inputko, function(i, inputname) {
|
$.each(inputko, function(i, inputname) {
|
||||||
var more = "";
|
var more = "";
|
||||||
if ($("#" + inputname).attr("type") == "checkbox") { more = ":checked"; }
|
if ($("#" + inputname).attr("type") == "checkbox") { more = ":checked"; }
|
||||||
@ -5186,7 +5192,10 @@ class Form
|
|||||||
}
|
}
|
||||||
var urljump=pageno + (pageno.indexOf("?") < 0 ? "?" : "") + options;
|
var urljump=pageno + (pageno.indexOf("?") < 0 ? "?" : "") + options;
|
||||||
//alert(urljump);
|
//alert(urljump);
|
||||||
if (pageno.length > 0) { location.href = urljump; }
|
if (pageno.length > 0) {
|
||||||
|
location.href = urljump;
|
||||||
|
console.log("after location.href");
|
||||||
|
}
|
||||||
$(this).dialog("close");
|
$(this).dialog("close");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -887,6 +887,9 @@ textarea.centpercent {
|
|||||||
.cursornotallowed {
|
.cursornotallowed {
|
||||||
cursor: not-allowed;
|
cursor: not-allowed;
|
||||||
}
|
}
|
||||||
|
.cursorwait {
|
||||||
|
cursor: wait;
|
||||||
|
}
|
||||||
.backgroundblank {
|
.backgroundblank {
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1032,6 +1032,9 @@ textarea.centpercent {
|
|||||||
.cursormove {
|
.cursormove {
|
||||||
cursor: move;
|
cursor: move;
|
||||||
}
|
}
|
||||||
|
.cursorwait {
|
||||||
|
cursor: wait;
|
||||||
|
}
|
||||||
.cursornotallowed {
|
.cursornotallowed {
|
||||||
cursor: not-allowed;
|
cursor: not-allowed;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user