From 8d2aa68bc18c04c2b03cbdd01f008a89e4c8c1c6 Mon Sep 17 00:00:00 2001 From: Christian Kollmann Date: Tue, 7 Dec 2021 07:51:10 +0100 Subject: Unify HTML templates across test, main, basicConfig --- .../config/webcontent/css/css_country.css | 293 +++++++++++---------- .../resources/config/webcontent/js/js_country.js | 58 ++-- 2 files changed, 186 insertions(+), 165 deletions(-) (limited to 'connector/src/test/resources/config/webcontent') diff --git a/connector/src/test/resources/config/webcontent/css/css_country.css b/connector/src/test/resources/config/webcontent/css/css_country.css index 4091955f..bc575c90 100644 --- a/connector/src/test/resources/config/webcontent/css/css_country.css +++ b/connector/src/test/resources/config/webcontent/css/css_country.css @@ -1,137 +1,158 @@ @charset "utf-8"; - body { - background-image: none; - margin: 0px; - font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; - } - #page { - padding-top: 2%; - padding-left: 10%; - } - - #country { - display: flex; - flex-direction: row; - flex-wrap: wrap; - align-items: center; - } - - .block { - display: flex; - flex-direction: row; - flex-wrap: wrap; - cursor: pointer; - text-decoration: none; - padding-right:2%; - width: 250px; - } - - .countryimage { - width:50px; - height:50px; - padding-right: 2%; - padding-bottom: 4%; - } - - input[type=button], input[type=submit], input[type=reset] { - display:flex; - background-color:transparent; - border:none; - color: black; - text-decoration: none; - cursor: pointer; - } - #testEnvironment { - border: none; - color: black; - padding: 10px 20px; - text-decoration: none; - margin: 4px 2px; - height: 3%; - display: inline-block; - vertical-align: middle; - width: 40%; - } - #button{ - background-color: transparent; - border:none; - } - div.header { - background-color: #e9ecef; - padding-top: 28px; - padding-left: 137px; - padding-right: 137px; - padding-bottom: 12px; - } - div.titlebar { - padding: 0px; - } - div.titlebar div { - } - .hidden { - display: none; - } - ul.nav_oben { - padding: 0px; - margin: 0px; - text-align: right; - text-transform: uppercase; - } - li { - display: inline-block; - } - div.header a { - text-decoration: none; - color: black; - } - a { - text-decoration: none; - color: #a22c1c; - } - .content { - padding-left: 137px; - padding-right: 137px; - } - div.subtitle h1 { - padding: 0px; - margin: 0px; - font-size: 130%; - align: right; - } - div.subtitle h2 { - padding: 0px; - margin: 0px; - font-size: 115%; - } - footer { - position: fixed; - left: 0; - padding-left: 137px; - padding-right: 137px; - padding-top: 1em; - bottom: 0; - width: 100%; - height: 2em; - background-color: rgb(162,44,28); - color: white; - } - .float { - float: left; - } - .floatright { - float: right; - } - .copyright { - width: 66%; - font-size: 80%; - } - #countries,#country { - padding-bottom: 40px; - } - input[type=submit] { - width: inherit; - /* text-align: left; */ - } - form { - justify-content: center; - } \ No newline at end of file +body { + background-image: none; + margin: 0px; + font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; +} + +#page { + padding-top: 2%; + padding-left: 10%; +} + +#country { + display: flex; + flex-direction: row; + flex-wrap: wrap; + align-items: center; +} + +.block { + display: flex; + flex-direction: row; + flex-wrap: wrap; + cursor: pointer; + text-decoration: none; + padding-right: 2%; + width: 250px; +} + +.countryimage { + width: 50px; + height: 50px; + padding-right: 2%; + padding-bottom: 4%; +} + +input[type=button], input[type=submit], input[type=reset] { + display: flex; + background-color: transparent; + border: none; + color: black; + text-decoration: none; + cursor: pointer; +} + +#testEnvironment { + border: none; + color: black; + padding: 10px 20px; + text-decoration: none; + margin: 4px 2px; + height: 3%; + display: inline-block; + vertical-align: middle; + width: 40%; +} + +#button { + background-color: transparent; + border: none; +} + +div.header { + background-color: #e9ecef; + padding-top: 28px; + padding-left: 137px; + padding-right: 137px; + padding-bottom: 12px; +} + +div.titlebar { + padding: 0px; +} + +div.titlebar div { +} + +.hidden { + display: none; +} + +ul.nav_oben { + padding: 0px; + margin: 0px; + text-align: right; + text-transform: uppercase; +} + +li { + display: inline-block; +} + +div.header a { + text-decoration: none; + color: black; +} + +a { + text-decoration: none; + color: #a22c1c; +} + +.content { + padding-left: 137px; + padding-right: 137px; +} + +div.subtitle h1 { + padding: 0px; + margin: 0px; + font-size: 130%; + align: right; +} + +div.subtitle h2 { + padding: 0px; + margin: 0px; + font-size: 115%; +} + +footer { + position: fixed; + left: 0; + padding-left: 137px; + padding-right: 137px; + padding-top: 1em; + bottom: 0; + width: 100%; + height: 2em; + background-color: rgb(162, 44, 28); + color: white; +} + +.float { + float: left; +} + +.floatright { + float: right; +} + +.copyright { + width: 66%; + font-size: 80%; +} + +#countries, #country { + padding-bottom: 40px; +} + +input[type=submit] { + width: inherit; + /* text-align: left; */ +} + +form { + justify-content: center; +} \ No newline at end of file diff --git a/connector/src/test/resources/config/webcontent/js/js_country.js b/connector/src/test/resources/config/webcontent/js/js_country.js index 5dcea90e..9baa0d0a 100644 --- a/connector/src/test/resources/config/webcontent/js/js_country.js +++ b/connector/src/test/resources/config/webcontent/js/js_country.js @@ -1,41 +1,41 @@ function clickCountryFlag(element) { - if (!element) return false; + if (!element) return false; - var form = element.target.closest("form"); + var form = element.target.closest("form"); - if (!form) return false; + if (!form) return false; - form.submit(); - return false; + form.submit(); + return false; } /* Set JS events by EventListener to prevent problems with CSP*/ -document.addEventListener("DOMContentLoaded", function(event) { - - /* Element.closest polyfill - https://developer.mozilla.org/en-US/docs/Web/API/Element/closest License: public domain*/ - if (!Element.prototype.matches) - Element.prototype.matches = Element.prototype.msMatchesSelector || - Element.prototype.webkitMatchesSelector; - - if (!Element.prototype.closest) - Element.prototype.closest = function(s) { - var el = this; - if (!document.documentElement.contains(el)) return null; - do { - if (el.matches(s)) return el; - el = el.parentElement || el.parentNode; - } while (el !== null && el.nodeType === 1); - return null; - }; - - /* set Click events by EventListener to prevent JavaScript in HTML which can be a problem with CSP*/ - var allFlags = document.getElementsByClassName("countryimage"); - for (i=0;i