From ba156bcaecd97fab6d9f273de0d5de2707258ebf Mon Sep 17 00:00:00 2001 From: rpiazzi Date: Thu, 29 Sep 2011 11:14:57 +0000 Subject: Set src locations to dynamic (checking automatically if pdf-as or test-pdf-as is started) git-svn-id: https://joinup.ec.europa.eu/svn/pdf-as/trunk@847 7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c --- pdf-as-web/src/main/webapp/jsp/signupload.jsp | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) (limited to 'pdf-as-web') diff --git a/pdf-as-web/src/main/webapp/jsp/signupload.jsp b/pdf-as-web/src/main/webapp/jsp/signupload.jsp index 57d66e3..f3f8a48 100644 --- a/pdf-as-web/src/main/webapp/jsp/signupload.jsp +++ b/pdf-as-web/src/main/webapp/jsp/signupload.jsp @@ -24,6 +24,9 @@ session.removeAttribute(SessionAttributes.DOWNLOAD_URL_FOR_SIGNED_PDF_DOCUMENT); session.removeAttribute(SessionAttributes.SIGNED_PDF_DOCUMENT); + 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; @@ -54,7 +57,6 @@ else { session.setAttribute(SessionAttributes.LANGUAGE, "de"); } - } @@ -142,15 +144,15 @@ if (german) { %> - + <% } else { %> - + <% } } else { session.setAttribute("extern", "yes"); %> - + <% } %> @@ -391,7 +393,7 @@ fakeFileUpload.appendChild(input); var img = document.createElement('img'); - img.src = 'https://www.buergerkarte.at/pdf-as/images/durchsuchen.png'; + img.src = '<%=baseUrl%>/images/durchsuchen.png'; img.id = 'buttonimage'; var fakeButton = document.createElement('input'); @@ -442,12 +444,12 @@ //Show the fake image/button as it would be focused (mouse over) function focusButton() { - document.getElementById('buttonimage').src = 'https://www.buergerkarte.at/pdf-as/images/durchsuchen_aktiv.png'; + document.getElementById('buttonimage').src = '<%=baseUrl%>/images/durchsuchen_aktiv.png'; } //Show the fake image/button as it would be unfocused (mouse out) function unfocusButton() { - document.getElementById('buttonimage').src = 'https://www.buergerkarte.at/pdf-as/images/durchsuchen.png'; + document.getElementById('buttonimage').src = '<%=baseUrl%>/images/durchsuchen.png'; } //Change some size settings when IE7 is found @@ -768,10 +770,10 @@
- Handy + Handy
- +