summaryrefslogtreecommitdiffstats
path: root/assets
diff options
context:
space:
mode:
authorrstular <rok@stular.eu>2020-06-01 20:14:59 +0200
committerrstular <rok@stular.eu>2020-06-01 20:14:59 +0200
commitaebac8bcd0e946f1e7283d8e280e301d52b8d64b (patch)
treed4b07b3b6de14695a0b3d9cb83f8abe4fe5f1c54 /assets
parentAdded UI for user-defined gradings (diff)
downloadbeziapp-aebac8bcd0e946f1e7283d8e280e301d52b8d64b.tar
beziapp-aebac8bcd0e946f1e7283d8e280e301d52b8d64b.tar.gz
beziapp-aebac8bcd0e946f1e7283d8e280e301d52b8d64b.tar.bz2
beziapp-aebac8bcd0e946f1e7283d8e280e301d52b8d64b.tar.lz
beziapp-aebac8bcd0e946f1e7283d8e280e301d52b8d64b.tar.xz
beziapp-aebac8bcd0e946f1e7283d8e280e301d52b8d64b.tar.zst
beziapp-aebac8bcd0e946f1e7283d8e280e301d52b8d64b.zip
Diffstat (limited to 'assets')
-rw-r--r--assets/js/gsec.js8
1 files changed, 5 insertions, 3 deletions
diff --git a/assets/js/gsec.js b/assets/js/gsec.js
index 19e190f..5632949 100644
--- a/assets/js/gsec.js
+++ b/assets/js/gsec.js
@@ -273,8 +273,10 @@ class gsec {
}
rowSpan.remove(); // magic
- var subject = SUBJECT_REGEX.exec(subFields[1].innerHTML)[1].trim();
- var desc = DESC_REGEX.exec(subFields[1].innerHTML)[1];
+ var subject = SUBJECT_REGEX.exec(subFields[1].innerHTML)
+ subject = subject == null ? "" : subject[1].trim();
+ var desc = DESC_REGEX.exec(subFields[1].innerHTML);
+ desc = desc == null ? "" : desc[1];
gradings.push({
"date": dateObj,
@@ -529,7 +531,7 @@ class gsec {
"__EVENTARGUMENT": "Select$" + selectId
};
- this.postback(GSE_URL+"Page_Gim/Uporabnik/Sporocila.aspx", dataToBeSent, null, true).then((response) => {
+ this.postback(GSE_URL + "Page_Gim/Uporabnik/Sporocila.aspx", dataToBeSent, null, true).then((response) => {
let parser = new DOMParser();
let parsed = parser.parseFromString(response.data, "text/html");
let subject = parsed.getElementsByClassName("msgSubjectS")[0].innerHTML.trim();