display feature settings prompt
This commit is contained in:
parent
44d516012d
commit
f1c37fa6de
@ -562,6 +562,7 @@ allFeaturesRemoveBtns.map((value, index) => {
|
||||
method: "POST",
|
||||
body: JSON.stringify(symbol),
|
||||
});
|
||||
displaySavePrompt2();
|
||||
}
|
||||
else if ((item.getAttribute("class") == "active") && (index == 1 )){
|
||||
let symbol = item.innerText;
|
||||
@ -572,11 +573,13 @@ allFeaturesRemoveBtns.map((value, index) => {
|
||||
method: "POST",
|
||||
body: JSON.stringify(symbol),
|
||||
});
|
||||
displaySavePrompt2();
|
||||
}
|
||||
else if (item.getAttribute("class") == "active") {
|
||||
item.remove();
|
||||
uploaded_images = [];
|
||||
uploaded_GIFs = [];
|
||||
displaySavePrompt2();
|
||||
}
|
||||
}
|
||||
});
|
||||
@ -595,6 +598,7 @@ allFeaturesIncreaseBtns.map((value, index) => {
|
||||
prevElement.innerText = currentText;
|
||||
prevElement.setAttribute("class", "active");
|
||||
item.setAttribute("class", "");
|
||||
displaySavePrompt2();
|
||||
}
|
||||
}
|
||||
});
|
||||
@ -614,6 +618,7 @@ allFeaturesDecreaseBtns.map((value, index) => {
|
||||
nextElement.innerText = currentText;
|
||||
nextElement.setAttribute("class", "active");
|
||||
item.setAttribute("class", "");
|
||||
displaySavePrompt2();
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -3186,7 +3191,6 @@ function displaySavePrompt() {
|
||||
},300); // 0.3 seconds
|
||||
}
|
||||
|
||||
|
||||
function closeSavePrompt() {
|
||||
document.getElementById('save-prompt-message').style.display = "none";
|
||||
}
|
||||
@ -3208,4 +3212,43 @@ function savePrompt() {
|
||||
}
|
||||
|
||||
|
||||
// SAVE FEATURE SETTINGS PROMPT FUNCTIONS
|
||||
var savePromptTimeout2;
|
||||
var isSavePromptRunning2 = false;
|
||||
function displaySavePrompt2() {
|
||||
// Check if the function is already running
|
||||
if (isSavePromptRunning2) {
|
||||
return;
|
||||
}
|
||||
isSavePromptRunning2 = true;
|
||||
document.getElementById('save-feature-prompt-message').style.display = "block";
|
||||
var savePrompt2 = document.getElementById('save-feature-prompt-p');
|
||||
// Store the original color
|
||||
var originalColor2 = savePrompt2.style.color;
|
||||
// Set the new color for the transition effect
|
||||
savePrompt2.style.color = "lightgreen";
|
||||
// Clear any existing timeout
|
||||
clearTimeout(savePromptTimeout2);
|
||||
// Add a delay before reverting back to the original color
|
||||
savePromptTimeout2 = setTimeout(function() {
|
||||
savePrompt2.style.color = originalColor2;
|
||||
isSavePromptRunning2 = false;
|
||||
},300); // 0.3 seconds
|
||||
}
|
||||
|
||||
function closeFeatureSavePrompt() {
|
||||
document.getElementById('save-feature-prompt-message').style.display = "none";
|
||||
}
|
||||
|
||||
function featureSavePrompt() {
|
||||
document.getElementById('save-feature-prompt-message').style.display = "none";
|
||||
setTimeout(
|
||||
function() {
|
||||
document.getElementById('saved-feature-msg-feedback').style.display = "block";
|
||||
}, 100);
|
||||
setTimeout(
|
||||
function() {
|
||||
document.getElementById('saved-feature-msg-feedback').style.display = "none";
|
||||
}, 3000);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user