From 7313fbd58d100aaba05b79564452e2598237d31a Mon Sep 17 00:00:00 2001 From: Askill Date: Mon, 16 Mar 2020 19:51:17 +0100 Subject: [PATCH] more layout --- application/static/main.css | 31 +++++- application/static/main.js | 167 +++++++++---------------------- application/templates/index.html | 28 ++++-- 3 files changed, 98 insertions(+), 128 deletions(-) diff --git a/application/static/main.css b/application/static/main.css index 0f6a871..b070ae4 100644 --- a/application/static/main.css +++ b/application/static/main.css @@ -3,8 +3,8 @@ right: 0; top:0; width: 20rem; - height: 100%; - background-color: aqua; + min-height: 100%; + } #switch{ @@ -13,7 +13,7 @@ position: relative; top: 0; left: -50%; - background-color: aqua; + } #main{ @@ -22,5 +22,28 @@ position: relative; top: 10rem; left: -50%; - background-color: aqua; + } + +.listIMG{ + width: 5rem; + float: left; +} + +.navi{ + margin-left: 1.5rem; +} + +.personalInfo{ + float: right; + width: 9rem; + margin:0; + padding:0; +} +.card{ + margin-top:2rem; +} +.card-text{ + padding: 0; + height: 0; +} \ No newline at end of file diff --git a/application/static/main.js b/application/static/main.js index 8d8cab6..ae79edb 100644 --- a/application/static/main.js +++ b/application/static/main.js @@ -1,137 +1,70 @@ -var rootKontext = "/od1"; -//var rootKontext = ""; -var customeStyle = false; -function loadOD1(){ - try{ - let ksession = $.cookie("KSESSIONID"); - var xmlHttp = new XMLHttpRequest(); - xmlHttp.open( "GET", rootKontext, false ); - xmlHttp.send(); - document.getElementById("od1").innerHTML = xmlHttp.responseText; - - $('link[title="custom"]').prop('disabled', true); - - loadData(); - } - catch(e){ - document.getElementById("od1").innerHTML = "Ein Fehler ist beim Laden des Dienstes aufgetreten, bitte versuchen Sie es später erneut."; - } -} - -function nextTab(){ - $('#navMenu1 a').removeClass("disabled"); - $('#navMenu1 a').tab('show'); -} - -function getJSON (url, callback) { - let ksession = $.cookie("KSESSIONID"); +rootKontext = "" +function getJSON(url, callback) { var xhr = new XMLHttpRequest(); - xhr.open('GET', url + "?session_id=" + ksession, true); + xhr.open('GET', url, true); xhr.responseType = 'json'; - xhr.onload = function() { - var status = xhr.status; - if (status < 400) { - callback(null, xhr.response); - } else { - console.log("failed getting"); - console.log(status); - } + xhr.onload = function () { + var status = xhr.status; + if (status < 400) { + callback(null, xhr.response); + } else { + console.log("failed getting"); + console.log(status); + } }; xhr.send(); }; -function putJSON (url, data, callback) { - let ksession = $.cookie("KSESSIONID"); - +function putJSON(url, data, callback) { var xhr = new XMLHttpRequest(); - xhr.open('PUT', url + "?session_id=" + ksession, true); + xhr.open('PUT', url, true); xhr.responseType = 'json'; xhr.setRequestHeader('Content-Type', 'application/json'); - xhr.onload = function() { - var status = xhr.status; - if (status < 400) { - callback(null, xhr.response); - } else { - console.log("failed posting"); - console.log(status); - } + xhr.onload = function () { + var status = xhr.status; + if (status < 400) { + callback(null, xhr.response); + } else { + console.log("failed posting"); + console.log(status); + } }; xhr.send(data); }; -function sendVorhaben(){ - let data = document.getElementById("form1"); - data = {}; - data["name"] = document.getElementById("form1")["name"].value; - data["reason"] = document.getElementById("form1")["reason"].value; - data["note"] = document.getElementById("form1")["note"].value; - data["partial_application_id"] = document.getElementById("form1")["partial_application_id"].value; - - putJSON(rootKontext + "/api/v1/vorhaben/" + data["partial_application_id"], JSON.stringify(data), function(error, data){ - document.getElementById("status").innerHTML = "Daten erfolgreich erneuert"; - loadData(); - nextTab(); - }); - -} - -function queryString(string) -{ - let queryString = window.location.search; - let varArray = queryString.split("&"); - for (let i=0;i +
+

${item["fname"]} ${item["lname"]}

+
${item["timestamp"]}
+ +

+ +

+ ${item["gender"]}
+ ${item["yob"]}
+ ${item["fingerprints"].length}
+
+ +

+
+ + ` + el.innerHTML += string; + }) + + + } ); -} - -function populateForm(data, formId){ - console.log(data) - inputs = document.forms[formId]; - - for(var i = 0; i < 8; i++){ - if(inputs[i] !== undefined && data[inputs[i].name] !== undefined){ - inputs[i].value = data[inputs[i].name]; - } - else{ - console.log(inputs); - } - } -} - -function loadNewStyle(){ - customeStyle = !customeStyle; - - if(customeStyle){ - $('link[title="custom"]').prop('disabled', false); - $('link[title="default"]').prop('disabled', true); - - console.log("StyleSheet: Custom"); - alert("StyleSheet: Custom"); - } - else{ - $('link[title="default"]').prop('disabled', false); - $('link[title="custom"]').prop('disabled', true); - - console.log("StyleSheet: Default"); - alert("StyleSheet: Default"); - } - } \ No newline at end of file diff --git a/application/templates/index.html b/application/templates/index.html index b729ab8..41bddff 100644 --- a/application/templates/index.html +++ b/application/templates/index.html @@ -6,6 +6,7 @@ + @@ -16,6 +17,7 @@ + @@ -24,20 +26,32 @@ -
-
- hi - +
+
-
+
hi
-
- hi +
+