stock dash

This commit is contained in:
Thanakorn S
2026-04-09 09:48:47 +07:00
parent a4f474b5df
commit 3b8f94f011
10 changed files with 612 additions and 105 deletions
+5 -2
View File
@@ -286,14 +286,16 @@ let isAjaxProcessing = false;
function ajax_request(options) {
if (isAjaxProcessing) {
if (isAjaxProcessing && options.queueLock !== false) {
// Instead of rejecting, we just return a "never-ending" promise
// or a resolved promise that does nothing.
console.warn("Request is busy... ignoring click.");
return new Promise(() => { }); // This stays pending and won't trigger .then or .catch
}
isAjaxProcessing = true;
if (options.queueLock !== false) {
isAjaxProcessing = true;
}
// Auto prepare form data
if (options.autoPrepare === true) {
@@ -339,6 +341,7 @@ function ajax_request(options) {
let isSendingFiles = (options.data instanceof FormData);
if (options.debugMode) {
isAjaxProcessing = false;
console.log("REQUEST DATA:", options.data);
}