forked from ScoDoc/ScoDoc
Update opolka/ScoDoc from ScoDoc/ScoDoc #2
@ -182,6 +182,9 @@
|
|||||||
promptModal.removeEventListener('click', this)
|
promptModal.removeEventListener('click', this)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
document.body.style.overflow = "hidden";
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function promptModalButtonAction(success, cancel) {
|
function promptModalButtonAction(success, cancel) {
|
||||||
@ -189,7 +192,7 @@
|
|||||||
succBtn.classList.add("btnPrompt")
|
succBtn.classList.add("btnPrompt")
|
||||||
succBtn.textContent = "Valider"
|
succBtn.textContent = "Valider"
|
||||||
succBtn.addEventListener('click', () => {
|
succBtn.addEventListener('click', () => {
|
||||||
const retour = success();
|
const retour = success(closePromptModal);
|
||||||
if (retour == null || retour == false || retour == undefined) {
|
if (retour == null || retour == false || retour == undefined) {
|
||||||
closePromptModal();
|
closePromptModal();
|
||||||
}
|
}
|
||||||
@ -207,6 +210,7 @@
|
|||||||
|
|
||||||
function closePromptModal() {
|
function closePromptModal() {
|
||||||
promptModal.classList.remove("is-active")
|
promptModal.classList.remove("is-active")
|
||||||
|
document.body.style.overflow = "auto";
|
||||||
}
|
}
|
||||||
const promptClose = document.querySelector(".promptModal-close");
|
const promptClose = document.querySelector(".promptModal-close");
|
||||||
promptClose.onclick = function () {
|
promptClose.onclick = function () {
|
||||||
|
Loading…
Reference in New Issue
Block a user