From 8825fc510535fc545cb82dcdf3e43792144e6d2e Mon Sep 17 00:00:00 2001 From: darthsandmann Date: Thu, 17 Nov 2016 19:46:32 +0100 Subject: [PATCH] Finish --- Praktikum2/ppm1/data/Angebote/30.json | 13 ++ Praktikum2/ppm1/doc/documentation.html | 127 +++++++++++++++++++ Praktikum2/ppm1/static/functions.js | 3 +- Praktikum2/ppm1/static/functionsAngebote.js | 33 +++++ Praktikum2/ppm1/static/functionsChoice.js | 19 +++ Praktikum2/ppm1/static/functionsFirmen.js | 33 +++++ Praktikum2/ppm1/static/functionsLehrender.js | 33 +++++ Praktikum2/ppm1/static/functionsStudenten.js | 33 +++++ Praktikum2/ppm1/templates/list.tpl | 11 +- Praktikum2/ppm1/templates/listChoice.tpl | 4 +- 10 files changed, 302 insertions(+), 7 deletions(-) create mode 100644 Praktikum2/ppm1/data/Angebote/30.json create mode 100644 Praktikum2/ppm1/doc/documentation.html create mode 100644 Praktikum2/ppm1/static/functionsAngebote.js create mode 100644 Praktikum2/ppm1/static/functionsChoice.js create mode 100644 Praktikum2/ppm1/static/functionsFirmen.js create mode 100644 Praktikum2/ppm1/static/functionsLehrender.js create mode 100644 Praktikum2/ppm1/static/functionsStudenten.js diff --git a/Praktikum2/ppm1/data/Angebote/30.json b/Praktikum2/ppm1/data/Angebote/30.json new file mode 100644 index 0000000..31c0e32 --- /dev/null +++ b/Praktikum2/ppm1/data/Angebote/30.json @@ -0,0 +1,13 @@ +{ + "ZeitraumBis": "", + "Firmenbetreuer": "firmenbetreuer", + "id": "30", + "ZeitraumVon": "", + "Name": "name", + "Beschreibung": "beschreibung", + "Student": "", + "Lehrender": "", + "Status": "Angebot", + "Voraussetzungen": "voraussetzungen", + "Firma": "IBM" +} \ No newline at end of file diff --git a/Praktikum2/ppm1/doc/documentation.html b/Praktikum2/ppm1/doc/documentation.html new file mode 100644 index 0000000..7387d6d --- /dev/null +++ b/Praktikum2/ppm1/doc/documentation.html @@ -0,0 +1,127 @@ + + + + + + + + + + + +

Web-Praktikum Gruppe A

+

Kai Wansart und Felix Hoster

+

16.11.2016

+

Beschreibung der Lösung

+

Aufgabe der Anwendung:

+ +

Übersicht der fachlichen Funktion:

+ +

Beschreibung des Servers

+

Zweck

+ +

Aufbau (Bestandteile der Komponente)

+ +

Zusammenwirken mit anderen Komponenten

+

API (Programmierschnittstellen), die die Leistung der Komponente anbieten

