diff options
author | Friedrich Beckmann <friedrich.beckmann@gmx.de> | 2025-04-05 09:28:51 +0200 |
---|---|---|
committer | Friedrich Beckmann <friedrich.beckmann@gmx.de> | 2025-04-05 09:28:51 +0200 |
commit | 12a87277041c82edcec46b4f05e35abac632d271 (patch) | |
tree | b4ce20310a4a9c559c1f8862c487a9e1d6a74c7a | |
parent | d120b47cb9e2282d3e5d3e42964485ac3eaa49a8 (diff) |
-rw-r--r-- | index.html | 21 |
1 files changed, 19 insertions, 2 deletions
@@ -56,7 +56,10 @@ courses.map(course=>{ checkb.innerHTML = "<input id=\"" + course.Name + "\" type=checkbox onclick=\"onCheckBoxClicked(event)\">"; for (const [key, value] of Object.entries(course)) { box = row.insertCell(); - box.innerHTML = value; + if (key === "Dozent") + box.innerHTML = dozwhomepage(value) + else + box.innerHTML = value; }; }); @@ -78,6 +81,20 @@ function onCheckBoxClicked(e) { console.log(listofchecked); } +function dozwhomepage(dozent) { + doz2hp = new Map ([ + ["Stolle", "https://www.tha.de/Elektrotechnik/Reinhard-Stolle.html"], + ["Kamuf", "https://www.tha.de/Elektrotechnik/Matthias-Kamuf.html"], + ["Beckmann", "https://www.tha.de/Elektrotechnik/Friedrich-Beckmann.html"], + ["Königbauer", "https://www.tha.de/Elektrotechnik/Prof.-Dr.-rer.nat.-martina-koenigbauer.html"] + ]); + if (homepagelink = doz2hp.get(dozent)){ + return "<a href=\"" + homepagelink + "\">" + dozent + "</a>"; + } else { + return dozent; + } +} + function dayname2number(dayname) { const d2n = new Map ([ ["Montag", 1], @@ -97,7 +114,7 @@ function addpart2calendar (name,dozent,tag,startzeit,ende,raum,id,color) { event = { "start": caldatestring + startzeit, "end": caldatestring + ende, - "title": {html: name + "</br>" + "Raum: " + raum}, + "title": {html: name + "</br>" + raum + " / " + dozwhomepage(dozent)}, "id": id, "color": color }; |