diff options
author | afitzek <afitzek@7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c> | 2012-07-09 14:24:21 +0000 |
---|---|---|
committer | afitzek <afitzek@7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c> | 2012-07-09 14:24:21 +0000 |
commit | 168477fe312474c95e326383f8c101247a6f206f (patch) | |
tree | 92111c8191141bf1e5fba87501cf4ed402f488bf /pdf-as-web/src/main/webapp/jsp | |
parent | 28c303923ec7bb96b18c54d660630bfab86f3b8c (diff) | |
download | pdf-as-3-168477fe312474c95e326383f8c101247a6f206f.tar.gz pdf-as-3-168477fe312474c95e326383f8c101247a6f206f.tar.bz2 pdf-as-3-168477fe312474c95e326383f8c101247a6f206f.zip |
Supported EID
git-svn-id: https://joinup.ec.europa.eu/svn/pdf-as/trunk@920 7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c
Diffstat (limited to 'pdf-as-web/src/main/webapp/jsp')
-rw-r--r-- | pdf-as-web/src/main/webapp/jsp/signupload.jsp | 56 | ||||
-rw-r--r-- | pdf-as-web/src/main/webapp/jsp/supportedEID.jsp | 190 |
2 files changed, 246 insertions, 0 deletions
diff --git a/pdf-as-web/src/main/webapp/jsp/signupload.jsp b/pdf-as-web/src/main/webapp/jsp/signupload.jsp index 89a9360..a65f56a 100644 --- a/pdf-as-web/src/main/webapp/jsp/signupload.jsp +++ b/pdf-as-web/src/main/webapp/jsp/signupload.jsp @@ -254,6 +254,9 @@ else {
document.getElementById('descriptionbeforefreetext').style.display='none';
}
+
+ document.getElementById('cardlink').style.display='none';
+
document.getElementById('descriptionduring').style.display='block';
//document.getElementById('sprachlink').style.display = 'none';
//document.getElementById('sprachlinkdeaktiviert').style.display= 'block';
@@ -295,6 +298,9 @@ if (document.getElementById('descriptionbeforefreetext').style.display=='block') {
document.getElementById('descriptionbeforefreetext').style.display='none'
}
+ if (document.getElementById('cardlink').style.display=='block') {
+ document.getElementById('cardlink').style.display='none'
+ }
if (document.getElementById('descriptionduring').style.display=='block') {
document.getElementById('descriptionduring').style.display='none'
}
@@ -446,6 +452,21 @@ }
}
+
+ function PDFEinAusblenden(objekt) {
+ if (document.getElementById(objekt).style.display == 'block') {
+ document.getElementById(objekt).style.display = 'none';
+ document.getElementById('dreieck-' + objekt).src = 'images/dreieck-hinunter.gif';
+ document.getElementById('dreieck-' + objekt).alt = objekt + ' anzeigen';
+ }
+ else {
+ document.getElementById(objekt).style.display = 'block';
+ document.getElementById('dreieck-' + objekt).src = 'images/dreieck-hinauf.gif';
+ document.getElementById('dreieck-' + objekt).alt = objekt + ' ausblenden';
+ }
+ document.getElementById('dreieck-' + objekt).parentNode.blur();
+ }
+
//Check the height of the IFrame to be shown for adjusting the high
//of the currently showed div's as well as of those of other pages
function checkHeight() {
@@ -558,6 +579,41 @@ </div>
<% } %>
+ <div id="cardlink" style="display:block">
+ <a id='Link-cards' class='keinhover'><fmt:message key="supported.EID.link"/></a><a><img id='dreieck-CardSupport' alt="<fmt:message key="supported.EID.link"/>" src='images/dreieck-hinunter.gif' width='9' height='8' class='dreieck' /></a>
+ </div>
+
+ <script type='text/javascript'>
+ document.getElementById('Link-cards').href = "javascript:PDFEinAusblenden('CardSupport');";
+ document.getElementById('Link-cards').className = '';
+ document.getElementById('dreieck-CardSupport').parentNode.href = "javascript:PDFEinAusblenden('CardSupport');";
+ </script>
+ <div id="CardSupport" style="display:none">
+ <p>
+ <fmt:message key="supported.EID.text"/>
+ </p>
+ <ul class="links" style="margin-left:20px;">
+ <li><fmt:message key="supported.EID.austria"/></li>
+ <li><fmt:message key="supported.EID.belgium"/></li>
+ <li><fmt:message key="supported.EID.estonia"/></li>
+ <li><fmt:message key="supported.EID.finland"/></li>
+ <li><fmt:message key="supported.EID.iceland"/></li>
+ <li><fmt:message key="supported.EID.italy"/></li>
+ <li><fmt:message key="supported.EID.liechtenstein"/></li>
+ <li><fmt:message key="supported.EID.lithuania"/></li>
+ <li><fmt:message key="supported.EID.portugal"/></li>
+ <% if(german) { %>
+ <li><fmt:message key="supported.EID.sweden"/></li>
+ <li><fmt:message key="supported.EID.spain"/></li>
+ <% } else { %>
+ <li><fmt:message key="supported.EID.spain"/></li>
+ <li><fmt:message key="supported.EID.sweden"/></li>
+ <% } %>
+ <li><fmt:message key="supported.EID.switzerland"/></li>
+</ul>
+ </div> <!-- CardSupport -->
+</div>
+
<div id="descriptionduring" style="display:none">
<fmt:message key="signupload.signing"/>
</div>
diff --git a/pdf-as-web/src/main/webapp/jsp/supportedEID.jsp b/pdf-as-web/src/main/webapp/jsp/supportedEID.jsp new file mode 100644 index 0000000..b9d3ed0 --- /dev/null +++ b/pdf-as-web/src/main/webapp/jsp/supportedEID.jsp @@ -0,0 +1,190 @@ +<%@page import="at.gv.egiz.pdfas.web.session.SessionAttributes"%> +<%@ page import="org.apache.commons.lang.StringEscapeUtils"%> +<%@ page import="at.gv.egiz.pdfas.api.commons.Constants"%> +<%@ page import="at.gv.egiz.pdfas.web.i18n.LanguageDecoratorMapper"%> +<%@ page import="org.apache.commons.lang.BooleanUtils"%> +<%@ page import="at.gv.egiz.pdfas.web.i18n.LocaleParamFilter"%> +<%@ page import="java.util.Locale"%> +<%@ page import="at.gv.egiz.pdfas.web.helper.LocalRequestHelper"%> + +<%@ include file="/jsp/language.jsp"%> + +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> + +<html> +<head> + +<% + + String sessionLang = null; + + //When Change Language link is hit, three parameters are passed with a hidden form + //so that the settings keep the same. Check if this parameters are passed... + String source_mode_request = (String)request.getParameter("source_mode"); + String text_request = (String)request.getParameter("text"); + String lang_request = (String)request.getParameter("newlanguage"); + + if (lang_request!=null) { + if (lang_request.equals("de")) { + session.setAttribute(SessionAttributes.LANGUAGE, "de"); + } + else { + session.setAttribute(SessionAttributes.LANGUAGE, "en"); + } + } + + String serverUrl=LocalRequestHelper.getLocalServerAddress(request,response); + String baseUrl=LocalRequestHelper.getLocalContextAddress(request,response); + + //Check if application is started within an iframe from an extern application + String extern = (String)request.getParameter("extern"); + boolean startedFromIFrame = false; + + if (extern !=null) { + if (extern.equals("yes")) { + startedFromIFrame = true; + } + } + + String requestLang = (String)request.getParameter("locale"); + sessionLang = (String)session.getAttribute(SessionAttributes.LANGUAGE); + String language = ""; + + //If language within session... + if (sessionLang!=null) { + //But if language also changed by clicking the change language link + //or passed as parameter with the URL... + if (requestLang!=null) { + //If language has changed, change it also within session + if (!sessionLang.equals(requestLang)) { + session.setAttribute(SessionAttributes.LANGUAGE, requestLang); + } + //else do nothing + } + //else no change + } + //Else still no language within session + else { + //But if language changed by clicking the change language link + //or passed as parameter with the URL... + if (requestLang!=null) { + if (requestLang.equals("de")) { + session.setAttribute(SessionAttributes.LANGUAGE,"de"); + } + else { + session.setAttribute(SessionAttributes.LANGUAGE,"en"); + } + } + //No language here. Set to german + else { + session.setAttribute(SessionAttributes.LANGUAGE,"de"); + } + } + + language = (String)session.getAttribute(SessionAttributes.LANGUAGE); + + boolean german = true; + + if (language != null) { + if (language.equals("en")) { + german = false; + } + } + + if (german) { +%> +<fmt:setLocale value="de" /> +<% + } else { +%> +<fmt:setLocale value="en" /> +<% + } +%> + +<title> + <fmt:message key="supported.EID.title"/> +</title> + +<% + //If application called within an IFrame from an external application + //choose template and set session attribute + if (!startedFromIFrame) { + session.setAttribute("extern", "no"); + if (german) { + %> + <meta name="decorator" content="production_de" /> + <link rel="stylesheet" type="text/css" href="<%=baseUrl%>/css/pdfas-styles.css" /> + <% } else { %> + <meta name="decorator" content="production_en" /> + <link rel="stylesheet" type="text/css" href="<%=baseUrl%>/css/pdfas-styles.css" /> + <% } + } else { + session.setAttribute("extern", "yes"); + %> + <link rel="stylesheet" type="text/css" href="<%=baseUrl%>/css/extern-styles.css" /> + <% } %> + + <% if ((serverUrl.contains("http")) && (!serverUrl.contains("https")) && (!serverUrl.contains("localhost"))) { + baseUrl = baseUrl.replace("http","https"); %> + <meta HTTP-EQUIV="REFRESH" content="0; url=<%=baseUrl %>/"> + <% } %> + +</head> +<body> + +<h1 id="heading1" style="display:block"> +<fmt:message key="supported.EID.title"/> +</h1> +<div class="linksinhalt"> + + +<fmt:message key="supported.EID.text"/> + +<ul> + <li><fmt:message key="supported.EID.austria"/></li> + <li><fmt:message key="supported.EID.belgium"/></li> + <li><fmt:message key="supported.EID.estonia"/></li> + <li><fmt:message key="supported.EID.finland"/></li> + <li><fmt:message key="supported.EID.iceland"/></li> + <li><fmt:message key="supported.EID.italy"/></li> + <li><fmt:message key="supported.EID.liechtenstein"/></li> + <li><fmt:message key="supported.EID.lithuania"/></li> + <li><fmt:message key="supported.EID.portugal"/></li> + <% if(german) { %> + <li><fmt:message key="supported.EID.sweden"/></li> + <li><fmt:message key="supported.EID.spain"/></li> + <% } else { %> + <li><fmt:message key="supported.EID.spain"/></li> + <li><fmt:message key="supported.EID.sweden"/></li> + <% } %> + <li><fmt:message key="supported.EID.switzerland"/></li> +</ul> +</div> +<div style="display: none;"> +<form id="submitform" name="submitform"> + <select id="source" name="source_filefreetext"> + <option name="none" value="none" selected="selected"></option> + </select> +</form> +</div> + +<!-- Form that sets the source choosed and eventually the text when free text is choosen. + This is for passing the information when the change language link was hit. --> + <form name="changelanguage" id="changelanguage" method="post" accept-charset="UTF-8" action="<%=baseUrl %>/jsp/supportedEID.jsp" target="_self"> + <% if (german) { %> + <input type="hidden" name="newlanguage" value="en"/> + <% } else { %> + <input type="hidden" name="newlanguage" value="de"/> + <% } %> + <input type="hidden" name="source_mode" value="file"/> + <input type="hidden" name="text" value=""/> + </form> + + <script language="javascript" type="text/javascript"> + checkHeight(); + detectBrowser(); + </script> + +</body> +</html>
\ No newline at end of file |