summaryrefslogtreecommitdiff
path: root/src/main/webapp/wayf.jsp
diff options
context:
space:
mode:
authorLeif Johansson <leifj@sunet.se>2011-11-03 10:53:40 +0100
committerLeif Johansson <leifj@sunet.se>2011-11-03 10:53:40 +0100
commitb5c41b83249677bf1dec46de4a7ce97fee55729e (patch)
tree5e894d0a4b132f41a38a7004e8f65d40dcf037be /src/main/webapp/wayf.jsp
parent0a90384a9c7d840e88d9636271e8393a514647a0 (diff)
import 1.1.31.1.3
Diffstat (limited to 'src/main/webapp/wayf.jsp')
-rwxr-xr-x[-rw-r--r--]src/main/webapp/wayf.jsp125
1 files changed, 113 insertions, 12 deletions
diff --git a/src/main/webapp/wayf.jsp b/src/main/webapp/wayf.jsp
index 74ba11d..12d72da 100644..100755
--- a/src/main/webapp/wayf.jsp
+++ b/src/main/webapp/wayf.jsp
@@ -2,6 +2,7 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ page language="java" import="java.util.*,edu.internet2.middleware.shibboleth.wayf.*,java.lang.*" %>
<html>
<%@ taglib uri="/WEB-INF/tlds/struts-logic.tld" prefix="logic" %>
@@ -123,6 +124,7 @@
10 - Recently used sites hyperlinks
20 - <clear button for above>
+ 25 - AutoSuggestion
30 Federation selection
40 IdP within Selection
50 Select button
@@ -158,15 +160,14 @@ Select an identity provider
<!--CONFIG-->
The Service you are trying to reach requires that you
-authenticate with your home institution, please select it from the
-list below.
+authenticate with your home organization, enter the name below.
</p>
<logic:present name="cookieList" scope="request">
<h2>
-Recently used institutions:
+Recently used organizations:
</h2>
@@ -178,6 +179,7 @@ Recently used institutions:
simulating the user having specified a permanent cookie -->
</logic:present>
+
<logic:iterate id="site" name="cookieList">
<p class="text">
<logic:present name="entityID" scope="request">
@@ -186,7 +188,8 @@ Recently used institutions:
<bean:define id="ei" name="entityID" />
<bean:define id="re" name="returnX"/>
- <a tabindex="10" href="<bean:write name="requestURL" />?entityID=<%= java.net.URLEncoder.encode(ei.toString(), "utf-8") %>&return=<%= java.net.URLEncoder.encode(re.toString(), "utf-8") %>&returnIDxParam=<%= java.net.URLEncoder.encode( returnIDParam.toString(), "utf-8" ) %>&cache=perm&action=selection&origin=<jsp:getProperty name="site" property="name" />">
+ <a tabindex="10" href="<bean:write name="requestURL" />?entityID=<%= java.net.URLEncoder.encode(ei.toString(), "utf-8") %>&return=<%= java.net.URLEncoder.encode(re.toString(), "utf-8") %>&returnIDxParam=<%= java.net.URLEncoder.encode( returnIDParam.toString(), "utf-8" ) %>&cache=perm&action=selection&origin=<%=java.net.URLEncoder.encode(((IdPSite)site).getName())%>
+">
<jsp:getProperty name="site" property="displayName" />
</a>
</logic:present>
@@ -194,7 +197,7 @@ Recently used institutions:
<bean:define id="targ" name="target" />
<bean:define id="shire" name="shire" />
<bean:define id="pid" name="providerId" />
- <a tabindex="10" href="<bean:write name="requestURL" />?target=<%= java.net.URLEncoder.encode(targ.toString(),"utf-8") %>&shire=<%= java.net.URLEncoder.encode(shire.toString(),"utf-8") %>&providerId=<%= java.net.URLEncoder.encode(pid.toString(),"utf-8") %>&time=<bean:write name="time" />&cache=perm&action=selection&origin=<jsp:getProperty name="site" property="name" />">
+ <a tabindex="10" href="<bean:write name="requestURL" />?target=<%= java.net.URLEncoder.encode(targ.toString(),"utf-8") %>&shire=<%= java.net.URLEncoder.encode(shire.toString(),"utf-8") %>&providerId=<%= java.net.URLEncoder.encode(pid.toString(),"utf-8") %>&time=<bean:write name="time" />&cache=perm&action=selection&origin=<%=java.net.URLEncoder.encode(((IdPSite)site).getName())%>
<jsp:getProperty name="site"
property="displayName" />
</a>
@@ -230,13 +233,54 @@ Recently used institutions:
</div>
</form>
- </logic:present>
+ </logic:present> <!-- Previous Selections -->
- <div class="list">
+<logic:present name="showComments" scope="Request">
+
+<!-- PROGRAMMING NOTE
+
+ Add the "instant search" dialogue.
+
+</logic:present>
+ <div class="list">
+ <logic:present name="sites" scope="request">
+ <h2>
+ Enter institution name:
+ </h2>
+ <form autocomplete="OFF" action="">
+ <div>
+ <logic:notPresent name="entityID" scope="request">
+ <input type="hidden" name="shire" value="<bean:write name="shire" />" />
+ <input type="hidden" name="target" value="<bean:write name="target" />" />
+ <input type="hidden" name="providerId" value="<bean:write name="providerId" />" />
+ <logic:present name="time" scope="request">
+ <input type="hidden" name="time" value="<bean:write name="time" />" />
+ </logic:present>
+ </logic:notPresent>
+ <logic:present name="entityID" scope="request">
+ <input type="hidden" name="entityID" value="<bean:write name="entityID" />" />
+ <input type="hidden" name="returnX" value="<bean:write name="returnX" />" />
+ <input type="hidden" name="returnIDParam" value="<bean:write name="returnIDParam" />" />
+ </logic:present>
+ <input type="hidden" id="enterOrigin" name="origin" value="unspec" />
+ <input type="hidden" id="enterType" name="action" value="search" />
+ <input type="text" id="enterText" name="string" value="" tabindex="25" size="54"/>
+ <input type="submit" id="enterSubmit" value="Search"/>
+ <input type="hidden" name="cache" value="perm"/>
+ </div>
+ </form>
+ </logic:present>
+
<h2>
-Choose from a list:
+<logic:present name="showComments" scope="Request">
+
+Provide a static drop down or a dynamically republished one. - you may wish to remove this code
+
+</logic:present>
+
+Or choose from a list:
</h2>
@@ -259,7 +303,7 @@ Choose from a list:
<input type="hidden" name="returnIDParam" value="<bean:write name="returnIDParam" />" />
</logic:present>
<input type="hidden" name="action" value="selection" />
- <select name="origin" tabindex="40">
+ <select name="origin" id="hackForie6" tabindex="40">
<logic:iterate id="site" name="sites">
<option value="<jsp:getProperty name="site" property="name" />">
<jsp:getProperty name="site" property="displayName" />
@@ -314,7 +358,7 @@ Choose from a list:
<table id="tab">
<tr>
<th>Federation </th>
- <th>Institution</th>
+ <th>organization</th>
</tr>
<tr><td>
<select name="FedSelector" size="10" id="FedSelect" tabindex="30"
@@ -378,7 +422,14 @@ Choose from a list:
</form>
</logic:present>
</div>
+
+
<div class="search">
+
+<logic:present name="showComments" scope="Request">
+
+<!-- This is here for completeness - it shows the "old fashioned way" to do search -->
+
<span class="option">or</span>
<h2>
@@ -412,6 +463,9 @@ Search by keyword:
</div>
</form>
+<!-- The end of the old code. Below is where search results go -->
+
+</logic:present>
<logic:present name="searchResultsEmpty" scope="request">
<p class="error">
@@ -540,8 +594,55 @@ function changedFed(X, Selected) {
-->
</script>
</logic:present>
-
+
+<logic:present name="sites" scope="request">
+
+<logic:present name="showComments" scope="Request">
+ <!-- Load the autosuggest code.
+
+ PROGRAMMING NOTE - the "ie6Hack" is to do with an issue in ie6 in which the
+ psuedo drop down floats below the real dropdown. The hack is that we jsut disable
+ the real drop down when the pseudo one is about. This can seem weird for some
+ layouts and so if you are not deploying against ie6 you can just send an
+ empty array.
+ -->
+</logic:present>
+ <script language="javascript" type="text/javascript" src="Suggest.js"></script>
+ <script language="javascript" type="text/javascript">
+<!--
+window.onload = function() {
+
+<logic:notPresent name="siteLists" scope="request">
+ var ie6Hack = [ document.getElementById("hackForie6")];
+</logic:notPresent>
+
+<logic:present name="siteLists" scope="request">
+ var ie6Hack = [ document.getElementById("FedSelect"), document.getElementById("originIdp")];
+</logic:present>
+ var control = new TypeAheadControl(theElements,
+ document.getElementById("enterText"),
+ document.getElementById("enterOrigin"),
+ document.getElementById("enterSubmit"),
+ document.getElementById("enterType"),
+ ie6Hack);
+
+
+ document.getElementById("enterText").focus();
+}
+
+
+var theElements = [
+ <logic:iterate id="site" name="sites">
+ ["<%= ((edu.internet2.middleware.shibboleth.wayf.IdPSite)site).getDisplayName().replace("\n","").toString() %>",
+ "<jsp:getProperty name="site" property="name" />"],
+ </logic:iterate>
+ ];
+
+-->
+ </script>
+</logic:present>
+
</body>
</html>
- \ No newline at end of file
+