From: <bra...@us...> - 2008-08-14 01:57:55
|
Revision: 2546 http://archive-access.svn.sourceforge.net/archive-access/?rev=2546&view=rev Author: bradtofel Date: 2008-08-14 01:58:05 +0000 (Thu, 14 Aug 2008) Log Message: ----------- INITIAL REV: template .jsp usable in Query, Exception, Replay insert context to draw an HTML select with date options for AnchorWindow. Automatically selects the correct option based on cookie information, and uses Javascript to update the cookie value when the select value is changed. Added Paths: ----------- trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/template/AnchorWindow.jsp Added: trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/template/AnchorWindow.jsp =================================================================== --- trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/template/AnchorWindow.jsp (rev 0) +++ trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/template/AnchorWindow.jsp 2008-08-14 01:58:05 UTC (rev 2546) @@ -0,0 +1,20 @@ +<%@ + page language="java" pageEncoding="utf-8" contentType="text/html;charset=utf-8" +%><%@ + page import="org.archive.wayback.core.UIResults" +%><%@ + page import="org.archive.wayback.core.WaybackRequest" +%><%@ page import="org.archive.wayback.util.html.SelectHTML" +%><% +SelectHTML window = new SelectHTML("foo"); +window.setProps("onchange=\"SetAnchorWindow(this.value); location.reload(true);\""); +window.addOption("none","0"); +window.addOption("1 day","86400"); +window.addOption("1 week","604800"); +window.addOption("1 month","2592000"); +window.addOption("1 year","31536000"); +window.addOption("10 years","315360000"); +UIResults results = UIResults.getGeneric(request); +WaybackRequest wbr = results.getWbRequest(); +window.setActive(wbr.get(WaybackRequest.REQUEST_ANCHOR_WINDOW)); +%><jsp:include page="/WEB-INF/template/CookieJS.jsp" flush="true" /><%= window.draw() %> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |