PPM2: select

This commit is contained in:
darthsandmann
2016-12-12 22:20:21 +01:00
parent f0db62320a
commit 1b35f02647
141 changed files with 3986 additions and 1313 deletions

View File

@ -0,0 +1,46 @@
var table = document.getElementById('idList');
var selected = table.getElementsByClassName('selected');
var selectedId = 'None';
table.onclick = highlight;
function select(category, mode) {
var id = selectedId;
if (id == 'None')
{
alert("Kein Eintrag ausgewaehlt!");
}
else
{
if(mode == 0) {
window.location.href = '/detail/?cat=' + category + '&id=' + id;
}
if(mode == 1) {
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;
}
}
if(mode == 2) {
var result = confirm("Sind Sie sicher, dass das Angebot angenommen werden soll?");
if(result) {
window.location.href = '/detailchoice/?id=' + id;
return true;
}
else {
return false;
}
}
}
}
function highlight(e) {
if (selected[0]) selected[0].className = '';
e.target.parentNode.className = 'selected';
var tr = e.target.parentNode;
selectedId = tr.getAttribute('id');
}

View File

@ -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;
}
}
}

View File

@ -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;
}
}

View File

@ -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;
}
}
}

View File

@ -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;
}
}
}

View File

@ -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;
}
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 97 KiB

View File

@ -0,0 +1 @@
body{font-family:"Open Sans",sans-serif;font-size:12pt;padding:0;margin:0;}.clSiteHeader{position:absolute;top:0;left:0;right:0;height:100px;line-height:100px;margin:0;padding:5px;font-size:40pt;text-align:center;text-shadow:black 3px 2px;font-family:"Open Sans",sans-serif;background-color:#084791;border:none;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{position:absolute;top:150px;left:0;right:0;bottom:0;margin:0;padding:5px;background-repeat:no-repeat;background-position:bottom left;}.clContentHeader{position:absolute;top:20px;left:0;right:0;height:30px;line-height:30px;margin:0;padding:5px;font-size:18pt;text-align:center;}.clContentArea{position:absolute;top:80px;left:0;right:0;bottom:0px;margin:10px 0;margin-left:10px;padding:5px;background-attachment:#819FF7;}.clButtonArea{position:absolute;left:0;right:0;bottom:0;height:80px;line-height:80px;margin:0;padding:5px;text-align:center;background-color:#FFFFFF;}.clButtonArea a,input[type="submit"]{margin:0 5px;padding:3px 6px;font-size:14pt;text-decoration:none;border:2px solid;color:white;background-color:#084791;}.clButtonArea a:hover{color:white;background-color:#0D71E4;cursor:pointer;}.clButtonArea a:visited,a:active{color:white;}.clNavButton{display:inline-block;text-align:center;background-color:#084791;border:1px solid black;color:white;padding:15px 32px;text-decoration:none;font-size:16px;cursor:pointer;float:left;clear:left;width:20%;margin-left:38%;margin-right:30%;}.clNavButton:hover{background-color:#0D71E4;}#idList{table-layout:fixed;width:auto;border:2px solid;border-collapse:collapse;margin:auto;}#idList th{text-align:center;padding-left:5px;background-color:white;padding:3px;border:2px solid;}#idList td{padding:3px;border:2px solid;cursor:pointer;}#idForm .clContentArea{width:500px;margin:auto;}.selected{background-color:#0D71E4;color:white;}.clFormRow{position:relative;height:30px;margin-bottom:10px;}.clFormRow label{position:absolute;top:0;left:0;width:240px;text-align:center;}.clFormRow input{position:absolute;top:0;left:250px;width:250px;}.clFormRow select{position:absolute;top:0;left:250px;width:250px;}h3{text-align:center;}