Files
ServiceHubPlus/script.js
T
2021-10-12 21:14:54 -04:00

48 lines
1.5 KiB
JavaScript

"use strict";
/*
TODO float buttons on bottom of RO
TODO float location entry on RO (sidebar?)
TODO style individual buttons
TODO options page
- move parts list buttons top or bottom
- color themes?
BUG close button on photo pages is styled along with the btnCancel
HACK display tiny images next to parts list?
TODO shrink navbar/header/location on scroll
TODO fancy button animations
TODO choose file on upload window
TODO insert a reset button into search form
TODO style menubar and keep it sticky on the window
TODO style/move the location scan to float with the RO
*/
// Warranty Highlight
const isWarranty = document.getElementById("chkWarrantee");
if (isWarranty != null) {
isWarranty.addEventListener("change", updateBackground);
updateBackground();
function updateBackground() {
isWarranty.nextElementSibling.style.backgroundColor = isWarranty.checked
? "red"
: "transparent";
isWarranty.nextElementSibling.style.color = isWarranty.checked
? "white"
: "black";
}
}
// TODO highlight change case label if SN updated
// TODO color bg to bin color
// TODO add current location to top of page somewhere
// Notification system
// TODO implement facebook-style notifications
// https://portal.trgrepair.com/task_manager.asp?rnd=0.9996227368620352
// const notifCountStr = document.getElementById("lblTask").innerText;
// const notifCount = parseInt(notifCountStr.split(" ")[2]); // Total task count
// const notifCountNew = parseInt(notifCountStr.split(" ")[5].slice(1)); // New task count