diff options
Diffstat (limited to 'dist')
-rwxr-xr-x | dist/css/styles.css | 4 | ||||
-rwxr-xr-x | dist/js/app.js | 4 | ||||
-rw-r--r-- | dist/js/gsec.js | 7 | ||||
-rw-r--r-- | dist/js/login.js | 2 | ||||
-rwxr-xr-x | dist/pages/about.html | 4 | ||||
-rwxr-xr-x | dist/sw.js | 4 |
6 files changed, 14 insertions, 11 deletions
diff --git a/dist/css/styles.css b/dist/css/styles.css index 3f403e7..0e11125 100755 --- a/dist/css/styles.css +++ b/dist/css/styles.css @@ -424,4 +424,8 @@ h1, h2, h3, h4, h5, h6 { .zakljucna-grade { color: red; +} + +ol { + color: var(--color-text) !important; }
\ No newline at end of file diff --git a/dist/js/app.js b/dist/js/app.js index d44995d..f5c2f1b 100755 --- a/dist/js/app.js +++ b/dist/js/app.js @@ -2,8 +2,8 @@ -const app_version = "1.0.14.1-beta"; -const previous_commit = "ab895dc64437ac9ea42b2c9790a0b29550bdbc17"; +const app_version = "1.0.14.2-beta"; +const previous_commit = "c28c1c56dd807f620e916f9711d4c969817c6dd0"; if ("serviceWorker" in navigator) { navigator.serviceWorker.register("/sw.js") diff --git a/dist/js/gsec.js b/dist/js/gsec.js index 36d49a5..59d95bf 100644 --- a/dist/js/gsec.js +++ b/dist/js/gsec.js @@ -32,10 +32,9 @@ var dataToBeSent={"ctl00$ContentPlaceHolder1$edtDatZacetka":`${fromDate.getDay() var absences=[];for(const izostanek of rowElements){var subFields=izostanek.getElementsByTagName("td");var date=subFields[0].innerHTML.trim().split(".");var dateObj=new Date(Date.parse(`${date[2]}-${date[1]}-${date[0]}`));var subjects=[];subFields[2].innerHTML.match(SUBJECT_LIST_REGEX).forEach((subject)=>{subjects.push(subject);});var absencesBySubject={};for(const subject of subjects){const matched_info=FIELDS_REGEX.exec(subject);var subjectName=matched_info[1];var status=Number(matched_info[2]);var period=matched_info[3];period=period.includes("P")?Number(period.replace("P",""))+7:Number(period);absencesBySubject[period]={status:status,subject:subjectName};} absences.push({subjects:absencesBySubject,date:dateObj});} resolve(absences);});});} -fetchGrades(){var grades=[];return new Promise((resolve,reject)=>{$.ajax({xhrFields:{withCredentials:true},crossDomain:true,url:GSE_URL+"Page_Gim/Ucenec/OceneUcenec.aspx",cache:false,type:"GET",dataType:"html",processData:false,success:(data)=>{let parser=new DOMParser();let parsed=parser.parseFromString(data,"text/html");let gradeSpans=parsed.getElementsByClassName("txtVOcObd");for(const grade of gradeSpans){var ist=grade.getElementsByTagName("span")[0].getAttribute("title").split("\n");if(ist.length==1){var gradeToAdd={"gradeType":GSEC_ZAKLJUCNA_GRADE,"grade":Number(grade.getElementsByTagName("span")[0].innerHTML),"subject":grade.parentElement.parentElement.parentElement.parentElement.getElementsByTagName("th")[0].innerText} -grades.push(gradeToAdd);}else{var date=ist[0].split(": ")[1].trim().split(".");var dateObj=new Date(Date.parse(`${date[2]}-${date[1]}-${date[0]}`));var teacher=ist[1].split(": ")[1].trim();var subject=ist[2].split(": ")[1].trim();var name=[];name.push(ist[3].split(": ")[1].trim()) -name.push(ist[4].split(": ")[1].trim()) -name.push(ist[5].split(": ")[1].trim()) +fetchGrades(){var grades=[];return new Promise((resolve,reject)=>{$.ajax({xhrFields:{withCredentials:true},crossDomain:true,url:GSE_URL+"Page_Gim/Ucenec/OceneUcenec.aspx",cache:false,type:"GET",dataType:"html",processData:false,success:(data)=>{let parser=new DOMParser();let parsed=parser.parseFromString(data,"text/html");let gradeSpans=parsed.getElementsByClassName("txtVOcObd");for(const grade of gradeSpans){var whatever_ist_meant_in_my_head_back_then_but_as_a_string=grade.getElementsByTagName("span")[0].getAttribute("title");var ist=whatever_ist_meant_in_my_head_back_then_but_as_a_string.split("\n");if(ist.length==1){var gradeToAdd={"gradeType":GSEC_ZAKLJUCNA_GRADE,"grade":Number(grade.getElementsByTagName("span")[0].innerHTML),"subject":grade.parentElement.parentElement.parentElement.parentElement.getElementsByTagName("th")[0].innerText} +grades.push(gradeToAdd);}else{var date=ist[0].split(": ")[1].trim().split(".");var dateObj=new Date(Date.parse(`${date[2]}-${date[1]}-${date[0]}`));var teacher=ist[1].split(": ")[1].trim();var subject=ist[2].split(": ")[1].trim();var name=[];name.push(whatever_ist_meant_in_my_head_back_then_but_as_a_string.split("Ocenjevanje: ")[1].split("\nVrsta: ")[0].trim());name.push(whatever_ist_meant_in_my_head_back_then_but_as_a_string.split("Vrsta: ")[1].split("\nRok: ")[0].trim()) +name.push(whatever_ist_meant_in_my_head_back_then_but_as_a_string.split("Rok: ")[1].trim()) var gradeNumber=Number(grade.getElementsByTagName("span")[0].innerHTML);var temporary=grade.getElementsByTagName("span")[0].classList.contains("ocVmesna");var gradeToAdd={"gradeType":GSEC_NORMAL_GRADE,"date":dateObj,"teacher":teacher,"subject":subject,"name":name,"temporary":temporary,"grade":gradeNumber};if(grade.getElementsByTagName("span").length>1){if(grade.getElementsByTagName("span")[1].classList.contains("ocVmesna")){gradeToAdd["temporary"]=true;}else{gradeToAdd["temporary"]=false;} gradeToAdd["grade"]=Number(grade.getElementsByTagName("span")[1].innerHTML);gradeToAdd["oldgrade"]=Number(grade.getElementsByTagName("span")[0].innerHTML);} grades.push(gradeToAdd);}} diff --git a/dist/js/login.js b/dist/js/login.js index 2d79576..88cf081 100644 --- a/dist/js/login.js +++ b/dist/js/login.js @@ -2,4 +2,4 @@ document.addEventListener("DOMContentLoaded",()=>{setupEventListeners();}) function setupEventListeners(){$("#login-button").click(()=>{login();});window.addEventListener("keyup",(event)=>{if(event.keyCode===13){event.preventDefault();login();}});} function login(){let username=$("#username").val();let password=$("#password").val();var gsecInstance;try{gsecInstance=new gsec();}catch(error){$.ajax({url:'js/gsec.js?ajaxload',async:false,dataType:"script",});try{gsecInstance=new gsec();}catch(error){alert(D("browserNotSupported"));}} -gsecInstance.login(username,password).then((value)=>{if(typeof value=="string"){let promises_to_run=[localforage.setItem("logged_in",true),localforage.setItem("username",username),localforage.setItem("password",password)];read_val(0);Promise.all(promises_to_run).then(function(){window.location.replace("/pages/timetable.html");});}else{UIAlert("loginFailed");$("#password").val("");}}).catch((err)=>{gsecErrorHandlerUI(err);$("#password").val("");});}
\ No newline at end of file +gsecInstance.login(username,password).then((value)=>{if(typeof value=="string"){let promises_to_run=[localforage.setItem("logged_in",true),localforage.setItem("username",username),localforage.setItem("password",password)];Promise.all(promises_to_run).then(function(){window.location.replace("/pages/timetable.html");});}else{UIAlert("loginFailed");$("#password").val("");}}).catch((err)=>{gsecErrorHandlerUI(err);$("#password").val("");});}
\ No newline at end of file diff --git a/dist/pages/about.html b/dist/pages/about.html index a08ae16..834a0a6 100755 --- a/dist/pages/about.html +++ b/dist/pages/about.html @@ -73,7 +73,7 @@ <b class="title-secondary">Beži</b><span class="title-primary">App</span> </h3> <!-- One day in the future we may have sw cache version covered by this as well --> - <h5 class="subheader"><x-su>version</x-su> 1.0.14.1-beta</h5> + <h5 class="subheader"><x-su>version</x-su> 1.0.14.2-beta</h5> </div> </div> <div class="row"> @@ -142,7 +142,7 @@ <div class="row"> <p> <small> - ^HEAD ab895dc64437ac9ea42b2c9790a0b29550bdbc17 + ^HEAD c28c1c56dd807f620e916f9711d4c969817c6dd0 </small> </p> </div> @@ -3,8 +3,8 @@ // Change version to cause cache refresh -const static_cache_name = "site-static-1.0.14.1-beta-ab895dc"; -// commit before the latest is ab895dc64437ac9ea42b2c9790a0b29550bdbc17 +const static_cache_name = "site-static-1.0.14.2-beta-c28c1c5"; +// commit before the latest is c28c1c56dd807f620e916f9711d4c969817c6dd0 // Got them with find . -not -path '*/\.*' | sed "s/.*/\"&\",/" | grep -v sw.js // sw.js NE SME BITI CACHAN, ker vsebuje verzijo! |