aboutsummaryrefslogtreecommitdiff
path: root/id/server/moa-id-frontend-resources/src/main/resources/mainGUI
diff options
context:
space:
mode:
authorThomas Lenz <tlenz@iaik.tugraz.at>2018-01-23 14:23:39 +0100
committerThomas Lenz <tlenz@iaik.tugraz.at>2018-01-23 14:23:39 +0100
commit731ab39b8ef05a4e84b72fb4243d59c9f6dd48cb (patch)
tree52ce23ebe8191f99a187b9ff90af8cef01d63030 /id/server/moa-id-frontend-resources/src/main/resources/mainGUI
parent869a07573fb6295174fd57aced1ba888f3015910 (diff)
downloadmoa-id-spss-731ab39b8ef05a4e84b72fb4243d59c9f6dd48cb.tar.gz
moa-id-spss-731ab39b8ef05a4e84b72fb4243d59c9f6dd48cb.tar.bz2
moa-id-spss-731ab39b8ef05a4e84b72fb4243d59c9f6dd48cb.zip
update mostly all GUI forms to split JavaScript and CSS from html code to support "Content Security-Policy" http headers
Diffstat (limited to 'id/server/moa-id-frontend-resources/src/main/resources/mainGUI')
-rw-r--r--id/server/moa-id-frontend-resources/src/main/resources/mainGUI/autocommit.js5
-rw-r--r--id/server/moa-id-frontend-resources/src/main/resources/mainGUI/basic.css4
-rw-r--r--id/server/moa-id-frontend-resources/src/main/resources/mainGUI/bkudetected.js3
-rw-r--r--id/server/moa-id-frontend-resources/src/main/resources/mainGUI/bkudetection.js6
-rw-r--r--id/server/moa-id-frontend-resources/src/main/resources/mainGUI/iframeLBKUdetect.html33
-rw-r--r--id/server/moa-id-frontend-resources/src/main/resources/mainGUI/iframeLBKUdetected.html12
-rw-r--r--id/server/moa-id-frontend-resources/src/main/resources/mainGUI/redirect.js5
-rw-r--r--id/server/moa-id-frontend-resources/src/main/resources/mainGUI/slo.js20
-rw-r--r--id/server/moa-id-frontend-resources/src/main/resources/mainGUI/template_handyBKU.html9
-rw-r--r--id/server/moa-id-frontend-resources/src/main/resources/mainGUI/template_localBKU.html9
-rw-r--r--id/server/moa-id-frontend-resources/src/main/resources/mainGUI/template_onlineBKU.html9
-rw-r--r--id/server/moa-id-frontend-resources/src/main/resources/mainGUI/template_thirdBKU.html9
12 files changed, 63 insertions, 61 deletions
diff --git a/id/server/moa-id-frontend-resources/src/main/resources/mainGUI/autocommit.js b/id/server/moa-id-frontend-resources/src/main/resources/mainGUI/autocommit.js
new file mode 100644
index 000000000..d21a5651d
--- /dev/null
+++ b/id/server/moa-id-frontend-resources/src/main/resources/mainGUI/autocommit.js
@@ -0,0 +1,5 @@
+function autoCommmit() {
+ document.forms[0].submit();
+}
+
+document.addEventListener('DOMContentLoaded', autoCommmit); \ No newline at end of file
diff --git a/id/server/moa-id-frontend-resources/src/main/resources/mainGUI/basic.css b/id/server/moa-id-frontend-resources/src/main/resources/mainGUI/basic.css
new file mode 100644
index 000000000..4bec163a9
--- /dev/null
+++ b/id/server/moa-id-frontend-resources/src/main/resources/mainGUI/basic.css
@@ -0,0 +1,4 @@
+@charset "utf-8";
+ .bgTrans {
+ background-color:transparent
+ } \ No newline at end of file
diff --git a/id/server/moa-id-frontend-resources/src/main/resources/mainGUI/bkudetected.js b/id/server/moa-id-frontend-resources/src/main/resources/mainGUI/bkudetected.js
new file mode 100644
index 000000000..7e4d2b12f
--- /dev/null
+++ b/id/server/moa-id-frontend-resources/src/main/resources/mainGUI/bkudetected.js
@@ -0,0 +1,3 @@
+document.addEventListener('DOMContentLoaded', function () {
+ parent.setBKUAvailable(true);
+}); \ No newline at end of file
diff --git a/id/server/moa-id-frontend-resources/src/main/resources/mainGUI/bkudetection.js b/id/server/moa-id-frontend-resources/src/main/resources/mainGUI/bkudetection.js
new file mode 100644
index 000000000..b991beb60
--- /dev/null
+++ b/id/server/moa-id-frontend-resources/src/main/resources/mainGUI/bkudetection.js
@@ -0,0 +1,6 @@
+function autoCommmit() {
+ parent.setBKUAvailable(false);
+ document.forms[0].submit();
+}
+
+document.addEventListener('DOMContentLoaded', autoCommmit); \ No newline at end of file
diff --git a/id/server/moa-id-frontend-resources/src/main/resources/mainGUI/iframeLBKUdetect.html b/id/server/moa-id-frontend-resources/src/main/resources/mainGUI/iframeLBKUdetect.html
index cbc16cb38..1be548979 100644
--- a/id/server/moa-id-frontend-resources/src/main/resources/mainGUI/iframeLBKUdetect.html
+++ b/id/server/moa-id-frontend-resources/src/main/resources/mainGUI/iframeLBKUdetect.html
@@ -1,31 +1,14 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html lang="de">
<head>
-<title>BKU-Erkennung</title>
-<script type="text/javascript">
-<!--
- bkuprot = location.protocol;
- bkuhost = "localhost";
- bkuport = (bkuprot == "https:" ? 3496 : 3495);
- bkupath = "https-security-layer-request";
- bkuurl = bkuprot + "//" + bkuhost + ":" + bkuport + "/" + bkupath;
-//-->
-</script>
+ <title>BKU-Erkennung</title>
+ <script src="$contextPath/bkudetection.js"></script>
+ <link rel="stylesheet" href="$contextPath/basic.css" />
</head>
-<body style="background-color:transparent">
-<script type="text/javascript">
-<!--
- if (bkuprot == "https:" || bkuprot == "http:") {
- parent.setBKUAvailable(false);
- document.write('<form name="bkudetectform" method="POST" target="bkudetect" action="' + bkuurl + '" enctype="application/x-www-form-urlencoded">');
- document.write('<input type="hidden" name="XMLRequest" value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&lt;NullOperationRequest xmlns=&quot;http://www.buergerkarte.at/namespaces/securitylayer/1.2#&quot;/&gt;" />');
- document.write('<input type="hidden" name="RedirectURL" value="$contextPath/iframeLBKUdetected.html"/>');
- document.write('</form>');
- try {
- document.bkudetectform.submit();
- } catch(e) {console.log(e)}
- }
-//-->
-</script>
+<body class="bgTrans">
+ <form name="bkudetectform" method="POST" target="bkudetect" action="https://localhost:3496/https-security-layer-request" enctype="application/x-www-form-urlencoded">
+ <input type="hidden" name="XMLRequest" value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&lt;NullOperationRequest xmlns=&quot;http://www.buergerkarte.at/namespaces/securitylayer/1.2#&quot;/&gt;" />
+ <input type="hidden" name="RedirectURL" value="$contextPath/iframeLBKUdetected.html"/>
+ </form>
</body>
</html>
diff --git a/id/server/moa-id-frontend-resources/src/main/resources/mainGUI/iframeLBKUdetected.html b/id/server/moa-id-frontend-resources/src/main/resources/mainGUI/iframeLBKUdetected.html
index 8769c38ad..566ca01bc 100644
--- a/id/server/moa-id-frontend-resources/src/main/resources/mainGUI/iframeLBKUdetected.html
+++ b/id/server/moa-id-frontend-resources/src/main/resources/mainGUI/iframeLBKUdetected.html
@@ -1,14 +1,10 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html lang="de">
<head>
-<title>BKU-Erkennung</title>
-<script type="text/javascript">
- parent.setBKUAvailable(true);
-</script>
+ <title>BKU-Erkennung</title>
+ <script src="bkudetected.js"></script>
+ <link rel="stylesheet" href="basic.css" />
</head>
-<body style="background-color:transparent">
-<script type="text/javascript">
- parent.setBKUAvailable(true);
-</script>
+<body class="bgTrans">
</body>
</html>
diff --git a/id/server/moa-id-frontend-resources/src/main/resources/mainGUI/redirect.js b/id/server/moa-id-frontend-resources/src/main/resources/mainGUI/redirect.js
new file mode 100644
index 000000000..1bba3d5e0
--- /dev/null
+++ b/id/server/moa-id-frontend-resources/src/main/resources/mainGUI/redirect.js
@@ -0,0 +1,5 @@
+function autoCommmit() {
+ document.getElementById('link').click();
+}
+
+document.addEventListener('DOMContentLoaded', autoCommmit); \ No newline at end of file
diff --git a/id/server/moa-id-frontend-resources/src/main/resources/mainGUI/slo.js b/id/server/moa-id-frontend-resources/src/main/resources/mainGUI/slo.js
new file mode 100644
index 000000000..c85837c8a
--- /dev/null
+++ b/id/server/moa-id-frontend-resources/src/main/resources/mainGUI/slo.js
@@ -0,0 +1,20 @@
+function sloTimeOut() {
+ document.getElementById("timeoutURL").click();
+}
+function RestartAfterDelay() {
+ var eDate = null;
+ var MilliSekZeit = 0;
+ var SysDatumJetzt = new Date();
+ var SysDatumJetztMilli = SysDatumJetzt.getTime();
+
+ do {
+ eDate = new Date();
+ MilliSekZeit = eDate.getTime();
+ } while ((MilliSekZeit-SysDatumJetztMilli) < $timeout);
+
+ sloTimeOut();
+}
+
+document.addEventListener('DOMContentLoaded', function () {
+ setTimeout(sloTimeOut, 30000);
+}); \ No newline at end of file
diff --git a/id/server/moa-id-frontend-resources/src/main/resources/mainGUI/template_handyBKU.html b/id/server/moa-id-frontend-resources/src/main/resources/mainGUI/template_handyBKU.html
index 08071ac3a..7a25367e0 100644
--- a/id/server/moa-id-frontend-resources/src/main/resources/mainGUI/template_handyBKU.html
+++ b/id/server/moa-id-frontend-resources/src/main/resources/mainGUI/template_handyBKU.html
@@ -3,14 +3,9 @@
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
- <script language="javascript" type="text/javascript">
- function onAnmeldeSubmit() {
- document.CustomizedForm.submit();
- document.CustomizedForm.Senden.disabled=true;
- }
- </script>
+ <script src="<ContextURL>/autocommit.js"></script>
</head>
- <body onLoad="onAnmeldeSubmit()">
+ <body>
<form name="CustomizedForm" action="<BKU>" method="post" enctype="multipart/form-data">
Falls Sie nicht automatisch weitergeleitet werden klicken Sie bitte hier:
<input class="button" type="submit" value="Starte Anmeldung" name="Senden">
diff --git a/id/server/moa-id-frontend-resources/src/main/resources/mainGUI/template_localBKU.html b/id/server/moa-id-frontend-resources/src/main/resources/mainGUI/template_localBKU.html
index b9905c4af..ef2c1ed8e 100644
--- a/id/server/moa-id-frontend-resources/src/main/resources/mainGUI/template_localBKU.html
+++ b/id/server/moa-id-frontend-resources/src/main/resources/mainGUI/template_localBKU.html
@@ -3,14 +3,9 @@
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
- <script language="javascript" type="text/javascript">
- function onAnmeldeSubmit() {
- document.CustomizedForm.submit();
- document.CustomizedForm.Senden.disabled=true;
- }
- </script>
+ <script src="<ContextURL>/autocommit.js"></script>
</head>
- <body onLoad="onAnmeldeSubmit()">
+ <body>
<form target=<REDIRECTTARGET> name="CustomizedForm" action="<BKU>" method="post" enctype="multipart/form-data">
Falls Sie nicht automatisch weitergeleitet werden klicken Sie bitte hier:
<input class="button" type="submit" value="Starte Anmeldung" name="Senden">
diff --git a/id/server/moa-id-frontend-resources/src/main/resources/mainGUI/template_onlineBKU.html b/id/server/moa-id-frontend-resources/src/main/resources/mainGUI/template_onlineBKU.html
index a9932d49d..7a0ae51ad 100644
--- a/id/server/moa-id-frontend-resources/src/main/resources/mainGUI/template_onlineBKU.html
+++ b/id/server/moa-id-frontend-resources/src/main/resources/mainGUI/template_onlineBKU.html
@@ -3,14 +3,9 @@
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
- <script language="javascript" type="text/javascript">
- function onAnmeldeSubmit() {
- document.CustomizedForm.submit();
- document.CustomizedForm.Senden.disabled=true;
- }
- </script>
+ <script src="<ContextURL>/autocommit.js"></script>
</head>
- <body onLoad="onAnmeldeSubmit()">
+ <body>
<form name="CustomizedForm" action="<BKU>" method="post" enctype="multipart/form-data">
Falls Sie nicht automatisch weitergeleitet werden klicken Sie bitte hier:
<input class="button" type="hidden" value="Starte Anmeldung" name="Senden">
diff --git a/id/server/moa-id-frontend-resources/src/main/resources/mainGUI/template_thirdBKU.html b/id/server/moa-id-frontend-resources/src/main/resources/mainGUI/template_thirdBKU.html
index a9932d49d..be8d7aab1 100644
--- a/id/server/moa-id-frontend-resources/src/main/resources/mainGUI/template_thirdBKU.html
+++ b/id/server/moa-id-frontend-resources/src/main/resources/mainGUI/template_thirdBKU.html
@@ -3,14 +3,9 @@
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
- <script language="javascript" type="text/javascript">
- function onAnmeldeSubmit() {
- document.CustomizedForm.submit();
- document.CustomizedForm.Senden.disabled=true;
- }
- </script>
+ <script src="<ContextURL>/autocommit.js"></script>
</head>
- <body onLoad="onAnmeldeSubmit()">
+ <body>
<form name="CustomizedForm" action="<BKU>" method="post" enctype="multipart/form-data">
Falls Sie nicht automatisch weitergeleitet werden klicken Sie bitte hier:
<input class="button" type="hidden" value="Starte Anmeldung" name="Senden">