+ + + diff --git a/Praktikum2/ppm1/static/functions.js b/Praktikum2/ppm1/static/functions.js index e0b34b8..73341c4 100644 --- a/Praktikum2/ppm1/static/functions.js +++ b/Praktikum2/ppm1/static/functions.js @@ -37,9 +37,10 @@ function select(category, mode) { } } + function highlight(e) { if (selected[0]) selected[0].className = ''; e.target.parentNode.className = 'selected'; - var tr = e.target.parentNode; + var tr = event_opl.target.parentNode; selectedId = tr.getAttribute('id'); } \ No newline at end of file diff --git a/Praktikum2/ppm1/static/functionsAngebote.js b/Praktikum2/ppm1/static/functionsAngebote.js new file mode 100644 index 0000000..967dc07 --- /dev/null +++ b/Praktikum2/ppm1/static/functionsAngebote.js @@ -0,0 +1,33 @@ +window.onload = function () { + document.getElementById("idList").onclick = function (event_opl) { + if (event_opl.target.tagName.toLowerCase() == 'td') { + id = event_opl.target.parentNode.id; + if (id != "") { + document.getElementById(id).className = ""; + } + + + console.log(id); + document.getElementById(id).className = "selected"; + } + } + + document.getElementById("New").onclick = function (event_opl) { + window.location.href = "/detail/?cat=Angebote" ; + } + + + document.getElementById("Modify").onclick = function (event_opl) { + if (id != "") + window.location.href = "/detail/?cat=Angebote&id=" + id; + } + + document.getElementById("Delete").onclick = function (event_opl) { + if (id != "") + if (confirm("Soll der Eintrag wirklich geloescht werden?")) { + window.location.href = "/delete/?cat=Angebote&id=" + id; + } + + } + +} \ No newline at end of file diff --git a/Praktikum2/ppm1/static/functionsChoice.js b/Praktikum2/ppm1/static/functionsChoice.js new file mode 100644 index 0000000..ee7b3fa --- /dev/null +++ b/Praktikum2/ppm1/static/functionsChoice.js @@ -0,0 +1,19 @@ +window.onload = function () { + document.getElementById("idList").onclick = function (event_opl) { + if (event_opl.target.tagName.toLowerCase() == 'td') { + id = event_opl.target.parentNode.id; + if (id != "") { + document.getElementById(id).className = ""; + } + + + console.log(id); + document.getElementById(id).className = "selected"; + } + } + + document.getElementById("Annehmen").onclick = function (event_opl) { + if (id != "") + window.location.href = "/detailchoice/?id=" + id; + } +} \ No newline at end of file diff --git a/Praktikum2/ppm1/static/functionsFirmen.js b/Praktikum2/ppm1/static/functionsFirmen.js new file mode 100644 index 0000000..c52c68f --- /dev/null +++ b/Praktikum2/ppm1/static/functionsFirmen.js @@ -0,0 +1,33 @@ +window.onload = function () { + document.getElementById("idList").onclick = function (event_opl) { + if (event_opl.target.tagName.toLowerCase() == 'td') { + id = event_opl.target.parentNode.id; + if (id != "") { + document.getElementById(id).className = ""; + } + + + console.log(id); + document.getElementById(id).className = "selected"; + } + } + + document.getElementById("New").onclick = function (event_opl) { + window.location.href = "/detail/?cat=Firmen" ; + } + + + document.getElementById("Modify").onclick = function (event_opl) { + if (id != "") + window.location.href = "/detail/?cat=Firmen&id=" + id; + } + + document.getElementById("Delete").onclick = function (event_opl) { + if (id != "") + if (confirm("Soll der Eintrag wirklich geloescht werden?")) { + window.location.href = "/delete/?cat=Firmen&id=" + id; + } + + } + +} \ No newline at end of file diff --git a/Praktikum2/ppm1/static/functionsLehrender.js b/Praktikum2/ppm1/static/functionsLehrender.js new file mode 100644 index 0000000..de63671 --- /dev/null +++ b/Praktikum2/ppm1/static/functionsLehrender.js @@ -0,0 +1,33 @@ +window.onload = function () { + document.getElementById("idList").onclick = function (event_opl) { + if (event_opl.target.tagName.toLowerCase() == 'td') { + id = event_opl.target.parentNode.id; + if (id != "") { + document.getElementById(id).className = ""; + } + + + console.log(id); + document.getElementById(id).className = "selected"; + } + } + + document.getElementById("New").onclick = function (event_opl) { + window.location.href = "/detail/?cat=Lehrender" ; + } + + + document.getElementById("Modify").onclick = function (event_opl) { + if (id != "") + window.location.href = "/detail/?cat=Lehrender&id=" + id; + } + + document.getElementById("Delete").onclick = function (event_opl) { + if (id != "") + if (confirm("Soll der Eintrag wirklich geloescht werden?")) { + window.location.href = "/delete/?cat=Lehrender&id=" + id; + } + + } + +} \ No newline at end of file diff --git a/Praktikum2/ppm1/static/functionsStudenten.js b/Praktikum2/ppm1/static/functionsStudenten.js new file mode 100644 index 0000000..2136ca2 --- /dev/null +++ b/Praktikum2/ppm1/static/functionsStudenten.js @@ -0,0 +1,33 @@ +window.onload = function () { + document.getElementById("idList").onclick = function (event_opl) { + if (event_opl.target.tagName.toLowerCase() == 'td') { + id = event_opl.target.parentNode.id; + if (id != "") { + document.getElementById(id).className = ""; + } + + + console.log(id); + document.getElementById(id).className = "selected"; + } + } + + document.getElementById("New").onclick = function (event_opl) { + window.location.href = "/detail/?cat=Studenten" ; + } + + + document.getElementById("Modify").onclick = function (event_opl) { + if (id != "") + window.location.href = "/detail/?cat=Studenten&id=" + id; + } + + document.getElementById("Delete").onclick = function (event_opl) { + if (id != "") + if (confirm("Soll der Eintrag wirklich geloescht werden?")) { + window.location.href = "/delete/?cat=Studenten&id=" + id; + } + + } + +} \ No newline at end of file diff --git a/Praktikum2/ppm1/templates/list.tpl b/Praktikum2/ppm1/templates/list.tpl index 0b51888..7cc3bce 100644 --- a/Praktikum2/ppm1/templates/list.tpl +++ b/Praktikum2/ppm1/templates/list.tpl @@ -8,6 +8,7 @@ + @@ -61,13 +62,15 @@
Startseite - Neu - Bearbeiten - Loeschen + + Neu + Bearbeiten + Loeschen +
\ No newline at end of file diff --git a/Praktikum2/ppm1/templates/listChoice.tpl b/Praktikum2/ppm1/templates/listChoice.tpl index 55ce280..5241c5c 100644 --- a/Praktikum2/ppm1/templates/listChoice.tpl +++ b/Praktikum2/ppm1/templates/listChoice.tpl @@ -8,6 +8,7 @@ + @@ -46,11 +47,10 @@
Startseite - Annehmen + Annehmen
\ No newline at end of file