css, html, delete
This commit is contained in:
parent
5332dfa3f4
commit
d315cd1009
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -58,12 +58,10 @@ class Application_cl(object):
|
|||||||
@cherrypy.expose
|
@cherrypy.expose
|
||||||
|
|
||||||
#-------------------------------------------------------
|
#-------------------------------------------------------
|
||||||
def delete(self, id, form=None):
|
def delete(self, cat=None, id=None):
|
||||||
#-------------------------------------------------------
|
#-------------------------------------------------------
|
||||||
# Eintrag löschen, dann Liste neu anzeigen
|
print("Delete",cat,id)
|
||||||
self.db_o.delete_px(id)
|
return self.GenerateDelete(cat, id)
|
||||||
print("Delete",form)
|
|
||||||
return self.createList_p(form)
|
|
||||||
@cherrypy.expose
|
@cherrypy.expose
|
||||||
|
|
||||||
#-------------------------------------------------------
|
#-------------------------------------------------------
|
||||||
@ -125,4 +123,13 @@ class Application_cl(object):
|
|||||||
self.db.Save(dataTmp, category)
|
self.db.Save(dataTmp, category)
|
||||||
return self.GenerateList(category)
|
return self.GenerateList(category)
|
||||||
|
|
||||||
|
#-------------------------------------------------------
|
||||||
|
def GenerateDelete(self, category, id):
|
||||||
|
#-------------------------------------------------------
|
||||||
|
if(category == None or id == None):
|
||||||
|
return self.view.CreateIndex()
|
||||||
|
else:
|
||||||
|
self.db.Delete(category, id)
|
||||||
|
return self.GenerateList(category)
|
||||||
|
|
||||||
#EOF
|
#EOF
|
@ -85,7 +85,7 @@ class Database_cl(object):
|
|||||||
#-------------------------------------------------------
|
#-------------------------------------------------------
|
||||||
status_b = False
|
status_b = False
|
||||||
if id in self.data[category]:
|
if id in self.data[category]:
|
||||||
os.remove(os.path.join('data', category, id+'json'))
|
os.remove(os.path.join('data', category, id+'.json'))
|
||||||
del self.data[category][id]
|
del self.data[category][id]
|
||||||
|
|
||||||
return status_b
|
return status_b
|
||||||
|
@ -1,8 +0,0 @@
|
|||||||
{
|
|
||||||
"anzahlMitarbeiter": "anzahlMitarbeiter",
|
|
||||||
"schwerpunkt": "schwerpunkt",
|
|
||||||
"id": "0",
|
|
||||||
"sitz": "sitz",
|
|
||||||
"branche": "branche",
|
|
||||||
"name": "name"
|
|
||||||
}
|
|
@ -1,8 +0,0 @@
|
|||||||
{
|
|
||||||
"voraussetzungen": "voraussetzungen",
|
|
||||||
"beschreibung": "beschreibung",
|
|
||||||
"firmenbetreuer": "firmenbetreuer",
|
|
||||||
"company": "company",
|
|
||||||
"id": "0",
|
|
||||||
"name": "name"
|
|
||||||
}
|
|
@ -1,6 +0,0 @@
|
|||||||
{
|
|
||||||
"vorname": "vorname3",
|
|
||||||
"name": "name3",
|
|
||||||
"id": "33",
|
|
||||||
"matrikelnummer": "3"
|
|
||||||
}
|
|
@ -1,6 +0,0 @@
|
|||||||
{
|
|
||||||
"vorname": "vorname2",
|
|
||||||
"name": "name2",
|
|
||||||
"id": "34",
|
|
||||||
"matrikelnummer": "2"
|
|
||||||
}
|
|
@ -1,6 +0,0 @@
|
|||||||
{
|
|
||||||
"vorname": "vorname1",
|
|
||||||
"name": "name1",
|
|
||||||
"id": "35",
|
|
||||||
"matrikelnummer": "1"
|
|
||||||
}
|
|
@ -1,7 +0,0 @@
|
|||||||
{
|
|
||||||
"titel": "titel",
|
|
||||||
"id": "0",
|
|
||||||
"lehrgebiet": "lehrgebiet",
|
|
||||||
"name": "name",
|
|
||||||
"vorname": "vorname"
|
|
||||||
}
|
|
@ -3,7 +3,7 @@ var selected = table.getElementsByClassName('selected');
|
|||||||
var selectedId = 'None';
|
var selectedId = 'None';
|
||||||
table.onclick = highlight;
|
table.onclick = highlight;
|
||||||
|
|
||||||
function select(category) {
|
function select(category, mode) {
|
||||||
var id = selectedId;
|
var id = selectedId;
|
||||||
if (id == 'None')
|
if (id == 'None')
|
||||||
{
|
{
|
||||||
@ -11,7 +11,19 @@ function select(category) {
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
if(mode == 0){
|
||||||
window.location.href = '/detail/?cat=' + category + '&id=' + id;
|
window.location.href = '/detail/?cat=' + category + '&id=' + id;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
var result = confirm("Sind Sie sicher, dass der Eintrag gelöscht werden soll?");
|
||||||
|
if(result) {
|
||||||
|
window.location.href = '/delete/?cat=' + category + '&id=' + id;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
BIN
Praktikum2/ppm1/static/img/logo.png
Normal file
BIN
Praktikum2/ppm1/static/img/logo.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 97 KiB |
@ -19,12 +19,26 @@ body {
|
|||||||
text-align: center;
|
text-align: center;
|
||||||
text-shadow:black 3px 2px;
|
text-shadow:black 3px 2px;
|
||||||
font-family: "Open Sans", sans-serif;
|
font-family: "Open Sans", sans-serif;
|
||||||
color: #FFFFFF;
|
|
||||||
background-color: #084791;
|
background-color: #084791;
|
||||||
border: none;
|
border: none;
|
||||||
border-radius: 60px;
|
border-radius: 60px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.clSiteHeader a {
|
||||||
|
text-decoration: none;
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
|
|
||||||
|
.clSiteHeader:hover {
|
||||||
|
background-color: #0D71E4;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
.clSiteHeader a:visited, a:active {
|
||||||
|
color: white;
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
|
||||||
.clContent {
|
.clContent {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 150px; /* height, padding, border, margin von idSiteHeader beachten */
|
top: 150px; /* height, padding, border, margin von idSiteHeader beachten */
|
||||||
@ -33,7 +47,7 @@ body {
|
|||||||
bottom: 0;
|
bottom: 0;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 5px;
|
padding: 5px;
|
||||||
background-image: url("https://lionel.kr.hs-niederrhein.de/logo_hs_02.png");
|
background-image: url("/img/logo.png");
|
||||||
background-repeat: no-repeat;
|
background-repeat: no-repeat;
|
||||||
background-position: bottom left;
|
background-position: bottom left;
|
||||||
}
|
}
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>
|
<title>
|
||||||
Praxisphasenmanager (PPM)
|
Praxisphasenmanager (PPM)
|
||||||
</title>
|
</title>
|
||||||
<meta charset="UTF-8" />
|
<meta charset="UTF-8" />
|
||||||
<style type="text/css">
|
<style type="text/css">
|
||||||
@ -11,11 +11,20 @@
|
|||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<h1 id="idSiteHeader" class="clSiteHeader">
|
<h1 id="idSiteHeader" class="clSiteHeader">
|
||||||
${data['category']}: Ihre Daten
|
<a href="/index" title="Zurück zur Startseite">Praxisphasenmanager (PPM)</a>
|
||||||
</h1>
|
</h1>
|
||||||
|
|
||||||
<form id="idForm" class="clContent" action="/save/?cat=${data['category']}" method="POST">
|
<form id="idForm" class="clContent" action="/save/?cat=${data['category']}" method="POST">
|
||||||
<h2 id="idContentHeader" class="clContentHeader">
|
<h2 id="idContentHeader" class="clContentHeader">
|
||||||
Das Formular ausfüllen/korrigieren und auf "speichern" klicken:
|
% if data['category'] == 'students':
|
||||||
|
Studenten: Ihre Daten
|
||||||
|
% elif data['category'] == 'teachers':
|
||||||
|
Lehrende: Ihre Daten
|
||||||
|
% elif data['category'] == 'companies':
|
||||||
|
Firmen: Ihre Daten
|
||||||
|
% elif data['category'] == 'offerings':
|
||||||
|
Angebote: Ihre Daten
|
||||||
|
% endif
|
||||||
</h2>
|
</h2>
|
||||||
<div id="idContentArea" class="clContentArea">
|
<div id="idContentArea" class="clContentArea">
|
||||||
<input type="hidden" value="${data['id']}" id="id" name="id" />
|
<input type="hidden" value="${data['id']}" id="id" name="id" />
|
||||||
@ -30,7 +39,8 @@
|
|||||||
% endfor
|
% endfor
|
||||||
|
|
||||||
<div id="idButtonArea" class="clButtonArea">
|
<div id="idButtonArea" class="clButtonArea">
|
||||||
<a href="/index" title="Zurueck zur Startseite">Zurueck</a>
|
<a href="/index" title="Zurück zur Startseite">Zurück zur Startseite</a>
|
||||||
|
<a href="/category/?cat=${data['category']}" title="Zurueck zur Startseite">Zurück zur übersicht</a>
|
||||||
<input type="submit" value="Speichern" />
|
<input type="submit" value="Speichern" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<h1 id="idSiteHeader" class="clSiteHeader">
|
<h1 id="idSiteHeader" class="clSiteHeader">
|
||||||
Praxisphasenmanager (PPM)
|
<a href="/index" title="Zurück zur Startseite">Praxisphasenmanager (PPM)</a>
|
||||||
</h1>
|
</h1>
|
||||||
<div class="clContent">
|
<div class="clContent">
|
||||||
<h2 id="idContentHeader" class="clContentHeader">Module</h2>
|
<h2 id="idContentHeader" class="clContentHeader">Module</h2>
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
<body>
|
<body>
|
||||||
|
|
||||||
<h1 id="idSiteHeader" class="clSiteHeader">
|
<h1 id="idSiteHeader" class="clSiteHeader">
|
||||||
Praxisphasenmanager (PPM)
|
<a href="/index" title="Zurück zur Startseite">Praxisphasenmanager (PPM)</a>
|
||||||
</h1>
|
</h1>
|
||||||
<div id="idContent" class="clContent">
|
<div id="idContent" class="clContent">
|
||||||
<h2 id="idContentHeader" class="clContentHeader">
|
<h2 id="idContentHeader" class="clContentHeader">
|
||||||
@ -61,7 +61,8 @@
|
|||||||
<div id="idButtonArea" class="clButtonArea">
|
<div id="idButtonArea" class="clButtonArea">
|
||||||
<a href="/index" class="clButton">Startseite</a>
|
<a href="/index" class="clButton">Startseite</a>
|
||||||
<a href="/detail/?cat=${data['category']}" class="clButton">Neu</a>
|
<a href="/detail/?cat=${data['category']}" class="clButton">Neu</a>
|
||||||
<a class="clButton" onclick="select('${data['category']}')">Bearbeiten</a>
|
<a class="clButton" onclick="select('${data['category']}', 0)">Bearbeiten</a>
|
||||||
|
<a class="clButton" onclick="select('${data['category']}', 1)">Loeschen</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user