backend stuff for features to display save prompt
This commit is contained in:
parent
3396f5a7bd
commit
3580432cd2
@ -339,6 +339,7 @@ const addEventonBtns = () => {
|
|||||||
availableFeatures = document.querySelectorAll("#available-features li");
|
availableFeatures = document.querySelectorAll("#available-features li");
|
||||||
displayToFormat = document.querySelectorAll("#display-format li");
|
displayToFormat = document.querySelectorAll("#display-format li");
|
||||||
addEventOnList();
|
addEventOnList();
|
||||||
|
displaySavePrompt();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -353,6 +354,7 @@ const addEventonBtns = () => {
|
|||||||
availableFeatures = document.querySelectorAll("#available-features li");
|
availableFeatures = document.querySelectorAll("#available-features li");
|
||||||
displayToFormat = document.querySelectorAll("#display-format li");
|
displayToFormat = document.querySelectorAll("#display-format li");
|
||||||
addEventOnList();
|
addEventOnList();
|
||||||
|
displaySavePrompt();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -369,6 +371,7 @@ const addEventonBtns = () => {
|
|||||||
);
|
);
|
||||||
displayToFormat2 = document.querySelectorAll("#display-format-2 li");
|
displayToFormat2 = document.querySelectorAll("#display-format-2 li");
|
||||||
addEventOnList();
|
addEventOnList();
|
||||||
|
displaySavePrompt();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -385,6 +388,7 @@ const addEventonBtns = () => {
|
|||||||
);
|
);
|
||||||
displayToFormat2 = document.querySelectorAll("#display-format-2 li");
|
displayToFormat2 = document.querySelectorAll("#display-format-2 li");
|
||||||
addEventOnList();
|
addEventOnList();
|
||||||
|
displaySavePrompt();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -483,6 +487,7 @@ displayincreaseBtn.addEventListener("click", () => {
|
|||||||
prevElement.innerText = currentText;
|
prevElement.innerText = currentText;
|
||||||
prevElement.setAttribute("class", "active");
|
prevElement.setAttribute("class", "active");
|
||||||
displayItem.setAttribute("class", "");
|
displayItem.setAttribute("class", "");
|
||||||
|
displaySavePrompt();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -500,6 +505,7 @@ displayincreaseBtn2.addEventListener("click", () => {
|
|||||||
prevElement.innerText = currentText;
|
prevElement.innerText = currentText;
|
||||||
prevElement.setAttribute("class", "active");
|
prevElement.setAttribute("class", "active");
|
||||||
displayItem.setAttribute("class", "");
|
displayItem.setAttribute("class", "");
|
||||||
|
displaySavePrompt();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -517,6 +523,7 @@ displayDecreaseBtn.addEventListener("click", () => {
|
|||||||
nextElement.innerText = currentText;
|
nextElement.innerText = currentText;
|
||||||
nextElement.setAttribute("class", "active");
|
nextElement.setAttribute("class", "active");
|
||||||
displayItem.setAttribute("class", "");
|
displayItem.setAttribute("class", "");
|
||||||
|
displaySavePrompt();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -534,6 +541,7 @@ displayDecreaseBtn2.addEventListener("click", () => {
|
|||||||
nextElement.innerText = currentText;
|
nextElement.innerText = currentText;
|
||||||
nextElement.setAttribute("class", "active");
|
nextElement.setAttribute("class", "active");
|
||||||
displayItem.setAttribute("class", "");
|
displayItem.setAttribute("class", "");
|
||||||
|
displaySavePrompt();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -3149,3 +3157,30 @@ function updateCryptoPorftolio() {
|
|||||||
}, 5000);
|
}, 5000);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// SAVE FEATURES TO DISPLAY PROMPT FUNCTIONS
|
||||||
|
function displaySavePrompt() {
|
||||||
|
document.getElementById('save-prompt-message').style.display = "block";
|
||||||
|
}
|
||||||
|
|
||||||
|
function closeSavePrompt() {
|
||||||
|
document.getElementById('save-prompt-message').style.display = "none";
|
||||||
|
}
|
||||||
|
|
||||||
|
function savePrompt() {
|
||||||
|
saveSettings();
|
||||||
|
document.getElementById('save-prompt-message').style.display = "none";
|
||||||
|
setTimeout(
|
||||||
|
function() {
|
||||||
|
document.getElementById('saved-msg-feedback').style.display = "block";
|
||||||
|
}, 100);
|
||||||
|
setTimeout(
|
||||||
|
function() {
|
||||||
|
document.getElementById('saved-msg-feedback').style.display = "none";
|
||||||
|
}, 3000);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user