Exist popup by clicking outside of it
This commit is contained in:
parent
5c4431778e
commit
b0ee888c82
@ -30,6 +30,8 @@ const addtaskpopup = document.querySelector("addtask-popup");
|
|||||||
const closetaskpopup = document.querySelector("#closePopupImg");
|
const closetaskpopup = document.querySelector("#closePopupImg");
|
||||||
|
|
||||||
settingsCog.addEventListener("click", () => slide());
|
settingsCog.addEventListener("click", () => slide());
|
||||||
|
closetaskpopup.addEventListener("click", () => HideNewTaskWindow())
|
||||||
|
document.querySelector("addtask-background").addEventListener("click", () => HideNewTaskWindow());
|
||||||
|
|
||||||
let availableTaskTypes;
|
let availableTaskTypes;
|
||||||
GetTaskTypes()
|
GetTaskTypes()
|
||||||
@ -107,8 +109,6 @@ function slide(){
|
|||||||
slideIn = !slideIn;
|
slideIn = !slideIn;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function ResetContent(){
|
function ResetContent(){
|
||||||
tasksContent.replaceChildren();
|
tasksContent.replaceChildren();
|
||||||
var add = document.createElement("div");
|
var add = document.createElement("div");
|
||||||
@ -120,7 +120,6 @@ function ResetContent(){
|
|||||||
tasksContent.appendChild(add);
|
tasksContent.appendChild(add);
|
||||||
}
|
}
|
||||||
|
|
||||||
closetaskpopup.addEventListener("click", () => HideNewTaskWindow())
|
|
||||||
function ShowNewTaskWindow(){
|
function ShowNewTaskWindow(){
|
||||||
addtaskpopup.style.display = "block";
|
addtaskpopup.style.display = "block";
|
||||||
addtaskpopup.animate(fadeIn, fadeInTiming);
|
addtaskpopup.animate(fadeIn, fadeInTiming);
|
||||||
|
@ -206,7 +206,6 @@ publication img {
|
|||||||
|
|
||||||
addtask-popup{
|
addtask-popup{
|
||||||
display: none;
|
display: none;
|
||||||
opacity: 0;
|
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
top: 0;
|
top: 0;
|
||||||
@ -246,7 +245,6 @@ window-titlebar {
|
|||||||
top: 0;
|
top: 0;
|
||||||
border-radius: 5px 5px 0 0;
|
border-radius: 5px 5px 0 0;
|
||||||
color: var(--accent-color);
|
color: var(--accent-color);
|
||||||
|
|
||||||
display: flex block;
|
display: flex block;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
|
Loading…
Reference in New Issue
Block a user