aboutsummaryrefslogtreecommitdiff
path: root/index.html
diff options
context:
space:
mode:
Diffstat (limited to 'index.html')
-rw-r--r--index.html65
1 files changed, 27 insertions, 38 deletions
diff --git a/index.html b/index.html
index ce36afe..cbbe840 100644
--- a/index.html
+++ b/index.html
@@ -40,7 +40,15 @@
<th>Tag2</th>
<th>Start2</th>
<th>Ende2</th>
- <th>Raum2</th>
+ <th>Raum2</th>
+ <th>Tag3</th>
+ <th>Start3</th>
+ <th>Ende3</th>
+ <th>Raum3</th>
+ <th>Tag4</th>
+ <th>Start4</th>
+ <th>Ende4</th>
+ <th>Raum4</th>
</tr>
</thead>
<tbody id="tableBody"></tbody>
@@ -48,9 +56,13 @@
</main>
<script type="text/javascript">
-const courses = [{"Vertiefung": "Kommunikation", "Name": "Hochfrequenztechnik", "Dozent": "Stolle", "Semester": "SS", "SWS": "4", "CP": "5", "Tag1": "Dienstag", "Startzeit1": "09:50", "Ende1": "11:20", "Raum1": "A2.16", "Tag2": "Donnerstag", "Startzeit2": "09:50", "Ende2": "11:20", "Raum2": "E3.06"}, {"Vertiefung": "Kommunikation", "Name": "Nachrichtentechnik", "Dozent": "Kamuf", "Semester": "SS", "SWS": "4", "CP": "5", "Tag1": "Mittwoch", "Startzeit1": "09:50", "Ende1": "11:20", "Raum1": "A2.16/E6.01", "Tag2": "Freitag", "Startzeit2": "14:00", "Ende2": "15:30", "Raum2": "A2.16/E6.01"}, {"Vertiefung": "Information", "Name": "K\u00fcnstliche Intelligenz", "Dozent": "Legat", "Semester": "SS", "SWS": "4", "CP": "5", "Tag1": "Montag", "Startzeit1": "09:50", "Ende1": "11:20", "Raum1": "A3.10", "Tag2": "Montag", "Startzeit2": "17:10", "Ende2": "18:40", "Raum2": "E3.06"}, {"Vertiefung": "Information", "Name": "Digitale Zwillinge", "Dozent": "Legat", "Semester": "SS", "SWS": "4", "CP": "5", "Tag1": "Montag", "Startzeit1": "11:40", "Ende1": "13:10", "Raum1": "H1.22", "Tag2": "Freitag", "Startzeit2": "09:50", "Ende2": "11:20", "Raum2": "H1.22"}, {"Vertiefung": "Energietechnik", "Name": "Erneuerbare Energien", "Dozent": "Schw\u00e4gerl", "Semester": "SS", "SWS": "4", "CP": "5", "Tag1": "Montag", "Startzeit1": "14:00", "Ende1": "17:10", "Raum1": "A3.10", "Tag2": "", "Startzeit2": "", "Ende2": "", "Raum2": ""}, {"Vertiefung": "Energietechnik", "Name": "Erneuerbare Energien Praktikum", "Dozent": "Schw\u00e4gerl", "Semester": "SS", "SWS": "2", "CP": "2", "Tag1": "Mittwoch", "Startzeit1": "11:40", "Ende1": "13:10", "Raum1": "E1.01", "Tag2": "Mittwoch", "Startzeit2": "14:00", "Ende2": "15:30", "Raum2": "E1.01"}, {"Vertiefung": "Energietechnik", "Name": "Elektrische Maschinen", "Dozent": "Meyer", "Semester": "SS", "SWS": "4", "CP": "5", "Tag1": "Dienstag", "Startzeit1": "09:50", "Ende1": "11:20", "Raum1": "A3.13", "Tag2": "Donnerstag", "Startzeit2": "08:00", "Ende2": "09:30", "Raum2": "E3.06"}, {"Vertiefung": "Energietechnik", "Name": "Leistungselektronik", "Dozent": "Ritter", "Semester": "SS", "SWS": "4", "CP": "5", "Tag1": "Donnerstag", "Startzeit1": "09:50", "Ende1": "11:20", "Raum1": "A3.10", "Tag2": "Donnerstag", "Startzeit2": "14:00", "Ende2": "15:30", "Raum2": "H1.22"}, {"Vertiefung": "Energietechnik", "Name": "Hochspannungstechnik", "Dozent": "Finkel", "Semester": "SS", "SWS": "4", "CP": "5", "Tag1": "Dienstag", "Startzeit1": "11:40", "Ende1": "13:10", "Raum1": "E1.02", "Tag2": "Freitag", "Startzeit2": "09:50", "Ende2": "11:20", "Raum2": "E1.02"}, {"Vertiefung": "Elektronik", "Name": "Schaltungstechnik", "Dozent": "Kopystynski", "Semester": "SS", "SWS": "4", "CP": "5", "Tag1": "Montag", "Startzeit1": "11:40", "Ende1": "13:10", "Raum1": "A3.19", "Tag2": "Donnerstag", "Startzeit2": "14:00", "Ende2": "15:30", "Raum2": "A2.15"}, {"Vertiefung": "Elektronik", "Name": "Messtechnik 2", "Dozent": "Gro\u00dfmann", "Semester": "SS", "SWS": "4", "CP": "5", "Tag1": "Dienstag", "Startzeit1": "14:00", "Ende1": "15:30", "Raum1": "E3.06", "Tag2": "Freitag", "Startzeit2": "08:00", "Ende2": "09:30", "Raum2": "E3.06"}, {"Vertiefung": "Autom./Robotik", "Name": "Robot Systems Engineering", "Dozent": "Dietrich", "Semester": "SS", "SWS": "4", "CP": "5", "Tag1": "Mittwoch", "Startzeit1": "11:40", "Ende1": "13:10", "Raum1": "H1.22", "Tag2": "Donnerstag", "Startzeit2": "11:40", "Ende2": "13:10", "Raum2": "H1.22"}, {"Vertiefung": "Autom./Robotik", "Name": "Automatisierungstechnik", "Dozent": "Zeller", "Semester": "SS", "SWS": "4", "CP": "5", "Tag1": "Mittwoch", "Startzeit1": "08:00", "Ende1": "11:20", "Raum1": "E4.06", "Tag2": "", "Startzeit2": "", "Ende2": "", "Raum2": ""}, {"Vertiefung": "Aufbau", "Name": "Messtechnik Praktikum", "Dozent": "Gro\u00dfmann", "Semester": "SS", "SWS": "2", "CP": "2", "Tag1": "Montag", "Startzeit1": "14:00", "Ende1": "17:10", "Raum1": "E3.01", "Tag2": "Dienstag", "Startzeit2": "08:00", "Ende2": "11:20", "Raum2": "E3.01"}, {"Vertiefung": "Allgemein", "Name": "Systemdenken", "Dozent": "K\u00f6nigbauer", "Semester": "SS", "SWS": "4", "CP": "5", "Tag1": "Donnerstag", "Startzeit1": "15:40", "Ende1": "18:40", "Raum1": "E4.06", "Tag2": "", "Startzeit2": "", "Ende2": "", "Raum2": ""}, {"Vertiefung": "Allgemein", "Name": "Matlab/Simulink", "Dozent": "Werthschulte", "Semester": "WS/SS", "SWS": "2", "CP": "2", "Tag1": "Montag", "Startzeit1": "09:50", "Ende1": "11:20", "Raum1": "H3.15", "Tag2": "", "Startzeit2": "", "Ende2": "", "Raum2": ""}, {"Vertiefung": "Allgemein", "Name": "Optimale Prozesse und Produkte", "Dozent": "Frommelt", "Semester": "SS", "SWS": "2", "CP": "2", "Tag1": "Montag", "Startzeit1": "11:40", "Ende1": "13:10", "Raum1": "H3.10", "Tag2": "", "Startzeit2": "", "Ende2": "", "Raum2": ""}, {"Vertiefung": "Allgemein", "Name": "Systems Engineering", "Dozent": "Frommelt", "Semester": "WS/SS", "SWS": "4", "CP": "5", "Tag1": "Freitag", "Startzeit1": "14:00", "Ende1": "17:10", "Raum1": "H1.28", "Tag2": "", "Startzeit2": "", "Ende2": "", "Raum2": ""}, {"Vertiefung": "Allgemein", "Name": "Fertigungstechnik", "Dozent": "Dietrich", "Semester": "SS", "SWS": "4", "CP": "5", "Tag1": "Dienstag", "Startzeit1": "08:00", "Ende1": "09:30", "Raum1": "E4.06", "Tag2": "Freitag", "Startzeit2": "09:50", "Ende2": "11:20", "Raum2": "A3.10"}, {"Vertiefung": "Allgemein", "Name": "Sicherheitstechnik", "Dozent": "Pasker", "Semester": "SS", "SWS": "2", "CP": "2", "Tag1": "Freitag", "Startzeit1": "09:50", "Ende1": "11:20", "Raum1": "A2.15", "Tag2": "", "Startzeit2": "", "Ende2": "", "Raum2": ""}];
-const table = document.getElementById("tableBody");
-courses.map(course=>{
+let courses = [];
+fetch('kurse.json')
+ .then(r => r.json())
+ .then(data => {
+ courses = data;
+ const table = document.getElementById("tableBody");
+ courses.map(course=>{
let row = table.insertRow();
let checkb = row.insertCell();
checkb.innerHTML = "<input id=\"" + course.Name + "\" type=checkbox onclick=\"onCheckBoxClicked(event)\">";
@@ -61,6 +73,7 @@ courses.map(course=>{
else
box.innerHTML = value;
};
+ });
});
function onCheckBoxClicked(e) {
@@ -131,21 +144,19 @@ function addtocalendar(name) {
course = courses.find((element) => element.Name == name);
hue = courses.indexOf(course)*360.0/courses.length;
color = hsv2rgb(hue,1.0,1.0);
- if (dayname2number(course.Tag1) === undefined)
- return;
- addpart2calendar(course.Name,course.Dozent,
- course.Tag1,course.Startzeit1,course.Ende1,
- course.Raum1,course.Name+"1",color);
- if (dayname2number(course.Tag2) === undefined)
- return;
- addpart2calendar(course.Name,course.Dozent,
- course.Tag2,course.Startzeit2,course.Ende2,
- course.Raum2,course.Name+"2",color);
+ for (let i = 1; i <= 4; i++) {
+ if (dayname2number(course["Tag"+i]) === undefined)
+ continue;
+ addpart2calendar(course.Name,course.Dozent,
+ course["Tag"+i],course["Startzeit"+i],course["Ende"+i],
+ course["Raum"+i],course.Name+i,color);
+ }
}
function removefromcalendar(name) {
- ec.removeEventById(name + "1");
- ec.removeEventById(name + "2");
+ for (let i = 1; i <= 4; i++) {
+ ec.removeEventById(name + i);
+ }
}
const ec = new EventCalendar(document.getElementById('ec'), {
@@ -199,28 +210,6 @@ const ec = new EventCalendar(document.getElementById('ec'), {
function createEvents() {
return [];
- let days = [];
- for (let i = 0; i < 7; ++i) {
- let day = new Date();
- let diff = i - day.getDay();
- day.setDate(day.getDate() + diff);
- days[i] = day.getFullYear() + "-" + _pad(day.getMonth()+1) + "-" + _pad(day.getDate());
- }
-
- return [
- {start: days[0] + " 00:00", end: days[0] + " 09:00", resourceId: 1, display: "background"},
- {start: days[1] + " 12:00", end: days[1] + " 14:00", resourceId: 2, display: "background"},
- {start: days[2] + " 17:00", end: days[2] + " 24:00", resourceId: 1, display: "background"},
- {start: days[0] + " 10:00", end: days[0] + " 14:00", resourceId: 1, title: "The calendar can display background and regular events", color: "#FE6B64"},
- {start: days[1] + " 16:00", end: days[2] + " 08:00", resourceId: 2, title: "An event may span to another day", color: "#B29DD9"},
- {start: days[2] + " 09:00", end: days[2] + " 13:00", resourceId: 2, title: "Events can be assigned to resources and the calendar has the resources view built-in", color: "#779ECB"},
- {start: days[3] + " 14:00", end: days[3] + " 20:00", resourceId: 1, title: "", color: "#FE6B64"},
- {start: days[3] + " 15:00", end: days[3] + " 18:00", resourceId: 1, title: "Overlapping events are positioned properly", color: "#779ECB"},
- {start: days[5] + " 10:00", end: days[5] + " 16:00", resourceId: 2, title: {html: "You have complete control over the <i><b>display</b></i> of events…"}, color: "#779ECB"},
- {start: days[5] + " 14:00", end: days[5] + " 19:00", resourceId: 2, title: "…and you can drag and drop the events!", color: "#FE6B64"},
- {start: days[5] + " 18:00", end: days[5] + " 21:00", resourceId: 2, title: "", color: "#B29DD9"},
- {start: days[1], end: days[3], resourceId: 1, title: "All-day events can be displayed at the top", color: "#B29DD9", allDay: true}
- ];
}
function _pad(num) {