diff --git a/js/db/customDBActions.js b/js/db/customDBActions.js index 3b42666..5c47dfe 100644 --- a/js/db/customDBActions.js +++ b/js/db/customDBActions.js @@ -70,7 +70,7 @@ function printTable() { tempColor = defYellowBgn; break; case "red": - tempColor = defRedBgn; + tempColor = redBgnCss; break; } @@ -137,4 +137,4 @@ function deleteByIDs() { saveData(); }; dialogConfirm.close(); -} +} \ No newline at end of file diff --git a/js/db/customDBActions.min.js b/js/db/customDBActions.min.js index 219e52d..3ac4715 100644 --- a/js/db/customDBActions.min.js +++ b/js/db/customDBActions.min.js @@ -1 +1 @@ -function setDbConf(){currentDB=getLocalStorageValue("currentDB"),currentDB===getLocalStorageValue("latestDB")&&null!==currentDB||(setLocalStorage("currentDB",DB_VERSION),setLocalStorage("latestDB",DB_VERSION),latestDB=DB_VERSION)}function getSelectedIDs(){let e=[];return Array.from(document.getElementsByClassName("chkChoose")).forEach(function(t){t.matches(".is-checked")&&e.push(parseInt(t.querySelectorAll("input")[0].id.replace("chk","")))}),e}function countTimetable(){let e=db.transaction(["timeTable"],"readonly").objectStore("timeTable").count();e.onsuccess=function(){e.result>0?(imgMultiple.src="img/icons-svg/checkbox-outline.svg",hideCheckBoxes(),printTable(),dialogTimeTable.showModal()):showSnackbar(lngObject.noSpeakers)}}function hideCheckBoxes(){Array.from(document.getElementsByClassName("tdDel")).forEach(function(e){e.style.display="none"}),document.getElementById("thDel").classList.add("hiddenObject")}function showCheckBoxes(){Array.from(document.getElementsByClassName("tdDel")).forEach(function(e){e.style.display="block"}),document.getElementById("thDel").classList.remove("hiddenObject")}function printTable(){let e=document.getElementById("speakers");e.innerHTML="",results=[],db.transaction(["timeTable"],"readwrite").objectStore("timeTable").openCursor().onsuccess=function(t){let l=t.target.result;if(l){let t="white";"yellow"!==l.value.lastColor&&"black"!==l.value.lastColor&&"white"!==l.value.lastColor||(t="black");let a=l.value.lastColor;switch("black"===a&&(a="white"),a){case"green":a=greenBgnCss;break;case"yellow":a=defYellowBgn;break;case"red":a=defRedBgn}let c=getSeconds(l.value.time),o=getSeconds(l.value.min);o-30<=c&&c${l.value.member}${l.value.role}${l.value.time}`,l.continue()}else refreshControls(),addCheckTaps()}}function addCheckTaps(){Array.from(document.querySelectorAll("[id^=chk]")).forEach(function(e){e.addEventListener("change",function(){document.getElementById("lblTickAll").MaterialCheckbox.uncheck()})})}function deleteTimetable(){dialogConfirm.showModal()}function deleteByIDs(){let e=getSelectedIDs(),t=db.transaction(["timeTable"],"readwrite");for(i=0;i${c.value.member}${c.value.role}${c.value.time}`,c.continue()}else refreshControls(),addCheckTaps()}}function addCheckTaps(){Array.from(document.querySelectorAll("[id^=chk]")).forEach(function(a){a.addEventListener("change",function(){document.getElementById("lblTickAll").MaterialCheckbox.uncheck()})})}function deleteTimetable(){dialogConfirm.showModal()}function deleteByIDs(){let a=getSelectedIDs(),b=db.transaction(["timeTable"],"readwrite");for(i=0;i