refactor code

This commit is contained in:
2021-10-07 20:36:08 -04:00
parent e3adeb55b1
commit 5482c6aae9
2 changed files with 5 additions and 63 deletions
+5 -7
View File
@@ -14,7 +14,11 @@ updateBackground();
function updateBackground() { function updateBackground() {
isWarranty.nextElementSibling.style.backgroundColor = isWarranty.checked isWarranty.nextElementSibling.style.backgroundColor = isWarranty.checked
? "red" ? "red"
: "transparent"; : "transparent";
isWarranty.nextElementSibling.style.color = isWarranty.checked
? "white"
: "black";
}
} }
// Notification system // Notification system
@@ -23,9 +27,3 @@ function updateBackground() {
const notifCountStr = document.getElementById("lblTask").innerText; const notifCountStr = document.getElementById("lblTask").innerText;
const notifCount = parseInt(notifCountStr.split(" ")[2]); // Total task count const notifCount = parseInt(notifCountStr.split(" ")[2]); // Total task count
const notifCountNew = parseInt(notifCountStr.split(" ")[5].slice(1)); // New task count const notifCountNew = parseInt(notifCountStr.split(" ")[5].slice(1)); // New task count
/*
// Insert notification button
const insertButton = document.getElementById("exitBtn");
insertButton.innerHTML = `<div id='newBtn'><a href='#' id='notification-button'><span class='material-icons-outlined notification-icon'>notifications</span></a><span id='notification-badge'>${notifCountNew}</span></div>`;
*/
-56
View File
@@ -156,59 +156,3 @@ img[id="Img3"] {
label[for="chkWarrantee"] { label[for="chkWarrantee"] {
padding: 0.35em; padding: 0.35em;
} }
/* Fancy Notifications */
/*
#div_task {
display: none;
visibility: hidden;
}
#newBtn {
position: relative;
}
.material-icons-outlined {
font-family: "Material Icons Outlined";
}
#notification-button {
position: relative;
color: var(--lightblue);
cursor: pointer;
text-decoration: none;
outline: none;
}
#notification-button:hover {
color: var(--lightgray);
}
.notification-icon {
font-size: 2.5em;
position: absolute;
top: 5;
right: 3;
}
#notification-badge {
position: absolute;
top: 0;
right: 0;
}
*/
/* Top bar */
#div_location {
/* position: relative;
width: 80%; */
}
#frmLocation {
/* position: absolute;
top: -40;
right: 370; */
}
*/