From a3450f2675694cbd6abdd231f1a75f8235ee80f4 Mon Sep 17 00:00:00 2001 From: darthsandmann Date: Mon, 17 Oct 2016 18:04:28 +0200 Subject: [PATCH] Praktikum1_Kai --- .../__pycache__/application.cpython-35.pyc | Bin 2350 -> 0 bytes .../app/__pycache__/database.cpython-35.pyc | Bin 2259 -> 0 bytes .../app/__pycache__/view.cpython-35.pyc | Bin 1838 -> 0 bytes Praktikum1/webteams/content/webteams.css | 0 Praktikum1/webteams/data/webteams.json | 1 - Praktikum1/webteams/template/form1.tpl | 14 ---- Praktikum1/webteams/template/form2.tpl | 6 -- Praktikum1/webteams/template/list1.tpl | 5 -- Praktikum1/webteams/template/listaufz1.tpl | 7 -- {Praktikum1 => Praktikum1_Kai}/Aufgabe A.pdf | Bin .../test/app/__init__.py | 0 .../test/app/__init__.pyc | Bin .../app/__pycache__/__init__.cpython-35.pyc | Bin .../__pycache__/application.cpython-35.pyc | Bin .../test/app/application.py | 0 .../test/app/application.pyc | Bin .../test/content/index.html | 0 .../test/testserver.py | 0 .../webteams/app/__init__.py | 0 .../app/__pycache__/__init__.cpython-35.pyc | Bin .../__pycache__/application.cpython-35.pyc | Bin 0 -> 2834 bytes .../app/__pycache__/database.cpython-35.pyc | Bin 0 -> 2363 bytes .../app/__pycache__/view.cpython-35.pyc | Bin 0 -> 2543 bytes .../webteams/app/application.py | 27 ++++++- .../webteams/app/database.py | 12 ++- .../webteams/app/view.py | 47 ++++++++++-- Praktikum1_Kai/webteams/content/webteams.css | 72 ++++++++++++++++++ .../webteams/content/webteams.js | 9 +++ Praktikum1_Kai/webteams/data/webteams.json | 1 + .../webteams/server.py | 0 .../webteams/template/form0.tpl | 0 Praktikum1_Kai/webteams/template/form1.tpl | 37 +++++++++ Praktikum1_Kai/webteams/template/form2.tpl | 12 +++ .../webteams/template/list0.tpl | 6 +- Praktikum1_Kai/webteams/template/list1.tpl | 5 ++ .../webteams/template/list2.tpl | 1 + .../webteams/template/listaufz0.tpl | 0 .../webteams/template/listaufz1.tpl | 7 ++ .../webteams/template/listaufz2.tpl | 1 + 39 files changed, 219 insertions(+), 51 deletions(-) delete mode 100644 Praktikum1/webteams/app/__pycache__/application.cpython-35.pyc delete mode 100644 Praktikum1/webteams/app/__pycache__/database.cpython-35.pyc delete mode 100644 Praktikum1/webteams/app/__pycache__/view.cpython-35.pyc delete mode 100644 Praktikum1/webteams/content/webteams.css delete mode 100644 Praktikum1/webteams/data/webteams.json delete mode 100644 Praktikum1/webteams/template/form1.tpl delete mode 100644 Praktikum1/webteams/template/form2.tpl delete mode 100644 Praktikum1/webteams/template/list1.tpl delete mode 100644 Praktikum1/webteams/template/listaufz1.tpl rename {Praktikum1 => Praktikum1_Kai}/Aufgabe A.pdf (100%) rename {Praktikum1 => Praktikum1_Kai}/test/app/__init__.py (100%) rename {Praktikum1 => Praktikum1_Kai}/test/app/__init__.pyc (100%) rename {Praktikum1 => Praktikum1_Kai}/test/app/__pycache__/__init__.cpython-35.pyc (100%) rename {Praktikum1 => Praktikum1_Kai}/test/app/__pycache__/application.cpython-35.pyc (100%) rename {Praktikum1 => Praktikum1_Kai}/test/app/application.py (100%) rename {Praktikum1 => Praktikum1_Kai}/test/app/application.pyc (100%) rename {Praktikum1 => Praktikum1_Kai}/test/content/index.html (100%) rename {Praktikum1 => Praktikum1_Kai}/test/testserver.py (100%) rename {Praktikum1 => Praktikum1_Kai}/webteams/app/__init__.py (100%) rename {Praktikum1 => Praktikum1_Kai}/webteams/app/__pycache__/__init__.cpython-35.pyc (100%) create mode 100644 Praktikum1_Kai/webteams/app/__pycache__/application.cpython-35.pyc create mode 100644 Praktikum1_Kai/webteams/app/__pycache__/database.cpython-35.pyc create mode 100644 Praktikum1_Kai/webteams/app/__pycache__/view.cpython-35.pyc rename {Praktikum1 => Praktikum1_Kai}/webteams/app/application.py (82%) rename {Praktikum1 => Praktikum1_Kai}/webteams/app/database.py (89%) rename {Praktikum1 => Praktikum1_Kai}/webteams/app/view.py (61%) create mode 100644 Praktikum1_Kai/webteams/content/webteams.css rename {Praktikum1 => Praktikum1_Kai}/webteams/content/webteams.js (69%) create mode 100644 Praktikum1_Kai/webteams/data/webteams.json rename {Praktikum1 => Praktikum1_Kai}/webteams/server.py (100%) rename {Praktikum1 => Praktikum1_Kai}/webteams/template/form0.tpl (100%) create mode 100644 Praktikum1_Kai/webteams/template/form1.tpl create mode 100644 Praktikum1_Kai/webteams/template/form2.tpl rename {Praktikum1 => Praktikum1_Kai}/webteams/template/list0.tpl (56%) create mode 100644 Praktikum1_Kai/webteams/template/list1.tpl rename {Praktikum1 => Praktikum1_Kai}/webteams/template/list2.tpl (68%) rename {Praktikum1 => Praktikum1_Kai}/webteams/template/listaufz0.tpl (100%) create mode 100644 Praktikum1_Kai/webteams/template/listaufz1.tpl rename {Praktikum1 => Praktikum1_Kai}/webteams/template/listaufz2.tpl (67%) diff --git a/Praktikum1/webteams/app/__pycache__/application.cpython-35.pyc b/Praktikum1/webteams/app/__pycache__/application.cpython-35.pyc deleted file mode 100644 index 42b38b08d20f04ddf88d0dba3105d9f069976d48..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2350 zcmb6b%Wm67aF(PuEy3Sj? z3;J&v!Y(VCkHb71gqaA2F)p2-B5{G}keJHPMC1XE>`w#&6=0+c%Eb#&GD`7H5Eh)F zP?Hov$~7a23u37Z5uK9g0I!#v^^)iUZ?^==^Q&@Zuq|zePJ}2*`=tnCP@yQ<`T_pc=(EBkHGV6`PsFw{RF-UvQqWmx% z^j(T63@D zx?vWXrp#&}f(D%_%ajqU@P<-^xj2lnJeYKutRs)oTLU^$)S`ro*(RbHxd`m}RzROL z&&8MIr)>n#Y%pi}Ynh(0ZMKbh)!B6B!_oZ&@6gdDH>m(KTB{0Gp*9!#a}f)rzoeR3 zgkEkSURBZ7tdDR@mzJ|(%sZ9%Yn~e!Kn>srI`kC+3_rFEt*oAUMbXvU`pb-=z|c6LvjnIbK^55-?=;t{VmT%2B~fM3vcS$PI!Hk@bQh_q z)RLd#jehG?-Vi*~tAj{#M8 z5EP9d7^i$16Yd4UFVisAJFa-9Hma=AsILtqa<;b<499lmFeJ240FZ( VAwfm`8*SLP6i1b+9@}6W=6{%A-TnXo diff --git a/Praktikum1/webteams/app/__pycache__/database.cpython-35.pyc b/Praktikum1/webteams/app/__pycache__/database.cpython-35.pyc deleted file mode 100644 index 96730b434ddc103753013a0716b2000189ad882d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2259 zcmah~OK;mo5T0F9)H{B~N|h!lawr-eVj%@u6h&$njbj5vAtZGRxdsA)5@|;=Ez-MG z;|TW2x#utR+P}nWPXP+_UZ6m~SxSne1Sq8)4R?pbZ@zh`QLk72Uj4W8SB>aTn!9Z1 zJ6QS$hyY(f5z*017jwF#BRRFP=*Xh|0QVNXfwe`UP1o2hu!{rNeg}Wl?y;O+7L*+< ztsz3ZMX)#a2}QCS_=KmxHo8p#oH-N}=?!2&FHul7N7$@TP&Imyf*J*Nqr>0^1uI4` zQ?N?Gn$clg0I2n>y6dNY*Vm!fi+Tbu_~KuQ^#n`bf&i*ZBG1Typlg_5>%bLlS7uHC z7harIROkon&P!a8**c7l{~+by@qcz&zvxiu)~Vlb>0UqV#;yH+`lH`%b)J6TdZzr- zw0}A}d(?UrcGJ*5(=9(qTI`phZ6&X>lIQh@{nYbrGA0{>WLb=F&cWZBn)DbuUu?$9 z!~uRejw?wQhm=A$9A8V?eX&nh76*vXQc0HaJ;AjVS;n5JQjx|NFuYh96*t)1n?i?y&BC& zRB!;jCRapVjyL9^Pb_rb%s*APe%Coa!Nj_*r`#7RM|iab4&dX>i30$!`V z_p>W=bal9K^AxCc=;{VUR??}Tj}l75p3q9%J$wOt2sO_{|`U~VH6rrJhL=+97%w37As+9wb18mZ3t~Z;htFho;V;( zwp9hE=Dh&L^}39qeiEj;;jur8QjpVug*II%$IbbaE?CWQa8kKh436KSynetPnztj` zYkI|Qg5aMEwQVc^g8%;ld#iU|NE`1RTSB67rkvT?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< -
- - -
-
- - -
-
- - -
- \ No newline at end of file diff --git a/Praktikum1/webteams/template/form2.tpl b/Praktikum1/webteams/template/form2.tpl deleted file mode 100644 index 8c836cd..0000000 --- a/Praktikum1/webteams/template/form2.tpl +++ /dev/null @@ -1,6 +0,0 @@ -
- -
- - - \ No newline at end of file diff --git a/Praktikum1/webteams/template/list1.tpl b/Praktikum1/webteams/template/list1.tpl deleted file mode 100644 index 2ad319a..0000000 --- a/Praktikum1/webteams/template/list1.tpl +++ /dev/null @@ -1,5 +0,0 @@ - - $name1_s$vorname1_s$matrnr1_s - $name2_s$vorname2_s$matrnr2_s - bearbeiten löschen - \ No newline at end of file diff --git a/Praktikum1/webteams/template/listaufz1.tpl b/Praktikum1/webteams/template/listaufz1.tpl deleted file mode 100644 index 4b00513..0000000 --- a/Praktikum1/webteams/template/listaufz1.tpl +++ /dev/null @@ -1,7 +0,0 @@ - -
  • Gruppe $nr: bearbeiten löschen -
      -
    • $name1_s, $vorname1_s, $matrnr1_s
    • -
    • $name2_s, $vorname2_s, $matrnr2_s
    • -
    -
  • \ No newline at end of file diff --git a/Praktikum1/Aufgabe A.pdf b/Praktikum1_Kai/Aufgabe A.pdf similarity index 100% rename from Praktikum1/Aufgabe A.pdf rename to Praktikum1_Kai/Aufgabe A.pdf diff --git a/Praktikum1/test/app/__init__.py b/Praktikum1_Kai/test/app/__init__.py similarity index 100% rename from Praktikum1/test/app/__init__.py rename to Praktikum1_Kai/test/app/__init__.py diff --git a/Praktikum1/test/app/__init__.pyc b/Praktikum1_Kai/test/app/__init__.pyc similarity index 100% rename from Praktikum1/test/app/__init__.pyc rename to Praktikum1_Kai/test/app/__init__.pyc diff --git a/Praktikum1/test/app/__pycache__/__init__.cpython-35.pyc b/Praktikum1_Kai/test/app/__pycache__/__init__.cpython-35.pyc similarity index 100% rename from Praktikum1/test/app/__pycache__/__init__.cpython-35.pyc rename to Praktikum1_Kai/test/app/__pycache__/__init__.cpython-35.pyc diff --git a/Praktikum1/test/app/__pycache__/application.cpython-35.pyc b/Praktikum1_Kai/test/app/__pycache__/application.cpython-35.pyc similarity index 100% rename from Praktikum1/test/app/__pycache__/application.cpython-35.pyc rename to Praktikum1_Kai/test/app/__pycache__/application.cpython-35.pyc diff --git a/Praktikum1/test/app/application.py b/Praktikum1_Kai/test/app/application.py similarity index 100% rename from Praktikum1/test/app/application.py rename to Praktikum1_Kai/test/app/application.py diff --git a/Praktikum1/test/app/application.pyc b/Praktikum1_Kai/test/app/application.pyc similarity index 100% rename from Praktikum1/test/app/application.pyc rename to Praktikum1_Kai/test/app/application.pyc diff --git a/Praktikum1/test/content/index.html b/Praktikum1_Kai/test/content/index.html similarity index 100% rename from Praktikum1/test/content/index.html rename to Praktikum1_Kai/test/content/index.html diff --git a/Praktikum1/test/testserver.py b/Praktikum1_Kai/test/testserver.py similarity index 100% rename from Praktikum1/test/testserver.py rename to Praktikum1_Kai/test/testserver.py diff --git a/Praktikum1/webteams/app/__init__.py b/Praktikum1_Kai/webteams/app/__init__.py similarity index 100% rename from Praktikum1/webteams/app/__init__.py rename to Praktikum1_Kai/webteams/app/__init__.py diff --git a/Praktikum1/webteams/app/__pycache__/__init__.cpython-35.pyc b/Praktikum1_Kai/webteams/app/__pycache__/__init__.cpython-35.pyc similarity index 100% rename from Praktikum1/webteams/app/__pycache__/__init__.cpython-35.pyc rename to Praktikum1_Kai/webteams/app/__pycache__/__init__.cpython-35.pyc diff --git a/Praktikum1_Kai/webteams/app/__pycache__/application.cpython-35.pyc b/Praktikum1_Kai/webteams/app/__pycache__/application.cpython-35.pyc new file mode 100644 index 0000000000000000000000000000000000000000..cc5e8369e1b97e31689bdb6c765aaec3b791b5ff GIT binary patch literal 2834 zcmb_eOK;mo5S}F|Qlh9>wj;?-(bVbVARvjFqNk!Lns?C}Y5+TJ!3#lY*A6X;RF+ii z2+5_+rT6}c{+QkiqPL#%7kcW1d?;~1CDPmwrAc1)YfYvsnDC=uuYBWKVq9*CCFif@9j;0TSH z|;8zuon>)a}z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x<48qemZ#buM&fXs$93X=iz@}n1WJ1sZni4NkF+3 z*9hJscpEUSCGid!-X(aCfC@l-K=2{KT-l0>Sy|-!Ya9?&^97#zw^g%wxoW0fdbAE* z^e)i>@8FiN03>M+N!58tn~!H2HkCBA4txRPg$GJ(U{no40%6-k10Yrg^9`$jRSjDL z3k<7)T`{ZQb20sUWX-w+?4d{eXo7;~W`|iPG=70fagT z!)N0tEoKCjzxasYV}ef!%v-!jjbS9;g4!2pgCq?J+`tR22G@cOV{dulGg!OjOm5Lx k#dVB~7HBU!81SAlkDWQt+^_a;7Q4GeiX>@EfrXFr58fXEssI20 literal 0 HcmV?d00001 diff --git a/Praktikum1/webteams/app/application.py b/Praktikum1_Kai/webteams/app/application.py similarity index 82% rename from Praktikum1/webteams/app/application.py rename to Praktikum1_Kai/webteams/app/application.py index 1b2991a..c303add 100644 --- a/Praktikum1/webteams/app/application.py +++ b/Praktikum1_Kai/webteams/app/application.py @@ -14,13 +14,19 @@ class Application_cl(object): # spezielle Initialisierung können hier eingetragen werden self.db_o = Database_cl() self.view_o = View_cl() + self.liste = 0 @cherrypy.expose #------------------------------------------------------- - def index(self): + def index(self, form="NULL"): #------------------------------------------------------- - return self.createList_p() + if(form == "0"): + return self.createListAufz_p() + elif(form == "1"): + return self.createList_p() + elif(form == "NULL"): + return self.createList_p() @cherrypy.expose @@ -50,9 +56,11 @@ class Application_cl(object): data_a = [ data_opl["name1_s"] , data_opl["vorname1_s"] , data_opl["matrnr1_s"] + , data_opl["semesteranzahl1_s"] , data_opl["name2_s"] , data_opl["vorname2_s"] , data_opl["matrnr2_s"] + , data_opl["semesteranzahl2_s"] ] if id_s != "None": @@ -72,7 +80,7 @@ class Application_cl(object): # Eintrag löschen, dann Liste neu anzeigen self.db_o.delete_px(id) - return self.createList_p() + return self.createListAufz_p() @cherrypy.expose @@ -90,11 +98,22 @@ class Application_cl(object): #------------------------------------------------------- def createList_p(self): #------------------------------------------------------- + print("---------- List ----------") data_o = self.db_o.read_px() # mit diesen Daten Markup erzeugen return self.view_o.createList_px(data_o) - + + + #------------------------------------------------------- + def createListAufz_p(self): + #------------------------------------------------------- + print("---------- ListAufz ----------") + data_o = self.db_o.read_px() + # mit diesen Daten Markup erzeugen + + return self.view_o.createListAufz_px(data_o) + #------------------------------------------------------- def createForm_p(self, id_spl = None): diff --git a/Praktikum1/webteams/app/database.py b/Praktikum1_Kai/webteams/app/database.py similarity index 89% rename from Praktikum1/webteams/app/database.py rename to Praktikum1_Kai/webteams/app/database.py index de58a0a..20cfc8d 100644 --- a/Praktikum1/webteams/app/database.py +++ b/Praktikum1_Kai/webteams/app/database.py @@ -73,12 +73,17 @@ class Database_cl(object): #------------------------------------------------------- def delete_px(self, id_spl): #------------------------------------------------------- + #print("\n---------------------- DELETE ---------------------") status_b = False if id_spl in self.data_o: pass # hier müssen Sie den Code ergänzen # Löschen als Zurücksetzen auf die Default-Werte implementieren - # Ihre Ergänzung + # Ihre Ergänzung + self.data_o[id_spl] = {} + default_s = self.getDefault_px() + self.data_o[id_spl] = default_s + self.saveData_p() return status_b @@ -86,7 +91,7 @@ class Database_cl(object): #------------------------------------------------------- def getDefault_px(self): #------------------------------------------------------- - return ['', '', '', '', '', ''] # HIER müssen Sie eine Ergänzung vornehmen + return ['', '', '', '', '', '', '', ''] # HIER müssen Sie eine Ergänzung vornehmen #------------------------------------------------------- @@ -96,8 +101,9 @@ class Database_cl(object): fp_o = codecs.open(os.path.join('data', 'webteams.json'), 'r', 'utf-8') except: # Datei neu anlegen self.data_o = {} + self.data_o = {} for loop_i in range(0,15): - self.data_o[str(loop_i)] = ['', '', '', '', '', ''] # HIER müssen Sie eine Ergänzung vornehmen + self.data_o[str(loop_i)] = ['', '', '', '', '', '', '', ''] self.saveData_p() else: with fp_o: diff --git a/Praktikum1/webteams/app/view.py b/Praktikum1_Kai/webteams/app/view.py similarity index 61% rename from Praktikum1/webteams/app/view.py rename to Praktikum1_Kai/webteams/app/view.py index b166006..13e58db 100644 --- a/Praktikum1/webteams/app/view.py +++ b/Praktikum1_Kai/webteams/app/view.py @@ -35,12 +35,14 @@ class View_cl(object): # mehrfach nutzen, um die einzelnen Zeilen der Tabelle zu erzeugen for loop_i in range(0,15): data_a = data_opl[str(loop_i)] - markup_s += lineT_o.safe_substitute (name1_s=data_a[0] # HIER müssen Sie eine Ergänzung vornehmen + markup_s += lineT_o.safe_substitute (name1_s=data_a[0] , vorname1_s=data_a[1] , matrnr1_s=data_a[2] - , name2_s=data_a[3] - , vorname2_s=data_a[4] - , matrnr2_s=data_a[5] + , semesteranzahl1_s=data_a[3] + , name2_s=data_a[4] + , vorname2_s=data_a[5] + , matrnr2_s=data_a[6] + , semesteranzahl2_s=data_a[7] , id_s=str(loop_i) ) @@ -48,6 +50,33 @@ class View_cl(object): return markup_s + #------------------------------------------------------- + def createListAufz_px(self, data_opl): + #------------------------------------------------------- + # hier müsste noch eine Fehlerbehandlung ergänzt werden ! + markup_s = '' + markup_s += self.readFile_p('listaufz0.tpl') + markupV_s = self.readFile_p('listaufz1.tpl') + lineT_o = string.Template(markupV_s) + + # mehrfach nutzen, um die einzelnen Zeilen der Tabelle zu erzeugen + for loop_i in range(0,15): + data_a = data_opl[str(loop_i)] + markup_s += lineT_o.safe_substitute (name1_s=data_a[0] + , vorname1_s=data_a[1] + , matrnr1_s=data_a[2] + , semesteranzahl1_s=data_a[3] + , name2_s=data_a[4] + , vorname2_s=data_a[5] + , matrnr2_s=data_a[6] + , semesteranzahl2_s=data_a[7] + , id_s=str(loop_i) + ) + + markup_s += self.readFile_p('listaufz2.tpl') + + return markup_s + #------------------------------------------------------- def createForm_px(self, id_spl, data_opl): @@ -57,12 +86,14 @@ class View_cl(object): markup_s += self.readFile_p('form0.tpl') markupV_s = self.readFile_p('form1.tpl') lineT_o = string.Template(markupV_s) - markup_s += lineT_o.safe_substitute (name1_s=data_opl[0] # HIER müssen Sie eine Ergänzung vornehmen + markup_s += lineT_o.safe_substitute (name1_s=data_opl[0] , vorname1_s=data_opl[1] , matrnr1_s=data_opl[2] - , name2_s=data_opl[3] - , vorname2_s=data_opl[4] - , matrnr2_s=data_opl[5] + , semesteranzahl1_s=data_opl[3] + , name2_s=data_opl[4] + , vorname2_s=data_opl[5] + , matrnr2_s=data_opl[6] + , semesteranzahl2_s=data_opl[7] , id_s=id_spl ) markup_s += self.readFile_p('form2.tpl') diff --git a/Praktikum1_Kai/webteams/content/webteams.css b/Praktikum1_Kai/webteams/content/webteams.css new file mode 100644 index 0000000..577a9e3 --- /dev/null +++ b/Praktikum1_Kai/webteams/content/webteams.css @@ -0,0 +1,72 @@ +body { + font-family: "Open Sans", sans-serif; + font-size: 12pt; + padding: 0; + margin: 0; +} + +td { + border: 1px solid black; +} + +th { + height: 50px; + border: 1px solid black; +} + +li { +} + +ul { + padding-left: 30px; + list-style-type: square; + margin-bottom: 50px; +} + +label { + padding-left: 15px; +} + +input { + width: 200px; + border: none; + border-bottom: 2px solid black; + font-size: 12pt; +} + +input.button { + background-color: #eeeeee; + color: black; + padding: 5px 10px; + text-align: center; + text-decoration: none; + display: inline-block; + border: none; +} + +input.button:hover, input.button:active { + background-color: #e7e7e7; +} + +idWTForm { +} + + + +a:link, a:visited { + background-color: #eeeeee; + color: black; + padding: 5px 10px; + text-align: center; + text-decoration: none; + display: inline-block; +} + + +a:hover, a:active { + background-color: #e7e7e7; +} + +a.clDelete { +} + diff --git a/Praktikum1/webteams/content/webteams.js b/Praktikum1_Kai/webteams/content/webteams.js similarity index 69% rename from Praktikum1/webteams/content/webteams.js rename to Praktikum1_Kai/webteams/content/webteams.js index e0a29d8..2ae20fe 100644 --- a/Praktikum1/webteams/content/webteams.js +++ b/Praktikum1_Kai/webteams/content/webteams.js @@ -2,6 +2,15 @@ function confirmDelete_p (event_opl) { if ((event_opl.target.tagName.toLowerCase() == 'a') && (event_opl.target.className == "clDelete")) { // Klick auf Link zum Löschen // Ihre Ergänzung + var result = confirm("Sind Sie sicher, dass der Eintrag gelöscht werden soll?"); + if(result) + { + return true; + } + else + { + return false; + } } } diff --git a/Praktikum1_Kai/webteams/data/webteams.json b/Praktikum1_Kai/webteams/data/webteams.json new file mode 100644 index 0000000..1c9b79e --- /dev/null +++ b/Praktikum1_Kai/webteams/data/webteams.json @@ -0,0 +1 @@ +{"13": ["", "", "", "", "", "", "", ""], "12": ["", "", "", "", "", "", "", ""], "2": ["", "", "", "", "", "", "", ""], "7": ["", "", "", "", "", "", "", ""], "6": ["", "", "", "", "", "", "", ""], "0": ["", "", "", "", "", "", "", ""], "3": ["", "", "", "", "", "", "", ""], "5": ["", "", "", "", "", "", "", ""], "8": ["", "", "", "", "", "", "", ""], "11": ["", "", "", "", "", "", "", ""], "9": ["", "", "", "", "", "", "", ""], "10": ["", "", "", "", "", "", "", ""], "4": ["", "", "", "", "", "", "", ""], "1": ["", "", "", "", "", "", "", ""], "14": ["", "", "", "", "", "", "", ""]} \ No newline at end of file diff --git a/Praktikum1/webteams/server.py b/Praktikum1_Kai/webteams/server.py similarity index 100% rename from Praktikum1/webteams/server.py rename to Praktikum1_Kai/webteams/server.py diff --git a/Praktikum1/webteams/template/form0.tpl b/Praktikum1_Kai/webteams/template/form0.tpl similarity index 100% rename from Praktikum1/webteams/template/form0.tpl rename to Praktikum1_Kai/webteams/template/form0.tpl diff --git a/Praktikum1_Kai/webteams/template/form1.tpl b/Praktikum1_Kai/webteams/template/form1.tpl new file mode 100644 index 0000000..f010a75 --- /dev/null +++ b/Praktikum1_Kai/webteams/template/form1.tpl @@ -0,0 +1,37 @@ + + + +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    + + +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    \ No newline at end of file diff --git a/Praktikum1_Kai/webteams/template/form2.tpl b/Praktikum1_Kai/webteams/template/form2.tpl new file mode 100644 index 0000000..00ef544 --- /dev/null +++ b/Praktikum1_Kai/webteams/template/form2.tpl @@ -0,0 +1,12 @@ +
    + +
    + + +
    +
    + +
    +
    + + \ No newline at end of file diff --git a/Praktikum1/webteams/template/list0.tpl b/Praktikum1_Kai/webteams/template/list0.tpl similarity index 56% rename from Praktikum1/webteams/template/list0.tpl rename to Praktikum1_Kai/webteams/template/list0.tpl index 33cdf10..245a9df 100644 --- a/Praktikum1/webteams/template/list0.tpl +++ b/Praktikum1_Kai/webteams/template/list0.tpl @@ -9,9 +9,9 @@ - +
    - - + + \ No newline at end of file diff --git a/Praktikum1_Kai/webteams/template/list1.tpl b/Praktikum1_Kai/webteams/template/list1.tpl new file mode 100644 index 0000000..ac66bc5 --- /dev/null +++ b/Praktikum1_Kai/webteams/template/list1.tpl @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/Praktikum1/webteams/template/list2.tpl b/Praktikum1_Kai/webteams/template/list2.tpl similarity index 68% rename from Praktikum1/webteams/template/list2.tpl rename to Praktikum1_Kai/webteams/template/list2.tpl index 5d3af45..78217cc 100644 --- a/Praktikum1/webteams/template/list2.tpl +++ b/Praktikum1_Kai/webteams/template/list2.tpl @@ -1,6 +1,7 @@
    Name (1)Vorname (1)Matr.-Nr. (1)Name (2)Vorname (2)Matr.-Nr. (2)Name (1)Vorname (1)Matr.-Nr. (1)Anzahl Semester (1)Name (2)Vorname (2)Matr.-Nr. (2)Anzahl Semester (2) Aktion
    $name1_s$vorname1_s$matrnr1_s$semesteranzahl1_s$name2_s$vorname2_s$matrnr2_s$semesteranzahl2_sbearbeiten löschen
    \ No newline at end of file diff --git a/Praktikum1/webteams/template/listaufz0.tpl b/Praktikum1_Kai/webteams/template/listaufz0.tpl similarity index 100% rename from Praktikum1/webteams/template/listaufz0.tpl rename to Praktikum1_Kai/webteams/template/listaufz0.tpl diff --git a/Praktikum1_Kai/webteams/template/listaufz1.tpl b/Praktikum1_Kai/webteams/template/listaufz1.tpl new file mode 100644 index 0000000..4241c7f --- /dev/null +++ b/Praktikum1_Kai/webteams/template/listaufz1.tpl @@ -0,0 +1,7 @@ + +
  • Gruppe $id_s: bearbeiten  löschen +
      +
    • $name1_s, $vorname1_s, $matrnr1_s, $semesteranzahl1_s
    • +
    • $name2_s, $vorname2_s, $matrnr2_s, $semesteranzahl2_s
    • +
    +
  • \ No newline at end of file diff --git a/Praktikum1/webteams/template/listaufz2.tpl b/Praktikum1_Kai/webteams/template/listaufz2.tpl similarity index 67% rename from Praktikum1/webteams/template/listaufz2.tpl rename to Praktikum1_Kai/webteams/template/listaufz2.tpl index dfff501..ea495d4 100644 --- a/Praktikum1/webteams/template/listaufz2.tpl +++ b/Praktikum1_Kai/webteams/template/listaufz2.tpl @@ -1,6 +1,7 @@ \ No newline at end of file