You can subscribe to this list here.
2005 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
(10) |
Sep
(36) |
Oct
(339) |
Nov
(103) |
Dec
(152) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2006 |
Jan
(141) |
Feb
(102) |
Mar
(125) |
Apr
(203) |
May
(57) |
Jun
(30) |
Jul
(139) |
Aug
(46) |
Sep
(64) |
Oct
(105) |
Nov
(34) |
Dec
(162) |
2007 |
Jan
(81) |
Feb
(57) |
Mar
(141) |
Apr
(72) |
May
(9) |
Jun
(1) |
Jul
(144) |
Aug
(88) |
Sep
(40) |
Oct
(43) |
Nov
(34) |
Dec
(20) |
2008 |
Jan
(44) |
Feb
(45) |
Mar
(16) |
Apr
(36) |
May
(8) |
Jun
(77) |
Jul
(177) |
Aug
(66) |
Sep
(8) |
Oct
(33) |
Nov
(13) |
Dec
(37) |
2009 |
Jan
(2) |
Feb
(5) |
Mar
(8) |
Apr
|
May
(36) |
Jun
(19) |
Jul
(46) |
Aug
(8) |
Sep
(1) |
Oct
(66) |
Nov
(61) |
Dec
(10) |
2010 |
Jan
(13) |
Feb
(16) |
Mar
(38) |
Apr
(76) |
May
(47) |
Jun
(32) |
Jul
(35) |
Aug
(45) |
Sep
(20) |
Oct
(61) |
Nov
(24) |
Dec
(16) |
2011 |
Jan
(22) |
Feb
(34) |
Mar
(11) |
Apr
(8) |
May
(24) |
Jun
(23) |
Jul
(11) |
Aug
(42) |
Sep
(81) |
Oct
(48) |
Nov
(21) |
Dec
(20) |
2012 |
Jan
(30) |
Feb
(25) |
Mar
(4) |
Apr
(6) |
May
(1) |
Jun
(5) |
Jul
(5) |
Aug
(8) |
Sep
(6) |
Oct
(6) |
Nov
|
Dec
|
From: <bra...@us...> - 2010-08-03 00:34:53
|
Revision: 3205 http://archive-access.svn.sourceforge.net/archive-access/?rev=3205&view=rev Author: bradtofel Date: 2010-08-03 00:34:47 +0000 (Tue, 03 Aug 2010) Log Message: ----------- LiveWebDisclaimer now looks quite similar to the standard Toolbar, tweaked CSS in normal Toolbar Modified Paths: -------------- trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/replay/LiveWebDisclaimer.jsp trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/replay/Toolbar.jsp Modified: trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/replay/LiveWebDisclaimer.jsp =================================================================== --- trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/replay/LiveWebDisclaimer.jsp 2010-08-03 00:33:59 UTC (rev 3204) +++ trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/replay/LiveWebDisclaimer.jsp 2010-08-03 00:34:47 UTC (rev 3205) @@ -1,36 +1,75 @@ -<%@ - page language="java" pageEncoding="utf-8" contentType="text/html;charset=utf-8" -%><%@ - page import="org.archive.wayback.core.CaptureSearchResult" -%><%@ - page import="org.archive.wayback.core.UIResults" -%><%@ - page import="org.archive.wayback.core.WaybackRequest" -%><%@ - page import="org.archive.wayback.util.StringFormatter" +<%@ page language="java" pageEncoding="utf-8" contentType="text/html;charset=utf-8" +%><%@ page import="java.util.Date" +%><%@ page import="org.archive.wayback.core.CaptureSearchResult" +%><%@ page import="org.archive.wayback.core.UIResults" +%><%@ page import="org.archive.wayback.core.WaybackRequest" +%><%@ page import="org.archive.wayback.util.url.UrlOperations" +%><%@ page import="org.archive.wayback.util.StringFormatter" %><% UIResults results = UIResults.extractReplay(request); CaptureSearchResult result = results.getResult(); -WaybackRequest wbr = results.getWbRequest(); -StringFormatter fmt = wbr.getFormatter(); -String contextRoot = results.getStaticPrefix(); +WaybackRequest wbRequest = results.getWbRequest(); +StringFormatter fmt = wbRequest.getFormatter(); -String urlString = fmt.escapeHtml(wbr.getRequestUrl()); +String staticPrefix = results.getStaticPrefix(); +String queryPrefix = results.getQueryPrefix(); +String replayPrefix = results.getReplayPrefix(); + +String searchUrl = + UrlOperations.stripDefaultPortFromUrl(wbRequest.getRequestUrl()); +String searchUrlSafe = fmt.escapeHtml(searchUrl); + +Date captureDate = result.getCaptureDate(); +Date now = new Date(); +long capMSSE = captureDate.getTime(); +long nowMSSE = now.getTime(); +long ageMS = nowMSSE - capMSSE; +long ageMins = Math.round(ageMS / (60 * 1000)); + String prettyDateTime = fmt.format("MetaReplay.captureDateDisplay", result.getCaptureDate()); %> <!-- Start of LiveWebDisclaimer.jsp output --> -<div id="wm-disclaim-banner" style="display:none; position:relative; z-index:99999; background-color:#ffffff; font-size:10px; text-align:center; width:100%;"> - The URL you requested, <%= urlString %> does not exist in this archive. - Wayback is showing you a document captured <b>very recently</b> from the live web. The version of the document - you are now seeing, archived at <%= prettyDateTime %>, will become part of - the permanent archive after it has been added to the archive index. + +<style type="text/css">body{margin-top:0!important;padding-top:0!important;min-width:800px!important;}#wm-ipp a:hover{text-decoration:underline!important;}</style> +<div id="wm-ipp" style="display:none; position:relative;padding:0 5px;min-height:70px;min-width:800px; z-index:9000;"> +<div id="wm-ipp-inside" style="position:fixed;padding:0!important;margin:0!important;width:97%;min-width:780px;border:5px solid #000;border-top:none;background-image:url(<%= staticPrefix %>images/toolbar/wm_tb_bk_trns.png);text-align:center;-moz-box-shadow:1px 1px 3px #333;-webkit-box-shadow:1px 1px 3px #333;box-shadow:1px 1px 3px #333;font-size:11px!important;font-family:'Lucida Grande','Arial',sans-serif!important;"> + <table style="border-collapse:collapse;margin:0;padding:0;width:100%;"><tbody><tr> + <td style="padding:10px;vertical-align:top;min-width:110px;"> + <a href="<%= queryPrefix %>" title="Wayback Machine home page" style="background-color:transparent;border:none;"><img src="<%= staticPrefix %>images/toolbar/wayback-toolbar-logo.png" alt="Wayback Machine" width="110" height="39" border="0"/></a> + </td> + <td style="padding:0!important;text-align:center;vertical-align:top;width:100%;"> + + <table style="border-collapse:collapse;margin:0 auto;padding:0;width:570px;"><tbody><tr> + <td style="padding:3px 0;" colspan="2"> + <form target="_top" method="get" action="<%= queryPrefix %>query" name="wmtb" id="wmtb" style="margin:0!important;padding:0!important;"><input type="text" name="<%= WaybackRequest.REQUEST_URL %>" id="wmtbURL" value="<%= searchUrlSafe %>" style="width:400px;font-size:11px;font-family:'Lucida Grande','Arial',sans-serif;"/><input type="hidden" name="<%= WaybackRequest.REQUEST_TYPE %>" value="<%= WaybackRequest.REQUEST_REPLAY_QUERY %>"><input type="hidden" name="<%= WaybackRequest.REQUEST_DATE %>" value="<%= result.getCaptureTimestamp() %>"><input type="submit" value="Go" style="font-size:11px;font-family:'Lucida Grande','Arial',sans-serif;margin-left:5px;"/><span id="wm_tb_options" style="display:block;"></span></form> + </td> + </tr> + <tr> + <td style="padding:0!important;"> + <table style="border-collapse:collapse;margin:0;padding:0;width:100%;"><tbody><tr> + <td rowspan="2" style="padding-right:10px!important;"><img src="<%= staticPrefix %>images/toolbar/icon_alert.png" width="24" height="24" border="0" alt="Alert!"/></td> + <td style="font-family:'Arial',sans-serif;font-size:14px;font-weight:700;color:#2eaeec; text-align:left;">The Wayback Machine hasn't archived a capture for that URL.</td> + </tr> + <tr> + <td style="font-family:'Georgia',serif;font-size:13px;color:#333; text-align:left;">Here's a capture taken <%= ageMins %> minutes ago from the live web that will become part of the permanent archive in the next few months.</td> + </tr></tbody></table> + </td> + </tr></tbody></table> + </td> + <td style="text-align:right;padding:5px;width:65px;font-size:11px!important;"> + <a href="javascript:;" onclick="document.getElementById('wm-ipp').style.display='none';" style="display:block;padding-right:18px;background:url(<%= staticPrefix %>images/toolbar/wm_tb_close.png) no-repeat 100% 0;color:#33f;font-family:'Lucida Grande','Arial',sans-serif;margin-bottom:23px;background-color:transparent;border:none;" title="<%= fmt.format("ToolBar.closeTitle") %>"><%= fmt.format("ToolBar.closeText") %></a> + <a href="https://webarchive.jira.com/wiki/display/WWMOS/FAQs" style="display:block;padding-right:18px;background:url(<%= staticPrefix %>images/toolbar/wm_tb_help.png) no-repeat 100% 0;color:#33f;font-family:'Lucida Grande','Arial',sans-serif;background-color:transparent;border:none;" title="<%= fmt.format("ToolBar.helpTitle") %>"><%= fmt.format("ToolBar.helpText") %></a> + </td> + </tr></tbody></table> + </div> -<script type="text/javascript" src="<%= contextRoot %>js/disclaim-element.js" ></script> +</div> +<script type="text/javascript" src="<%= staticPrefix %>js/disclaim-element.js" ></script> <script type="text/javascript"> - var wmDisclaimBanner = document.getElementById("wm-disclaim-banner"); + var wmDisclaimBanner = document.getElementById("wm-ipp"); if(wmDisclaimBanner != null) { disclaimElement(wmDisclaimBanner); } </script> -<!-- End of LiveWebDisclaimer.jsp output --> \ No newline at end of file +<!-- End of LiveWebDisclaimer.jsp output --> Modified: trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/replay/Toolbar.jsp =================================================================== --- trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/replay/Toolbar.jsp 2010-08-03 00:33:59 UTC (rev 3204) +++ trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/replay/Toolbar.jsp 2010-08-03 00:34:47 UTC (rev 3205) @@ -167,7 +167,7 @@ <div id="wm-ipp" style="display:none; position:relative;padding:0 5px;min-height:70px;min-width:800px; z-index:9000;"> <div id="wm-ipp-inside" style="position:fixed;padding:0!important;margin:0!important;width:97%;min-width:780px;border:5px solid #000;border-top:none;background-image:url(<%= staticPrefix %>images/toolbar/wm_tb_bk_trns.png);text-align:center;-moz-box-shadow:1px 1px 3px #333;-webkit-box-shadow:1px 1px 3px #333;box-shadow:1px 1px 3px #333;font-size:11px!important;font-family:'Lucida Grande','Arial',sans-serif!important;"> <table style="border-collapse:collapse;margin:0;padding:0;width:100%;"><tbody><tr> - <td style="padding:10px;vertical-align:top;min-width:140px;"> + <td style="padding:10px;vertical-align:top;min-width:110px;"> <a href="<%= queryPrefix %>" title="Wayback Machine home page" style="background-color:transparent;border:none;"><img src="<%= staticPrefix %>images/toolbar/wayback-toolbar-logo.png" alt="Wayback Machine" width="110" height="39" border="0"/></a> </td> <td style="padding:0!important;text-align:center;vertical-align:top;width:100%;"> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bra...@us...> - 2010-08-03 00:34:05
|
Revision: 3204 http://archive-access.svn.sourceforge.net/archive-access/?rev=3204&view=rev Author: bradtofel Date: 2010-08-03 00:33:59 +0000 (Tue, 03 Aug 2010) Log Message: ----------- CSS + copy edits Modified Paths: -------------- trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/query/BubbleCalendar.jsp Modified: trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/query/BubbleCalendar.jsp =================================================================== --- trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/query/BubbleCalendar.jsp 2010-08-03 00:33:16 UTC (rev 3203) +++ trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/query/BubbleCalendar.jsp 2010-08-03 00:33:59 UTC (rev 3204) @@ -164,7 +164,7 @@ positions: ['top','right','left','bottom'], contentSelector: "$(this).find('.pop').html()", padding: 0, - width: '115px', + width: '130px', spikeGirth: 8, spikeLength: 8, overlap: 0, @@ -216,8 +216,8 @@ </form> <div id="wbMeta"> - <p class="wbThis"><a href="<%= data.searchUrlForHTML %>"><%= data.searchUrlForHTML %></a> has been crawled <strong><%= fmt.format("{0} times",data.numResults) %></strong> going all the way back to <a href="firstcapture"><%= fmt.format("{0,date,MMMM d, yyyy}",data.firstResultDate) %></a>.</p> - <p class="wbNote">A crawl can be a duplicate of the last one. It happens about [num]% of the time across [NUM] websites. <a href="https://webarchive.jira.com/wiki/display/WWMOS/FAQs">FAQ</a></p> + <p class="wbThis"><a href="<%= data.searchUrlForHTML %>"><%= data.searchUrlForHTML %></a> has been crawled <strong><%= fmt.format("{0} times",data.numResults) %></strong> going all the way back to <a href="<%= data.firstResultReplayUrl %>"><%= fmt.format("{0,date,MMMM d, yyyy}",data.firstResultDate) %></a>.</p> + <p class="wbNote">A crawl can be a duplicate of the last one. It happens about 25% of the time across 420,000,000 websites. <a href="https://webarchive.jira.com/wiki/display/WWMOS/FAQs">FAQ</a></p> </div> </div> @@ -459,4 +459,11 @@ } %> </div> + </div> + <div id="wbCalNote"> + <h2>Note</h2> + <p>This calendar view maps the number of times <%= data.searchUrlForHTML %> was crawled by the Wayback Machine, <em>not</em> how many times the site was actually updated. More info in the <a href="https://webarchive.jira.com/wiki/display/WWMOS/FAQs">FAQ</a>.</p> + </div> +</div> + <jsp:include page="/WEB-INF/global-template/UI-footer.jsp" flush="true" /> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bra...@us...> - 2010-08-03 00:33:22
|
Revision: 3203 http://archive-access.svn.sourceforge.net/archive-access/?rev=3203&view=rev Author: bradtofel Date: 2010-08-03 00:33:16 +0000 (Tue, 03 Aug 2010) Log Message: ----------- about to remove all "wrap" references.. Modified Paths: -------------- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/webapp/AccessPoint.java Modified: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/webapp/AccessPoint.java =================================================================== --- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/webapp/AccessPoint.java 2010-08-03 00:31:10 UTC (rev 3202) +++ trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/webapp/AccessPoint.java 2010-08-03 00:33:16 UTC (rev 3203) @@ -83,7 +83,7 @@ public class AccessPoint extends AbstractRequestHandler implements ShutdownListener { /** webapp relative location of Interstitial.jsp */ - public final static String INTERSTITIAL_JSP = "jsp/Interstitial-wrap.jsp"; + public final static String INTERSTITIAL_JSP = "jsp/Interstitial.jsp"; /** argument for Interstitial.jsp target URL */ public final static String INTERSTITIAL_TARGET = "target"; /** argument for Interstitial.jsp seconds to delay */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bra...@us...> - 2010-08-03 00:31:16
|
Revision: 3202 http://archive-access.svn.sourceforge.net/archive-access/?rev=3202&view=rev Author: bradtofel Date: 2010-08-03 00:31:10 +0000 (Tue, 03 Aug 2010) Log Message: ----------- renaming, plus minor edits. Added Paths: ----------- trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/jsp/Interstitial.jsp Removed Paths: ------------- trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/jsp/Interstitial-wrap.jsp Deleted: trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/jsp/Interstitial-wrap.jsp =================================================================== --- trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/jsp/Interstitial-wrap.jsp 2010-08-03 00:28:36 UTC (rev 3201) +++ trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/jsp/Interstitial-wrap.jsp 2010-08-03 00:31:10 UTC (rev 3202) @@ -1,42 +0,0 @@ -<%@ page import="org.archive.wayback.webapp.AccessPoint" -%><%@ page import="org.archive.wayback.util.StringFormatter" -%><% -String toUrl = request.getParameter(AccessPoint.INTERSTITIAL_TARGET); -if(toUrl == null) { - response.setStatus(400); -%> - Bad request. require argument <%= AccessPoint.INTERSTITIAL_TARGET %> -<% -} else { - String secsS = request.getParameter(AccessPoint.INTERSTITIAL_SECONDS); - int secs = 5; - try { - secs = Integer.parseInt(secsS); - } catch (NumberFormatException e) { - - } - if(secs < 1) { - secs = 5; - } - StringFormatter f = new StringFormatter(null,null); - String safeTargetUrl = f.escapeHtml(toUrl); - String safeTargetUrlJS = f.escapeJavaScript(toUrl); - %> - <script type="text/javascript"> - function go() { - document.location.href = "<%= safeTargetUrlJS %>"; - } - window.setTimeout("go()",<%= secs * 1000 %>); - </script> - <p> - Thanks for visiting the Wayback Machine. We're about to redirect you - to the page you requested: - </p> - <p><%= safeTargetUrl %></p> - <p> - in <%= secs %> seconds. - Click <a href="<%= safeTargetUrl %>">here</a> to go now. - </p> -<% -} -%> \ No newline at end of file Copied: trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/jsp/Interstitial.jsp (from rev 3153, trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/jsp/Interstitial-wrap.jsp) =================================================================== --- trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/jsp/Interstitial.jsp (rev 0) +++ trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/jsp/Interstitial.jsp 2010-08-03 00:31:10 UTC (rev 3202) @@ -0,0 +1,55 @@ +<%@ page import="org.archive.wayback.webapp.AccessPoint" +%><%@ page import="org.archive.wayback.util.StringFormatter" +%><% +String toUrl = request.getParameter(AccessPoint.INTERSTITIAL_TARGET); +if(toUrl == null) { + response.setStatus(400); +%> + Bad request. require argument <%= AccessPoint.INTERSTITIAL_TARGET %> +<% +} else { + String secsS = request.getParameter(AccessPoint.INTERSTITIAL_SECONDS); + int secs = 5; + try { + secs = Integer.parseInt(secsS); + } catch (NumberFormatException e) { + + } + if(secs < 1) { + secs = 5; + } + StringFormatter f = new StringFormatter(null,null); + String safeTargetUrl = f.escapeHtml(toUrl); + String safeTargetUrlJS = f.escapeJavaScript(toUrl); + %> + <jsp:include page="/WEB-INF/global-template/UI-header.jsp" flush="true" /> + + <div id="positionHome"> + <section> + <div id="logoHome"> + <a href="/index.jsp"><h1><span>Internet Archive's Wayback Machine</span></h1></a> + </div> + </section> + <section> + <div id="error"> + <script type="text/javascript"> + function go() { + document.location.href = "<%= safeTargetUrlJS %>"; + } + window.setTimeout("go()",<%= secs * 1000 %>); + </script> + <h2 class="blue">Hello.</h2> + <p class="code">Loading...</p> + <p class="code shift">[Month 00, 0000]</p> + <p class="code">Loading...</p> + <p class="code shift"><%= safeTargetUrl %></p> + <p class="impatient"><a href="<%= safeTargetUrl %>">Impatient?</a></p> +<% +} +%> + + </div> + </section> + <div id="errorBorder"></div> + +<jsp:include page="/WEB-INF/global-template/UI-footer.jsp" flush="true" /> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bra...@us...> - 2010-08-03 00:28:43
|
Revision: 3201 http://archive-access.svn.sourceforge.net/archive-access/?rev=3201&view=rev Author: bradtofel Date: 2010-08-03 00:28:36 +0000 (Tue, 03 Aug 2010) Log Message: ----------- possibly temporary addition of jquery: need to decide if Wayback should ship with this, or if there's a more canonical URL we should use. Added Paths: ----------- trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/js/excanvas.compiled.js trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/js/jquery-1.4.2.min.js trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/js/jquery.bt.min.js trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/js/jquery.dataTables.min.js trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/js/jquery.hoverintent.min.js Added: trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/js/excanvas.compiled.js =================================================================== --- trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/js/excanvas.compiled.js (rev 0) +++ trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/js/excanvas.compiled.js 2010-08-03 00:28:36 UTC (rev 3201) @@ -0,0 +1,35 @@ +// Copyright 2006 Google Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +document.createElement("canvas").getContext||(function(){var s=Math,j=s.round,F=s.sin,G=s.cos,V=s.abs,W=s.sqrt,k=10,v=k/2;function X(){return this.context_||(this.context_=new H(this))}var L=Array.prototype.slice;function Y(b,a){var c=L.call(arguments,2);return function(){return b.apply(a,c.concat(L.call(arguments)))}}var M={init:function(b){if(/MSIE/.test(navigator.userAgent)&&!window.opera){var a=b||document;a.createElement("canvas");a.attachEvent("onreadystatechange",Y(this.init_,this,a))}},init_:function(b){b.namespaces.g_vml_|| +b.namespaces.add("g_vml_","urn:schemas-microsoft-com:vml","#default#VML");b.namespaces.g_o_||b.namespaces.add("g_o_","urn:schemas-microsoft-com:office:office","#default#VML");if(!b.styleSheets.ex_canvas_){var a=b.createStyleSheet();a.owningElement.id="ex_canvas_";a.cssText="canvas{display:inline-block;overflow:hidden;text-align:left;width:300px;height:150px}g_vml_\\:*{behavior:url(#default#VML)}g_o_\\:*{behavior:url(#default#VML)}"}var c=b.getElementsByTagName("canvas"),d=0;for(;d<c.length;d++)this.initElement(c[d])}, +initElement:function(b){if(!b.getContext){b.getContext=X;b.innerHTML="";b.attachEvent("onpropertychange",Z);b.attachEvent("onresize",$);var a=b.attributes;if(a.width&&a.width.specified)b.style.width=a.width.nodeValue+"px";else b.width=b.clientWidth;if(a.height&&a.height.specified)b.style.height=a.height.nodeValue+"px";else b.height=b.clientHeight}return b}};function Z(b){var a=b.srcElement;switch(b.propertyName){case "width":a.style.width=a.attributes.width.nodeValue+"px";a.getContext().clearRect(); +break;case "height":a.style.height=a.attributes.height.nodeValue+"px";a.getContext().clearRect();break}}function $(b){var a=b.srcElement;if(a.firstChild){a.firstChild.style.width=a.clientWidth+"px";a.firstChild.style.height=a.clientHeight+"px"}}M.init();var N=[],B=0;for(;B<16;B++){var C=0;for(;C<16;C++)N[B*16+C]=B.toString(16)+C.toString(16)}function I(){return[[1,0,0],[0,1,0],[0,0,1]]}function y(b,a){var c=I(),d=0;for(;d<3;d++){var f=0;for(;f<3;f++){var h=0,g=0;for(;g<3;g++)h+=b[d][g]*a[g][f];c[d][f]= +h}}return c}function O(b,a){a.fillStyle=b.fillStyle;a.lineCap=b.lineCap;a.lineJoin=b.lineJoin;a.lineWidth=b.lineWidth;a.miterLimit=b.miterLimit;a.shadowBlur=b.shadowBlur;a.shadowColor=b.shadowColor;a.shadowOffsetX=b.shadowOffsetX;a.shadowOffsetY=b.shadowOffsetY;a.strokeStyle=b.strokeStyle;a.globalAlpha=b.globalAlpha;a.arcScaleX_=b.arcScaleX_;a.arcScaleY_=b.arcScaleY_;a.lineScale_=b.lineScale_}function P(b){var a,c=1;b=String(b);if(b.substring(0,3)=="rgb"){var d=b.indexOf("(",3),f=b.indexOf(")",d+ +1),h=b.substring(d+1,f).split(",");a="#";var g=0;for(;g<3;g++)a+=N[Number(h[g])];if(h.length==4&&b.substr(3,1)=="a")c=h[3]}else a=b;return{color:a,alpha:c}}function aa(b){switch(b){case "butt":return"flat";case "round":return"round";case "square":default:return"square"}}function H(b){this.m_=I();this.mStack_=[];this.aStack_=[];this.currentPath_=[];this.fillStyle=this.strokeStyle="#000";this.lineWidth=1;this.lineJoin="miter";this.lineCap="butt";this.miterLimit=k*1;this.globalAlpha=1;this.canvas=b; +var a=b.ownerDocument.createElement("div");a.style.width=b.clientWidth+"px";a.style.height=b.clientHeight+"px";a.style.overflow="hidden";a.style.position="absolute";b.appendChild(a);this.element_=a;this.lineScale_=this.arcScaleY_=this.arcScaleX_=1}var i=H.prototype;i.clearRect=function(){this.element_.innerHTML=""};i.beginPath=function(){this.currentPath_=[]};i.moveTo=function(b,a){var c=this.getCoords_(b,a);this.currentPath_.push({type:"moveTo",x:c.x,y:c.y});this.currentX_=c.x;this.currentY_=c.y}; +i.lineTo=function(b,a){var c=this.getCoords_(b,a);this.currentPath_.push({type:"lineTo",x:c.x,y:c.y});this.currentX_=c.x;this.currentY_=c.y};i.bezierCurveTo=function(b,a,c,d,f,h){var g=this.getCoords_(f,h),l=this.getCoords_(b,a),e=this.getCoords_(c,d);Q(this,l,e,g)};function Q(b,a,c,d){b.currentPath_.push({type:"bezierCurveTo",cp1x:a.x,cp1y:a.y,cp2x:c.x,cp2y:c.y,x:d.x,y:d.y});b.currentX_=d.x;b.currentY_=d.y}i.quadraticCurveTo=function(b,a,c,d){var f=this.getCoords_(b,a),h=this.getCoords_(c,d),g={x:this.currentX_+ +0.6666666666666666*(f.x-this.currentX_),y:this.currentY_+0.6666666666666666*(f.y-this.currentY_)};Q(this,g,{x:g.x+(h.x-this.currentX_)/3,y:g.y+(h.y-this.currentY_)/3},h)};i.arc=function(b,a,c,d,f,h){c*=k;var g=h?"at":"wa",l=b+G(d)*c-v,e=a+F(d)*c-v,m=b+G(f)*c-v,r=a+F(f)*c-v;if(l==m&&!h)l+=0.125;var n=this.getCoords_(b,a),o=this.getCoords_(l,e),q=this.getCoords_(m,r);this.currentPath_.push({type:g,x:n.x,y:n.y,radius:c,xStart:o.x,yStart:o.y,xEnd:q.x,yEnd:q.y})};i.rect=function(b,a,c,d){this.moveTo(b, +a);this.lineTo(b+c,a);this.lineTo(b+c,a+d);this.lineTo(b,a+d);this.closePath()};i.strokeRect=function(b,a,c,d){var f=this.currentPath_;this.beginPath();this.moveTo(b,a);this.lineTo(b+c,a);this.lineTo(b+c,a+d);this.lineTo(b,a+d);this.closePath();this.stroke();this.currentPath_=f};i.fillRect=function(b,a,c,d){var f=this.currentPath_;this.beginPath();this.moveTo(b,a);this.lineTo(b+c,a);this.lineTo(b+c,a+d);this.lineTo(b,a+d);this.closePath();this.fill();this.currentPath_=f};i.createLinearGradient=function(b, +a,c,d){var f=new D("gradient");f.x0_=b;f.y0_=a;f.x1_=c;f.y1_=d;return f};i.createRadialGradient=function(b,a,c,d,f,h){var g=new D("gradientradial");g.x0_=b;g.y0_=a;g.r0_=c;g.x1_=d;g.y1_=f;g.r1_=h;return g};i.drawImage=function(b){var a,c,d,f,h,g,l,e,m=b.runtimeStyle.width,r=b.runtimeStyle.height;b.runtimeStyle.width="auto";b.runtimeStyle.height="auto";var n=b.width,o=b.height;b.runtimeStyle.width=m;b.runtimeStyle.height=r;if(arguments.length==3){a=arguments[1];c=arguments[2];h=g=0;l=d=n;e=f=o}else if(arguments.length== +5){a=arguments[1];c=arguments[2];d=arguments[3];f=arguments[4];h=g=0;l=n;e=o}else if(arguments.length==9){h=arguments[1];g=arguments[2];l=arguments[3];e=arguments[4];a=arguments[5];c=arguments[6];d=arguments[7];f=arguments[8]}else throw Error("Invalid number of arguments");var q=this.getCoords_(a,c),t=[];t.push(" <g_vml_:group",' coordsize="',k*10,",",k*10,'"',' coordorigin="0,0"',' style="width:',10,"px;height:",10,"px;position:absolute;");if(this.m_[0][0]!=1||this.m_[0][1]){var E=[];E.push("M11=", +this.m_[0][0],",","M12=",this.m_[1][0],",","M21=",this.m_[0][1],",","M22=",this.m_[1][1],",","Dx=",j(q.x/k),",","Dy=",j(q.y/k),"");var p=q,z=this.getCoords_(a+d,c),w=this.getCoords_(a,c+f),x=this.getCoords_(a+d,c+f);p.x=s.max(p.x,z.x,w.x,x.x);p.y=s.max(p.y,z.y,w.y,x.y);t.push("padding:0 ",j(p.x/k),"px ",j(p.y/k),"px 0;filter:progid:DXImageTransform.Microsoft.Matrix(",E.join(""),", sizingmethod='clip');")}else t.push("top:",j(q.y/k),"px;left:",j(q.x/k),"px;");t.push(' ">','<g_vml_:image src="',b.src, +'"',' style="width:',k*d,"px;"," height:",k*f,'px;"',' cropleft="',h/n,'"',' croptop="',g/o,'"',' cropright="',(n-h-l)/n,'"',' cropbottom="',(o-g-e)/o,'"'," />","</g_vml_:group>");this.element_.insertAdjacentHTML("BeforeEnd",t.join(""))};i.stroke=function(b){var a=[],c=P(b?this.fillStyle:this.strokeStyle),d=c.color,f=c.alpha*this.globalAlpha;a.push("<g_vml_:shape",' filled="',!!b,'"',' style="position:absolute;width:',10,"px;height:",10,'px;"',' coordorigin="0 0" coordsize="',k*10," ",k*10,'"',' stroked="', +!b,'"',' path="');var h={x:null,y:null},g={x:null,y:null},l=0;for(;l<this.currentPath_.length;l++){var e=this.currentPath_[l];switch(e.type){case "moveTo":a.push(" m ",j(e.x),",",j(e.y));break;case "lineTo":a.push(" l ",j(e.x),",",j(e.y));break;case "close":a.push(" x ");e=null;break;case "bezierCurveTo":a.push(" c ",j(e.cp1x),",",j(e.cp1y),",",j(e.cp2x),",",j(e.cp2y),",",j(e.x),",",j(e.y));break;case "at":case "wa":a.push(" ",e.type," ",j(e.x-this.arcScaleX_*e.radius),",",j(e.y-this.arcScaleY_*e.radius), +" ",j(e.x+this.arcScaleX_*e.radius),",",j(e.y+this.arcScaleY_*e.radius)," ",j(e.xStart),",",j(e.yStart)," ",j(e.xEnd),",",j(e.yEnd));break}if(e){if(h.x==null||e.x<h.x)h.x=e.x;if(g.x==null||e.x>g.x)g.x=e.x;if(h.y==null||e.y<h.y)h.y=e.y;if(g.y==null||e.y>g.y)g.y=e.y}}a.push(' ">');if(b)if(typeof this.fillStyle=="object"){var m=this.fillStyle,r=0,n={x:0,y:0},o=0,q=1;if(m.type_=="gradient"){var t=m.x1_/this.arcScaleX_,E=m.y1_/this.arcScaleY_,p=this.getCoords_(m.x0_/this.arcScaleX_,m.y0_/this.arcScaleY_), +z=this.getCoords_(t,E);r=Math.atan2(z.x-p.x,z.y-p.y)*180/Math.PI;if(r<0)r+=360;if(r<1.0E-6)r=0}else{var p=this.getCoords_(m.x0_,m.y0_),w=g.x-h.x,x=g.y-h.y;n={x:(p.x-h.x)/w,y:(p.y-h.y)/x};w/=this.arcScaleX_*k;x/=this.arcScaleY_*k;var R=s.max(w,x);o=2*m.r0_/R;q=2*m.r1_/R-o}var u=m.colors_;u.sort(function(ba,ca){return ba.offset-ca.offset});var J=u.length,da=u[0].color,ea=u[J-1].color,fa=u[0].alpha*this.globalAlpha,ga=u[J-1].alpha*this.globalAlpha,S=[],l=0;for(;l<J;l++){var T=u[l];S.push(T.offset*q+ +o+" "+T.color)}a.push('<g_vml_:fill type="',m.type_,'"',' method="none" focus="100%"',' color="',da,'"',' color2="',ea,'"',' colors="',S.join(","),'"',' opacity="',ga,'"',' g_o_:opacity2="',fa,'"',' angle="',r,'"',' focusposition="',n.x,",",n.y,'" />')}else a.push('<g_vml_:fill color="',d,'" opacity="',f,'" />');else{var K=this.lineScale_*this.lineWidth;if(K<1)f*=K;a.push("<g_vml_:stroke",' opacity="',f,'"',' joinstyle="',this.lineJoin,'"',' miterlimit="',this.miterLimit,'"',' endcap="',aa(this.lineCap), +'"',' weight="',K,'px"',' color="',d,'" />')}a.push("</g_vml_:shape>");this.element_.insertAdjacentHTML("beforeEnd",a.join(""))};i.fill=function(){this.stroke(true)};i.closePath=function(){this.currentPath_.push({type:"close"})};i.getCoords_=function(b,a){var c=this.m_;return{x:k*(b*c[0][0]+a*c[1][0]+c[2][0])-v,y:k*(b*c[0][1]+a*c[1][1]+c[2][1])-v}};i.save=function(){var b={};O(this,b);this.aStack_.push(b);this.mStack_.push(this.m_);this.m_=y(I(),this.m_)};i.restore=function(){O(this.aStack_.pop(), +this);this.m_=this.mStack_.pop()};function ha(b){var a=0;for(;a<3;a++){var c=0;for(;c<2;c++)if(!isFinite(b[a][c])||isNaN(b[a][c]))return false}return true}function A(b,a,c){if(!!ha(a)){b.m_=a;if(c)b.lineScale_=W(V(a[0][0]*a[1][1]-a[0][1]*a[1][0]))}}i.translate=function(b,a){A(this,y([[1,0,0],[0,1,0],[b,a,1]],this.m_),false)};i.rotate=function(b){var a=G(b),c=F(b);A(this,y([[a,c,0],[-c,a,0],[0,0,1]],this.m_),false)};i.scale=function(b,a){this.arcScaleX_*=b;this.arcScaleY_*=a;A(this,y([[b,0,0],[0,a, +0],[0,0,1]],this.m_),true)};i.transform=function(b,a,c,d,f,h){A(this,y([[b,a,0],[c,d,0],[f,h,1]],this.m_),true)};i.setTransform=function(b,a,c,d,f,h){A(this,[[b,a,0],[c,d,0],[f,h,1]],true)};i.clip=function(){};i.arcTo=function(){};i.createPattern=function(){return new U};function D(b){this.type_=b;this.r1_=this.y1_=this.x1_=this.r0_=this.y0_=this.x0_=0;this.colors_=[]}D.prototype.addColorStop=function(b,a){a=P(a);this.colors_.push({offset:b,color:a.color,alpha:a.alpha})};function U(){}G_vmlCanvasManager= +M;CanvasRenderingContext2D=H;CanvasGradient=D;CanvasPattern=U})(); Added: trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/js/jquery-1.4.2.min.js =================================================================== --- trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/js/jquery-1.4.2.min.js (rev 0) +++ trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/js/jquery-1.4.2.min.js 2010-08-03 00:28:36 UTC (rev 3201) @@ -0,0 +1,154 @@ +/*! + * jQuery JavaScript Library v1.4.2 + * http://jquery.com/ + * + * Copyright 2010, John Resig + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * Includes Sizzle.js + * http://sizzlejs.com/ + * Copyright 2010, The Dojo Foundation + * Released under the MIT, BSD, and GPL Licenses. + * + * Date: Sat Feb 13 22:33:48 2010 -0500 + */ +(function(A,w){function ma(){if(!c.isReady){try{s.documentElement.doScroll("left")}catch(a){setTimeout(ma,1);return}c.ready()}}function Qa(a,b){b.src?c.ajax({url:b.src,async:false,dataType:"script"}):c.globalEval(b.text||b.textContent||b.innerHTML||"");b.parentNode&&b.parentNode.removeChild(b)}function X(a,b,d,f,e,j){var i=a.length;if(typeof b==="object"){for(var o in b)X(a,o,b[o],f,e,d);return a}if(d!==w){f=!j&&f&&c.isFunction(d);for(o=0;o<i;o++)e(a[o],b,f?d.call(a[o],o,e(a[o],b)):d,j);return a}return i? +e(a[0],b):w}function J(){return(new Date).getTime()}function Y(){return false}function Z(){return true}function na(a,b,d){d[0].type=a;return c.event.handle.apply(b,d)}function oa(a){var b,d=[],f=[],e=arguments,j,i,o,k,n,r;i=c.data(this,"events");if(!(a.liveFired===this||!i||!i.live||a.button&&a.type==="click")){a.liveFired=this;var u=i.live.slice(0);for(k=0;k<u.length;k++){i=u[k];i.origType.replace(O,"")===a.type?f.push(i.selector):u.splice(k--,1)}j=c(a.target).closest(f,a.currentTarget);n=0;for(r= +j.length;n<r;n++)for(k=0;k<u.length;k++){i=u[k];if(j[n].selector===i.selector){o=j[n].elem;f=null;if(i.preType==="mouseenter"||i.preType==="mouseleave")f=c(a.relatedTarget).closest(i.selector)[0];if(!f||f!==o)d.push({elem:o,handleObj:i})}}n=0;for(r=d.length;n<r;n++){j=d[n];a.currentTarget=j.elem;a.data=j.handleObj.data;a.handleObj=j.handleObj;if(j.handleObj.origHandler.apply(j.elem,e)===false){b=false;break}}return b}}function pa(a,b){return"live."+(a&&a!=="*"?a+".":"")+b.replace(/\./g,"`").replace(/ /g, +"&")}function qa(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function ra(a,b){var d=0;b.each(function(){if(this.nodeName===(a[d]&&a[d].nodeName)){var f=c.data(a[d++]),e=c.data(this,f);if(f=f&&f.events){delete e.handle;e.events={};for(var j in f)for(var i in f[j])c.event.add(this,j,f[j][i],f[j][i].data)}}})}function sa(a,b,d){var f,e,j;b=b&&b[0]?b[0].ownerDocument||b[0]:s;if(a.length===1&&typeof a[0]==="string"&&a[0].length<512&&b===s&&!ta.test(a[0])&&(c.support.checkClone||!ua.test(a[0]))){e= +true;if(j=c.fragments[a[0]])if(j!==1)f=j}if(!f){f=b.createDocumentFragment();c.clean(a,b,f,d)}if(e)c.fragments[a[0]]=j?f:1;return{fragment:f,cacheable:e}}function K(a,b){var d={};c.each(va.concat.apply([],va.slice(0,b)),function(){d[this]=a});return d}function wa(a){return"scrollTo"in a&&a.document?a:a.nodeType===9?a.defaultView||a.parentWindow:false}var c=function(a,b){return new c.fn.init(a,b)},Ra=A.jQuery,Sa=A.$,s=A.document,T,Ta=/^[^<]*(<[\w\W]+>)[^>]*$|^#([\w-]+)$/,Ua=/^.[^:#\[\.,]*$/,Va=/\S/, +Wa=/^(\s|\u00A0)+|(\s|\u00A0)+$/g,Xa=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,P=navigator.userAgent,xa=false,Q=[],L,$=Object.prototype.toString,aa=Object.prototype.hasOwnProperty,ba=Array.prototype.push,R=Array.prototype.slice,ya=Array.prototype.indexOf;c.fn=c.prototype={init:function(a,b){var d,f;if(!a)return this;if(a.nodeType){this.context=this[0]=a;this.length=1;return this}if(a==="body"&&!b){this.context=s;this[0]=s.body;this.selector="body";this.length=1;return this}if(typeof a==="string")if((d=Ta.exec(a))&& +(d[1]||!b))if(d[1]){f=b?b.ownerDocument||b:s;if(a=Xa.exec(a))if(c.isPlainObject(b)){a=[s.createElement(a[1])];c.fn.attr.call(a,b,true)}else a=[f.createElement(a[1])];else{a=sa([d[1]],[f]);a=(a.cacheable?a.fragment.cloneNode(true):a.fragment).childNodes}return c.merge(this,a)}else{if(b=s.getElementById(d[2])){if(b.id!==d[2])return T.find(a);this.length=1;this[0]=b}this.context=s;this.selector=a;return this}else if(!b&&/^\w+$/.test(a)){this.selector=a;this.context=s;a=s.getElementsByTagName(a);return c.merge(this, +a)}else return!b||b.jquery?(b||T).find(a):c(b).find(a);else if(c.isFunction(a))return T.ready(a);if(a.selector!==w){this.selector=a.selector;this.context=a.context}return c.makeArray(a,this)},selector:"",jquery:"1.4.2",length:0,size:function(){return this.length},toArray:function(){return R.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this.slice(a)[0]:this[a]},pushStack:function(a,b,d){var f=c();c.isArray(a)?ba.apply(f,a):c.merge(f,a);f.prevObject=this;f.context=this.context;if(b=== +"find")f.selector=this.selector+(this.selector?" ":"")+d;else if(b)f.selector=this.selector+"."+b+"("+d+")";return f},each:function(a,b){return c.each(this,a,b)},ready:function(a){c.bindReady();if(c.isReady)a.call(s,c);else Q&&Q.push(a);return this},eq:function(a){return a===-1?this.slice(a):this.slice(a,+a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(R.apply(this,arguments),"slice",R.call(arguments).join(","))},map:function(a){return this.pushStack(c.map(this, +function(b,d){return a.call(b,d,b)}))},end:function(){return this.prevObject||c(null)},push:ba,sort:[].sort,splice:[].splice};c.fn.init.prototype=c.fn;c.extend=c.fn.extend=function(){var a=arguments[0]||{},b=1,d=arguments.length,f=false,e,j,i,o;if(typeof a==="boolean"){f=a;a=arguments[1]||{};b=2}if(typeof a!=="object"&&!c.isFunction(a))a={};if(d===b){a=this;--b}for(;b<d;b++)if((e=arguments[b])!=null)for(j in e){i=a[j];o=e[j];if(a!==o)if(f&&o&&(c.isPlainObject(o)||c.isArray(o))){i=i&&(c.isPlainObject(i)|| +c.isArray(i))?i:c.isArray(o)?[]:{};a[j]=c.extend(f,i,o)}else if(o!==w)a[j]=o}return a};c.extend({noConflict:function(a){A.$=Sa;if(a)A.jQuery=Ra;return c},isReady:false,ready:function(){if(!c.isReady){if(!s.body)return setTimeout(c.ready,13);c.isReady=true;if(Q){for(var a,b=0;a=Q[b++];)a.call(s,c);Q=null}c.fn.triggerHandler&&c(s).triggerHandler("ready")}},bindReady:function(){if(!xa){xa=true;if(s.readyState==="complete")return c.ready();if(s.addEventListener){s.addEventListener("DOMContentLoaded", +L,false);A.addEventListener("load",c.ready,false)}else if(s.attachEvent){s.attachEvent("onreadystatechange",L);A.attachEvent("onload",c.ready);var a=false;try{a=A.frameElement==null}catch(b){}s.documentElement.doScroll&&a&&ma()}}},isFunction:function(a){return $.call(a)==="[object Function]"},isArray:function(a){return $.call(a)==="[object Array]"},isPlainObject:function(a){if(!a||$.call(a)!=="[object Object]"||a.nodeType||a.setInterval)return false;if(a.constructor&&!aa.call(a,"constructor")&&!aa.call(a.constructor.prototype, +"isPrototypeOf"))return false;var b;for(b in a);return b===w||aa.call(a,b)},isEmptyObject:function(a){for(var b in a)return false;return true},error:function(a){throw a;},parseJSON:function(a){if(typeof a!=="string"||!a)return null;a=c.trim(a);if(/^[\],:{}\s]*$/.test(a.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,"")))return A.JSON&&A.JSON.parse?A.JSON.parse(a):(new Function("return "+ +a))();else c.error("Invalid JSON: "+a)},noop:function(){},globalEval:function(a){if(a&&Va.test(a)){var b=s.getElementsByTagName("head")[0]||s.documentElement,d=s.createElement("script");d.type="text/javascript";if(c.support.scriptEval)d.appendChild(s.createTextNode(a));else d.text=a;b.insertBefore(d,b.firstChild);b.removeChild(d)}},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,b,d){var f,e=0,j=a.length,i=j===w||c.isFunction(a);if(d)if(i)for(f in a){if(b.apply(a[f], +d)===false)break}else for(;e<j;){if(b.apply(a[e++],d)===false)break}else if(i)for(f in a){if(b.call(a[f],f,a[f])===false)break}else for(d=a[0];e<j&&b.call(d,e,d)!==false;d=a[++e]);return a},trim:function(a){return(a||"").replace(Wa,"")},makeArray:function(a,b){b=b||[];if(a!=null)a.length==null||typeof a==="string"||c.isFunction(a)||typeof a!=="function"&&a.setInterval?ba.call(b,a):c.merge(b,a);return b},inArray:function(a,b){if(b.indexOf)return b.indexOf(a);for(var d=0,f=b.length;d<f;d++)if(b[d]=== +a)return d;return-1},merge:function(a,b){var d=a.length,f=0;if(typeof b.length==="number")for(var e=b.length;f<e;f++)a[d++]=b[f];else for(;b[f]!==w;)a[d++]=b[f++];a.length=d;return a},grep:function(a,b,d){for(var f=[],e=0,j=a.length;e<j;e++)!d!==!b(a[e],e)&&f.push(a[e]);return f},map:function(a,b,d){for(var f=[],e,j=0,i=a.length;j<i;j++){e=b(a[j],j,d);if(e!=null)f[f.length]=e}return f.concat.apply([],f)},guid:1,proxy:function(a,b,d){if(arguments.length===2)if(typeof b==="string"){d=a;a=d[b];b=w}else if(b&& +!c.isFunction(b)){d=b;b=w}if(!b&&a)b=function(){return a.apply(d||this,arguments)};if(a)b.guid=a.guid=a.guid||b.guid||c.guid++;return b},uaMatch:function(a){a=a.toLowerCase();a=/(webkit)[ \/]([\w.]+)/.exec(a)||/(opera)(?:.*version)?[ \/]([\w.]+)/.exec(a)||/(msie) ([\w.]+)/.exec(a)||!/compatible/.test(a)&&/(mozilla)(?:.*? rv:([\w.]+))?/.exec(a)||[];return{browser:a[1]||"",version:a[2]||"0"}},browser:{}});P=c.uaMatch(P);if(P.browser){c.browser[P.browser]=true;c.browser.version=P.version}if(c.browser.webkit)c.browser.safari= +true;if(ya)c.inArray=function(a,b){return ya.call(b,a)};T=c(s);if(s.addEventListener)L=function(){s.removeEventListener("DOMContentLoaded",L,false);c.ready()};else if(s.attachEvent)L=function(){if(s.readyState==="complete"){s.detachEvent("onreadystatechange",L);c.ready()}};(function(){c.support={};var a=s.documentElement,b=s.createElement("script"),d=s.createElement("div"),f="script"+J();d.style.display="none";d.innerHTML=" <link/><table></table><a href='/a' style='color:red;float:left;opacity:.55;'>a</a><input type='checkbox'/>"; +var e=d.getElementsByTagName("*"),j=d.getElementsByTagName("a")[0];if(!(!e||!e.length||!j)){c.support={leadingWhitespace:d.firstChild.nodeType===3,tbody:!d.getElementsByTagName("tbody").length,htmlSerialize:!!d.getElementsByTagName("link").length,style:/red/.test(j.getAttribute("style")),hrefNormalized:j.getAttribute("href")==="/a",opacity:/^0.55$/.test(j.style.opacity),cssFloat:!!j.style.cssFloat,checkOn:d.getElementsByTagName("input")[0].value==="on",optSelected:s.createElement("select").appendChild(s.createElement("option")).selected, +parentNode:d.removeChild(d.appendChild(s.createElement("div"))).parentNode===null,deleteExpando:true,checkClone:false,scriptEval:false,noCloneEvent:true,boxModel:null};b.type="text/javascript";try{b.appendChild(s.createTextNode("window."+f+"=1;"))}catch(i){}a.insertBefore(b,a.firstChild);if(A[f]){c.support.scriptEval=true;delete A[f]}try{delete b.test}catch(o){c.support.deleteExpando=false}a.removeChild(b);if(d.attachEvent&&d.fireEvent){d.attachEvent("onclick",function k(){c.support.noCloneEvent= +false;d.detachEvent("onclick",k)});d.cloneNode(true).fireEvent("onclick")}d=s.createElement("div");d.innerHTML="<input type='radio' name='radiotest' checked='checked'/>";a=s.createDocumentFragment();a.appendChild(d.firstChild);c.support.checkClone=a.cloneNode(true).cloneNode(true).lastChild.checked;c(function(){var k=s.createElement("div");k.style.width=k.style.paddingLeft="1px";s.body.appendChild(k);c.boxModel=c.support.boxModel=k.offsetWidth===2;s.body.removeChild(k).style.display="none"});a=function(k){var n= +s.createElement("div");k="on"+k;var r=k in n;if(!r){n.setAttribute(k,"return;");r=typeof n[k]==="function"}return r};c.support.submitBubbles=a("submit");c.support.changeBubbles=a("change");a=b=d=e=j=null}})();c.props={"for":"htmlFor","class":"className",readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing",rowspan:"rowSpan",colspan:"colSpan",tabindex:"tabIndex",usemap:"useMap",frameborder:"frameBorder"};var G="jQuery"+J(),Ya=0,za={};c.extend({cache:{},expando:G,noData:{embed:true,object:true, +applet:true},data:function(a,b,d){if(!(a.nodeName&&c.noData[a.nodeName.toLowerCase()])){a=a==A?za:a;var f=a[G],e=c.cache;if(!f&&typeof b==="string"&&d===w)return null;f||(f=++Ya);if(typeof b==="object"){a[G]=f;e[f]=c.extend(true,{},b)}else if(!e[f]){a[G]=f;e[f]={}}a=e[f];if(d!==w)a[b]=d;return typeof b==="string"?a[b]:a}},removeData:function(a,b){if(!(a.nodeName&&c.noData[a.nodeName.toLowerCase()])){a=a==A?za:a;var d=a[G],f=c.cache,e=f[d];if(b){if(e){delete e[b];c.isEmptyObject(e)&&c.removeData(a)}}else{if(c.support.deleteExpando)delete a[c.expando]; +else a.removeAttribute&&a.removeAttribute(c.expando);delete f[d]}}}});c.fn.extend({data:function(a,b){if(typeof a==="undefined"&&this.length)return c.data(this[0]);else if(typeof a==="object")return this.each(function(){c.data(this,a)});var d=a.split(".");d[1]=d[1]?"."+d[1]:"";if(b===w){var f=this.triggerHandler("getData"+d[1]+"!",[d[0]]);if(f===w&&this.length)f=c.data(this[0],a);return f===w&&d[1]?this.data(d[0]):f}else return this.trigger("setData"+d[1]+"!",[d[0],b]).each(function(){c.data(this, +a,b)})},removeData:function(a){return this.each(function(){c.removeData(this,a)})}});c.extend({queue:function(a,b,d){if(a){b=(b||"fx")+"queue";var f=c.data(a,b);if(!d)return f||[];if(!f||c.isArray(d))f=c.data(a,b,c.makeArray(d));else f.push(d);return f}},dequeue:function(a,b){b=b||"fx";var d=c.queue(a,b),f=d.shift();if(f==="inprogress")f=d.shift();if(f){b==="fx"&&d.unshift("inprogress");f.call(a,function(){c.dequeue(a,b)})}}});c.fn.extend({queue:function(a,b){if(typeof a!=="string"){b=a;a="fx"}if(b=== +w)return c.queue(this[0],a);return this.each(function(){var d=c.queue(this,a,b);a==="fx"&&d[0]!=="inprogress"&&c.dequeue(this,a)})},dequeue:function(a){return this.each(function(){c.dequeue(this,a)})},delay:function(a,b){a=c.fx?c.fx.speeds[a]||a:a;b=b||"fx";return this.queue(b,function(){var d=this;setTimeout(function(){c.dequeue(d,b)},a)})},clearQueue:function(a){return this.queue(a||"fx",[])}});var Aa=/[\n\t]/g,ca=/\s+/,Za=/\r/g,$a=/href|src|style/,ab=/(button|input)/i,bb=/(button|input|object|select|textarea)/i, +cb=/^(a|area)$/i,Ba=/radio|checkbox/;c.fn.extend({attr:function(a,b){return X(this,a,b,true,c.attr)},removeAttr:function(a){return this.each(function(){c.attr(this,a,"");this.nodeType===1&&this.removeAttribute(a)})},addClass:function(a){if(c.isFunction(a))return this.each(function(n){var r=c(this);r.addClass(a.call(this,n,r.attr("class")))});if(a&&typeof a==="string")for(var b=(a||"").split(ca),d=0,f=this.length;d<f;d++){var e=this[d];if(e.nodeType===1)if(e.className){for(var j=" "+e.className+" ", +i=e.className,o=0,k=b.length;o<k;o++)if(j.indexOf(" "+b[o]+" ")<0)i+=" "+b[o];e.className=c.trim(i)}else e.className=a}return this},removeClass:function(a){if(c.isFunction(a))return this.each(function(k){var n=c(this);n.removeClass(a.call(this,k,n.attr("class")))});if(a&&typeof a==="string"||a===w)for(var b=(a||"").split(ca),d=0,f=this.length;d<f;d++){var e=this[d];if(e.nodeType===1&&e.className)if(a){for(var j=(" "+e.className+" ").replace(Aa," "),i=0,o=b.length;i<o;i++)j=j.replace(" "+b[i]+" ", +" ");e.className=c.trim(j)}else e.className=""}return this},toggleClass:function(a,b){var d=typeof a,f=typeof b==="boolean";if(c.isFunction(a))return this.each(function(e){var j=c(this);j.toggleClass(a.call(this,e,j.attr("class"),b),b)});return this.each(function(){if(d==="string")for(var e,j=0,i=c(this),o=b,k=a.split(ca);e=k[j++];){o=f?o:!i.hasClass(e);i[o?"addClass":"removeClass"](e)}else if(d==="undefined"||d==="boolean"){this.className&&c.data(this,"__className__",this.className);this.className= +this.className||a===false?"":c.data(this,"__className__")||""}})},hasClass:function(a){a=" "+a+" ";for(var b=0,d=this.length;b<d;b++)if((" "+this[b].className+" ").replace(Aa," ").indexOf(a)>-1)return true;return false},val:function(a){if(a===w){var b=this[0];if(b){if(c.nodeName(b,"option"))return(b.attributes.value||{}).specified?b.value:b.text;if(c.nodeName(b,"select")){var d=b.selectedIndex,f=[],e=b.options;b=b.type==="select-one";if(d<0)return null;var j=b?d:0;for(d=b?d+1:e.length;j<d;j++){var i= +e[j];if(i.selected){a=c(i).val();if(b)return a;f.push(a)}}return f}if(Ba.test(b.type)&&!c.support.checkOn)return b.getAttribute("value")===null?"on":b.value;return(b.value||"").replace(Za,"")}return w}var o=c.isFunction(a);return this.each(function(k){var n=c(this),r=a;if(this.nodeType===1){if(o)r=a.call(this,k,n.val());if(typeof r==="number")r+="";if(c.isArray(r)&&Ba.test(this.type))this.checked=c.inArray(n.val(),r)>=0;else if(c.nodeName(this,"select")){var u=c.makeArray(r);c("option",this).each(function(){this.selected= +c.inArray(c(this).val(),u)>=0});if(!u.length)this.selectedIndex=-1}else this.value=r}})}});c.extend({attrFn:{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true},attr:function(a,b,d,f){if(!a||a.nodeType===3||a.nodeType===8)return w;if(f&&b in c.attrFn)return c(a)[b](d);f=a.nodeType!==1||!c.isXMLDoc(a);var e=d!==w;b=f&&c.props[b]||b;if(a.nodeType===1){var j=$a.test(b);if(b in a&&f&&!j){if(e){b==="type"&&ab.test(a.nodeName)&&a.parentNode&&c.error("type property can't be changed"); +a[b]=d}if(c.nodeName(a,"form")&&a.getAttributeNode(b))return a.getAttributeNode(b).nodeValue;if(b==="tabIndex")return(b=a.getAttributeNode("tabIndex"))&&b.specified?b.value:bb.test(a.nodeName)||cb.test(a.nodeName)&&a.href?0:w;return a[b]}if(!c.support.style&&f&&b==="style"){if(e)a.style.cssText=""+d;return a.style.cssText}e&&a.setAttribute(b,""+d);a=!c.support.hrefNormalized&&f&&j?a.getAttribute(b,2):a.getAttribute(b);return a===null?w:a}return c.style(a,b,d)}});var O=/\.(.*)$/,db=function(a){return a.replace(/[^\w\s\.\|`]/g, +function(b){return"\\"+b})};c.event={add:function(a,b,d,f){if(!(a.nodeType===3||a.nodeType===8)){if(a.setInterval&&a!==A&&!a.frameElement)a=A;var e,j;if(d.handler){e=d;d=e.handler}if(!d.guid)d.guid=c.guid++;if(j=c.data(a)){var i=j.events=j.events||{},o=j.handle;if(!o)j.handle=o=function(){return typeof c!=="undefined"&&!c.event.triggered?c.event.handle.apply(o.elem,arguments):w};o.elem=a;b=b.split(" ");for(var k,n=0,r;k=b[n++];){j=e?c.extend({},e):{handler:d,data:f};if(k.indexOf(".")>-1){r=k.split("."); +k=r.shift();j.namespace=r.slice(0).sort().join(".")}else{r=[];j.namespace=""}j.type=k;j.guid=d.guid;var u=i[k],z=c.event.special[k]||{};if(!u){u=i[k]=[];if(!z.setup||z.setup.call(a,f,r,o)===false)if(a.addEventListener)a.addEventListener(k,o,false);else a.attachEvent&&a.attachEvent("on"+k,o)}if(z.add){z.add.call(a,j);if(!j.handler.guid)j.handler.guid=d.guid}u.push(j);c.event.global[k]=true}a=null}}},global:{},remove:function(a,b,d,f){if(!(a.nodeType===3||a.nodeType===8)){var e,j=0,i,o,k,n,r,u,z=c.data(a), +C=z&&z.events;if(z&&C){if(b&&b.type){d=b.handler;b=b.type}if(!b||typeof b==="string"&&b.charAt(0)==="."){b=b||"";for(e in C)c.event.remove(a,e+b)}else{for(b=b.split(" ");e=b[j++];){n=e;i=e.indexOf(".")<0;o=[];if(!i){o=e.split(".");e=o.shift();k=new RegExp("(^|\\.)"+c.map(o.slice(0).sort(),db).join("\\.(?:.*\\.)?")+"(\\.|$)")}if(r=C[e])if(d){n=c.event.special[e]||{};for(B=f||0;B<r.length;B++){u=r[B];if(d.guid===u.guid){if(i||k.test(u.namespace)){f==null&&r.splice(B--,1);n.remove&&n.remove.call(a,u)}if(f!= +null)break}}if(r.length===0||f!=null&&r.length===1){if(!n.teardown||n.teardown.call(a,o)===false)Ca(a,e,z.handle);delete C[e]}}else for(var B=0;B<r.length;B++){u=r[B];if(i||k.test(u.namespace)){c.event.remove(a,n,u.handler,B);r.splice(B--,1)}}}if(c.isEmptyObject(C)){if(b=z.handle)b.elem=null;delete z.events;delete z.handle;c.isEmptyObject(z)&&c.removeData(a)}}}}},trigger:function(a,b,d,f){var e=a.type||a;if(!f){a=typeof a==="object"?a[G]?a:c.extend(c.Event(e),a):c.Event(e);if(e.indexOf("!")>=0){a.type= +e=e.slice(0,-1);a.exclusive=true}if(!d){a.stopPropagation();c.event.global[e]&&c.each(c.cache,function(){this.events&&this.events[e]&&c.event.trigger(a,b,this.handle.elem)})}if(!d||d.nodeType===3||d.nodeType===8)return w;a.result=w;a.target=d;b=c.makeArray(b);b.unshift(a)}a.currentTarget=d;(f=c.data(d,"handle"))&&f.apply(d,b);f=d.parentNode||d.ownerDocument;try{if(!(d&&d.nodeName&&c.noData[d.nodeName.toLowerCase()]))if(d["on"+e]&&d["on"+e].apply(d,b)===false)a.result=false}catch(j){}if(!a.isPropagationStopped()&& +f)c.event.trigger(a,b,f,true);else if(!a.isDefaultPrevented()){f=a.target;var i,o=c.nodeName(f,"a")&&e==="click",k=c.event.special[e]||{};if((!k._default||k._default.call(d,a)===false)&&!o&&!(f&&f.nodeName&&c.noData[f.nodeName.toLowerCase()])){try{if(f[e]){if(i=f["on"+e])f["on"+e]=null;c.event.triggered=true;f[e]()}}catch(n){}if(i)f["on"+e]=i;c.event.triggered=false}}},handle:function(a){var b,d,f,e;a=arguments[0]=c.event.fix(a||A.event);a.currentTarget=this;b=a.type.indexOf(".")<0&&!a.exclusive; +if(!b){d=a.type.split(".");a.type=d.shift();f=new RegExp("(^|\\.)"+d.slice(0).sort().join("\\.(?:.*\\.)?")+"(\\.|$)")}e=c.data(this,"events");d=e[a.type];if(e&&d){d=d.slice(0);e=0;for(var j=d.length;e<j;e++){var i=d[e];if(b||f.test(i.namespace)){a.handler=i.handler;a.data=i.data;a.handleObj=i;i=i.handler.apply(this,arguments);if(i!==w){a.result=i;if(i===false){a.preventDefault();a.stopPropagation()}}if(a.isImmediatePropagationStopped())break}}}return a.result},props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode layerX layerY metaKey newValue offsetX offsetY originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "), +fix:function(a){if(a[G])return a;var b=a;a=c.Event(b);for(var d=this.props.length,f;d;){f=this.props[--d];a[f]=b[f]}if(!a.target)a.target=a.srcElement||s;if(a.target.nodeType===3)a.target=a.target.parentNode;if(!a.relatedTarget&&a.fromElement)a.relatedTarget=a.fromElement===a.target?a.toElement:a.fromElement;if(a.pageX==null&&a.clientX!=null){b=s.documentElement;d=s.body;a.pageX=a.clientX+(b&&b.scrollLeft||d&&d.scrollLeft||0)-(b&&b.clientLeft||d&&d.clientLeft||0);a.pageY=a.clientY+(b&&b.scrollTop|| +d&&d.scrollTop||0)-(b&&b.clientTop||d&&d.clientTop||0)}if(!a.which&&(a.charCode||a.charCode===0?a.charCode:a.keyCode))a.which=a.charCode||a.keyCode;if(!a.metaKey&&a.ctrlKey)a.metaKey=a.ctrlKey;if(!a.which&&a.button!==w)a.which=a.button&1?1:a.button&2?3:a.button&4?2:0;return a},guid:1E8,proxy:c.proxy,special:{ready:{setup:c.bindReady,teardown:c.noop},live:{add:function(a){c.event.add(this,a.origType,c.extend({},a,{handler:oa}))},remove:function(a){var b=true,d=a.origType.replace(O,"");c.each(c.data(this, +"events").live||[],function(){if(d===this.origType.replace(O,""))return b=false});b&&c.event.remove(this,a.origType,oa)}},beforeunload:{setup:function(a,b,d){if(this.setInterval)this.onbeforeunload=d;return false},teardown:function(a,b){if(this.onbeforeunload===b)this.onbeforeunload=null}}}};var Ca=s.removeEventListener?function(a,b,d){a.removeEventListener(b,d,false)}:function(a,b,d){a.detachEvent("on"+b,d)};c.Event=function(a){if(!this.preventDefault)return new c.Event(a);if(a&&a.type){this.originalEvent= +a;this.type=a.type}else this.type=a;this.timeStamp=J();this[G]=true};c.Event.prototype={preventDefault:function(){this.isDefaultPrevented=Z;var a=this.originalEvent;if(a){a.preventDefault&&a.preventDefault();a.returnValue=false}},stopPropagation:function(){this.isPropagationStopped=Z;var a=this.originalEvent;if(a){a.stopPropagation&&a.stopPropagation();a.cancelBubble=true}},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=Z;this.stopPropagation()},isDefaultPrevented:Y,isPropagationStopped:Y, +isImmediatePropagationStopped:Y};var Da=function(a){var b=a.relatedTarget;try{for(;b&&b!==this;)b=b.parentNode;if(b!==this){a.type=a.data;c.event.handle.apply(this,arguments)}}catch(d){}},Ea=function(a){a.type=a.data;c.event.handle.apply(this,arguments)};c.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(a,b){c.event.special[a]={setup:function(d){c.event.add(this,b,d&&d.selector?Ea:Da,a)},teardown:function(d){c.event.remove(this,b,d&&d.selector?Ea:Da)}}});if(!c.support.submitBubbles)c.event.special.submit= +{setup:function(){if(this.nodeName.toLowerCase()!=="form"){c.event.add(this,"click.specialSubmit",function(a){var b=a.target,d=b.type;if((d==="submit"||d==="image")&&c(b).closest("form").length)return na("submit",this,arguments)});c.event.add(this,"keypress.specialSubmit",function(a){var b=a.target,d=b.type;if((d==="text"||d==="password")&&c(b).closest("form").length&&a.keyCode===13)return na("submit",this,arguments)})}else return false},teardown:function(){c.event.remove(this,".specialSubmit")}}; +if(!c.support.changeBubbles){var da=/textarea|input|select/i,ea,Fa=function(a){var b=a.type,d=a.value;if(b==="radio"||b==="checkbox")d=a.checked;else if(b==="select-multiple")d=a.selectedIndex>-1?c.map(a.options,function(f){return f.selected}).join("-"):"";else if(a.nodeName.toLowerCase()==="select")d=a.selectedIndex;return d},fa=function(a,b){var d=a.target,f,e;if(!(!da.test(d.nodeName)||d.readOnly)){f=c.data(d,"_change_data");e=Fa(d);if(a.type!=="focusout"||d.type!=="radio")c.data(d,"_change_data", +e);if(!(f===w||e===f))if(f!=null||e){a.type="change";return c.event.trigger(a,b,d)}}};c.event.special.change={filters:{focusout:fa,click:function(a){var b=a.target,d=b.type;if(d==="radio"||d==="checkbox"||b.nodeName.toLowerCase()==="select")return fa.call(this,a)},keydown:function(a){var b=a.target,d=b.type;if(a.keyCode===13&&b.nodeName.toLowerCase()!=="textarea"||a.keyCode===32&&(d==="checkbox"||d==="radio")||d==="select-multiple")return fa.call(this,a)},beforeactivate:function(a){a=a.target;c.data(a, +"_change_data",Fa(a))}},setup:function(){if(this.type==="file")return false;for(var a in ea)c.event.add(this,a+".specialChange",ea[a]);return da.test(this.nodeName)},teardown:function(){c.event.remove(this,".specialChange");return da.test(this.nodeName)}};ea=c.event.special.change.filters}s.addEventListener&&c.each({focus:"focusin",blur:"focusout"},function(a,b){function d(f){f=c.event.fix(f);f.type=b;return c.event.handle.call(this,f)}c.event.special[b]={setup:function(){this.addEventListener(a, +d,true)},teardown:function(){this.removeEventListener(a,d,true)}}});c.each(["bind","one"],function(a,b){c.fn[b]=function(d,f,e){if(typeof d==="object"){for(var j in d)this[b](j,f,d[j],e);return this}if(c.isFunction(f)){e=f;f=w}var i=b==="one"?c.proxy(e,function(k){c(this).unbind(k,i);return e.apply(this,arguments)}):e;if(d==="unload"&&b!=="one")this.one(d,f,e);else{j=0;for(var o=this.length;j<o;j++)c.event.add(this[j],d,i,f)}return this}});c.fn.extend({unbind:function(a,b){if(typeof a==="object"&& +!a.preventDefault)for(var d in a)this.unbind(d,a[d]);else{d=0;for(var f=this.length;d<f;d++)c.event.remove(this[d],a,b)}return this},delegate:function(a,b,d,f){return this.live(b,d,f,a)},undelegate:function(a,b,d){return arguments.length===0?this.unbind("live"):this.die(b,null,d,a)},trigger:function(a,b){return this.each(function(){c.event.trigger(a,b,this)})},triggerHandler:function(a,b){if(this[0]){a=c.Event(a);a.preventDefault();a.stopPropagation();c.event.trigger(a,b,this[0]);return a.result}}, +toggle:function(a){for(var b=arguments,d=1;d<b.length;)c.proxy(a,b[d++]);return this.click(c.proxy(a,function(f){var e=(c.data(this,"lastToggle"+a.guid)||0)%d;c.data(this,"lastToggle"+a.guid,e+1);f.preventDefault();return b[e].apply(this,arguments)||false}))},hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)}});var Ga={focus:"focusin",blur:"focusout",mouseenter:"mouseover",mouseleave:"mouseout"};c.each(["live","die"],function(a,b){c.fn[b]=function(d,f,e,j){var i,o=0,k,n,r=j||this.selector, +u=j?this:c(this.context);if(c.isFunction(f)){e=f;f=w}for(d=(d||"").split(" ");(i=d[o++])!=null;){j=O.exec(i);k="";if(j){k=j[0];i=i.replace(O,"")}if(i==="hover")d.push("mouseenter"+k,"mouseleave"+k);else{n=i;if(i==="focus"||i==="blur"){d.push(Ga[i]+k);i+=k}else i=(Ga[i]||i)+k;b==="live"?u.each(function(){c.event.add(this,pa(i,r),{data:f,selector:r,handler:e,origType:i,origHandler:e,preType:n})}):u.unbind(pa(i,r),e)}}return this}});c.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error".split(" "), +function(a,b){c.fn[b]=function(d){return d?this.bind(b,d):this.trigger(b)};if(c.attrFn)c.attrFn[b]=true});A.attachEvent&&!A.addEventListener&&A.attachEvent("onunload",function(){for(var a in c.cache)if(c.cache[a].handle)try{c.event.remove(c.cache[a].handle.elem)}catch(b){}});(function(){function a(g){for(var h="",l,m=0;g[m];m++){l=g[m];if(l.nodeType===3||l.nodeType===4)h+=l.nodeValue;else if(l.nodeType!==8)h+=a(l.childNodes)}return h}function b(g,h,l,m,q,p){q=0;for(var v=m.length;q<v;q++){var t=m[q]; +if(t){t=t[g];for(var y=false;t;){if(t.sizcache===l){y=m[t.sizset];break}if(t.nodeType===1&&!p){t.sizcache=l;t.sizset=q}if(t.nodeName.toLowerCase()===h){y=t;break}t=t[g]}m[q]=y}}}function d(g,h,l,m,q,p){q=0;for(var v=m.length;q<v;q++){var t=m[q];if(t){t=t[g];for(var y=false;t;){if(t.sizcache===l){y=m[t.sizset];break}if(t.nodeType===1){if(!p){t.sizcache=l;t.sizset=q}if(typeof h!=="string"){if(t===h){y=true;break}}else if(k.filter(h,[t]).length>0){y=t;break}}t=t[g]}m[q]=y}}}var f=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g, +e=0,j=Object.prototype.toString,i=false,o=true;[0,0].sort(function(){o=false;return 0});var k=function(g,h,l,m){l=l||[];var q=h=h||s;if(h.nodeType!==1&&h.nodeType!==9)return[];if(!g||typeof g!=="string")return l;for(var p=[],v,t,y,S,H=true,M=x(h),I=g;(f.exec(""),v=f.exec(I))!==null;){I=v[3];p.push(v[1]);if(v[2]){S=v[3];break}}if(p.length>1&&r.exec(g))if(p.length===2&&n.relative[p[0]])t=ga(p[0]+p[1],h);else for(t=n.relative[p[0]]?[h]:k(p.shift(),h);p.length;){g=p.shift();if(n.relative[g])g+=p.shift(); +t=ga(g,t)}else{if(!m&&p.length>1&&h.nodeType===9&&!M&&n.match.ID.test(p[0])&&!n.match.ID.test(p[p.length-1])){v=k.find(p.shift(),h,M);h=v.expr?k.filter(v.expr,v.set)[0]:v.set[0]}if(h){v=m?{expr:p.pop(),set:z(m)}:k.find(p.pop(),p.length===1&&(p[0]==="~"||p[0]==="+")&&h.parentNode?h.parentNode:h,M);t=v.expr?k.filter(v.expr,v.set):v.set;if(p.length>0)y=z(t);else H=false;for(;p.length;){var D=p.pop();v=D;if(n.relative[D])v=p.pop();else D="";if(v==null)v=h;n.relative[D](y,v,M)}}else y=[]}y||(y=t);y||k.error(D|| +g);if(j.call(y)==="[object Array]")if(H)if(h&&h.nodeType===1)for(g=0;y[g]!=null;g++){if(y[g]&&(y[g]===true||y[g].nodeType===1&&E(h,y[g])))l.push(t[g])}else for(g=0;y[g]!=null;g++)y[g]&&y[g].nodeType===1&&l.push(t[g]);else l.push.apply(l,y);else z(y,l);if(S){k(S,q,l,m);k.uniqueSort(l)}return l};k.uniqueSort=function(g){if(B){i=o;g.sort(B);if(i)for(var h=1;h<g.length;h++)g[h]===g[h-1]&&g.splice(h--,1)}return g};k.matches=function(g,h){return k(g,null,null,h)};k.find=function(g,h,l){var m,q;if(!g)return[]; +for(var p=0,v=n.order.length;p<v;p++){var t=n.order[p];if(q=n.leftMatch[t].exec(g)){var y=q[1];q.splice(1,1);if(y.substr(y.length-1)!=="\\"){q[1]=(q[1]||"").replace(/\\/g,"");m=n.find[t](q,h,l);if(m!=null){g=g.replace(n.match[t],"");break}}}}m||(m=h.getElementsByTagName("*"));return{set:m,expr:g}};k.filter=function(g,h,l,m){for(var q=g,p=[],v=h,t,y,S=h&&h[0]&&x(h[0]);g&&h.length;){for(var H in n.filter)if((t=n.leftMatch[H].exec(g))!=null&&t[2]){var M=n.filter[H],I,D;D=t[1];y=false;t.splice(1,1);if(D.substr(D.length- +1)!=="\\"){if(v===p)p=[];if(n.preFilter[H])if(t=n.preFilter[H](t,v,l,p,m,S)){if(t===true)continue}else y=I=true;if(t)for(var U=0;(D=v[U])!=null;U++)if(D){I=M(D,t,U,v);var Ha=m^!!I;if(l&&I!=null)if(Ha)y=true;else v[U]=false;else if(Ha){p.push(D);y=true}}if(I!==w){l||(v=p);g=g.replace(n.match[H],"");if(!y)return[];break}}}if(g===q)if(y==null)k.error(g);else break;q=g}return v};k.error=function(g){throw"Syntax error, unrecognized expression: "+g;};var n=k.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF-]|\\.)+)/, +CLASS:/\.((?:[\w\u00c0-\uFFFF-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF-]|\\.)+)\s*(?:(\S?=)\s*(['"]*)(.*?)\3|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\((even|odd|[\dn+-]*)\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/},leftMatch:{},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(g){return g.getAttribute("href")}}, +relative:{"+":function(g,h){var l=typeof h==="string",m=l&&!/\W/.test(h);l=l&&!m;if(m)h=h.toLowerCase();m=0;for(var q=g.length,p;m<q;m++)if(p=g[m]){for(;(p=p.previousSibling)&&p.nodeType!==1;);g[m]=l||p&&p.nodeName.toLowerCase()===h?p||false:p===h}l&&k.filter(h,g,true)},">":function(g,h){var l=typeof h==="string";if(l&&!/\W/.test(h)){h=h.toLowerCase();for(var m=0,q=g.length;m<q;m++){var p=g[m];if(p){l=p.parentNode;g[m]=l.nodeName.toLowerCase()===h?l:false}}}else{m=0;for(q=g.length;m<q;m++)if(p=g[m])g[m]= +l?p.parentNode:p.parentNode===h;l&&k.filter(h,g,true)}},"":function(g,h,l){var m=e++,q=d;if(typeof h==="string"&&!/\W/.test(h)){var p=h=h.toLowerCase();q=b}q("parentNode",h,m,g,p,l)},"~":function(g,h,l){var m=e++,q=d;if(typeof h==="string"&&!/\W/.test(h)){var p=h=h.toLowerCase();q=b}q("previousSibling",h,m,g,p,l)}},find:{ID:function(g,h,l){if(typeof h.getElementById!=="undefined"&&!l)return(g=h.getElementById(g[1]))?[g]:[]},NAME:function(g,h){if(typeof h.getElementsByName!=="undefined"){var l=[]; +h=h.getElementsByName(g[1]);for(var m=0,q=h.length;m<q;m++)h[m].getAttribute("name")===g[1]&&l.push(h[m]);return l.length===0?null:l}},TAG:function(g,h){return h.getElementsByTagName(g[1])}},preFilter:{CLASS:function(g,h,l,m,q,p){g=" "+g[1].replace(/\\/g,"")+" ";if(p)return g;p=0;for(var v;(v=h[p])!=null;p++)if(v)if(q^(v.className&&(" "+v.className+" ").replace(/[\t\n]/g," ").indexOf(g)>=0))l||m.push(v);else if(l)h[p]=false;return false},ID:function(g){return g[1].replace(/\\/g,"")},TAG:function(g){return g[1].toLowerCase()}, +CHILD:function(g){if(g[1]==="nth"){var h=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(g[2]==="even"&&"2n"||g[2]==="odd"&&"2n+1"||!/\D/.test(g[2])&&"0n+"+g[2]||g[2]);g[2]=h[1]+(h[2]||1)-0;g[3]=h[3]-0}g[0]=e++;return g},ATTR:function(g,h,l,m,q,p){h=g[1].replace(/\\/g,"");if(!p&&n.attrMap[h])g[1]=n.attrMap[h];if(g[2]==="~=")g[4]=" "+g[4]+" ";return g},PSEUDO:function(g,h,l,m,q){if(g[1]==="not")if((f.exec(g[3])||"").length>1||/^\w/.test(g[3]))g[3]=k(g[3],null,null,h);else{g=k.filter(g[3],h,l,true^q);l||m.push.apply(m, +g);return false}else if(n.match.POS.test(g[0])||n.match.CHILD.test(g[0]))return true;return g},POS:function(g){g.unshift(true);return g}},filters:{enabled:function(g){return g.disabled===false&&g.type!=="hidden"},disabled:function(g){return g.disabled===true},checked:function(g){return g.checked===true},selected:function(g){return g.selected===true},parent:function(g){return!!g.firstChild},empty:function(g){return!g.firstChild},has:function(g,h,l){return!!k(l[3],g).length},header:function(g){return/h\d/i.test(g.nodeName)}, +text:function(g){return"text"===g.type},radio:function(g){return"radio"===g.type},checkbox:function(g){return"checkbox"===g.type},file:function(g){return"file"===g.type},password:function(g){return"password"===g.type},submit:function(g){return"submit"===g.type},image:function(g){return"image"===g.type},reset:function(g){return"reset"===g.type},button:function(g){return"button"===g.type||g.nodeName.toLowerCase()==="button"},input:function(g){return/input|select|textarea|button/i.test(g.nodeName)}}, +setFilters:{first:function(g,h){return h===0},last:function(g,h,l,m){return h===m.length-1},even:function(g,h){return h%2===0},odd:function(g,h){return h%2===1},lt:function(g,h,l){return h<l[3]-0},gt:function(g,h,l){return h>l[3]-0},nth:function(g,h,l){return l[3]-0===h},eq:function(g,h,l){return l[3]-0===h}},filter:{PSEUDO:function(g,h,l,m){var q=h[1],p=n.filters[q];if(p)return p(g,l,h,m);else if(q==="contains")return(g.textContent||g.innerText||a([g])||"").indexOf(h[3])>=0;else if(q==="not"){h= +h[3];l=0;for(m=h.length;l<m;l++)if(h[l]===g)return false;return true}else k.error("Syntax error, unrecognized expression: "+q)},CHILD:function(g,h){var l=h[1],m=g;switch(l){case "only":case "first":for(;m=m.previousSibling;)if(m.nodeType===1)return false;if(l==="first")return true;m=g;case "last":for(;m=m.nextSibling;)if(m.nodeType===1)return false;return true;case "nth":l=h[2];var q=h[3];if(l===1&&q===0)return true;h=h[0];var p=g.parentNode;if(p&&(p.sizcache!==h||!g.nodeIndex)){var v=0;for(m=p.firstChild;m;m= +m.nextSibling)if(m.nodeType===1)m.nodeIndex=++v;p.sizcache=h}g=g.nodeIndex-q;return l===0?g===0:g%l===0&&g/l>=0}},ID:function(g,h){return g.nodeType===1&&g.getAttribute("id")===h},TAG:function(g,h){return h==="*"&&g.nodeType===1||g.nodeName.toLowerCase()===h},CLASS:function(g,h){return(" "+(g.className||g.getAttribute("class"))+" ").indexOf(h)>-1},ATTR:function(g,h){var l=h[1];g=n.attrHandle[l]?n.attrHandle[l](g):g[l]!=null?g[l]:g.getAttribute(l);l=g+"";var m=h[2];h=h[4];return g==null?m==="!=":m=== +"="?l===h:m==="*="?l.indexOf(h)>=0:m==="~="?(" "+l+" ").indexOf(h)>=0:!h?l&&g!==false:m==="!="?l!==h:m==="^="?l.indexOf(h)===0:m==="$="?l.substr(l.length-h.length)===h:m==="|="?l===h||l.substr(0,h.length+1)===h+"-":false},POS:function(g,h,l,m){var q=n.setFilters[h[2]];if(q)return q(g,l,h,m)}}},r=n.match.POS;for(var u in n.match){n.match[u]=new RegExp(n.match[u].source+/(?![^\[]*\])(?![^\(]*\))/.source);n.leftMatch[u]=new RegExp(/(^(?:.|\r|\n)*?)/.source+n.match[u].source.replace(/\\(\d+)/g,function(g, +h){return"\\"+(h-0+1)}))}var z=function(g,h){g=Array.prototype.slice.call(g,0);if(h){h.push.apply(h,g);return h}return g};try{Array.prototype.slice.call(s.documentElement.childNodes,0)}catch(C){z=function(g,h){h=h||[];if(j.call(g)==="[object Array]")Array.prototype.push.apply(h,g);else if(typeof g.length==="number")for(var l=0,m=g.length;l<m;l++)h.push(g[l]);else for(l=0;g[l];l++)h.push(g[l]);return h}}var B;if(s.documentElement.compareDocumentPosition)B=function(g,h){if(!g.compareDocumentPosition|| +!h.compareDocumentPosition){if(g==h)i=true;return g.compareDocumentPosition?-1:1}g=g.compareDocumentPosition(h)&4?-1:g===h?0:1;if(g===0)i=true;return g};else if("sourceIndex"in s.documentElement)B=function(g,h){if(!g.sourceIndex||!h.sourceIndex){if(g==h)i=true;return g.sourceIndex?-1:1}g=g.sourceIndex-h.sourceIndex;if(g===0)i=true;return g};else if(s.createRange)B=function(g,h){if(!g.ownerDocument||!h.ownerDocument){if(g==h)i=true;return g.ownerDocument?-1:1}var l=g.ownerDocument.createRange(),m= +h.ownerDocument.createRange();l.setStart(g,0);l.setEnd(g,0);m.setStart(h,0);m.setEnd(h,0);g=l.compareBoundaryPoints(Range.START_TO_END,m);if(g===0)i=true;return g};(function(){var g=s.createElement("div"),h="script"+(new Date).getTime();g.innerHTML="<a name='"+h+"'/>";var l=s.documentElement;l.insertBefore(g,l.firstChild);if(s.getElementById(h)){n.find.ID=function(m,q,p){if(typeof q.getElementById!=="undefined"&&!p)return(q=q.getElementById(m[1]))?q.id===m[1]||typeof q.getAttributeNode!=="undefined"&& +q.getAttributeNode("id").nodeValue===m[1]?[q]:w:[]};n.filter.ID=function(m,q){var p=typeof m.getAttributeNode!=="undefined"&&m.getAttributeNode("id");return m.nodeType===1&&p&&p.nodeValue===q}}l.removeChild(g);l=g=null})();(function(){var g=s.createElement("div");g.appendChild(s.createComment(""));if(g.getElementsByTagName("*").length>0)n.find.TAG=function(h,l){l=l.getElementsByTagName(h[1]);if(h[1]==="*"){h=[];for(var m=0;l[m];m++)l[m].nodeType===1&&h.push(l[m]);l=h}return l};g.innerHTML="<a href='#'></a>"; +if(g.firstChild&&typeof g.firstChild.getAttribute!=="undefined"&&g.firstChild.getAttribute("href")!=="#")n.attrHandle.href=function(h){return h.getAttribute("href",2)};g=null})();s.querySelectorAll&&function(){var g=k,h=s.createElement("div");h.innerHTML="<p class='TEST'></p>";if(!(h.querySelectorAll&&h.querySelectorAll(".TEST").length===0)){k=function(m,q,p,v){q=q||s;if(!v&&q.nodeType===9&&!x(q))try{return z(q.querySelectorAll(m),p)}catch(t){}return g(m,q,p,v)};for(var l in g)k[l]=g[l];h=null}}(); +(function(){var g=s.createElement("div");g.innerHTML="<div class='test e'></div><div class='test'></div>";if(!(!g.getElementsByClassName||g.getElementsByClassName("e").length===0)){g.lastChild.className="e";if(g.getElementsByClassName("e").length!==1){n.order.splice(1,0,"CLASS");n.find.CLASS=function(h,l,m){if(typeof l.getElementsByClassName!=="undefined"&&!m)return l.getElementsByClassName(h[1])};g=null}}})();var E=s.compareDocumentPosition?function(g,h){return!!(g.compareDocumentPosition(h)&16)}: +function(g,h){return g!==h&&(g.contains?g.contains(h):true)},x=function(g){return(g=(g?g.ownerDocument||g:0).documentElement)?g.nodeName!=="HTML":false},ga=function(g,h){var l=[],m="",q;for(h=h.nodeType?[h]:h;q=n.match.PSEUDO.exec(g);){m+=q[0];g=g.replace(n.match.PSEUDO,"")}g=n.relative[g]?g+"*":g;q=0;for(var p=h.length;q<p;q++)k(g,h[q],l);return k.filter(m,l)};c.find=k;c.expr=k.selectors;c.expr[":"]=c.expr.filters;c.unique=k.uniqueSort;c.text=a;c.isXMLDoc=x;c.contains=E})();var eb=/Until$/,fb=/^(?:parents|prevUntil|prevAll)/, +gb=/,/;R=Array.prototype.slice;var Ia=function(a,b,d){if(c.isFunction(b))return c.grep(a,function(e,j){return!!b.call(e,j,e)===d});else if(b.nodeType)return c.grep(a,function(e){return e===b===d});else if(typeof b==="string"){var f=c.grep(a,function(e){return e.nodeType===1});if(Ua.test(b))return c.filter(b,f,!d);else b=c.filter(b,f)}return c.grep(a,function(e){return c.inArray(e,b)>=0===d})};c.fn.extend({find:function(a){for(var b=this.pushStack("","find",a),d=0,f=0,e=this.length;f<e;f++){d=b.length; +c.find(a,this[f],b);if(f>0)for(var j=d;j<b.length;j++)for(var i=0;i<d;i++)if(b[i]===b[j]){b.splice(j--,1);break}}return b},has:function(a){var b=c(a);return this.filter(function(){for(var d=0,f=b.length;d<f;d++)if(c.contains(this,b[d]))return true})},not:function(a){return this.pushStack(Ia(this,a,false),"not",a)},filter:function(a){return this.pushStack(Ia(this,a,true),"filter",a)},is:function(a){return!!a&&c.filter(a,this).length>0},closest:function(a,b){if(c.isArray(a)){var d=[],f=this[0],e,j= +{},i;if(f&&a.length){e=0;for(var o=a.length;e<o;e++){i=a[e];j[i]||(j[i]=c.expr.match.POS.test(i)?c(i,b||this.context):i)}for(;f&&f.ownerDocument&&f!==b;){for(i in j){e=j[i];if(e.jquery?e.index(f)>-1:c(f).is(e)){d.push({selector:i,elem:f});delete j[i]}}f=f.parentNode}}return d}var k=c.expr.match.POS.test(a)?c(a,b||this.context):null;return this.map(function(n,r){for(;r&&r.ownerDocument&&r!==b;){if(k?k.index(r)>-1:c(r).is(a))return r;r=r.parentNode}return null})},index:function(a){if(!a||typeof a=== +"string")return c.inArray(this[0],a?c(a):this.parent().children());return c.inArray(a.jquery?a[0]:a,this)},add:function(a,b){a=typeof a==="string"?c(a,b||this.context):c.makeArray(a);b=c.merge(this.get(),a);return this.pushStack(qa(a[0])||qa(b[0])?b:c.unique(b))},andSelf:function(){return this.add(this.prevObject)}});c.each({parent:function(a){return(a=a.parentNode)&&a.nodeType!==11?a:null},parents:function(a){return c.dir(a,"parentNode")},parentsUntil:function(a,b,d){return c.dir(a,"parentNode", +d)},next:function(a){return c.nth(a,2,"nextSibling")},prev:function(a){return c.nth(a,2,"previousSibling")},nextAll:function(a){return c.dir(a,"nextSibling")},prevAll:function(a){return c.dir(a,"previousSibling")},nextUntil:function(a,b,d){return c.dir(a,"nextSibling",d)},prevUntil:function(a,b,d){return c.dir(a,"previousSibling",d)},siblings:function(a){return c.sibling(a.parentNode.firstChild,a)},children:function(a){return c.sibling(a.firstChild)},contents:function(a){return c.nodeName(a,"iframe")? +a.contentDocument||a.contentWindow.document:c.makeArray(a.childNodes)}},function(a,b){c.fn[a]=function(d,f){var e=c.map(this,b,d);eb.test(a)||(f=d);if(f&&typeof f==="string")e=c.filter(f,e);e=this.length>1?c.unique(e):e;if((this.length>1||gb.test(f))&&fb.test(a))e=e.reverse();return this.pushStack(e,a,R.call(arguments).join(","))}});c.extend({filter:function(a,b,d){if(d)a=":not("+a+")";return c.find.matches(a,b)},dir:function(a,b,d){var f=[];for(a=a[b];a&&a.nodeType!==9&&(d===w||a.nodeType!==1||!c(a).is(d));){a.nodeType=== +1&&f.push(a);a=a[b]}return f},nth:function(a,b,d){b=b||1;for(var f=0;a;a=a[d])if(a.nodeType===1&&++f===b)break;return a},sibling:function(a,b){for(var d=[];a;a=a.nextSibling)a.nodeType===1&&a!==b&&d.push(a);return d}});var Ja=/ jQuery\d+="(?:\d+|null)"/g,V=/^\s+/,Ka=/(<([\w:]+)[^>]*?)\/>/g,hb=/^(?:area|br|col|embed|hr|img|input|link|meta|param)$/i,La=/<([\w:]+)/,ib=/<tbody/i,jb=/<|&#?\w+;/,ta=/<script|<object|<embed|<option|<style/i,ua=/checked\s*(?:[^=]|=\s*.checked.)/i,Ma=function(a,b,d){return hb.test(d)? +a:b+"></"+d+">"},F={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],area:[1,"<map>","</map>"],_default:[0,"",""]};F.optgroup=F.option;F.tbody=F.tfoot=F.colgroup=F.caption=F.thead;F.th=F.td;if(!c.support.htmlSerialize)F._default=[1,"div<div>","</div>"];c.fn.extend({text:function(a){if(c.isFunction(a))return this.each(function(b){var d= +c(this);d.text(a.call(this,b,d.text()))});if(typeof a!=="object"&&a!==w)return this.empty().append((this[0]&&this[0].ownerDocument||s).createTextNode(a));return c.text(this)},wrapAll:function(a){if(c.isFunction(a))return this.each(function(d){c(this).wrapAll(a.call(this,d))});if(this[0]){var b=c(a,this[0].ownerDocument).eq(0).clone(true);this[0].parentNode&&b.insertBefore(this[0]);b.map(function(){for(var d=this;d.firstChild&&d.firstChild.nodeType===1;)d=d.firstChild;return d}).append(this)}return this}, +wrapInner:function(a){if(c.isFunction(a))return this.each(function(b){c(this).wrapInner(a.call(this,b))});return this.each(function(){var b=c(this),d=b.contents();d.length?d.wrapAll(a):b.append(a)})},wrap:function(a){return this.each(function(){c(this).wrapAll(a)})},unwrap:function(){return this.parent().each(function(){c.nodeName(this,"body")||c(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.appendChild(a)})}, +prepend:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(b){this.parentNode.insertBefore(b,this)});else if(arguments.length){var a=c(arguments[0]);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(b){this.parentNode.insertBefore(b, +this.nextSibling)});else if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,c(arguments[0]).toArray());return a}},remove:function(a,b){for(var d=0,f;(f=this[d])!=null;d++)if(!a||c.filter(a,[f]).length){if(!b&&f.nodeType===1){c.cleanData(f.getElementsByTagName("*"));c.cleanData([f])}f.parentNode&&f.parentNode.removeChild(f)}return this},empty:function(){for(var a=0,b;(b=this[a])!=null;a++)for(b.nodeType===1&&c.cleanData(b.getElementsByTagName("*"));b.firstChild;)b.removeChild(b.firstChild); +return this},clone:function(a){var b=this.map(function(){if(!c.support.noCloneEvent&&!c.isXMLDoc(this)){var d=this.outerHTML,f=this.ownerDocument;if(!d){d=f.createElement("div");d.appendChild(this.cloneNode(true));d=d.innerHTML}return c.clean([d.replace(Ja,"").replace(/=([^="'>\s]+\/)>/g,'="$1">').replace(V,"")],f)[0]}else... [truncated message content] |
From: <bra...@us...> - 2010-08-03 00:25:59
|
Revision: 3200 http://archive-access.svn.sourceforge.net/archive-access/?rev=3200&view=rev Author: bradtofel Date: 2010-08-03 00:25:53 +0000 (Tue, 03 Aug 2010) Log Message: ----------- Modified Paths: -------------- trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/images/toolbar/wm_tb_help.png Added Paths: ----------- trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/images/toolbar/icon_alert.png Added: trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/images/toolbar/icon_alert.png =================================================================== (Binary files differ) Property changes on: trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/images/toolbar/icon_alert.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Modified: trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/images/toolbar/wm_tb_help.png =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bra...@us...> - 2010-08-03 00:25:26
|
Revision: 3199 http://archive-access.svn.sourceforge.net/archive-access/?rev=3199&view=rev Author: bradtofel Date: 2010-08-03 00:25:18 +0000 (Tue, 03 Aug 2010) Log Message: ----------- possibly temporary addition of jquery: need to decide if Wayback should ship with this, or if there's a more canonical URL we should use. Added Paths: ----------- trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/jflot/ trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/jflot/excanvas.js trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/jflot/excanvas.min.js trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/jflot/jquery.colorhelpers.js trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/jflot/jquery.colorhelpers.min.js trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/jflot/jquery.flot.crosshair.js trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/jflot/jquery.flot.crosshair.min.js trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/jflot/jquery.flot.image.js trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/jflot/jquery.flot.image.min.js trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/jflot/jquery.flot.js trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/jflot/jquery.flot.min.js trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/jflot/jquery.flot.navigate.js trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/jflot/jquery.flot.navigate.min.js trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/jflot/jquery.flot.selection.js trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/jflot/jquery.flot.selection.min.js trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/jflot/jquery.flot.stack.js trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/jflot/jquery.flot.stack.min.js trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/jflot/jquery.flot.threshold.js trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/jflot/jquery.flot.threshold.min.js trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/jflot/jquery.js trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/jflot/jquery.min.js Added: trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/jflot/excanvas.js =================================================================== --- trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/jflot/excanvas.js (rev 0) +++ trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/jflot/excanvas.js 2010-08-03 00:25:18 UTC (rev 3199) @@ -0,0 +1,1427 @@ +// Copyright 2006 Google Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + + +// Known Issues: +// +// * Patterns only support repeat. +// * Radial gradient are not implemented. The VML version of these look very +// different from the canvas one. +// * Clipping paths are not implemented. +// * Coordsize. The width and height attribute have higher priority than the +// width and height style values which isn't correct. +// * Painting mode isn't implemented. +// * Canvas width/height should is using content-box by default. IE in +// Quirks mode will draw the canvas using border-box. Either change your +// doctype to HTML5 +// (http://www.whatwg.org/specs/web-apps/current-work/#the-doctype) +// or use Box Sizing Behavior from WebFX +// (http://webfx.eae.net/dhtml/boxsizing/boxsizing.html) +// * Non uniform scaling does not correctly scale strokes. +// * Filling very large shapes (above 5000 points) is buggy. +// * Optimize. There is always room for speed improvements. + +// Only add this code if we do not already have a canvas implementation +if (!document.createElement('canvas').getContext) { + +(function() { + + // alias some functions to make (compiled) code shorter + var m = Math; + var mr = m.round; + var ms = m.sin; + var mc = m.cos; + var abs = m.abs; + var sqrt = m.sqrt; + + // this is used for sub pixel precision + var Z = 10; + var Z2 = Z / 2; + + /** + * This funtion is assigned to the <canvas> elements as element.getContext(). + * @this {HTMLElement} + * @return {CanvasRenderingContext2D_} + */ + function getContext() { + return this.context_ || + (this.context_ = new CanvasRenderingContext2D_(this)); + } + + var slice = Array.prototype.slice; + + /** + * Binds a function to an object. The returned function will always use the + * passed in {@code obj} as {@code this}. + * + * Example: + * + * g = bind(f, obj, a, b) + * g(c, d) // will do f.call(obj, a, b, c, d) + * + * @param {Function} f The function to bind the object to + * @param {Object} obj The object that should act as this when the function + * is called + * @param {*} var_args Rest arguments that will be used as the initial + * arguments when the function is called + * @return {Function} A new function that has bound this + */ + function bind(f, obj, var_args) { + var a = slice.call(arguments, 2); + return function() { + return f.apply(obj, a.concat(slice.call(arguments))); + }; + } + + function encodeHtmlAttribute(s) { + return String(s).replace(/&/g, '&').replace(/"/g, '"'); + } + + function addNamespacesAndStylesheet(doc) { + // create xmlns + if (!doc.namespaces['g_vml_']) { + doc.namespaces.add('g_vml_', 'urn:schemas-microsoft-com:vml', + '#default#VML'); + + } + if (!doc.namespaces['g_o_']) { + doc.namespaces.add('g_o_', 'urn:schemas-microsoft-com:office:office', + '#default#VML'); + } + + // Setup default CSS. Only add one style sheet per document + if (!doc.styleSheets['ex_canvas_']) { + var ss = doc.createStyleSheet(); + ss.owningElement.id = 'ex_canvas_'; + ss.cssText = 'canvas{display:inline-block;overflow:hidden;' + + // default size is 300x150 in Gecko and Opera + 'text-align:left;width:300px;height:150px}'; + } + } + + // Add namespaces and stylesheet at startup. + addNamespacesAndStylesheet(document); + + var G_vmlCanvasManager_ = { + init: function(opt_doc) { + if (/MSIE/.test(navigator.userAgent) && !window.opera) { + var doc = opt_doc || document; + // Create a dummy element so that IE will allow canvas elements to be + // recognized. + doc.createElement('canvas'); + doc.attachEvent('onreadystatechange', bind(this.init_, this, doc)); + } + }, + + init_: function(doc) { + // find all canvas elements + var els = doc.getElementsByTagName('canvas'); + for (var i = 0; i < els.length; i++) { + this.initElement(els[i]); + } + }, + + /** + * Public initializes a canvas element so that it can be used as canvas + * element from now on. This is called automatically before the page is + * loaded but if you are creating elements using createElement you need to + * make sure this is called on the element. + * @param {HTMLElement} el The canvas element to initialize. + * @return {HTMLElement} the element that was created. + */ + initElement: function(el) { + if (!el.getContext) { + el.getContext = getContext; + + // Add namespaces and stylesheet to document of the element. + addNamespacesAndStylesheet(el.ownerDocument); + + // Remove fallback content. There is no way to hide text nodes so we + // just remove all childNodes. We could hide all elements and remove + // text nodes but who really cares about the fallback content. + el.innerHTML = ''; + + // do not use inline function because that will leak memory + el.attachEvent('onpropertychange', onPropertyChange); + el.attachEvent('onresize', onResize); + + var attrs = el.attributes; + if (attrs.width && attrs.width.specified) { + // TODO: use runtimeStyle and coordsize + // el.getContext().setWidth_(attrs.width.nodeValue); + el.style.width = attrs.width.nodeValue + 'px'; + } else { + el.width = el.clientWidth; + } + if (attrs.height && attrs.height.specified) { + // TODO: use runtimeStyle and coordsize + // el.getContext().setHeight_(attrs.height.nodeValue); + el.style.height = attrs.height.nodeValue + 'px'; + } else { + el.height = el.clientHeight; + } + //el.getContext().setCoordsize_() + } + return el; + } + }; + + function onPropertyChange(e) { + var el = e.srcElement; + + switch (e.propertyName) { + case 'width': + el.getContext().clearRect(); + el.style.width = el.attributes.width.nodeValue + 'px'; + // In IE8 this does not trigger onresize. + el.firstChild.style.width = el.clientWidth + 'px'; + break; + case 'height': + el.getContext().clearRect(); + el.style.height = el.attributes.height.nodeValue + 'px'; + el.firstChild.style.height = el.clientHeight + 'px'; + break; + } + } + + function onResize(e) { + var el = e.srcElement; + if (el.firstChild) { + el.firstChild.style.width = el.clientWidth + 'px'; + el.firstChild.style.height = el.clientHeight + 'px'; + } + } + + G_vmlCanvasManager_.init(); + + // precompute "00" to "FF" + var decToHex = []; + for (var i = 0; i < 16; i++) { + for (var j = 0; j < 16; j++) { + decToHex[i * 16 + j] = i.toString(16) + j.toString(16); + } + } + + function createMatrixIdentity() { + return [ + [1, 0, 0], + [0, 1, 0], + [0, 0, 1] + ]; + } + + function matrixMultiply(m1, m2) { + var result = createMatrixIdentity(); + + for (var x = 0; x < 3; x++) { + for (var y = 0; y < 3; y++) { + var sum = 0; + + for (var z = 0; z < 3; z++) { + sum += m1[x][z] * m2[z][y]; + } + + result[x][y] = sum; + } + } + return result; + } + + function copyState(o1, o2) { + o2.fillStyle = o1.fillStyle; + o2.lineCap = o1.lineCap; + o2.lineJoin = o1.lineJoin; + o2.lineWidth = o1.lineWidth; + o2.miterLimit = o1.miterLimit; + o2.shadowBlur = o1.shadowBlur; + o2.shadowColor = o1.shadowColor; + o2.shadowOffsetX = o1.shadowOffsetX; + o2.shadowOffsetY = o1.shadowOffsetY; + o2.strokeStyle = o1.strokeStyle; + o2.globalAlpha = o1.globalAlpha; + o2.font = o1.font; + o2.textAlign = o1.textAlign; + o2.textBaseline = o1.textBaseline; + o2.arcScaleX_ = o1.arcScaleX_; + o2.arcScaleY_ = o1.arcScaleY_; + o2.lineScale_ = o1.lineScale_; + } + + var colorData = { + aliceblue: '#F0F8FF', + antiquewhite: '#FAEBD7', + aquamarine: '#7FFFD4', + azure: '#F0FFFF', + beige: '#F5F5DC', + bisque: '#FFE4C4', + black: '#000000', + blanchedalmond: '#FFEBCD', + blueviolet: '#8A2BE2', + brown: '#A52A2A', + burlywood: '#DEB887', + cadetblue: '#5F9EA0', + chartreuse: '#7FFF00', + chocolate: '#D2691E', + coral: '#FF7F50', + cornflowerblue: '#6495ED', + cornsilk: '#FFF8DC', + crimson: '#DC143C', + cyan: '#00FFFF', + darkblue: '#00008B', + darkcyan: '#008B8B', + darkgoldenrod: '#B8860B', + darkgray: '#A9A9A9', + darkgreen: '#006400', + darkgrey: '#A9A9A9', + darkkhaki: '#BDB76B', + darkmagenta: '#8B008B', + darkolivegreen: '#556B2F', + darkorange: '#FF8C00', + darkorchid: '#9932CC', + darkred: '#8B0000', + darksalmon: '#E9967A', + darkseagreen: '#8FBC8F', + darkslateblue: '#483D8B', + darkslategray: '#2F4F4F', + darkslategrey: '#2F4F4F', + darkturquoise: '#00CED1', + darkviolet: '#9400D3', + deeppink: '#FF1493', + deepskyblue: '#00BFFF', + dimgray: '#696969', + dimgrey: '#696969', + dodgerblue: '#1E90FF', + firebrick: '#B22222', + floralwhite: '#FFFAF0', + forestgreen: '#228B22', + gainsboro: '#DCDCDC', + ghostwhite: '#F8F8FF', + gold: '#FFD700', + goldenrod: '#DAA520', + grey: '#808080', + greenyellow: '#ADFF2F', + honeydew: '#F0FFF0', + hotpink: '#FF69B4', + indianred: '#CD5C5C', + indigo: '#4B0082', + ivory: '#FFFFF0', + khaki: '#F0E68C', + lavender: '#E6E6FA', + lavenderblush: '#FFF0F5', + lawngreen: '#7CFC00', + lemonchiffon: '#FFFACD', + lightblue: '#ADD8E6', + lightcoral: '#F08080', + lightcyan: '#E0FFFF', + lightgoldenrodyellow: '#FAFAD2', + lightgreen: '#90EE90', + lightgrey: '#D3D3D3', + lightpink: '#FFB6C1', + lightsalmon: '#FFA07A', + lightseagreen: '#20B2AA', + lightskyblue: '#87CEFA', + lightslategray: '#778899', + lightslategrey: '#778899', + lightsteelblue: '#B0C4DE', + lightyellow: '#FFFFE0', + limegreen: '#32CD32', + linen: '#FAF0E6', + magenta: '#FF00FF', + mediumaquamarine: '#66CDAA', + mediumblue: '#0000CD', + mediumorchid: '#BA55D3', + mediumpurple: '#9370DB', + mediumseagreen: '#3CB371', + mediumslateblue: '#7B68EE', + mediumspringgreen: '#00FA9A', + mediumturquoise: '#48D1CC', + mediumvioletred: '#C71585', + midnightblue: '#191970', + mintcream: '#F5FFFA', + mistyrose: '#FFE4E1', + moccasin: '#FFE4B5', + navajowhite: '#FFDEAD', + oldlace: '#FDF5E6', + olivedrab: '#6B8E23', + orange: '#FFA500', + orangered: '#FF4500', + orchid: '#DA70D6', + palegoldenrod: '#EEE8AA', + palegreen: '#98FB98', + paleturquoise: '#AFEEEE', + palevioletred: '#DB7093', + papayawhip: '#FFEFD5', + peachpuff: '#FFDAB9', + peru: '#CD853F', + pink: '#FFC0CB', + plum: '#DDA0DD', + powderblue: '#B0E0E6', + rosybrown: '#BC8F8F', + royalblue: '#4169E1', + saddlebrown: '#8B4513', + salmon: '#FA8072', + sandybrown: '#F4A460', + seagreen: '#2E8B57', + seashell: '#FFF5EE', + sienna: '#A0522D', + skyblue: '#87CEEB', + slateblue: '#6A5ACD', + slategray: '#708090', + slategrey: '#708090', + snow: '#FFFAFA', + springgreen: '#00FF7F', + steelblue: '#4682B4', + tan: '#D2B48C', + thistle: '#D8BFD8', + tomato: '#FF6347', + turquoise: '#40E0D0', + violet: '#EE82EE', + wheat: '#F5DEB3', + whitesmoke: '#F5F5F5', + yellowgreen: '#9ACD32' + }; + + + function getRgbHslContent(styleString) { + var start = styleString.indexOf('(', 3); + var end = styleString.indexOf(')', start + 1); + var parts = styleString.substring(start + 1, end).split(','); + // add alpha if needed + if (parts.length == 4 && styleString.substr(3, 1) == 'a') { + alpha = Number(parts[3]); + } else { + parts[3] = 1; + } + return parts; + } + + function percent(s) { + return parseFloat(s) / 100; + } + + function clamp(v, min, max) { + return Math.min(max, Math.max(min, v)); + } + + function hslToRgb(parts){ + var r, g, b; + h = parseFloat(parts[0]) / 360 % 360; + if (h < 0) + h++; + s = clamp(percent(parts[1]), 0, 1); + l = clamp(percent(parts[2]), 0, 1); + if (s == 0) { + r = g = b = l; // achromatic + } else { + var q = l < 0.5 ? l * (1 + s) : l + s - l * s; + var p = 2 * l - q; + r = hueToRgb(p, q, h + 1 / 3); + g = hueToRgb(p, q, h); + b = hueToRgb(p, q, h - 1 / 3); + } + + return '#' + decToHex[Math.floor(r * 255)] + + decToHex[Math.floor(g * 255)] + + decToHex[Math.floor(b * 255)]; + } + + function hueToRgb(m1, m2, h) { + if (h < 0) + h++; + if (h > 1) + h--; + + if (6 * h < 1) + return m1 + (m2 - m1) * 6 * h; + else if (2 * h < 1) + return m2; + else if (3 * h < 2) + return m1 + (m2 - m1) * (2 / 3 - h) * 6; + else + return m1; + } + + function processStyle(styleString) { + var str, alpha = 1; + + styleString = String(styleString); + if (styleString.charAt(0) == '#') { + str = styleString; + } else if (/^rgb/.test(styleString)) { + var parts = getRgbHslContent(styleString); + var str = '#', n; + for (var i = 0; i < 3; i++) { + if (parts[i].indexOf('%') != -1) { + n = Math.floor(percent(parts[i]) * 255); + } else { + n = Number(parts[i]); + } + str += decToHex[clamp(n, 0, 255)]; + } + alpha = parts[3]; + } else if (/^hsl/.test(styleString)) { + var parts = getRgbHslContent(styleString); + str = hslToRgb(parts); + alpha = parts[3]; + } else { + str = colorData[styleString] || styleString; + } + return {color: str, alpha: alpha}; + } + + var DEFAULT_STYLE = { + style: 'normal', + variant: 'normal', + weight: 'normal', + size: 10, + family: 'sans-serif' + }; + + // Internal text style cache + var fontStyleCache = {}; + + function processFontStyle(styleString) { + if (fontStyleCache[styleString]) { + return fontStyleCache[styleString]; + } + + var el = document.createElement('div'); + var style = el.style; + try { + style.font = styleString; + } catch (ex) { + // Ignore failures to set to invalid font. + } + + return fontStyleCache[styleString] = { + style: style.fontStyle || DEFAULT_STYLE.style, + variant: style.fontVariant || DEFAULT_STYLE.variant, + weight: style.fontWeight || DEFAULT_STYLE.weight, + size: style.fontSize || DEFAULT_STYLE.size, + family: style.fontFamily || DEFAULT_STYLE.family + }; + } + + function getComputedStyle(style, element) { + var computedStyle = {}; + + for (var p in style) { + computedStyle[p] = style[p]; + } + + // Compute the size + var canvasFontSize = parseFloat(element.currentStyle.fontSize), + fontSize = parseFloat(style.size); + + if (typeof style.size == 'number') { + computedStyle.size = style.size; + } else if (style.size.indexOf('px') != -1) { + computedStyle.size = fontSize; + } else if (style.size.indexOf('em') != -1) { + computedStyle.size = canvasFontSize * fontSize; + } else if(style.size.indexOf('%') != -1) { + computedStyle.size = (canvasFontSize / 100) * fontSize; + } else if (style.size.indexOf('pt') != -1) { + computedStyle.size = fontSize / .75; + } else { + computedStyle.size = canvasFontSize; + } + + // Different scaling between normal text and VML text. This was found using + // trial and error to get the same size as non VML text. + computedStyle.size *= 0.981; + + return computedStyle; + } + + function buildStyle(style) { + return style.style + ' ' + style.variant + ' ' + style.weight + ' ' + + style.size + 'px ' + style.family; + } + + function processLineCap(lineCap) { + switch (lineCap) { + case 'butt': + return 'flat'; + case 'round': + return 'round'; + case 'square': + default: + return 'square'; + } + } + + /** + * This class implements CanvasRenderingContext2D interface as described by + * the WHATWG. + * @param {HTMLElement} surfaceElement The element that the 2D context should + * be associated with + */ + function CanvasRenderingContext2D_(surfaceElement) { + this.m_ = createMatrixIdentity(); + + this.mStack_ = []; + this.aStack_ = []; + this.currentPath_ = []; + + // Canvas context properties + this.strokeStyle = '#000'; + this.fillStyle = '#000'; + + this.lineWidth = 1; + this.lineJoin = 'miter'; + this.lineCap = 'butt'; + this.miterLimit = Z * 1; + this.globalAlpha = 1; + this.font = '10px sans-serif'; + this.textAlign = 'left'; + this.textBaseline = 'alphabetic'; + this.canvas = surfaceElement; + + var el = surfaceElement.ownerDocument.createElement('div'); + el.style.width = surfaceElement.clientWidth + 'px'; + el.style.height = surfaceElement.clientHeight + 'px'; + el.style.overflow = 'hidden'; + el.style.position = 'absolute'; + surfaceElement.appendChild(el); + + this.element_ = el; + this.arcScaleX_ = 1; + this.arcScaleY_ = 1; + this.lineScale_ = 1; + } + + var contextPrototype = CanvasRenderingContext2D_.prototype; + contextPrototype.clearRect = function() { + if (this.textMeasureEl_) { + this.textMeasureEl_.removeNode(true); + this.textMeasureEl_ = null; + } + this.element_.innerHTML = ''; + }; + + contextPrototype.beginPath = function() { + // TODO: Branch current matrix so that save/restore has no effect + // as per safari docs. + this.currentPath_ = []; + }; + + contextPrototype.moveTo = function(aX, aY) { + var p = this.getCoords_(aX, aY); + this.currentPath_.push({type: 'moveTo', x: p.x, y: p.y}); + this.currentX_ = p.x; + this.currentY_ = p.y; + }; + + contextPrototype.lineTo = function(aX, aY) { + var p = this.getCoords_(aX, aY); + this.currentPath_.push({type: 'lineTo', x: p.x, y: p.y}); + + this.currentX_ = p.x; + this.currentY_ = p.y; + }; + + contextPrototype.bezierCurveTo = function(aCP1x, aCP1y, + aCP2x, aCP2y, + aX, aY) { + var p = this.getCoords_(aX, aY); + var cp1 = this.getCoords_(aCP1x, aCP1y); + var cp2 = this.getCoords_(aCP2x, aCP2y); + bezierCurveTo(this, cp1, cp2, p); + }; + + // Helper function that takes the already fixed cordinates. + function bezierCurveTo(self, cp1, cp2, p) { + self.currentPath_.push({ + type: 'bezierCurveTo', + cp1x: cp1.x, + cp1y: cp1.y, + cp2x: cp2.x, + cp2y: cp2.y, + x: p.x, + y: p.y + }); + self.currentX_ = p.x; + self.currentY_ = p.y; + } + + contextPrototype.quadraticCurveTo = function(aCPx, aCPy, aX, aY) { + // the following is lifted almost directly from + // http://developer.mozilla.org/en/docs/Canvas_tutorial:Drawing_shapes + + var cp = this.getCoords_(aCPx, aCPy); + var p = this.getCoords_(aX, aY); + + var cp1 = { + x: this.currentX_ + 2.0 / 3.0 * (cp.x - this.currentX_), + y: this.currentY_ + 2.0 / 3.0 * (cp.y - this.currentY_) + }; + var cp2 = { + x: cp1.x + (p.x - this.currentX_) / 3.0, + y: cp1.y + (p.y - this.currentY_) / 3.0 + }; + + bezierCurveTo(this, cp1, cp2, p); + }; + + contextPrototype.arc = function(aX, aY, aRadius, + aStartAngle, aEndAngle, aClockwise) { + aRadius *= Z; + var arcType = aClockwise ? 'at' : 'wa'; + + var xStart = aX + mc(aStartAngle) * aRadius - Z2; + var yStart = aY + ms(aStartAngle) * aRadius - Z2; + + var xEnd = aX + mc(aEndAngle) * aRadius - Z2; + var yEnd = aY + ms(aEndAngle) * aRadius - Z2; + + // IE won't render arches drawn counter clockwise if xStart == xEnd. + if (xStart == xEnd && !aClockwise) { + xStart += 0.125; // Offset xStart by 1/80 of a pixel. Use something + // that can be represented in binary + } + + var p = this.getCoords_(aX, aY); + var pStart = this.getCoords_(xStart, yStart); + var pEnd = this.getCoords_(xEnd, yEnd); + + this.currentPath_.push({type: arcType, + x: p.x, + y: p.y, + radius: aRadius, + xStart: pStart.x, + yStart: pStart.y, + xEnd: pEnd.x, + yEnd: pEnd.y}); + + }; + + contextPrototype.rect = function(aX, aY, aWidth, aHeight) { + this.moveTo(aX, aY); + this.lineTo(aX + aWidth, aY); + this.lineTo(aX + aWidth, aY + aHeight); + this.lineTo(aX, aY + aHeight); + this.closePath(); + }; + + contextPrototype.strokeRect = function(aX, aY, aWidth, aHeight) { + var oldPath = this.currentPath_; + this.beginPath(); + + this.moveTo(aX, aY); + this.lineTo(aX + aWidth, aY); + this.lineTo(aX + aWidth, aY + aHeight); + this.lineTo(aX, aY + aHeight); + this.closePath(); + this.stroke(); + + this.currentPath_ = oldPath; + }; + + contextPrototype.fillRect = function(aX, aY, aWidth, aHeight) { + var oldPath = this.currentPath_; + this.beginPath(); + + this.moveTo(aX, aY); + this.lineTo(aX + aWidth, aY); + this.lineTo(aX + aWidth, aY + aHeight); + this.lineTo(aX, aY + aHeight); + this.closePath(); + this.fill(); + + this.currentPath_ = oldPath; + }; + + contextPrototype.createLinearGradient = function(aX0, aY0, aX1, aY1) { + var gradient = new CanvasGradient_('gradient'); + gradient.x0_ = aX0; + gradient.y0_ = aY0; + gradient.x1_ = aX1; + gradient.y1_ = aY1; + return gradient; + }; + + contextPrototype.createRadialGradient = function(aX0, aY0, aR0, + aX1, aY1, aR1) { + var gradient = new CanvasGradient_('gradientradial'); + gradient.x0_ = aX0; + gradient.y0_ = aY0; + gradient.r0_ = aR0; + gradient.x1_ = aX1; + gradient.y1_ = aY1; + gradient.r1_ = aR1; + return gradient; + }; + + contextPrototype.drawImage = function(image, var_args) { + var dx, dy, dw, dh, sx, sy, sw, sh; + + // to find the original width we overide the width and height + var oldRuntimeWidth = image.runtimeStyle.width; + var oldRuntimeHeight = image.runtimeStyle.height; + image.runtimeStyle.width = 'auto'; + image.runtimeStyle.height = 'auto'; + + // get the original size + var w = image.width; + var h = image.height; + + // and remove overides + image.runtimeStyle.width = oldRuntimeWidth; + image.runtimeStyle.height = oldRuntimeHeight; + + if (arguments.length == 3) { + dx = arguments[1]; + dy = arguments[2]; + sx = sy = 0; + sw = dw = w; + sh = dh = h; + } else if (arguments.length == 5) { + dx = arguments[1]; + dy = arguments[2]; + dw = arguments[3]; + dh = arguments[4]; + sx = sy = 0; + sw = w; + sh = h; + } else if (arguments.length == 9) { + sx = arguments[1]; + sy = arguments[2]; + sw = arguments[3]; + sh = arguments[4]; + dx = arguments[5]; + dy = arguments[6]; + dw = arguments[7]; + dh = arguments[8]; + } else { + throw Error('Invalid number of arguments'); + } + + var d = this.getCoords_(dx, dy); + + var w2 = sw / 2; + var h2 = sh / 2; + + var vmlStr = []; + + var W = 10; + var H = 10; + + // For some reason that I've now forgotten, using divs didn't work + vmlStr.push(' <g_vml_:group', + ' coordsize="', Z * W, ',', Z * H, '"', + ' coordorigin="0,0"' , + ' style="width:', W, 'px;height:', H, 'px;position:absolute;'); + + // If filters are necessary (rotation exists), create them + // filters are bog-slow, so only create them if abbsolutely necessary + // The following check doesn't account for skews (which don't exist + // in the canvas spec (yet) anyway. + + if (this.m_[0][0] != 1 || this.m_[0][1] || + this.m_[1][1] != 1 || this.m_[1][0]) { + var filter = []; + + // Note the 12/21 reversal + filter.push('M11=', this.m_[0][0], ',', + 'M12=', this.m_[1][0], ',', + 'M21=', this.m_[0][1], ',', + 'M22=', this.m_[1][1], ',', + 'Dx=', mr(d.x / Z), ',', + 'Dy=', mr(d.y / Z), ''); + + // Bounding box calculation (need to minimize displayed area so that + // filters don't waste time on unused pixels. + var max = d; + var c2 = this.getCoords_(dx + dw, dy); + var c3 = this.getCoords_(dx, dy + dh); + var c4 = this.getCoords_(dx + dw, dy + dh); + + max.x = m.max(max.x, c2.x, c3.x, c4.x); + max.y = m.max(max.y, c2.y, c3.y, c4.y); + + vmlStr.push('padding:0 ', mr(max.x / Z), 'px ', mr(max.y / Z), + 'px 0;filter:progid:DXImageTransform.Microsoft.Matrix(', + filter.join(''), ", sizingmethod='clip');"); + + } else { + vmlStr.push('top:', mr(d.y / Z), 'px;left:', mr(d.x / Z), 'px;'); + } + + vmlStr.push(' ">' , + '<g_vml_:image src="', image.src, '"', + ' style="width:', Z * dw, 'px;', + ' height:', Z * dh, 'px"', + ' cropleft="', sx / w, '"', + ' croptop="', sy / h, '"', + ' cropright="', (w - sx - sw) / w, '"', + ' cropbottom="', (h - sy - sh) / h, '"', + ' />', + '</g_vml_:group>'); + + this.element_.insertAdjacentHTML('BeforeEnd', vmlStr.join('')); + }; + + contextPrototype.stroke = function(aFill) { + var W = 10; + var H = 10; + // Divide the shape into chunks if it's too long because IE has a limit + // somewhere for how long a VML shape can be. This simple division does + // not work with fills, only strokes, unfortunately. + var chunkSize = 5000; + + var min = {x: null, y: null}; + var max = {x: null, y: null}; + + for (var j = 0; j < this.currentPath_.length; j += chunkSize) { + var lineStr = []; + var lineOpen = false; + + lineStr.push('<g_vml_:shape', + ' filled="', !!aFill, '"', + ' style="position:absolute;width:', W, 'px;height:', H, 'px;"', + ' coordorigin="0,0"', + ' coordsize="', Z * W, ',', Z * H, '"', + ' stroked="', !aFill, '"', + ' path="'); + + var newSeq = false; + + for (var i = j; i < Math.min(j + chunkSize, this.currentPath_.length); i++) { + if (i % chunkSize == 0 && i > 0) { // move into position for next chunk + lineStr.push(' m ', mr(this.currentPath_[i-1].x), ',', mr(this.currentPath_[i-1].y)); + } + + var p = this.currentPath_[i]; + var c; + + switch (p.type) { + case 'moveTo': + c = p; + lineStr.push(' m ', mr(p.x), ',', mr(p.y)); + break; + case 'lineTo': + lineStr.push(' l ', mr(p.x), ',', mr(p.y)); + break; + case 'close': + lineStr.push(' x '); + p = null; + break; + case 'bezierCurveTo': + lineStr.push(' c ', + mr(p.cp1x), ',', mr(p.cp1y), ',', + mr(p.cp2x), ',', mr(p.cp2y), ',', + mr(p.x), ',', mr(p.y)); + break; + case 'at': + case 'wa': + lineStr.push(' ', p.type, ' ', + mr(p.x - this.arcScaleX_ * p.radius), ',', + mr(p.y - this.arcScaleY_ * p.radius), ' ', + mr(p.x + this.arcScaleX_ * p.radius), ',', + mr(p.y + this.arcScaleY_ * p.radius), ' ', + mr(p.xStart), ',', mr(p.yStart), ' ', + mr(p.xEnd), ',', mr(p.yEnd)); + break; + } + + + // TODO: Following is broken for curves due to + // move to proper paths. + + // Figure out dimensions so we can do gradient fills + // properly + if (p) { + if (min.x == null || p.x < min.x) { + min.x = p.x; + } + if (max.x == null || p.x > max.x) { + max.x = p.x; + } + if (min.y == null || p.y < min.y) { + min.y = p.y; + } + if (max.y == null || p.y > max.y) { + max.y = p.y; + } + } + } + lineStr.push(' ">'); + + if (!aFill) { + appendStroke(this, lineStr); + } else { + appendFill(this, lineStr, min, max); + } + + lineStr.push('</g_vml_:shape>'); + + this.element_.insertAdjacentHTML('beforeEnd', lineStr.join('')); + } + }; + + function appendStroke(ctx, lineStr) { + var a = processStyle(ctx.strokeStyle); + var color = a.color; + var opacity = a.alpha * ctx.globalAlpha; + var lineWidth = ctx.lineScale_ * ctx.lineWidth; + + // VML cannot correctly render a line if the width is less than 1px. + // In that case, we dilute the color to make the line look thinner. + if (lineWidth < 1) { + opacity *= lineWidth; + } + + lineStr.push( + '<g_vml_:stroke', + ' opacity="', opacity, '"', + ' joinstyle="', ctx.lineJoin, '"', + ' miterlimit="', ctx.miterLimit, '"', + ' endcap="', processLineCap(ctx.lineCap), '"', + ' weight="', lineWidth, 'px"', + ' color="', color, '" />' + ); + } + + function appendFill(ctx, lineStr, min, max) { + var fillStyle = ctx.fillStyle; + var arcScaleX = ctx.arcScaleX_; + var arcScaleY = ctx.arcScaleY_; + var width = max.x - min.x; + var height = max.y - min.y; + if (fillStyle instanceof CanvasGradient_) { + // TODO: Gradients transformed with the transformation matrix. + var angle = 0; + var focus = {x: 0, y: 0}; + + // additional offset + var shift = 0; + // scale factor for offset + var expansion = 1; + + if (fillStyle.type_ == 'gradient') { + var x0 = fillStyle.x0_ / arcScaleX; + var y0 = fillStyle.y0_ / arcScaleY; + var x1 = fillStyle.x1_ / arcScaleX; + var y1 = fillStyle.y1_ / arcScaleY; + var p0 = ctx.getCoords_(x0, y0); + var p1 = ctx.getCoords_(x1, y1); + var dx = p1.x - p0.x; + var dy = p1.y - p0.y; + angle = Math.atan2(dx, dy) * 180 / Math.PI; + + // The angle should be a non-negative number. + if (angle < 0) { + angle += 360; + } + + // Very small angles produce an unexpected result because they are + // converted to a scientific notation string. + if (angle < 1e-6) { + angle = 0; + } + } else { + var p0 = ctx.getCoords_(fillStyle.x0_, fillStyle.y0_); + focus = { + x: (p0.x - min.x) / width, + y: (p0.y - min.y) / height + }; + + width /= arcScaleX * Z; + height /= arcScaleY * Z; + var dimension = m.max(width, height); + shift = 2 * fillStyle.r0_ / dimension; + expansion = 2 * fillStyle.r1_ / dimension - shift; + } + + // We need to sort the color stops in ascending order by offset, + // otherwise IE won't interpret it correctly. + var stops = fillStyle.colors_; + stops.sort(function(cs1, cs2) { + return cs1.offset - cs2.offset; + }); + + var length = stops.length; + var color1 = stops[0].color; + var color2 = stops[length - 1].color; + var opacity1 = stops[0].alpha * ctx.globalAlpha; + var opacity2 = stops[length - 1].alpha * ctx.globalAlpha; + + var colors = []; + for (var i = 0; i < length; i++) { + var stop = stops[i]; + colors.push(stop.offset * expansion + shift + ' ' + stop.color); + } + + // When colors attribute is used, the meanings of opacity and o:opacity2 + // are reversed. + lineStr.push('<g_vml_:fill type="', fillStyle.type_, '"', + ' method="none" focus="100%"', + ' color="', color1, '"', + ' color2="', color2, '"', + ' colors="', colors.join(','), '"', + ' opacity="', opacity2, '"', + ' g_o_:opacity2="', opacity1, '"', + ' angle="', angle, '"', + ' focusposition="', focus.x, ',', focus.y, '" />'); + } else if (fillStyle instanceof CanvasPattern_) { + if (width && height) { + var deltaLeft = -min.x; + var deltaTop = -min.y; + lineStr.push('<g_vml_:fill', + ' position="', + deltaLeft / width * arcScaleX * arcScaleX, ',', + deltaTop / height * arcScaleY * arcScaleY, '"', + ' type="tile"', + // TODO: Figure out the correct size to fit the scale. + //' size="', w, 'px ', h, 'px"', + ' src="', fillStyle.src_, '" />'); + } + } else { + var a = processStyle(ctx.fillStyle); + var color = a.color; + var opacity = a.alpha * ctx.globalAlpha; + lineStr.push('<g_vml_:fill color="', color, '" opacity="', opacity, + '" />'); + } + } + + contextPrototype.fill = function() { + this.stroke(true); + }; + + contextPrototype.closePath = function() { + this.currentPath_.push({type: 'close'}); + }; + + /** + * @private + */ + contextPrototype.getCoords_ = function(aX, aY) { + var m = this.m_; + return { + x: Z * (aX * m[0][0] + aY * m[1][0] + m[2][0]) - Z2, + y: Z * (aX * m[0][1] + aY * m[1][1] + m[2][1]) - Z2 + }; + }; + + contextPrototype.save = function() { + var o = {}; + copyState(this, o); + this.aStack_.push(o); + this.mStack_.push(this.m_); + this.m_ = matrixMultiply(createMatrixIdentity(), this.m_); + }; + + contextPrototype.restore = function() { + if (this.aStack_.length) { + copyState(this.aStack_.pop(), this); + this.m_ = this.mStack_.pop(); + } + }; + + function matrixIsFinite(m) { + return isFinite(m[0][0]) && isFinite(m[0][1]) && + isFinite(m[1][0]) && isFinite(m[1][1]) && + isFinite(m[2][0]) && isFinite(m[2][1]); + } + + function setM(ctx, m, updateLineScale) { + if (!matrixIsFinite(m)) { + return; + } + ctx.m_ = m; + + if (updateLineScale) { + // Get the line scale. + // Determinant of this.m_ means how much the area is enlarged by the + // transformation. So its square root can be used as a scale factor + // for width. + var det = m[0][0] * m[1][1] - m[0][1] * m[1][0]; + ctx.lineScale_ = sqrt(abs(det)); + } + } + + contextPrototype.translate = function(aX, aY) { + var m1 = [ + [1, 0, 0], + [0, 1, 0], + [aX, aY, 1] + ]; + + setM(this, matrixMultiply(m1, this.m_), false); + }; + + contextPrototype.rotate = function(aRot) { + var c = mc(aRot); + var s = ms(aRot); + + var m1 = [ + [c, s, 0], + [-s, c, 0], + [0, 0, 1] + ]; + + setM(this, matrixMultiply(m1, this.m_), false); + }; + + contextPrototype.scale = function(aX, aY) { + this.arcScaleX_ *= aX; + this.arcScaleY_ *= aY; + var m1 = [ + [aX, 0, 0], + [0, aY, 0], + [0, 0, 1] + ]; + + setM(this, matrixMultiply(m1, this.m_), true); + }; + + contextPrototype.transform = function(m11, m12, m21, m22, dx, dy) { + var m1 = [ + [m11, m12, 0], + [m21, m22, 0], + [dx, dy, 1] + ]; + + setM(this, matrixMultiply(m1, this.m_), true); + }; + + contextPrototype.setTransform = function(m11, m12, m21, m22, dx, dy) { + var m = [ + [m11, m12, 0], + [m21, m22, 0], + [dx, dy, 1] + ]; + + setM(this, m, true); + }; + + /** + * The text drawing function. + * The maxWidth argument isn't taken in account, since no browser supports + * it yet. + */ + contextPrototype.drawText_ = function(text, x, y, maxWidth, stroke) { + var m = this.m_, + delta = 1000, + left = 0, + right = delta, + offset = {x: 0, y: 0}, + lineStr = []; + + var fontStyle = getComputedStyle(processFontStyle(this.font), + this.element_); + + var fontStyleString = buildStyle(fontStyle); + + var elementStyle = this.element_.currentStyle; + var textAlign = this.textAlign.toLowerCase(); + switch (textAlign) { + case 'left': + case 'center': + case 'right': + break; + case 'end': + textAlign = elementStyle.direction == 'ltr' ? 'right' : 'left'; + break; + case 'start': + textAlign = elementStyle.direction == 'rtl' ? 'right' : 'left'; + break; + default: + textAlign = 'left'; + } + + // 1.75 is an arbitrary number, as there is no info about the text baseline + switch (this.textBaseline) { + case 'hanging': + case 'top': + offset.y = fontStyle.size / 1.75; + break; + case 'middle': + break; + default: + case null: + case 'alphabetic': + case 'ideographic': + case 'bottom': + offset.y = -fontStyle.size / 2.25; + break; + } + + switch(textAlign) { + case 'right': + left = delta; + right = 0.05; + break; + case 'center': + left = right = delta / 2; + break; + } + + var d = this.getCoords_(x + offset.x, y + offset.y); + + lineStr.push('<g_vml_:line from="', -left ,' 0" to="', right ,' 0.05" ', + ' coordsize="100 100" coordorigin="0 0"', + ' filled="', !stroke, '" stroked="', !!stroke, + '" style="position:absolute;width:1px;height:1px;">'); + + if (stroke) { + appendStroke(this, lineStr); + } else { + // TODO: Fix the min and max params. + appendFill(this, lineStr, {x: -left, y: 0}, + {x: right, y: fontStyle.size}); + } + + var skewM = m[0][0].toFixed(3) + ',' + m[1][0].toFixed(3) + ',' + + m[0][1].toFixed(3) + ',' + m[1][1].toFixed(3) + ',0,0'; + + var skewOffset = mr(d.x / Z) + ',' + mr(d.y / Z); + + lineStr.push('<g_vml_:skew on="t" matrix="', skewM ,'" ', + ' offset="', skewOffset, '" origin="', left ,' 0" />', + '<g_vml_:path textpathok="true" />', + '<g_vml_:textpath on="true" string="', + encodeHtmlAttribute(text), + '" style="v-text-align:', textAlign, + ';font:', encodeHtmlAttribute(fontStyleString), + '" /></g_vml_:line>'); + + this.element_.insertAdjacentHTML('beforeEnd', lineStr.join('')); + }; + + contextPrototype.fillText = function(text, x, y, maxWidth) { + this.drawText_(text, x, y, maxWidth, false); + }; + + contextPrototype.strokeText = function(text, x, y, maxWidth) { + this.drawText_(text, x, y, maxWidth, true); + }; + + contextPrototype.measureText = function(text) { + if (!this.textMeasureEl_) { + var s = '<span style="position:absolute;' + + 'top:-20000px;left:0;padding:0;margin:0;border:none;' + + 'white-space:pre;"></span>'; + this.element_.insertAdjacentHTML('beforeEnd', s); + this.textMeasureEl_ = this.element_.lastChild; + } + var doc = this.element_.ownerDocument; + this.textMeasureEl_.innerHTML = ''; + this.textMeasureEl_.style.font = this.font; + // Don't use innerHTML or innerText because they allow markup/whitespace. + this.textMeasureEl_.appendChild(doc.createTextNode(text)); + return {width: this.textMeasureEl_.offsetWidth}; + }; + + /******** STUBS ********/ + contextPrototype.clip = function() { + // TODO: Implement + }; + + contextPrototype.arcTo = function() { + // TODO: Implement + }; + + contextPrototype.createPattern = function(image, repetition) { + return new CanvasPattern_(image, repetition); + }; + + // Gradient / Pattern Stubs + function CanvasGradient_(aType) { + this.type_ = aType; + this.x0_ = 0; + this.y0_ = 0; + this.r0_ = 0; + this.x1_ = 0; + this.y1_ = 0; + this.r1_ = 0; + this.colors_ = []; + } + + CanvasGradient_.prototype.addColorStop = function(aOffset, aColor) { + aColor = processStyle(aColor); + this.colors_.push({offset: aOffset, + color: aColor.color, + alpha: aColor.alpha}); + }; + + function CanvasPattern_(image, repetition) { + assertImageIsValid(image); + switch (repetition) { + case 'repeat': + case null: + case '': + this.repetition_ = 'repeat'; + break + case 'repeat-x': + case 'repeat-y': + case 'no-repeat': + this.repetition_ = repetition; + break; + default: + throwException('SYNTAX_ERR'); + } + + this.src_ = image.src; + this.width_ = image.width; + this.height_ = image.height; + } + + function throwException(s) { + throw new DOMException_(s); + } + + function assertImageIsValid(img) { + if (!img || img.nodeType != 1 || img.tagName != 'IMG') { + throwException('TYPE_MISMATCH_ERR'); + } + if (img.readyState != 'complete') { + throwException('INVALID_STATE_ERR'); + } + } + + function DOMException_(s) { + this.code = this[s]; + this.message = s +': DOM Exception ' + this.code; + } + var p = DOMException_.prototype = new Error; + p.INDEX_SIZE_ERR = 1; + p.DOMSTRING_SIZE_ERR = 2; + p.HIERARCHY_REQUEST_ERR = 3; + p.WRONG_DOCUMENT_ERR = 4; + p.INVALID_CHARACTER_ERR = 5; + p.NO_DATA_ALLOWED_ERR = 6; + p.NO_MODIFICATION_ALLOWED_ERR = 7; + p.NOT_FOUND_ERR = 8; + p.NOT_SUPPORTED_ERR = 9; + p.INUSE_ATTRIBUTE_ERR = 10; + p.INVALID_STATE_ERR = 11; + p.SYNTAX_ERR = 12; + p.INVALID_MODIFICATION_ERR = 13; + p.NAMESPACE_ERR = 14; + p.INVALID_ACCESS_ERR = 15; + p.VALIDATION_ERR = 16; + p.TYPE_MISMATCH_ERR = 17; + + // set up externs + G_vmlCanvasManager = G_vmlCanvasManager_; + CanvasRenderingContext2D = CanvasRenderingContext2D_; + CanvasGradient = CanvasGradient_; + CanvasPattern = CanvasPattern_; + DOMException = DOMException_; +})(); + +} // if Added: trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/jflot/excanvas.min.js =================================================================== --- trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/jflot/excanvas.min.js (rev 0) +++ trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/jflot/excanvas.min.js 2010-08-03 00:25:18 UTC (rev 3199) @@ -0,0 +1 @@ +if(!document.createElement("canvas").getContext){(function(){var z=Math;var K=z.round;var J=z.sin;var U=z.cos;var b=z.abs;var k=z.sqrt;var D=10;var F=D/2;function T(){return this.context_||(this.context_=new W(this))}var O=Array.prototype.slice;function G(i,j,m){var Z=O.call(arguments,2);return function(){return i.apply(j,Z.concat(O.call(arguments)))}}function AD(Z){return String(Z).replace(/&/g,"&").replace(/"/g,""")}function r(i){if(!i.namespaces.g_vml_){i.namespaces.add("g_vml_","urn:schemas-microsoft-com:vml","#default#VML")}if(!i.namespaces.g_o_){i.namespaces.add("g_o_","urn:schemas-microsoft-com:office:office","#default#VML")}if(!i.styleSheets.ex_canvas_){var Z=i.createStyleSheet();Z.owningElement.id="ex_canvas_";Z.cssText="canvas{display:inline-block;overflow:hidden;text-align:left;width:300px;height:150px}"}}r(document);var E={init:function(Z){if(/MSIE/.test(navigator.userAgent)&&!window.opera){var i=Z||document;i.createElement("canvas");i.attachEvent("onreadystatechange",G(this.init_,this,i))}},init_:function(m){var j=m.getElementsByTagName("canvas");for(var Z=0;Z<j.length;Z++){this.initElement(j[Z])}},initElement:function(i){if(!i.getContext){i.getContext=T;r(i.ownerDocument);i.innerHTML="";i.attachEvent("onpropertychange",S);i.attachEvent("onresize",w);var Z=i.attributes;if(Z.width&&Z.width.specified){i.style.width=Z.width.nodeValue+"px"}else{i.width=i.clientWidth}if(Z.height&&Z.height.specified){i.style.height=Z.height.nodeValue+"px"}else{i.height=i.clientHeight}}return i}};function S(i){var Z=i.srcElement;switch(i.propertyName){case"width":Z.getContext().clearRect();Z.style.width=Z.attributes.width.nodeValue+"px";Z.firstChild.style.width=Z.clientWidth+"px";break;case"height":Z.getContext().clearRect();Z.style.height=Z.attributes.height.nodeValue+"px";Z.firstChild.style.height=Z.clientHeight+"px";break}}function w(i){var Z=i.srcElement;if(Z.firstChild){Z.firstChild.style.width=Z.clientWidth+"px";Z.firstChild.style.height=Z.clientHeight+"px"}}E.init();var I=[];for(var AC=0;AC<16;AC++){for(var AB=0;AB<16;AB++){I[AC*16+AB]=AC.toString(16)+AB.toString(16)}}function V(){return[[1,0,0],[0,1,0],[0,0,1]]}function d(m,j){var i=V();for(var Z=0;Z<3;Z++){for(var AF=0;AF<3;AF++){var p=0;for(var AE=0;AE<3;AE++){p+=m[Z][AE]*j[AE][AF]}i[Z][AF]=p}}return i}function Q(i,Z){Z.fillStyle=i.fillStyle;Z.lineCap=i.lineCap;Z.lineJoin=i.lineJoin;Z.lineWidth=i.lineWidth;Z.miterLimit=i.miterLimit;Z.shadowBlur=i.shadowBlur;Z.shadowColor=i.shadowColor;Z.shadowOffsetX=i.shadowOffsetX;Z.shadowOffsetY=i.shadowOffsetY;Z.strokeStyle=i.strokeStyle;Z.globalAlpha=i.globalAlpha;Z.font=i.font;Z.textAlign=i.textAlign;Z.textBaseline=i.textBaseline;Z.arcScaleX_=i.arcScaleX_;Z.arcScaleY_=i.arcScaleY_;Z.lineScale_=i.lineScale_}var B={aliceblue:"#F0F8FF",antiquewhite:"#FAEBD7",aquamarine:"#7FFFD4",azure:"#F0FFFF",beige:"#F5F5DC",bisque:"#FFE4C4",black:"#000000",blanchedalmond:"#FFEBCD",blueviolet:"#8A2BE2",brown:"#A52A2A",burlywood:"#DEB887",cadetblue:"#5F9EA0",chartreuse:"#7FFF00",chocolate:"#D2691E",coral:"#FF7F50",cornflowerblue:"#6495ED",cornsilk:"#FFF8DC",crimson:"#DC143C",cyan:"#00FFFF",darkblue:"#00008B",darkcyan:"#008B8B",darkgoldenrod:"#B8860B",darkgray:"#A9A9A9",darkgreen:"#006400",darkgrey:"#A9A9A9",darkkhaki:"#BDB76B",darkmagenta:"#8B008B",darkolivegreen:"#556B2F",darkorange:"#FF8C00",darkorchid:"#9932CC",darkred:"#8B0000",darksalmon:"#E9967A",darkseagreen:"#8FBC8F",darkslateblue:"#483D8B",darkslategray:"#2F4F4F",darkslategrey:"#2F4F4F",darkturquoise:"#00CED1",darkviolet:"#9400D3",deeppink:"#FF1493",deepskyblue:"#00BFFF",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1E90FF",firebrick:"#B22222",floralwhite:"#FFFAF0",forestgreen:"#228B22",gainsboro:"#DCDCDC",ghostwhite:"#F8F8FF",gold:"#FFD700",goldenrod:"#DAA520",grey:"#808080",greenyellow:"#ADFF2F",honeydew:"#F0FFF0",hotpink:"#FF69B4",indianred:"#CD5C5C",indigo:"#4B0082",ivory:"#FFFFF0",khaki:"#F0E68C",lavender:"#E6E6FA",lavenderblush:"#FFF0F5",lawngreen:"#7CFC00",lemonchiffon:"#FFFACD",lightblue:"#ADD8E6",lightcoral:"#F08080",lightcyan:"#E0FFFF",lightgoldenrodyellow:"#FAFAD2",lightgreen:"#90EE90",lightgrey:"#D3D3D3",lightpink:"#FFB6C1",lightsalmon:"#FFA07A",lightseagreen:"#20B2AA",lightskyblue:"#87CEFA",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#B0C4DE",lightyellow:"#FFFFE0",limegreen:"#32CD32",linen:"#FAF0E6",magenta:"#FF00FF",mediumaquamarine:"#66CDAA",mediumblue:"#0000CD",mediumorchid:"#BA55D3",mediumpurple:"#9370DB",mediumseagreen:"#3CB371",mediumslateblue:"#7B68EE",mediumspringgreen:"#00FA9A",mediumturquoise:"#48D1CC",mediumvioletred:"#C71585",midnightblue:"#191970",mintcream:"#F5FFFA",mistyrose:"#FFE4E1",moccasin:"#FFE4B5",navajowhite:"#FFDEAD",oldlace:"#FDF5E6",olivedrab:"#6B8E23",orange:"#FFA500",orangered:"#FF4500",orchid:"#DA70D6",palegoldenrod:"#EEE8AA",palegreen:"#98FB98",paleturquoise:"#AFEEEE",palevioletred:"#DB7093",papayawhip:"#FFEFD5",peachpuff:"#FFDAB9",peru:"#CD853F",pink:"#FFC0CB",plum:"#DDA0DD",powderblue:"#B0E0E6",rosybrown:"#BC8F8F",royalblue:"#4169E1",saddlebrown:"#8B4513",salmon:"#FA8072",sandybrown:"#F4A460",seagreen:"#2E8B57",seashell:"#FFF5EE",sienna:"#A0522D",skyblue:"#87CEEB",slateblue:"#6A5ACD",slategray:"#708090",slategrey:"#708090",snow:"#FFFAFA",springgreen:"#00FF7F",steelblue:"#4682B4",tan:"#D2B48C",thistle:"#D8BFD8",tomato:"#FF6347",turquoise:"#40E0D0",violet:"#EE82EE",wheat:"#F5DEB3",whitesmoke:"#F5F5F5",yellowgreen:"#9ACD32"};function g(i){var m=i.indexOf("(",3);var Z=i.indexOf(")",m+1);var j=i.substring(m+1,Z).split(",");if(j.length==4&&i.substr(3,1)=="a"){alpha=Number(j[3])}else{j[3]=1}return j}function C(Z){return parseFloat(Z)/100}function N(i,j,Z){return Math.min(Z,Math.max(j,i))}function c(AF){var j,i,Z;h=parseFloat(AF[0])/360%360;if(h<0){h++}s=N(C(AF[1]),0,1);l=N(C(AF[2]),0,1);if(s==0){j=i=Z=l}else{var m=l<0.5?l*(1+s):l+s-l*s;var AE=2*l-m;j=A(AE,m,h+1/3);i=A(AE,m,h);Z=A(AE,m,h-1/3)}return"#"+I[Math.floor(j*255)]+I[Math.floor(i*255)]+I[Math.floor(Z*255)]}function A(i,Z,j){if(j<0){j++}if(j>1){j--}if(6*j<1){return i+(Z-i)*6*j}else{if(2*j<1){return Z}else{if(3*j<2){return i+(Z-i)*(2/3-j)*6}else{return i}}}}function Y(Z){var AE,p=1;Z=String(Z);if(Z.charAt(0)=="#"){AE=Z}else{if(/^rgb/.test(Z)){var m=g(Z);var AE="#",AF;for(var j=0;j<3;j++){if(m[j].indexOf("%")!=-1){AF=Math.floor(C(m[j])*255)}else{AF=Number(m[j])}AE+=I[N(AF,0,255)]}p=m[3]}else{if(/^hsl/.test(Z)){var m=g(Z);AE=c(m);p=m[3]}else{AE=B[Z]||Z}}}return{color:AE,alpha:p}}var L={style:"normal",variant:"normal",weight:"normal",size:10,family:"sans-serif"};var f={};function X(Z){if(f[Z]){return f[Z]}var m=document.createElement("div");var j=m.style;try{j.font=Z}catch(i){}return f[Z]={style:j.fontStyle||L.style,variant:j.fontVariant||L.variant,weight:j.fontWeight||L.weight,size:j.fontSize||L.size,family:j.fontFamily||L.family}}function P(j,i){var Z={};for(var AF in j){Z[AF]=j[AF]}var AE=parseFloat(i.currentStyle.fontSize),m=parseFloat(j.size);if(typeof j.size=="number"){Z.size=j.size}else{if(j.size.indexOf("px")!=-1){Z.size=m}else{if(j.size.indexOf("em")!=-1){Z.size=AE*m}else{if(j.size.indexOf("%")!=-1){Z.size=(AE/100)*m}else{if(j.size.indexOf("pt")!=-1){Z.size=m/0.75}else{Z.size=AE}}}}}Z.size*=0.981;return Z}function AA(Z){return Z.style+" "+Z.variant+" "+Z.weight+" "+Z.size+"px "+Z.family}function t(Z){switch(Z){case"butt":return"flat";case"round":return"round";case"square":default:return"square"}}function W(i){this.m_=V();this.mStack_=[];this.aStack_=[];this.currentPath_=[];this.strokeStyle="#000";this.fillStyle="#000";this.lineWidth=1;this.lineJoin="miter";this.lineCap="butt";this.miterLimit=D*1;this.globalAlpha=1;this.font="10px sans-serif";this.textAlign="left";this.textBaseline="alphabetic";this.canvas=i;var Z=i.ownerDocument.createElement("div");Z.style.width=i.clientWidth+"px";Z.style.height=i.clientHeight+"px";Z.style.overflow="hidden";Z.style.position="absolute";i.appendChild(Z);this.element_=Z;this.arcScaleX_=1;this.arcScaleY_=1;this.lineScale_=1}var M=W.prototype;M.clearRect=function(){if(this.textMeasureEl_){this.textMeasureEl_.removeNode(true);this.textMeasureEl_=null}this.element_.innerHTML=""};M.beginPath=function(){this.currentPath_=[]};M.moveTo=function(i,Z){var j=this.getCoords_(i,Z);this.currentPath_.push({type:"moveTo",x:j.x,y:j.y});this.currentX_=j.x;this.currentY_=j.y};M.lineTo=function(i,Z){var j=this.getCoords_(i,Z);this.currentPath_.push({type:"lineTo",x:j.x,y:j.y});this.currentX_=j.x;this.currentY_=j.y};M.bezierCurveTo=function(j,i,AI,AH,AG,AE){var Z=this.getCoords_(AG,AE);var AF=this.getCoords_(j,i);var m=this.getCoords_(AI,AH);e(this,AF,m,Z)};function e(Z,m,j,i){Z.currentPath_.push({type:"bezierCurveTo",cp1x:m.x,cp1y:m.y,cp2x:j.x,cp2y:j.y,x:i.x,y:i.y});Z.currentX_=i.x;Z.currentY_=i.y}M.quadraticCurveTo=function(AG,j,i,Z){var AF=this.getCoords_(AG,j);var AE=this.getCoords_(i,Z);var AH={x:this.currentX_+2/3*(AF.x-this.currentX_),y:this.currentY_+2/3*(AF.y-this.currentY_)};var m={x:AH.x+(AE.x-this.currentX_)/3,y:AH.y+(AE.y-this.currentY_)/3};e(this,AH,m,AE)};M.arc=function(AJ,AH,AI,AE,i,j){AI*=D;var AN=j?"at":"wa";var AK=AJ+U(AE)*AI-F;var AM=AH+J(AE)*AI-F;var Z=AJ+U(i)*AI-F;var AL=AH+J(i)*AI-F;if(AK==Z&&!j){AK+=0.125}var m=this.getCoords_(AJ,AH);var AG=this.getCoords_(AK,AM);var AF=this.getCoords_(Z,AL);this.currentPath_.push({type:AN,x:m.x,y:m.y,radius:AI,xStart:AG.x,yStart:AG.y,xEnd:AF.x,yEnd:AF.y})};M.rect=function(j,i,Z,m){this.moveTo(j,i);this.lineTo(j+Z,i);this.lineTo(j+Z,i+m);this.lineTo(j,i+m);this.closePath()};M.strokeRect=function(j,i,Z,m){var p=this.currentPath_;this.beginPath();this.moveTo(j,i);this.lineTo(j+Z,i);this.lineTo(j+Z,i+m);this.lineTo(j,i+m);this.closePath();this.stroke();this.currentPath_=p};M.fillRect=function(j,i,Z,m){var p=this.currentPath_;this.beginPath();this.moveTo(j,i);this.lineTo(j+Z,i);this.lineTo(j+Z,i+m);this.lineTo(j,i+m);this.closePath();this.fill();this.currentPath_=p};M.createLinearGradient=function(i,m,Z,j){var p=new v("gradient");p.x0_=i;p.y0_=m;p.x1_=Z;p.y1_=j;return p};M.createRadialGradient=function(m,AE,j,i,p,Z){var AF=new v("gradientradial");AF.x0_=m;AF.y0_=AE;AF.r0_=j;AF.x1_=i;AF.y1_=p;AF.r1_=Z;return AF};M.drawImage=function(AO,j){var AH,AF,AJ,AV,AM,AK,AQ,AX;var AI=AO.runtimeStyle.width;var AN=AO.runtimeStyle.height;AO.runtimeStyle.width="auto";AO.runtimeStyle.height="auto";var AG=AO.width;var AT=AO.height;AO.runtimeStyle.width=AI;AO.runtimeStyle.height=AN;if(arguments.length==3){AH=arguments[1];AF=arguments[2];AM=AK=0;AQ=AJ=AG;AX=AV=AT}else{if(arguments.length==5){AH=arguments[1];AF=arguments[2];AJ=arguments[3];AV=arguments[4];AM=AK=0;AQ=AG;AX=AT}else{if(arguments.length==9){AM=arguments[1];AK=arguments[2];AQ=arguments[3];AX=arguments[4];AH=arguments[5];AF=arguments[6];AJ=arguments[7];AV=arguments[8]}else{throw Error("Invalid number of arguments")}}}var AW=this.getCoords_(AH,AF);var m=AQ/2;var i=AX/2;var AU=[];var Z=10;var AE=10;AU.push(" <g_vml_:group",' coordsize="',D*Z,",",D*AE,'"',' coordorigin="0,0"',' style="width:',Z,"px;height:",AE,"px;position:absolute;");if(this.m_[0][0]!=1||this.m_[0][1]||this.m_[1][1]!=1||this.m_[1][0]){var p=[];p.push("M11=",this.m_[0][0],",","M12=",this.m_[1][0],",","M21=",this.m_[0][1],",","M22=",this.m_[1][1],",","Dx=",K(AW.x/D),",","Dy=",K(AW.y/D),"");var AS=AW;var AR=this.getCoords_(AH+AJ,AF);var AP=this.getCoords_(AH,AF+AV);var AL=this.getCoords_(AH+AJ,AF+AV);AS.x=z.max(AS.x,AR.x,AP.x,AL.x);AS.y=z.max(AS.y,AR.y,AP.y,AL.y);AU.push("padding:0 ",K(AS.x/D),"px ",K(AS.y/D),"px 0;filter:progid:DXImageTransform.Microsoft.Matrix(",p.join(""),", sizingmethod='clip');")}else{AU.push("top:",K(AW.y/D),"px;left:",K(AW.x/D),"px;")}AU.push(' ">','<g_vml_:image src="',AO.src,'"',' style="width:',D*AJ,"px;"," height:",D*AV,'px"',' cropleft="',AM/AG,'"',' croptop="',AK/AT,'"',' cropright="',(AG-AM-AQ)/AG,'"',' cropbottom="',(AT-AK-AX)/AT,'"'," />","</g_vml_:group>");this.element_.insertAdjacentHTML("BeforeEnd",AU.join(""))};M.stroke=function(AM){var m=10;var AN=10;var AE=5000;var AG={x:null,y:null};var AL={x:null,y:null};for(var AH=0;AH<this.currentPath_.length;AH+=AE){var AK=[];var AF=false;AK.push("<g_vml_:shape",' filled="',!!AM,'"',' style="position:absolute;width:',m,"px;height:",AN,'px;"',' coordorigin="0,0"',' coordsize="',D*m,",",D*AN,'"',' stroked="',!AM,'"',' path="');var AO=false;for(var AI=AH;AI<Math.min(AH+AE,this.currentPath_.length);AI++){if(AI%AE==0&&AI>0){AK.push(" m ",K(this.currentPath_[AI-1].x),",",K(this.currentPath_[AI-1].y))}var Z=this.currentPath_[AI];var AJ;switch(Z.type){case"moveTo":AJ=Z;AK.push(" m ",K(Z.x),",",K(Z.y));break;case"lineTo":AK.push(" l ",K(Z.x),",",K(Z.y));break;case"close":AK.push(" x ");Z=null;break;case"bezierCurveTo":AK.push(" c ",K(Z.cp1x),",",K(Z.cp1y),",",K(Z.cp2x),",",K(Z.cp2y),",",K(Z.x),",",K(Z.y));break;case"at":case"wa":AK.push(" ",Z.type," ",K(Z.x-this.arcScaleX_*Z.radius),",",K(Z.y-this.arcScaleY_*Z.radius)," ",K(Z.x+this.arcScaleX_*Z.radius),",",K(Z.y+this.arcScaleY_*Z.radius)," ",K(Z.xStart),",",K(Z.yStart)," ",K(Z.xEnd),",",K(Z.yEnd));break}if(Z){if(AG.x==null||Z.x<AG.x){AG.x=Z.x}if(AL.x==null||Z.x>AL.x){AL.x=Z.x}if(AG.y==null||Z.y<AG.y){AG.y=Z.y}if(AL.y==null||Z.y>AL.y){AL.y=Z.y}}}AK.push(' ">');if(!AM){R(this,AK)}else{a(this,AK,AG,AL)}AK.push("</g_vml_:shape>");this.element_.insertAdjacentHTML("beforeEnd",AK.join(""))}};function R(j,AE){var i=Y(j.strokeStyle);var m=i.color;var p=i.alpha*j.globalAlpha;var Z=j.lineScale_*j.lineWidth;if(Z<1){p*=Z}AE.push("<g_vml_:stroke",' opacity="',p,'"',' joinstyle="',j.lineJoin,'"',' miterlimit="',j.miterLimit,'"',' endcap="',t(j.lineCap),'"',' weight="',Z,'px"',' color="',m,'" />')}function a(AO,AG,Ah,AP){var AH=AO.fillStyle;var AY=AO.arcScaleX_;var AX=AO.arcScaleY_;var Z=AP.x-Ah.x;var m=AP.y-Ah.y;if(AH instanceof v){var AL=0;var Ac={x:0,y:0};var AU=0;var AK=1;if(AH.type_=="gradient"){var AJ=AH.x0_/AY;var j=AH.y0_/AX;var AI=AH.x1_/AY;var Aj=AH.y1_/AX;var Ag=AO.getCoords_(AJ,j);var Af=AO.getCoords_(AI,Aj);var AE=Af.x-Ag.x;var p=Af.y-Ag.y;AL=Math.atan2(AE,p)*180/Math.PI;if(AL<0){AL+=360}if(AL<0.000001){AL=0}}else{var Ag=AO.getCoords_(AH.x0_,AH.y0_);Ac={x:(Ag.x-Ah.x)/Z,y:(Ag.y-Ah.y)/m};Z/=AY*D;m/=AX*D;var Aa=z.max(Z,m);AU=2*AH.r0_/Aa;AK=2*AH.r1_/Aa-AU}var AS... [truncated message content] |
From: <bra...@us...> - 2010-07-28 00:39:30
|
Revision: 3198 http://archive-access.svn.sourceforge.net/archive-access/?rev=3198&view=rev Author: bradtofel Date: 2010-07-28 00:39:23 +0000 (Wed, 28 Jul 2010) Log Message: ----------- TWEAK: image and css Modified Paths: -------------- trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/replay/Toolbar.jsp Modified: trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/replay/Toolbar.jsp =================================================================== --- trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/replay/Toolbar.jsp 2010-07-28 00:37:11 UTC (rev 3197) +++ trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/replay/Toolbar.jsp 2010-07-28 00:39:23 UTC (rev 3198) @@ -87,9 +87,9 @@ return; } if(val == "inline") { - document.getElementById("displayYearEl").style.color = "#f00"; - document.getElementById("displayMonthEl").style.color = "#f00"; - document.getElementById("displayDayEl").style.color = "#f00"; + document.getElementById("displayYearEl").style.color = "#ec008c"; + document.getElementById("displayMonthEl").style.color = "#ec008c"; + document.getElementById("displayDayEl").style.color = "#ec008c"; } else { document.getElementById("displayYearEl").innerHTML = displayYear; document.getElementById("displayYearEl").style.color = "#ff0"; @@ -98,9 +98,9 @@ document.getElementById("displayDayEl").innerHTML = displayDay; document.getElementById("displayDayEl").style.color = "#ff0"; } - document.getElementById("wbMouseTrackYearImg").style.display = val; - document.getElementById("wbMouseTrackMonthImg").style.display = val; - trackerVal = val; + document.getElementById("wbMouseTrackYearImg").style.display = val; + document.getElementById("wbMouseTrackMonthImg").style.display = val; + trackerVal = val; } function getElementX2(obj) { var thing = jQuery(obj); @@ -113,25 +113,25 @@ } function trackMouseMove(event,element) { - var eventX = getEventX(event); - var elementX = getElementX2(element); - var xOff = eventX - elementX; + var eventX = getEventX(event); + var elementX = getElementX2(element); + var xOff = eventX - elementX; if(xOff < 0) { xOff = 0; } else if(xOff > imgWidth) { xOff = imgWidth; } - var monthOff = xOff % yearImgWidth; + var monthOff = xOff % yearImgWidth; - var year = Math.floor(xOff / yearImgWidth); + var year = Math.floor(xOff / yearImgWidth); var yearStart = year * yearImgWidth; - var monthOfYear = Math.floor(monthOff / monthImgWidth); - if(monthOfYear > 11) { - monthOfYear = 11; - } - // 1 extra border pixel at the left edge of the year: - var month = (year * 12) + monthOfYear; - var day = 1; + var monthOfYear = Math.floor(monthOff / monthImgWidth); + if(monthOfYear > 11) { + monthOfYear = 11; + } + // 1 extra border pixel at the left edge of the year: + var month = (year * 12) + monthOfYear; + var day = 1; if(monthOff % 2 == 1) { day = 15; } @@ -149,140 +149,140 @@ var url = wbPrefix + dateString + '/' + wbCurrentUrl; document.getElementById('wm-graph-anchor').href = url; - //document.getElementById("wmtbURL").value="evX("+eventX+") elX("+elementX+") xO("+xOff+") y("+year+") m("+month+") monthOff("+monthOff+") DS("+dateString+") Moy("+monthOfYear+") ms("+monthString+")"; - if(curYear != year) { - var yrOff = year * yearImgWidth; - document.getElementById("wbMouseTrackYearImg").style.left = yrOff + "px"; - curYear = year; - } - if(curMonth != month) { - var mtOff = year + (month * monthImgWidth) + 1; - document.getElementById("wbMouseTrackMonthImg").style.left = mtOff + "px"; - curMonth = month; - } + //document.getElementById("wmtbURL").value="evX("+eventX+") elX("+elementX+") xO("+xOff+") y("+year+") m("+month+") monthOff("+monthOff+") DS("+dateString+") Moy("+monthOfYear+") ms("+monthString+")"; + if(curYear != year) { + var yrOff = year * yearImgWidth; + document.getElementById("wbMouseTrackYearImg").style.left = yrOff + "px"; + curYear = year; + } + if(curMonth != month) { + var mtOff = year + (month * monthImgWidth) + 1; + document.getElementById("wbMouseTrackMonthImg").style.left = mtOff + "px"; + curMonth = month; + } } </script> <style type="text/css">body{margin-top:0!important;padding-top:0!important;min-width:800px!important;}#wm-ipp a:hover{text-decoration:underline!important;}</style> <div id="wm-ipp" style="display:none; position:relative;padding:0 5px;min-height:70px;min-width:800px; z-index:9000;"> <div id="wm-ipp-inside" style="position:fixed;padding:0!important;margin:0!important;width:97%;min-width:780px;border:5px solid #000;border-top:none;background-image:url(<%= staticPrefix %>images/toolbar/wm_tb_bk_trns.png);text-align:center;-moz-box-shadow:1px 1px 3px #333;-webkit-box-shadow:1px 1px 3px #333;box-shadow:1px 1px 3px #333;font-size:11px!important;font-family:'Lucida Grande','Arial',sans-serif!important;"> - <table style="border-collapse:collapse;margin:0;padding:0;width:100%;"><tbody><tr> - <td style="padding:10px;vertical-align:top;min-width:140px;"> - <a href="<%= queryPrefix %>" title="Wayback Machine home page"><img src="<%= staticPrefix %>images/toolbar/wayback-toolbar-logo.png" alt="Wayback Machine" width="110" height="39" border="0"/></a> - </td> - <td style="padding:0!important;text-align:center;vertical-align:top;width:100%;"> + <table style="border-collapse:collapse;margin:0;padding:0;width:100%;"><tbody><tr> + <td style="padding:10px;vertical-align:top;min-width:140px;"> + <a href="<%= queryPrefix %>" title="Wayback Machine home page" style="background-color:transparent;border:none;"><img src="<%= staticPrefix %>images/toolbar/wayback-toolbar-logo.png" alt="Wayback Machine" width="110" height="39" border="0"/></a> + </td> + <td style="padding:0!important;text-align:center;vertical-align:top;width:100%;"> - <table style="border-collapse:collapse;margin:0 auto;padding:0;width:570px;"><tbody><tr> - <td style="padding:3px 0;" colspan="2"> - <form target="_top" method="get" action="<%= queryPrefix %>query" name="wmtb" id="wmtb" style="margin:0!important;padding:0!important;"><input type="text" name="<%= WaybackRequest.REQUEST_URL %>" id="wmtbURL" value="<%= searchUrlSafe %>" style="width:400px;font-size:11px;font-family:'Lucida Grande','Arial',sans-serif;"/><input type="hidden" name="<%= WaybackRequest.REQUEST_TYPE %>" value="<%= WaybackRequest.REQUEST_REPLAY_QUERY %>"><input type="hidden" name="<%= WaybackRequest.REQUEST_DATE %>" value="<%= data.curResult.getCaptureTimestamp() %>"><input type="submit" value="Go" style="font-size:11px;font-family:'Lucida Grande','Arial',sans-serif;margin-left:5px;"/><span id="wm_tb_options" style="display:block;"></span></form> - </td> - <td style="vertical-align:bottom;padding:5px 0 0 0!important;" rowspan="2"> - <table style="border-collapse:collapse;width:110px;color:#99a;font-family:'Helvetica','Lucida Grande','Arial',sans-serif;"><tbody> + <table style="border-collapse:collapse;margin:0 auto;padding:0;width:570px;"><tbody><tr> + <td style="padding:3px 0;" colspan="2"> + <form target="_top" method="get" action="<%= queryPrefix %>query" name="wmtb" id="wmtb" style="margin:0!important;padding:0!important;"><input type="text" name="<%= WaybackRequest.REQUEST_URL %>" id="wmtbURL" value="<%= searchUrlSafe %>" style="width:400px;font-size:11px;font-family:'Lucida Grande','Arial',sans-serif;"/><input type="hidden" name="<%= WaybackRequest.REQUEST_TYPE %>" value="<%= WaybackRequest.REQUEST_REPLAY_QUERY %>"><input type="hidden" name="<%= WaybackRequest.REQUEST_DATE %>" value="<%= data.curResult.getCaptureTimestamp() %>"><input type="submit" value="Go" style="font-size:11px;font-family:'Lucida Grande','Arial',sans-serif;margin-left:5px;"/><span id="wm_tb_options" style="display:block;"></span></form> + </td> + <td style="vertical-align:bottom;padding:5px 0 0 0!important;" rowspan="2"> + <table style="border-collapse:collapse;width:110px;color:#99a;font-family:'Helvetica','Lucida Grande','Arial',sans-serif;"><tbody> - <!-- NEXT/PREV MONTH NAV AND MONTH INDICATOR --> - <tr style="width:110px;height:16px;font-size:10px!important;"> - <td style="padding-right:9px;font-size:11px!important;font-weight: bold;text-align:right;white-space:nowrap;overflow:visible;" nowrap="nowrap"> - <% - if(data.monthPrevResult == null) { - %> - <%= fmt.format("ToolBar.noPrevMonthText",ToolBarData.addMonth(data.curResult.getCaptureDate(),-1)) %> - <% - } else { + <!-- NEXT/PREV MONTH NAV AND MONTH INDICATOR --> + <tr style="width:110px;height:16px;font-size:10px!important;"> + <td style="padding-right:9px;font-size:11px!important;font-weight:bold;text-transform:uppercase;text-align:right;white-space:nowrap;overflow:visible;" nowrap="nowrap"> + <% + if(data.monthPrevResult == null) { + %> + <%= fmt.format("ToolBar.noPrevMonthText",ToolBarData.addMonth(data.curResult.getCaptureDate(),-1)) %> + <% + } else { %> - <a href="<%= data.makeReplayURL(data.monthPrevResult) %>" style="text-decoration:none;color:#33f;" title="<%= fmt.format("ToolBar.prevMonthTitle",data.monthPrevResult.getCaptureDate()) %>"><%= fmt.format("ToolBar.prevMonthText",data.monthPrevResult.getCaptureDate()).toUpperCase() %></a> + <a href="<%= data.makeReplayURL(data.monthPrevResult) %>" style="text-decoration:none;color:#33f;font-weight:bold;background-color:transparent;border:none;" title="<%= fmt.format("ToolBar.prevMonthTitle",data.monthPrevResult.getCaptureDate()) %>"><strong><%= fmt.format("ToolBar.prevMonthText",data.monthPrevResult.getCaptureDate()).toUpperCase() %></strong></a> <% - } - %> - </td> - <td id="displayMonthEl" style="background:#000;color:#ff0;font-size:11px!important;font-weight: bold;width:34px;height:15px;padding-top:1px;text-align:center;" title="<%= fmt.format("ToolBar.curMonthTitle",data.curResult.getCaptureDate()) %>"><%= fmt.format("ToolBar.curMonthText",data.curResult.getCaptureDate()).toUpperCase() %></td> - <td style="padding-left:9px;font-size:11px!important;font-weight: bold;white-space:nowrap;overflow:visible;" nowrap="nowrap"> - <% - if(data.monthNextResult == null) { - %> - <%= fmt.format("ToolBar.noNextMonthText",ToolBarData.addMonth(data.curResult.getCaptureDate(),1)) %> - <% - } else { + } + %> + </td> + <td id="displayMonthEl" style="background:#000;color:#ff0;font-size:11px!important;font-weight:bold;text-transform:uppercase;width:34px;height:15px;padding-top:1px;text-align:center;" title="<%= fmt.format("ToolBar.curMonthTitle",data.curResult.getCaptureDate()) %>"><%= fmt.format("ToolBar.curMonthText",data.curResult.getCaptureDate()).toUpperCase() %></td> + <td style="padding-left:9px;font-size:11px!important;font-weight:bold;text-transform:uppercase;white-space:nowrap;overflow:visible;" nowrap="nowrap"> + <% + if(data.monthNextResult == null) { + %> + <%= fmt.format("ToolBar.noNextMonthText",ToolBarData.addMonth(data.curResult.getCaptureDate(),1)) %> + <% + } else { %> - <a href="<%= data.makeReplayURL(data.monthNextResult) %>" style="text-decoration:none;color:#33f;" title="<%= fmt.format("ToolBar.nextMonthTitle",data.monthNextResult.getCaptureDate()) %>"><%= fmt.format("ToolBar.nextMonthText",data.monthNextResult.getCaptureDate()).toUpperCase() %></a> + <a href="<%= data.makeReplayURL(data.monthNextResult) %>" style="text-decoration:none;color:#33f;font-weight:bold;background-color:transparent;border:none;" title="<%= fmt.format("ToolBar.nextMonthTitle",data.monthNextResult.getCaptureDate()) %>"><strong><%= fmt.format("ToolBar.nextMonthText",data.monthNextResult.getCaptureDate()).toUpperCase() %></strong></a> <% - } - %> - </td> - </tr> + } + %> + </td> + </tr> - <!-- NEXT/PREV CAPTURE NAV AND DAY OF MONTH INDICATOR --> - <tr> - <td style="padding-right:9px;text-align:right;"> - <% - if(data.prevResult == null) { - %> - <img src="<%= staticPrefix %>images/toolbar/wm_tb_prv_on.png" alt="Previous capture" width="14" height="16" border="0" /> - <% - } else { + <!-- NEXT/PREV CAPTURE NAV AND DAY OF MONTH INDICATOR --> + <tr> + <td style="padding-right:9px;white-space:nowrap;overflow:visible;text-align:right!important;vertical-align:middle!important;" nowrap="nowrap"> + <% + if(data.prevResult == null) { + %> + <img src="<%= staticPrefix %>images/toolbar/wm_tb_prv_off.png" alt="Previous capture" width="14" height="16" border="0" /> + <% + } else { %> - <a href="<%= data.makeReplayURL(data.prevResult) %>" title="<%= fmt.format("ToolBar.prevTitle",data.prevResult.getCaptureDate()) %>"><img src="<%= staticPrefix %>images/toolbar/wm_tb_prv_on.png" alt="Previous capture" width="14" height="16" border="0" /></a> + <a href="<%= data.makeReplayURL(data.prevResult) %>" title="<%= fmt.format("ToolBar.prevTitle",data.prevResult.getCaptureDate()) %>" style="background-color:transparent;border:none;"><img src="<%= staticPrefix %>images/toolbar/wm_tb_prv_on.png" alt="Previous capture" width="14" height="16" border="0" /></a> <% - } - %> - </td> - <td id="displayDayEl" style="background:#000;color:#ff0;width:34px;height:24px;padding:2px 0 0 0;text-align:center;font-size:24px;font-weight: bold;" title="<%= fmt.format("ToolBar.curDayTitle",data.curResult.getCaptureDate()) %>"><%= fmt.format("ToolBar.curDayText",data.curResult.getCaptureDate()) %></td> - <td style="padding-left:9px;white-space:nowrap;overflow:visible;" nowrap="nowrap"> - <% - if(data.nextResult == null) { - %> - <img src="<%= staticPrefix %>images/toolbar/wm_tb_nxt_on.png" alt="Next capture" width="14" height="16" border="0"/> - <% - } else { + } + %> + </td> + <td id="displayDayEl" style="background:#000;color:#ff0;width:34px;height:24px;padding:2px 0 0 0;text-align:center;font-size:24px;font-weight: bold;" title="<%= fmt.format("ToolBar.curDayTitle",data.curResult.getCaptureDate()) %>"><%= fmt.format("ToolBar.curDayText",data.curResult.getCaptureDate()) %></td> + <td style="padding-left:9px;white-space:nowrap;overflow:visible;text-align:left!important;vertical-align:middle!important;" nowrap="nowrap"> + <% + if(data.nextResult == null) { + %> + <img src="<%= staticPrefix %>images/toolbar/wm_tb_nxt_off.png" alt="Next capture" width="14" height="16" border="0"/> + <% + } else { %> - <a href="<%= data.makeReplayURL(data.nextResult) %>" title="<%= fmt.format("ToolBar.nextTitle",data.nextResult.getCaptureDate()) %>"><img src="<%= staticPrefix %>images/toolbar/wm_tb_nxt_on.png" alt="Next capture" width="14" height="16" border="0"/></a> + <a href="<%= data.makeReplayURL(data.nextResult) %>" title="<%= fmt.format("ToolBar.nextTitle",data.nextResult.getCaptureDate()) %>" style="background-color:transparent;border:none;"><img src="<%= staticPrefix %>images/toolbar/wm_tb_nxt_on.png" alt="Next capture" width="14" height="16" border="0"/></a> <% - } - %> + } + %> </td> - </tr> + </tr> - <!-- NEXT/PREV YEAR NAV AND YEAR INDICATOR --> - <tr style="width:110px;height:13px;font-size:9px!important;"> + <!-- NEXT/PREV YEAR NAV AND YEAR INDICATOR --> + <tr style="width:110px;height:13px;font-size:9px!important;"> <td style="padding-right:9px;font-size:11px!important;font-weight: bold;text-align:right;white-space:nowrap;overflow:visible;" nowrap="nowrap"> - <% - if(data.yearPrevResult == null) { - %> - <%= fmt.format("ToolBar.noPrevYearText",ToolBarData.addYear(data.curResult.getCaptureDate(),-1)) %> - <% - } else { + <% + if(data.yearPrevResult == null) { + %> + <%= fmt.format("ToolBar.noPrevYearText",ToolBarData.addYear(data.curResult.getCaptureDate(),-1)) %> + <% + } else { %> - <a href="<%= data.makeReplayURL(data.yearPrevResult) %>" style="text-decoration:none;color:#33f;" title="<%= fmt.format("ToolBar.prevYearTitle",data.yearPrevResult.getCaptureDate()) %>"><%= fmt.format("ToolBar.prevYearText",data.yearPrevResult.getCaptureDate()) %></a> + <a href="<%= data.makeReplayURL(data.yearPrevResult) %>" style="text-decoration:none;color:#33f;font-weight:bold;background-color:transparent;border:none;" title="<%= fmt.format("ToolBar.prevYearTitle",data.yearPrevResult.getCaptureDate()) %>"><strong><%= fmt.format("ToolBar.prevYearText",data.yearPrevResult.getCaptureDate()) %></strong></a> <% - } - %> - </td> - <td id="displayYearEl" style="background:#000;color:#ff0;font-size:11px!important;font-weight: bold;padding-top:1px;width:34px;height:13px;text-align:center;" title="<%= fmt.format("ToolBar.curYearTitle",data.curResult.getCaptureDate()) %>"><%= fmt.format("ToolBar.curYearText",data.curResult.getCaptureDate()) %></td> + } + %> + </td> + <td id="displayYearEl" style="background:#000;color:#ff0;font-size:11px!important;font-weight: bold;padding-top:1px;width:34px;height:13px;text-align:center;" title="<%= fmt.format("ToolBar.curYearTitle",data.curResult.getCaptureDate()) %>"><%= fmt.format("ToolBar.curYearText",data.curResult.getCaptureDate()) %></td> <td style="padding-left:9px;font-size:11px!important;font-weight: bold;white-space:nowrap;overflow:visible;" nowrap="nowrap"> - <% - if(data.yearNextResult == null) { - %> - <%= fmt.format("ToolBar.noNextYearText",ToolBarData.addYear(data.curResult.getCaptureDate(),1)) %> - <% - } else { + <% + if(data.yearNextResult == null) { + %> + <%= fmt.format("ToolBar.noNextYearText",ToolBarData.addYear(data.curResult.getCaptureDate(),1)) %> + <% + } else { %> - <a href="<%= data.makeReplayURL(data.yearNextResult) %>" style="text-decoration:none;color:#33f;" title="<%= fmt.format("ToolBar.nextYearTitle",data.yearNextResult.getCaptureDate()) %>"><%= fmt.format("ToolBar.nextYearText",data.yearNextResult.getCaptureDate()) %></a> + <a href="<%= data.makeReplayURL(data.yearNextResult) %>" style="text-decoration:none;color:#33f;font-weight:bold;background-color:transparent;border:none;" title="<%= fmt.format("ToolBar.nextYearTitle",data.yearNextResult.getCaptureDate()) %>"><strong><%= fmt.format("ToolBar.nextYearText",data.yearNextResult.getCaptureDate()) %></strong></a> <% - } - %> + } + %> </td> - </tr> - </tbody></table> - </td> + </tr> + </tbody></table> + </td> - </tr> - <tr> - <td style="vertical-align:middle;padding:0!important;"> - <a href="<%= starLink %>" style="color:#33f;font-size:11px;" title="<%= fmt.format("ToolBar.numCapturesTitle") %>"><strong><%= fmt.format("ToolBar.numCapturesText",data.getResultCount()) %></strong></a> - <div style="margin:0!important;padding:0!important;color:#666;font-size:9px;padding-top:2px!important;white-space:nowrap;" title="<%= fmt.format("ToolBar.captureRangeTitle") %>"><%= fmt.format("ToolBar.captureRangeText",data.getFirstResultDate(),data.getLastResultDate()) %></div> - </td> - <td style="padding:0!important;"> - <a style="position:relative; white-space:nowrap; width:<%= imgWidth %>px;height:<%= imgHeight %>px;" href="" id="wm-graph-anchor"> - <div id="wm-ipp-sparkline" style="position:relative; white-space:nowrap; width:<%= imgWidth %>px;height:<%= imgHeight %>px;background-color:#fff;cursor:pointer;" title="<%= fmt.format("ToolBar.sparklineTitle") %>"> + </tr> + <tr> + <td style="vertical-align:middle;padding:0!important;"> + <a href="<%= starLink %>" style="color:#33f;font-size:11px;font-weight:bold;background-color:transparent;border:none;" title="<%= fmt.format("ToolBar.numCapturesTitle") %>"><strong><%= fmt.format("ToolBar.numCapturesText",data.getResultCount()) %></strong></a> + <div style="margin:0!important;padding:0!important;color:#666;font-size:9px;padding-top:2px!important;white-space:nowrap;" title="<%= fmt.format("ToolBar.captureRangeTitle") %>"><%= fmt.format("ToolBar.captureRangeText",data.getFirstResultDate(),data.getLastResultDate()) %></div> + </td> + <td style="padding:0!important;"> + <a style="position:relative; white-space:nowrap; width:<%= imgWidth %>px;height:<%= imgHeight %>px;" href="" id="wm-graph-anchor"> + <div id="wm-ipp-sparkline" style="position:relative; white-space:nowrap; width:<%= imgWidth %>px;height:<%= imgHeight %>px;background-color:#fff;cursor:pointer;border-right:1px solid #ccc;" title="<%= fmt.format("ToolBar.sparklineTitle") %>"> <img id="sparklineImgId" style="position:absolute; z-index:9012; top:0px; left:0px;" onmouseover="showTrackers('inline');" onmouseout="showTrackers('none');" @@ -304,25 +304,24 @@ height="<%= imgHeight %>" border="0" src="<%= staticPrefix %>images/toolbar/transp-red-pixel.png"></img> - </div> + </div> </a> - </td> - </tr></tbody></table> - </td> - <td style="text-align:right;padding:5px;width:65px;font-size:11px!important;"> - <a href="javascript:;" onclick="document.getElementById('wm-ipp').style.display='none';" style="display:block;padding-right:18px;background:url(<%= staticPrefix %>images/toolbar/wm_tb_close.png) no-repeat 100% 0;color:#33f;font-family:'Lucida Grande','Arial',sans-serif;margin-bottom:23px;" title="<%= fmt.format("ToolBar.closeTitle") %>"><%= fmt.format("ToolBar.closeText") %></a> - <a href="https://webarchive.jira.com/wiki/display/WWMOS/FAQs" style="display:block;padding-right:18px;background:url(<%= staticPrefix %>images/toolbar/wm_tb_help.png) no-repeat 100% 0;color:#33f;font-family:'Lucida Grande','Arial',sans-serif;" title="<%= fmt.format("ToolBar.helpTitle") %>"><%= fmt.format("ToolBar.helpText") %></a> - </td> - </tr></tbody></table> + </td> + </tr></tbody></table> + </td> + <td style="text-align:right;padding:5px;width:65px;font-size:11px!important;"> + <a href="javascript:;" onclick="document.getElementById('wm-ipp').style.display='none';" style="display:block;padding-right:18px;background:url(<%= staticPrefix %>images/toolbar/wm_tb_close.png) no-repeat 100% 0;color:#33f;font-family:'Lucida Grande','Arial',sans-serif;margin-bottom:23px;background-color:transparent;border:none;" title="<%= fmt.format("ToolBar.closeTitle") %>"><%= fmt.format("ToolBar.closeText") %></a> + <a href="https://webarchive.jira.com/wiki/display/WWMOS/FAQs" style="display:block;padding-right:18px;background:url(<%= staticPrefix %>images/toolbar/wm_tb_help.png) no-repeat 100% 0;color:#33f;font-family:'Lucida Grande','Arial',sans-serif;background-color:transparent;border:none;" title="<%= fmt.format("ToolBar.helpTitle") %>"><%= fmt.format("ToolBar.helpText") %></a> + </td> + </tr></tbody></table> </div> </div> <script type="text/javascript"> - var wmDisclaimBanner = document.getElementById("wm-ipp"); - if(wmDisclaimBanner != null) { - disclaimElement(wmDisclaimBanner); - } + var wmDisclaimBanner = document.getElementById("wm-ipp"); + if(wmDisclaimBanner != null) { + disclaimElement(wmDisclaimBanner); + } </script> <!-- END WAYBACK TOOLBAR INSERT --> - This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bra...@us...> - 2010-07-28 00:37:17
|
Revision: 3197 http://archive-access.svn.sourceforge.net/archive-access/?rev=3197&view=rev Author: bradtofel Date: 2010-07-28 00:37:11 +0000 (Wed, 28 Jul 2010) Log Message: ----------- Added Paths: ----------- trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/images/blueblob-dk.png trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/images/blueblob.png trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/images/logo_WM.png trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/images/logo_archive-sm.png Added: trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/images/blueblob-dk.png =================================================================== (Binary files differ) Property changes on: trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/images/blueblob-dk.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/images/blueblob.png =================================================================== (Binary files differ) Property changes on: trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/images/blueblob.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/images/logo_WM.png =================================================================== (Binary files differ) Property changes on: trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/images/logo_WM.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/images/logo_archive-sm.png =================================================================== (Binary files differ) Property changes on: trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/images/logo_archive-sm.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bra...@us...> - 2010-07-28 00:29:33
|
Revision: 3196 http://archive-access.svn.sourceforge.net/archive-access/?rev=3196&view=rev Author: bradtofel Date: 2010-07-28 00:29:26 +0000 (Wed, 28 Jul 2010) Log Message: ----------- INITIAL REV: very preliminary Memento-style date-time content negotiation support. .JSP files really need some cleanup. lots of static references and date parsing operations should be centralized into a Memento.java support class. Added Paths: ----------- trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/replay/MementoAggregate.jsp trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/replay/MementoValidity.jsp Added: trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/replay/MementoAggregate.jsp =================================================================== --- trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/replay/MementoAggregate.jsp (rev 0) +++ trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/replay/MementoAggregate.jsp 2010-07-28 00:29:26 UTC (rev 3196) @@ -0,0 +1,3 @@ +<jsp:include page="/WEB-INF/replay/ArchiveComment.jsp" flush="true" /> +<jsp:include page="/WEB-INF/replay/MementoValidity.jsp" flush="true" /> +<jsp:include page="/WEB-INF/replay/Disclaimer.jsp" flush="true" /> Added: trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/replay/MementoValidity.jsp =================================================================== --- trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/replay/MementoValidity.jsp (rev 0) +++ trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/replay/MementoValidity.jsp 2010-07-28 00:29:26 UTC (rev 3196) @@ -0,0 +1,103 @@ +<%@ page import="org.archive.wayback.core.UIResults" %> +<%@ page import="org.archive.wayback.core.CaptureSearchResults" %> +<%@ page import="org.archive.wayback.core.CaptureSearchResult"%> +<%@ page import="java.util.Date" %> +<%@ page import="org.archive.wayback.core.WaybackRequest" %> +<%@ page import="org.archive.wayback.archivalurl.ArchivalUrlResultURIConverter" %> +<%@ page import="java.text.SimpleDateFormat" %> +<%@ page import="java.util.Iterator" %> +<% + UIResults results = UIResults.extractCaptureQuery(request); + WaybackRequest wbRequest = results.getWbRequest(); + CaptureSearchResults cResults = results.getCaptureResults(); + CaptureSearchResult res = cResults.getClosest(wbRequest, true); + String u = wbRequest.getRequestUrl(); + SimpleDateFormat httpformatterl = new SimpleDateFormat( + "E, dd MMM yyyy HH:mm:ss z"); + String agguri = results.getContextConfig("aggregationPrefix") + + "timebundle/" + u; + String timemap = " , <" + + results.getContextConfig("aggregationPrefix") + + "timemap/link/" + u + + ">;rel=\"timemap\"; type=\"text/csv\""; + ArchivalUrlResultURIConverter uriconverter = + (ArchivalUrlResultURIConverter) results.getURIConverter(); + + String uriPrefix = uriconverter.getReplayURIPrefix(); + + Date f = cResults.getFirstResultDate(); + Date l = cResults.getLastResultDate(); + String qvalue = "1.0"; //just example + StringBuffer sb = new StringBuffer(); + response.setHeader("Content-Datetime", httpformatterl.format(res + .getCaptureDate())); + SimpleDateFormat formatterk = new SimpleDateFormat("yyyyMMddHHmmss"); + sb.append(", <" + uriPrefix + formatterk.format(f) + "/" + u + + ">;rel=\"first-memento\"; datetime=\"" + + httpformatterl.format(f) + "\""); + if (!f.equals(l)) { + + sb.append(", <" + uriPrefix + formatterk.format(f) + "/" + u + + ">;rel=\"last-memento\"; datetime=\"" + + httpformatterl.format(f) + "\""); + } + + // calculate closest values for alternates + Date closestDate = res.getCaptureDate(); + CaptureSearchResult closestleft = null; + CaptureSearchResult closestright = null; + long rclosestDistance = 0; + long lclosestDistance = 0; + CaptureSearchResult cur = null; + String anchorDate = null; + + long maxWindow = -1; + long wantTime = closestDate.getTime(); + + Iterator<CaptureSearchResult> itr = cResults.iterator(); + while (itr.hasNext()) { + cur = itr.next(); + cur.getCaptureDate(); + long curDistance = wantTime - cur.getCaptureDate().getTime(); + // == 0 propuskaem + if (curDistance > 0) { + if ((closestright == null) + || (Math.abs(curDistance) < Math + .abs(rclosestDistance))) { + closestright = cur; + rclosestDistance = Math.abs(curDistance); + } + } + + if (curDistance < 0) { + if ((closestleft == null) + || (Math.abs(curDistance) < Math + .abs(lclosestDistance))) { + closestleft = cur; + lclosestDistance = Math.abs(curDistance); + } + } + + } + + if (closestleft != null) { + if (!closestleft.getCaptureDate().equals(f)) { + sb.append(", <" + uriPrefix + formatterk.format(f) + "/" + + u + ">;rel=\"prev-memento\"; datetime=\"" + + httpformatterl.format(f) + "\""); + } + } + if (closestright != null) { + if (!closestright.getCaptureDate().equals(l)) { + sb.append(", <" + uriPrefix + formatterk.format(f) + "/" + + u + ">;rel=\"next-memento\"; datetime=\"" + + httpformatterl.format(f) + "\""); + } + + } + + String origlink = ", <" + u + ">;rel=\"original\""; + + response.setHeader("Link", "<" + agguri + ">;rel=\"timebundle\"" + + origlink + sb.toString() + timemap); +%> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bra...@us...> - 2010-07-28 00:23:32
|
Revision: 3195 http://archive-access.svn.sourceforge.net/archive-access/?rev=3195&view=rev Author: bradtofel Date: 2010-07-28 00:23:25 +0000 (Wed, 28 Jul 2010) Log Message: ----------- Modified Paths: -------------- trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/replay/UrlRedirectNotice.jsp Modified: trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/replay/UrlRedirectNotice.jsp =================================================================== --- trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/replay/UrlRedirectNotice.jsp 2010-07-28 00:21:08 UTC (rev 3194) +++ trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/replay/UrlRedirectNotice.jsp 2010-07-28 00:23:25 UTC (rev 3195) @@ -40,7 +40,7 @@ <div id="positionHome"> <section> <div id="logoHome"> - <h1><span>Internet Archive's Wayback Machine</span></h1> + <a href="/index.jsp"><h1><span>Internet Archive's Wayback Machine</span></h1></a> </div> </section> <section> @@ -52,10 +52,10 @@ window.setTimeout("go()",<%= secs * 1000 %>); </script> <p class="code">Loading...</p> - <p class="code shift"><%= safeSource %> | <%= prettyDate %></p> + <p class="code shift target"><%= safeSource %> | <%= prettyDate %></p> <p class="code shift red">Got an HTTP 302 response at crawl time</p> <p class="code">Redirecting to...</p> - <p><%= safeTarget %></p> + <p class="code shift target"><%= safeTarget %></p> <p class="impatient"><a href="<%= safeTargetReplayUrl %>">Impatient?</a></p> </div> </section> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bra...@us...> - 2010-07-28 00:21:14
|
Revision: 3194 http://archive-access.svn.sourceforge.net/archive-access/?rev=3194&view=rev Author: bradtofel Date: 2010-07-28 00:21:08 +0000 (Wed, 28 Jul 2010) Log Message: ----------- archive.org default favicon Added Paths: ----------- trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/favicon.ico Added: trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/favicon.ico =================================================================== (Binary files differ) Property changes on: trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/favicon.ico ___________________________________________________________________ Added: svn:mime-type + application/octet-stream This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bra...@us...> - 2010-07-28 00:16:52
|
Revision: 3193 http://archive-access.svn.sourceforge.net/archive-access/?rev=3193&view=rev Author: bradtofel Date: 2010-07-28 00:16:46 +0000 (Wed, 28 Jul 2010) Log Message: ----------- Modified Paths: -------------- trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/images/toolbar/transp-red-pixel.png trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/images/toolbar/wayback-toolbar-logo.png Added Paths: ----------- trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/images/toolbar/wm_tb_nxt_off.png trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/images/toolbar/wm_tb_prv_off.png trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/images/toolbar/yellow-pixel.png Modified: trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/images/toolbar/transp-red-pixel.png =================================================================== (Binary files differ) Modified: trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/images/toolbar/wayback-toolbar-logo.png =================================================================== (Binary files differ) Added: trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/images/toolbar/wm_tb_nxt_off.png =================================================================== (Binary files differ) Property changes on: trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/images/toolbar/wm_tb_nxt_off.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/images/toolbar/wm_tb_prv_off.png =================================================================== (Binary files differ) Property changes on: trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/images/toolbar/wm_tb_prv_off.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/images/toolbar/yellow-pixel.png =================================================================== (Binary files differ) Property changes on: trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/images/toolbar/yellow-pixel.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bra...@us...> - 2010-07-28 00:09:57
|
Revision: 3192 http://archive-access.svn.sourceforge.net/archive-access/?rev=3192&view=rev Author: bradtofel Date: 2010-07-28 00:09:51 +0000 (Wed, 28 Jul 2010) Log Message: ----------- Added method "addBase()" which just adds a <base href="X"> tag. Modified Paths: -------------- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/replay/TextDocument.java Modified: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/replay/TextDocument.java =================================================================== --- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/replay/TextDocument.java 2010-07-27 23:57:00 UTC (rev 3191) +++ trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/replay/TextDocument.java 2010-07-28 00:09:51 UTC (rev 3192) @@ -77,7 +77,20 @@ this.uriConverter = uriConverter; } + public void addBase() { + // TODO: get url from Resource instead of SearchResult? + String pageUrl = result.getOriginalUrl(); + String captureDate = result.getCaptureTimestamp(); + + String existingBaseHref = TagMagix.getBaseHref(sb); + if (existingBaseHref == null) { + insertAtStartOfHead("<base href=\"" + pageUrl + "\" />"); + } else { + pageUrl = existingBaseHref; + } + } + /** * Update URLs inside the page, so those URLs which must be correct at * page load time resolve correctly to absolute URLs. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bra...@us...> - 2010-07-27 23:57:07
|
Revision: 3191 http://archive-access.svn.sourceforge.net/archive-access/?rev=3191&view=rev Author: bradtofel Date: 2010-07-27 23:57:00 +0000 (Tue, 27 Jul 2010) Log Message: ----------- INITIAL REV: very preliminary Memento-style date-time content negotiation support. .JSP files really need some cleanup. lots of static references and date parsing operations should be centralized into a Memento.java support class. Added Paths: ----------- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/requestparser/MementoParser.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/requestparser/TimeBundleParser.java trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/query/Memento.jsp trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/query/ORE.jsp Added: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/requestparser/MementoParser.java =================================================================== --- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/requestparser/MementoParser.java (rev 0) +++ trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/requestparser/MementoParser.java 2010-07-27 23:57:00 UTC (rev 3191) @@ -0,0 +1,155 @@ +package org.archive.wayback.requestparser; + +import java.text.SimpleDateFormat; +import java.util.ArrayList; +import java.util.Date; +import java.util.Iterator; +import java.util.List; + +import javax.servlet.http.HttpServletRequest; + +import org.apache.log4j.Logger; +import org.archive.wayback.core.WaybackRequest; +import org.archive.wayback.exception.BadQueryException; +import org.archive.wayback.exception.BetterRequestException; +import org.archive.wayback.webapp.AccessPoint; + +/** + * RequestParser subclass which matches ".../timegate/URL" requests, and parses + * the Accept-Datetime header + * + * @author Lyudmila Balakireva + * + */ +public class MementoParser extends WrappedRequestParser { + private static final Logger LOGGER = + Logger.getLogger(MementoParser.class.getName()); + + String DTHEADER = "Accept-Datetime"; + + List<SimpleDateFormat> dtsupportedformats = + new ArrayList<SimpleDateFormat>(); + + String MEMENTO_BASE = "timegate"; + + /** + * @param wrapped + * BaseRequestParser with configuration + */ + public MementoParser(BaseRequestParser wrapped) { + super(wrapped); + + dtsupportedformats + .add(new SimpleDateFormat("E, dd MMM yyyy HH:mm:ss Z")); + dtsupportedformats.add(new SimpleDateFormat("E, dd MMM yyyy Z")); + dtsupportedformats.add(new SimpleDateFormat("E, dd MMM yyyy")); + } + + @Override + public WaybackRequest parse(HttpServletRequest httpRequest, + AccessPoint accessPoint) throws BadQueryException, + BetterRequestException { + + String base = accessPoint.translateRequestPath(httpRequest); + String requestPath = accessPoint.translateRequestPathQuery(httpRequest); + + LOGGER.trace("requestPath:" + requestPath); + if (base.startsWith(MEMENTO_BASE)) { + + // strip leading "timegate/": + String urlStr = base.substring(requestPath.indexOf("/") + 1); + + // get the "Accept-Datetime" header: + String httpdate = getHttpDate(httpRequest); + Date dtconnegdate = null; + if (httpdate != null) { + dtconnegdate = checkDateValidity(httpdate, dtsupportedformats); + if (dtconnegdate == null) { + return null; + } + } else { + // TODO: should this return null her? no header.. + } + + WaybackRequest wbRequest = new WaybackRequest(); + if (wbRequest.getStartTimestamp() == null) { + wbRequest.setStartTimestamp(getEarliestTimestamp()); + } + if (dtconnegdate != null) { + wbRequest.setAnchorDate(dtconnegdate); + } else { + wbRequest.setAnchorTimestamp(getLatestTimestamp()); + } + + wbRequest.put("dtconneg", httpdate); + + if (wbRequest.getEndTimestamp() == null) { + wbRequest.setEndTimestamp(getLatestTimestamp()); + } + wbRequest.setCaptureQueryRequest(); + wbRequest.setRequestUrl(urlStr); + if (wbRequest != null) { + wbRequest.setResultsPerPage(getMaxRecords()); + } + return wbRequest; + } + return null; + } + + /** + * Extract the value of the "Accept-Datetime" HTTP request header, if + * present, and further strips the date value from any surrounding "{","}" + * @param req HttpServletRequest for this request + * @return the raw String containing the date information, or null if no + * such HTTP header exists. + */ + public String getHttpDate(HttpServletRequest req) { + String httpdate = req.getHeader(DTHEADER); + + if (httpdate != null) { + int j = httpdate.indexOf("{", 0); + + if (j >= 0) { + + httpdate = httpdate.substring(httpdate.indexOf("{", 0) + 1); + + } + + if (httpdate.indexOf("}") > 0) { + httpdate = httpdate.substring(0, httpdate.indexOf("}")); + + } + } + return httpdate; + } + + /** + * Attempt to parse the String httpdate argument using one of the + * SimpleDateFormats provided. + * + * @param httpdate + * String version of a Date + * @param list + * of SimpleDateFormats to parse the httpdate + * @return Date object set to the time parsed, or null if not parsed + */ + public Date checkDateValidity(String httpdate, List<SimpleDateFormat> list) { + + Date d = null; + Iterator<SimpleDateFormat> it = list.iterator(); + while (it.hasNext()) { + SimpleDateFormat formatter = it.next(); + try { + + d = formatter.parse(httpdate); + break; + + } catch (Exception e) { + e.printStackTrace(); + } + + } + + return d; + } +} Property changes on: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/requestparser/MementoParser.java ___________________________________________________________________ Added: svn:keywords + Author Date Revision Id Added: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/requestparser/TimeBundleParser.java =================================================================== --- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/requestparser/TimeBundleParser.java (rev 0) +++ trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/requestparser/TimeBundleParser.java 2010-07-27 23:57:00 UTC (rev 3191) @@ -0,0 +1,88 @@ +package org.archive.wayback.requestparser; + +import javax.servlet.http.HttpServletRequest; + +import org.apache.log4j.Logger; +import org.archive.wayback.core.WaybackRequest; +import org.archive.wayback.exception.BadQueryException; +import org.archive.wayback.exception.BetterRequestException; +import org.archive.wayback.webapp.AccessPoint; + +/** + * RequestParser subclass which parses "timebundle/URL" and + * "timemap/FORMAT/URL" requests + * + * @author Lyudmila Balakireva + * + */ +public class TimeBundleParser extends WrappedRequestParser { + private static final Logger LOGGER = + Logger.getLogger(TimeBundleParser.class.getName()); + + String MEMENTO_BASE = "timegate"; + + /** + * @param wrapped BaseRequestParser holding config + */ + public TimeBundleParser(BaseRequestParser wrapped) { + super(wrapped); + } + + @Override + public WaybackRequest parse(HttpServletRequest httpRequest, + AccessPoint accessPoint) throws BadQueryException, + BetterRequestException { + + String requestPath = accessPoint.translateRequestPathQuery(httpRequest); + LOGGER.trace("requestpath:" + requestPath); + + if (requestPath.startsWith("timebundle")) { + + WaybackRequest wbRequest = new WaybackRequest(); + String urlStr = requestPath.substring(requestPath.indexOf("/") + 1); + if (wbRequest.getStartTimestamp() == null) { + wbRequest.setStartTimestamp(getEarliestTimestamp()); + } + if (wbRequest.getEndTimestamp() == null) { + wbRequest.setEndTimestamp(getLatestTimestamp()); + } + wbRequest.setCaptureQueryRequest(); + wbRequest.setRequestUrl(urlStr); + + // TODO: is it critical to return a 303 code, or will a 302 do? + // if so, this and ORE.jsp can be simplified by throwing a + // BetterRequestException here. + wbRequest.put("redirect", "true"); + return wbRequest; + } + + if (requestPath.startsWith("timemap")) { + + String urlStrplus = requestPath + .substring(requestPath.indexOf("/") + 1); + String format = urlStrplus.substring(0, urlStrplus.indexOf("/")); + + LOGGER.trace("format:" + format); + String urlStr = urlStrplus.substring(urlStrplus.indexOf("/") + 1); + LOGGER.trace("id:" + urlStr); + WaybackRequest wbRequest = new WaybackRequest(); + if (wbRequest.getStartTimestamp() == null) { + wbRequest.setStartTimestamp(getEarliestTimestamp()); + } + wbRequest.setAnchorTimestamp(getLatestTimestamp()); + wbRequest.put("format", format); + if (wbRequest.getEndTimestamp() == null) { + wbRequest.setEndTimestamp(getLatestTimestamp()); + } + wbRequest.setCaptureQueryRequest(); + wbRequest.setRequestUrl(urlStr); + if (wbRequest != null) { + wbRequest.setResultsPerPage(getMaxRecords()); + } + return wbRequest; + + } + return null; + } + +} Property changes on: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/requestparser/TimeBundleParser.java ___________________________________________________________________ Added: svn:keywords + Author Date Revision Id Added: trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/query/Memento.jsp =================================================================== --- trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/query/Memento.jsp (rev 0) +++ trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/query/Memento.jsp 2010-07-27 23:57:00 UTC (rev 3191) @@ -0,0 +1,192 @@ +<%@ page import="java.util.Date" %> +<%@ page import="org.archive.wayback.core.UIResults" %> +<%@ page import="org.archive.wayback.util.StringFormatter" %> +<%@ page import="org.archive.wayback.core.WaybackRequest" %> +<%@ page import="org.archive.wayback.core.CaptureSearchResults" %> +<%@ page import="org.archive.wayback.core.CaptureSearchResult"%> +<%@ page import="org.archive.wayback.ResultURIConverter" %> +<%@ page import="java.text.SimpleDateFormat" %> +<%@ page import="org.archive.wayback.util.Timestamp" %> +<%@ page import="java.util.Iterator" %> +<%@ page import="java.util.List" %> +<%@ page import="java.util.ArrayList" %> +<%@ page import="org.archive.wayback.ResultURIConverter" %> +<%@ page import="org.archive.wayback.archivalurl.ArchivalUrlResultURIConverter" %> +<% + response.setHeader("Vary", "negotiate,accept-datetime"); + SimpleDateFormat httpformatterl = new SimpleDateFormat( + "E, dd MMM yyyy HH:mm:ss z"); + Date now = new Date(); + UIResults results = UIResults.extractCaptureQuery(request);//nuzno potom perepisat' + + WaybackRequest wbRequest = results.getWbRequest(); + //String p_url = wbRequest.getContextPrefix(); + + String u = wbRequest.getRequestUrl(); + // String agguri = p_url.replace("memento","ore") +"timebundle/" + u; + // String ad = wbRequest.getStartTimestamp(); + // Date sdate = wbRequest.getStartDate(); + //Date pdate = wbRequest.getAnchorDate(); + String dtdate = wbRequest.get("dtconneg"); + + Date dt = now; + if (dtdate != null) { + dt = httpformatterl.parse(dtdate); + } + CaptureSearchResults cResults = results.getCaptureResults(); + CaptureSearchResult res = cResults.getClosest(wbRequest, true); + + Date closestDate = res.getCaptureDate(); + //String url = res.getRedirectUrl(); + String agguri = results.getContextConfig("aggregationPrefix") + + "timebundle/" + u; + String timemap = " , <" + + results.getContextConfig("aggregationPrefix") + + "timemap/link/" + u + + ">;rel=\"timemap\"; type=\"text/csv\""; + ArchivalUrlResultURIConverter uriconverter = (ArchivalUrlResultURIConverter) results + .getURIConverter(); + String uriPrefix = uriconverter.getReplayURIPrefix(); + String replayUrl = results.resultToReplayUrl(res); + //alternates header + String qvalue = "1.0"; //just example + StringBuffer sb = new StringBuffer(); + // sb.append("{"); + //sb.append("\"" + u +"\" "+qvalue); + //sb.append(" {dt original}},"); + //calculate X-Archive-Interval + + StringFormatter fmt = results.getWbRequest().getFormatter(); + Date f = cResults.getFirstResultDate(); + Date l = cResults.getLastResultDate(); + SimpleDateFormat formatterk = new SimpleDateFormat("yyyyMMddHHmmss"); + + //sb.append("{\"" + uriPrefix +formatterk.format(f)+"/" +u +"\" " +qvalue); + //sb.append(" {dt " + "\""+httpformatterl.format(f) +"\" first}}"); + sb.append(", <" + uriPrefix + formatterk.format(f) + "/" + u + + ">;rel=\"first-memento\"; datetime=\"" + + httpformatterl.format(f) + "\""); + if (!f.equals(l)) { + + // sb.append(","); + // sb.append("{\"" + uriPrefix +formatterk.format(l)+"/" +u +"\" " +qvalue); + // sb.append(" {dt " + "\""+httpformatterl.format(l) +"\" last}}"); + sb.append(", <" + uriPrefix + formatterk.format(f) + "/" + u + + ">;rel=\"last-memento\"; datetime=\"" + + httpformatterl.format(f) + "\""); + } + + //response.setHeader("X-Archive-Interval","{"+httpformatterl.format(f)+"} - {"+httpformatterl.format(l)+"}"); + + // calculate closest values for alternates + + CaptureSearchResult closestleft = null; + CaptureSearchResult closestright = null; + long rclosestDistance = 0; + long lclosestDistance = 0; + CaptureSearchResult cur = null; + String anchorDate = null; + + long maxWindow = -1; + //long wantTime = wbRequest.getReplayDate().getTime(); + long wantTime = closestDate.getTime(); + + Iterator<CaptureSearchResult> itr = cResults.iterator(); + while (itr.hasNext()) { + cur = itr.next(); + cur.getCaptureDate(); + //long curDistance = Math.abs(wantTime - cur.getCaptureDate().getTime()); + long curDistance = wantTime - cur.getCaptureDate().getTime(); + // == 0 propuskaem + if (curDistance > 0) { + if ((closestright == null) + || (Math.abs(curDistance) < Math + .abs(rclosestDistance))) { + closestright = cur; + rclosestDistance = Math.abs(curDistance); + } + } + + if (curDistance < 0) { + if ((closestleft == null) + || (Math.abs(curDistance) < Math + .abs(lclosestDistance))) { + closestleft = cur; + lclosestDistance = Math.abs(curDistance); + } + } + + } + + if ((dt.before(f)) || dt.after(now)) { + //if ((pdate.before(f))||pdate.after(now)) { + response.setHeader("TCN", "list"); + response.setStatus(406); + // response.setHeader("Link","<"+agguri+">;rel=\"aggregation\""); + // sb.append("}"); + // response.setHeader("Alternates",sb.toString()); + } else { + // SimpleDateFormat formatterk = new SimpleDateFormat("yyyyMMddHHmmss"); + + // StringBuffer sb = new StringBuffer(); + + // List list = new ArrayList(); + if (closestleft != null) { + if (!closestleft.getCaptureDate().equals(f)) { + // sb.append(","); + // sb.append("{\"" + uriPrefix +formatterk.format(closestleft.getCaptureDate())+"/" +u +"\" "+qvalue); + // sb.append(" {dt " +"\""+httpformatterl.format(closestleft.getCaptureDate()) +"\" prev} {type " + closestleft.getMimeType() +"}}"); + sb.append(", <" + uriPrefix + formatterk.format(f) + + "/" + u + + ">;rel=\"prev-memento\"; datetime=\"" + + httpformatterl.format(f) + "\""); + // list.add(closestleft); + } + } + if (closestright != null) { + if (!closestright.getCaptureDate().equals(l)) { + // sb.append(","); + // sb.append("{\"" + uriPrefix +formatterk.format(closestright.getCaptureDate())+"/" +u +"\" " +qvalue); + //sb.append(" {dt " +"\""+httpformatterl.format(closestright.getCaptureDate()) +"\" next} {type " + closestright.getMimeType() +"}}"); + sb.append(", <" + uriPrefix + formatterk.format(f) + + "/" + u + + ">;rel=\"next-memento\"; datetime=\"" + + httpformatterl.format(f) + "\""); + } + + // list.add(closestright); + } + + // Iterator it = list.iterator(); + //int count=0; + //while (it.hasNext()) { + + // count++; + //CaptureSearchResult alt = (CaptureSearchResult) it.next(); + + // sb.append("{"); + //sb.append("\"" + uriPrefix +formatterk.format(alt.getCaptureDate())+"/" +u +"\" "); + //sb.append("{dt " + httpformatterl.format(alt.getCaptureDate()) +"} {type " + alt.getMimeType() +"}"); + + //sb.append("}"); + //if (count!=list.size()) { + // sb.append(","); } + + //} + + // sb.append("}"); + String origlink = ", <" + u + ">;rel=\"original\""; + String memento = ",<" + replayUrl + + ">;rel=\"memento\";datetime=\"" + + httpformatterl.format(closestDate) + "\""; + response.setHeader("Link", "<" + agguri + + ">;rel=\"timebundle\"" + origlink + sb.toString() + + memento + timemap); //added timemap + // response.setHeader("Alternates",sb.toString()); + response.setHeader("TCN", "choice"); + response.setHeader("Location", replayUrl); + // response.setStatus(302,"Found"); //does'not work + response.sendError(302, "Found"); + + } +%> \ No newline at end of file Added: trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/query/ORE.jsp =================================================================== --- trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/query/ORE.jsp (rev 0) +++ trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/query/ORE.jsp 2010-07-27 23:57:00 UTC (rev 3191) @@ -0,0 +1,320 @@ +<%@ page import="java.util.Date" %> +<%@ page import="org.archive.wayback.core.UIResults" %> +<%@ page import="org.archive.wayback.util.StringFormatter" %> +<%@ page import="org.archive.wayback.core.WaybackRequest" %> +<%@ page import="org.archive.wayback.core.CaptureSearchResults" %> +<%@ page import="org.archive.wayback.core.CaptureSearchResult"%> +<%@ page import="org.archive.wayback.ResultURIConverter" %> +<%@ page import="java.text.SimpleDateFormat" %> +<%@ page import="org.archive.wayback.util.Timestamp" %> +<%@ page import="java.util.Iterator" %> +<%@ page import="java.util.List" %> +<%@ page import="java.util.ArrayList" %> +<%@ page import="org.dspace.foresite.Aggregation" %> +<%@ page import="org.dspace.foresite.ResourceMap" %> +<%@ page import="org.dspace.foresite.Agent" %> +<%@ page import="org.dspace.foresite.OREFactory" %> +<%@ page import="org.dspace.foresite.AggregatedResource" %> +<%@ page import="org.dspace.foresite.ORESerialiser" %> +<%@ page import="org.dspace.foresite.ORESerialiserFactory" %> +<%@ page import="org.dspace.foresite.ResourceMapDocument" %> +<%@ page import="java.io.PrintWriter" %> +<%@ page import="java.net.URI" %> +<%@ page import="org.dspace.foresite.Predicate" %> +<%@ page import="org.archive.wayback.archivalurl.ArchivalUrlResultURIConverter" %> +<%@page import="org.dspace.foresite.Triple"%> +<%@page import="org.dspace.foresite.jena.TripleJena"%> +<%@page import="java.util.UUID"%> +<%@page import="java.util.Calendar"%> +<% + UIResults results = UIResults.extractCaptureQuery(request);//nuzno potom perepisat' + SimpleDateFormat httpformatterl = new SimpleDateFormat( + "E, dd MMM yyyy HH:mm:ss z"); + WaybackRequest wbRequest = results.getWbRequest(); + CaptureSearchResults cResults = results.getCaptureResults(); + CaptureSearchResult res = cResults.getClosest(wbRequest, true); + + ArchivalUrlResultURIConverter uriconverter = (ArchivalUrlResultURIConverter) results + .getURIConverter(); + String uriPrefix = uriconverter.getReplayURIPrefix(); + //String p_url = wbRequest.getContextPrefix(); + String u = wbRequest.getRequestUrl(); + String agguri = uriPrefix + "timebundle/" + u; + //String agguri = results.getContextConfig("Prefix") + "timebundle/" + u; + //String remuri = p_url +"timemap/" + u; + //System.out.println(agguri); + //System.out.println(remuri); + String redirection = null; + if (wbRequest.containsKey("redirect")) { + redirection = wbRequest.get("redirect"); + } + if (redirection != null) { + //default poka + //skip content negotiation + + // TODO: see comment in TimeBundleParser - could be handled elsewhere + response.setStatus(303); + response.setHeader("Location", uriPrefix + "timemap/rdf/" + u); + //response.sendRedirect(p_url +"timemap/rdf/" + u); + } else { + String format = wbRequest.get("format"); + // System.out.println("here"); + Aggregation agg = OREFactory.createAggregation(new URI(agguri)); + //System.out.println("here"); + ResourceMap rem = agg.createResourceMap(new URI(uriPrefix + + "timemap/" + format + "/" + u)); + + //SimpleDateFormat formatter_utc = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss'Z'"); + + Date now = new Date(); + + rem.setCreated(now); + Predicate pr_type = new Predicate(); + pr_type.setURI(new URI( + "http://www.w3.org/1999/02/22-rdf-syntax-ns#type")); + + rem.setModified(now); + rem.createTriple(pr_type, new URI( + "http://www.mementoweb.org/terms/tb/TimeMap")); + //rem.addType(new URI("http://www.mementoweb.org/terms/tb/TimeMap")); + Agent creator = OREFactory.createAgent(); + creator.addName("Foresite Toolkit (Java)"); + //creator.addMbox(new URI("for...@go...")); + + //rem.addAgent(new URI("http://foresite-toolkit.googlecode.com/#javaAgent"),creator); + rem.addCreator(creator); + agg.addTitle("Memento Time Bundle for " + u); + + //CaptureSearchResults cResults = results.getCaptureResults(); + //CaptureSearchResult res = cResults.getClosest(wbRequest,true); + Iterator<CaptureSearchResult> itr = cResults.iterator(); + SimpleDateFormat formatterk = new SimpleDateFormat( + "yyyyMMddHHmmss"); + + Date f = cResults.getFirstResultDate(); + Date l = cResults.getLastResultDate(); + + String ArchiveInterval = formatterk.format(f) + " - " + + formatterk.format(l); + + //agg.createTriple(new URI("http://www.mementoweb.org/ns/archiveInterval"),ArchiveInterval); + agg.addType(new URI( + "http://www.mementoweb.org/terms/tb/TimeBundle")); + //String mementourl =p_url.replace("ore","memento"); + //include original into aggregation + + AggregatedResource ar_o = agg.createAggregatedResource(new URI( + u)); + ar_o.createTriple(pr_type, new URI( + "http://www.mementoweb.org/terms/tb/OriginalResource")); + //include timegate into aggregation + AggregatedResource ar_tg = agg + .createAggregatedResource(new URI(results + .getContextConfig("Prefix") + + "timegate/" + u)); + Predicate pr_format = new Predicate(); + pr_format.setURI(new URI( + "http://purl.org/dc/elements/1.1/format")); + ar_tg.createTriple(pr_format, new URI(u)); + ar_tg.createTriple(pr_type, new URI( + "http://www.mementoweb.org/terms/tb/TimeGate")); + + String previos_digest = null; + List<String> previos_blancs = new ArrayList<String>(); + + Predicate pr = new Predicate(); + pr.setURI(new URI("http://www.mementoweb.org/terms/tb/start")); + Predicate pre = new Predicate(); + pre.setURI(new URI("http://www.mementoweb.org/terms/tb/end")); + Calendar cal = Calendar.getInstance(); + AggregatedResource ar = null; + + Date enddate = null; + + // String buffer for special link serialization format + StringBuffer linkbf = new StringBuffer(); + + linkbf.append("<" + u + ">;rel=\"original\"\n"); + linkbf.append(",<" + agguri + ">;rel=\"timebundle\"\n"); + String firstmemento = null; + + while (itr.hasNext()) { + CaptureSearchResult cur = itr.next(); + //I am not deduping urls (by digest) for the rdf serialization running out of time, extra efforts for me now ;) + + String resurl = results.getContextConfig("Prefix") + + formatterk.format(cur.getCaptureDate()) + "/" + u; + + String digest = cur.getDigest(); + if (previos_digest == null) { + previos_digest = digest; + } + + ar = agg.createAggregatedResource(new URI(resurl)); + ar.createTriple(pr_format, cur.getMimeType()); + + Predicate pr_1 = new Predicate(); + pr_1.setURI(new URI( + "http://www.mementoweb.org/terms/tb/mementoFor")); + ar.createTriple(pr_1, new URI(u)); + ar.createTriple(pr_type, new URI( + "http://www.mementoweb.org/terms/tb/Memento")); + + Date startdate = cur.getDuplicateDigestStoredDate(); + //System.out.println("start:"+startdate); + enddate = cur.getCaptureDate(); + //System.out.println("end:"+enddate); + + // serialiase it in links format only for unique digest + + if (startdate == null) { + if (firstmemento == null) { + linkbf.append(",<" + resurl + + ">;rel=\"first-memento\";datetime=\"" + + httpformatterl.format(enddate) + "\"\n"); + firstmemento = "firstmemento"; + } else { + linkbf.append(",<" + resurl + + ">;rel=\"memento\";datetime=\"" + + httpformatterl.format(enddate) + "\"\n"); + } + } + + // Adding blanc node + Triple triple = new TripleJena(); + triple.initialise(new URI(resurl)); + Predicate pred = new Predicate(); + UUID a = UUID.randomUUID(); + String blanc = "urn:uuid:" + a.toString(); + + //System.out.println(blanc); + pred.setURI(new URI( + "http://www.mementoweb.org/terms/tb/validOver")); + triple.relate(pred, new URI(blanc)); + Triple tr = new TripleJena(); + tr.initialise(new URI(blanc)); + + tr.relate(pr_type, new URI( + "http://www.mementoweb.org/terms/tb/Period")); + + //period difined by [ [ interval [ date first digest recorded and date of next digest recorded [ + + String start = null; + Triple trd = new TripleJena(); + trd.initialise(new URI(blanc)); + //Calendar cal = Calendar.getInstance(); + + if (startdate != null) { + + cal.setTime(startdate); + trd.relate(pr, cal); + start = httpformatterl.format(startdate); + } else { + cal.setTime(enddate); + trd.relate(pr, cal); + start = httpformatterl.format(enddate); + } + + //System.out.println("type" +trd.getLiteralType()); + + ar.addTriple(triple); + ar.addTriple(tr); + ar.addTriple(trd); + + if (!digest.equals("previos_digest")) { + + Iterator<String> it = previos_blancs.iterator(); + while (it.hasNext()) { + String blanc_ = (String) it.next(); + Triple tre = new TripleJena(); + tre.initialise(new URI(blanc_)); + + //Calendar cal = Calendar.getInstance(); + cal.setTime(enddate); + tre.relate(pre, cal); + ar.addTriple(tre); + } + + previos_blancs.clear(); + previos_digest = digest; + } + + previos_blancs.add(blanc); + + } + + Iterator it = previos_blancs.iterator(); + while (it.hasNext()) { + String blanc_ = (String) it.next(); + Triple tre = new TripleJena(); + tre.initialise(new URI(blanc_)); + + cal.setTime(now); //or date of archive stop archiving + tre.relate(pre, cal); + + ar.addTriple(tre); + } + + // additional logic for link format + int m_index = linkbf.lastIndexOf("\"memento\""); + //System.out.println(m_index); + linkbf.insert(m_index + 1, "last-"); + //System.out.println("here"); + + //String format = wbRequest.get("format"); + ORESerialiser serial = null; + if (format.equals("rdf")) { + serial = ORESerialiserFactory.getInstance("RDF/XML"); + response.setContentType("application/rdf+xml"); + } + //else if (format.equals("atom")) { + // serial = ORESerialiserFactory.getInstance("ATOM-1.0"); + //} + //else if (format.equals ("html")) { + // serial = ORESerialiserFactory.getInstance("RDFa"); + //} + //removed n3 because serialization of the date to the String type + //else if (format.equals("n3")) { + //serial = ORESerialiserFactory.getInstance("N3"); + + //response.setContentType("text/n3"); + //} + else if (format.equals("link")) { + PrintWriter pw = response.getWriter(); + //System.out.println(linkbf.toString()); + + // TODO: are we sure this is right? We want to flush *before* + // setting content-type? + pw.print(linkbf.toString()); + pw.flush(); + response.setContentType("text/csv"); + } else { + // response.setStatus(404); + // TODO: this should be handled in TimeBundleParser to allow + // usual Exception rendering to happen. + response.sendError(404, "Unknown TimeMap serialization"); + } + if (serial != null) { + ResourceMapDocument doc = serial.serialise(rem); + // TODO: this could get really big. Any way to stream the data out + // so we don't need another copy beyond the ResourceMap, + // and other helper objects? + String serialisation = doc.toString(); + if (format.equals("rdf")) { + //bug in jena? did not serialise date to date type but to string type // stupid fix will need investigate it + serialisation = serialisation + .replaceAll( + "end rdf:datatype=\"http://www.w3.org/2001/XMLSchema#string", + "end rdf:datatype=\"http://www.w3.org/2001/XMLSchema#dateTime"); + serialisation = serialisation + .replaceAll( + "start rdf:datatype=\"http://www.w3.org/2001/XMLSchema#string", + "start rdf:datatype=\"http://www.w3.org/2001/XMLSchema#dateTime"); + } + PrintWriter pw = response.getWriter(); + pw.print(serialisation); + pw.flush(); + } + + } +%> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
Revision: 3190 http://archive-access.svn.sourceforge.net/archive-access/?rev=3190&view=rev Author: bradtofel Date: 2010-07-27 23:53:19 +0000 (Tue, 27 Jul 2010) Log Message: ----------- TWEAKED test.. Modified Paths: -------------- trunk/archive-access/projects/wayback/wayback-core/src/test/java/org/archive/wayback/util/htmllex/ParseContextTest.java Modified: trunk/archive-access/projects/wayback/wayback-core/src/test/java/org/archive/wayback/util/htmllex/ParseContextTest.java =================================================================== --- trunk/archive-access/projects/wayback/wayback-core/src/test/java/org/archive/wayback/util/htmllex/ParseContextTest.java 2010-07-21 21:50:42 UTC (rev 3189) +++ trunk/archive-access/projects/wayback/wayback-core/src/test/java/org/archive/wayback/util/htmllex/ParseContextTest.java 2010-07-27 23:53:19 UTC (rev 3190) @@ -69,8 +69,11 @@ pc.contextualizeUrl("/../../image/1.html#REF FOO")); assertEquals("http://base.com/image/foo?boo=baz", pc.contextualizeUrl("/image/foo?boo=baz")); - assertEquals("http://base.com/image/foo?boo=baz%3A&gar=war", + assertEquals("http://base.com/image/foo?boo=baz%253A&gar=war", pc.contextualizeUrl("/image/foo?boo=baz%3A&gar=war")); + // TODO: we need to escape again, right? +// assertEquals("http://base.com/image/foo?boo=baz%3A&gar=war", +// pc.contextualizeUrl("/image/foo?boo=baz%3A&gar=war")); } catch (Exception e) { // TODO Auto-generated catch block e.printStackTrace(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
Revision: 3189 http://archive-access.svn.sourceforge.net/archive-access/?rev=3189&view=rev Author: bradtofel Date: 2010-07-21 21:50:42 +0000 (Wed, 21 Jul 2010) Log Message: ----------- INITIAL REV: helper class to massage the CaptureSearchResults into data needed by BubbleCalendar.jsp Added Paths: ----------- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/partition/BubbleCalendarData.java Added: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/partition/BubbleCalendarData.java =================================================================== --- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/partition/BubbleCalendarData.java (rev 0) +++ trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/partition/BubbleCalendarData.java 2010-07-21 21:50:42 UTC (rev 3189) @@ -0,0 +1,154 @@ +/* BubbleCalendarData + * + * $Id$: + * + * Created on Jun 15, 2010. + * + * Copyright (C) 2006 Internet Archive. + * + * This file is part of Wayback. + * + * Wayback is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser Public License as published by + * the Free Software Foundation; either version 2.1 of the License, or + * any later version. + * + * Wayback is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser Public License for more details. + * + * You should have received a copy of the GNU Lesser Public License + * along with Wayback; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +package org.archive.wayback.partition; + +import java.util.Calendar; +import java.util.Date; +import java.util.List; + +import org.archive.wayback.core.CaptureSearchResult; +import org.archive.wayback.core.CaptureSearchResults; +import org.archive.wayback.core.UIResults; +import org.archive.wayback.core.WaybackRequest; +import org.archive.wayback.util.StringFormatter; +import org.archive.wayback.util.graph.Graph; +import org.archive.wayback.util.graph.GraphEncoder; +import org.archive.wayback.util.graph.RegionGraphElement; +import org.archive.wayback.util.partition.Partition; +import org.archive.wayback.util.partition.PartitionSize; +import org.archive.wayback.util.partition.Partitioner; +import org.archive.wayback.util.url.UrlOperations; + +/** + * @author brad + * + */ +public class BubbleCalendarData { + public UIResults results; + public String searchUrlForJS; + public String searchUrlForHTML; + public Date searchStartDate; + public Date searchEndDate; + public Date firstResultDate; + public Date lastResultDate; + public int yearNum = 0; + public long dataStartMSSE; + public long dataEndMSSE; + public long numResults = 0; + public String firstResultReplayUrl; + + + private List<Partition<CaptureSearchResult>> months; + private List<Partition<Partition<CaptureSearchResult>>> years; + public List<Partition<Partition<CaptureSearchResult>>> monthsByDay; + + static PartitionSize daySize = Partitioner.daySize; + static PartitionSize monthSize = Partitioner.monthSize; + static PartitionSize yearSize = Partitioner.yearSize; + + static CaptureSearchResultPartitionMap captureMap = + new CaptureSearchResultPartitionMap(); + static PartitionPartitionMap partitionMap = + new PartitionPartitionMap(); + + static Partitioner<CaptureSearchResult> capturePartitioner = + new Partitioner<CaptureSearchResult>(captureMap); + + static Partitioner<Partition<CaptureSearchResult>> partitionPartitioner = + new Partitioner<Partition<CaptureSearchResult>>(partitionMap); + + public BubbleCalendarData(UIResults results) { + this.results = results; + CaptureSearchResults cResults = results.getCaptureResults(); + WaybackRequest wbRequest = results.getWbRequest(); + StringFormatter fmt = wbRequest.getFormatter(); + String searchUrl = + UrlOperations.stripDefaultPortFromUrl(wbRequest.getRequestUrl()); + + searchUrlForHTML = fmt.escapeHtml(searchUrl); + searchUrlForJS = fmt.escapeJavaScript(searchUrl); + firstResultDate = cResults.getFirstResultDate(); + firstResultReplayUrl = fmt.escapeHtml( + results.resultToReplayUrl(cResults.getResults().get(0))); + lastResultDate = cResults.getLastResultDate(); + Date searchStartDate = wbRequest.getStartDate(); + Date searchEndDate = wbRequest.getEndDate(); + months = capturePartitioner.getRange(monthSize,searchStartDate,searchEndDate); + years = partitionPartitioner.getRange(yearSize,searchStartDate,searchEndDate); + + + // To build the graph, we need to break all the results into 1 month + // partitions, so partition all the results into the months: + capturePartitioner.populate(months,cResults.iterator()); + + // To fill in the calendar, we need to break the current year into day + // sized partitions, so first partition those months into years: + partitionPartitioner.populate(years,months.iterator()); + // find the active year: + Partition<Partition<CaptureSearchResult>> activeYear = null; + for(Partition<Partition<CaptureSearchResult>> year : years) { + if(year.isContainsClosest()) { + activeYear = year; + break; + } + } + // if there's no activeYear, something is quite wrong... + // TODO: check anyways: + String yearStr = fmt.format("{0,date,yyyy}",activeYear.getStart()); + yearNum = Integer.parseInt(yearStr); + + // now unroll the months in the active year into day-sized partitions: + List<Partition<CaptureSearchResult>> days = + capturePartitioner.getRange(daySize, + activeYear.getStart(),activeYear.getEnd()); + for(Partition<CaptureSearchResult> month : activeYear.list()) { + capturePartitioner.populate(days,month.iterator()); + } + // finally, spool the days of the current year into 12 month-sized + // partitions: + monthsByDay = partitionPartitioner.getRange(monthSize, activeYear.getStart(), activeYear.getEnd()); + partitionPartitioner.populate(monthsByDay,days.iterator()); + dataStartMSSE = years.get(0).getStart().getTime(); + dataEndMSSE = years.get(years.size()-1).getEnd().getTime(); + numResults = cResults.getMatchingCount(); + } + public String getYearsGraphString(int imgWidth, int imgHeight) { + String yearFormatKey = "PartitionSize.dateHeader.yearGraphLabel"; + Graph yearGraph = PartitionsToGraph.partsOfPartsToGraph( + years,results.getWbRequest().getFormatter(),yearFormatKey, + imgWidth,imgHeight); + for(RegionGraphElement rge : yearGraph.getRegions()) { + if(rge.getData().hasHighlightedValue()) { +// rge.getData().setHighlightedValue(-1); + } + } + + return GraphEncoder.encode(yearGraph); + } + public static Calendar getUTCCalendar() { + return PartitionsToGraph.getUTCCalendar(); + } +} Property changes on: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/partition/BubbleCalendarData.java ___________________________________________________________________ Added: svn:keywords + Author Date Revision Id This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
Revision: 3188 http://archive-access.svn.sourceforge.net/archive-access/?rev=3188&view=rev Author: bradtofel Date: 2010-07-21 21:49:24 +0000 (Wed, 21 Jul 2010) Log Message: ----------- TWEAKED colors and border strokes Modified Paths: -------------- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/util/graph/GraphConfiguration.java Modified: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/util/graph/GraphConfiguration.java =================================================================== --- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/util/graph/GraphConfiguration.java 2010-07-21 21:34:29 UTC (rev 3187) +++ trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/util/graph/GraphConfiguration.java 2010-07-21 21:49:24 UTC (rev 3188) @@ -38,11 +38,16 @@ * */ public class GraphConfiguration { - final static BasicStroke dashed = new BasicStroke(1.0f, - BasicStroke.CAP_BUTT, - BasicStroke.JOIN_MITER, - 1.0f, new float[] {1.0f}, 0.0f); + final static BasicStroke dashedStroke = new BasicStroke(1.0f, + BasicStroke.CAP_BUTT, + BasicStroke.JOIN_MITER, + 1.0f, new float[] {1.0f}, 0.0f); + final static BasicStroke solidStroke = new BasicStroke(1.0f, + BasicStroke.CAP_BUTT, + BasicStroke.JOIN_MITER, + 1.0f); + /** * type of BufferedImage to create, specifically the final constructor arg. */ @@ -82,25 +87,27 @@ /** * color for Year/Month border lines */ - public Color regionBorderColor = Color.darkGray; + public Color regionBorderColor = new Color(204,204,204,255); +// public Color regionBorderColor = Color.darkGray; + /** * Stroke for Year/Month border lines */ - public Stroke regionBorderStroke = dashed; + public Stroke regionBorderStroke = solidStroke; /** * Background color for active/selected Year/Month */ - public Color regionHighlightColor = new Color(255,255,25,128); + public Color regionHighlightColor = new Color(255,255,0,90); /** * color for non-active/selected graph values */ public Color valueColor = Color.black; /** - * color for active/selected graph values + * color for active/selected graph values ( #ec008c ) */ - public Color valueHighlightColor = Color.red; + public Color valueHighlightColor = new Color(236,0,140,255); /** * Minimum pixel height for non-zero graph values This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bra...@us...> - 2010-07-21 21:34:35
|
Revision: 3187 http://archive-access.svn.sourceforge.net/archive-access/?rev=3187&view=rev Author: bradtofel Date: 2010-07-21 21:34:29 +0000 (Wed, 21 Jul 2010) Log Message: ----------- Added method to set the highlighted value, in prep for disabling the active month indicator in the Query Graph Modified Paths: -------------- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/util/graph/RegionData.java Modified: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/util/graph/RegionData.java =================================================================== --- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/util/graph/RegionData.java 2010-07-21 00:00:27 UTC (rev 3186) +++ trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/util/graph/RegionData.java 2010-07-21 21:34:29 UTC (rev 3187) @@ -66,6 +66,12 @@ return highlightedValue; } /** + * sets the highlighted value index, or removes highlight if -1 is used + */ + public void setHighlightedValue(int highlightedValue) { + this.highlightedValue = highlightedValue; + } + /** * @return the raw array of values for this region */ public int[] getValues() { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bra...@us...> - 2010-07-21 00:00:33
|
Revision: 3186 http://archive-access.svn.sourceforge.net/archive-access/?rev=3186&view=rev Author: bradtofel Date: 2010-07-21 00:00:27 +0000 (Wed, 21 Jul 2010) Log Message: ----------- HACKHACK - if original HREF or base-HREF is not a valid URL, allows identity rewriting of other urls in the page Modified Paths: -------------- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/util/htmllex/ParseContext.java Modified: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/util/htmllex/ParseContext.java =================================================================== --- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/util/htmllex/ParseContext.java 2010-07-20 23:59:24 UTC (rev 3185) +++ trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/util/htmllex/ParseContext.java 2010-07-21 00:00:27 UTC (rev 3186) @@ -106,6 +106,11 @@ url = url.substring(0,hashIdx); } try { + if(baseUrl == null) { + // TODO: log + System.err.println("No url to resolve!"); + return url; + } return baseUrl.resolve(url,false).toString() + frag; // return UURIFactory.getInstance(baseUrl, url).toString() + frag; } catch (URIException e) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
Revision: 3185 http://archive-access.svn.sourceforge.net/archive-access/?rev=3185&view=rev Author: bradtofel Date: 2010-07-20 23:59:24 +0000 (Tue, 20 Jul 2010) Log Message: ----------- INTERFACE: exposed some fields for subclassing Modified Paths: -------------- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourceindex/cdx/format/CDXFormat.java Modified: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourceindex/cdx/format/CDXFormat.java =================================================================== --- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourceindex/cdx/format/CDXFormat.java 2010-07-20 23:58:43 UTC (rev 3184) +++ trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourceindex/cdx/format/CDXFormat.java 2010-07-20 23:59:24 UTC (rev 3185) @@ -88,9 +88,9 @@ * *** future data */ - private CDXField[] fields = null; - private char delimiter = ' '; - private String delimiterS = null; + protected CDXField[] fields = null; + protected char delimiter = ' '; + protected String delimiterS = null; public static String CDX_MAGIC = " CDX"; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bra...@us...> - 2010-07-20 23:58:49
|
Revision: 3184 http://archive-access.svn.sourceforge.net/archive-access/?rev=3184&view=rev Author: bradtofel Date: 2010-07-20 23:58:43 +0000 (Tue, 20 Jul 2010) Log Message: ----------- Created IORuntimeException so ZiplinesIterator can maintain Iterator interface, but throws an exception discernible as an IO problem Modified Paths: -------------- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourceindex/LocalResourceIndex.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourceindex/ziplines/ZiplinesChunkIterator.java Added Paths: ----------- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/exception/RuntimeIOException.java Added: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/exception/RuntimeIOException.java =================================================================== --- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/exception/RuntimeIOException.java (rev 0) +++ trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/exception/RuntimeIOException.java 2010-07-20 23:58:43 UTC (rev 3184) @@ -0,0 +1,36 @@ +/* RuntimeIOException + * + * $Id$: + * + * Created on Jun 24, 2010. + * + * Copyright (C) 2006 Internet Archive. + * + * This file is part of Wayback. + * + * Wayback is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser Public License as published by + * the Free Software Foundation; either version 2.1 of the License, or + * any later version. + * + * Wayback is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser Public License for more details. + * + * You should have received a copy of the GNU Lesser Public License + * along with Wayback; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +package org.archive.wayback.exception; + +/** + * @author brad + * + */ +public class RuntimeIOException extends RuntimeException { + + /** */ + private static final long serialVersionUID = -4762025404760379497L; +} Property changes on: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/exception/RuntimeIOException.java ___________________________________________________________________ Added: svn:keywords + Author Date Revision Id Modified: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourceindex/LocalResourceIndex.java =================================================================== --- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourceindex/LocalResourceIndex.java 2010-07-20 23:56:53 UTC (rev 3183) +++ trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourceindex/LocalResourceIndex.java 2010-07-20 23:58:43 UTC (rev 3184) @@ -43,6 +43,7 @@ import org.archive.wayback.exception.BadQueryException; import org.archive.wayback.exception.ResourceIndexNotAvailableException; import org.archive.wayback.exception.ResourceNotInArchiveException; +import org.archive.wayback.exception.RuntimeIOException; import org.archive.wayback.resourceindex.adapters.CaptureToUrlSearchResultIterator; import org.archive.wayback.resourceindex.filterfactory.AccessPointCaptureFilterGroupFactory; import org.archive.wayback.resourceindex.filterfactory.CaptureFilterGroup; @@ -173,6 +174,9 @@ WindowFilterGroup<CaptureSearchResult> window = new WindowFilterGroup<CaptureSearchResult>(wbRequest,this); List<CaptureFilterGroup> groups = getRequestFilterGroups(wbRequest); + if(filter != null) { + filters.addFilter(filter); + } for(CaptureFilterGroup cfg : groups) { filters.addFilters(cfg.getFilters()); @@ -182,16 +186,17 @@ CloseableIterator<CaptureSearchResult> itr = new ObjectFilterIterator<CaptureSearchResult>( source.getPrefixIterator(urlKey),filters); - - while(itr.hasNext()) { - results.addSearchResult(itr.next()); + try { + while(itr.hasNext()) { + results.addSearchResult(itr.next()); + } + } catch(RuntimeIOException e) { + throw new ResourceIndexNotAvailableException(e.getLocalizedMessage()); } - for(CaptureFilterGroup cfg : groups) { cfg.annotateResults(results); } window.annotateResults(results); - cleanupIterator(itr); return results; Modified: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourceindex/ziplines/ZiplinesChunkIterator.java =================================================================== --- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourceindex/ziplines/ZiplinesChunkIterator.java 2010-07-20 23:56:53 UTC (rev 3183) +++ trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourceindex/ziplines/ZiplinesChunkIterator.java 2010-07-20 23:58:43 UTC (rev 3184) @@ -38,6 +38,8 @@ import java.util.zip.GZIPInputStream; import org.apache.log4j.Logger; +import org.archive.wayback.exception.ResourceIndexNotAvailableException; +import org.archive.wayback.exception.RuntimeIOException; import org.archive.wayback.util.CloseableIterator; import org.archive.wayback.webapp.AccessPoint; @@ -88,7 +90,7 @@ try { br = blockItr.next().readBlock(); } catch (IOException e) { - e.printStackTrace(); + throw new RuntimeIOException(); } } else { return false; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
Revision: 3183 http://archive-access.svn.sourceforge.net/archive-access/?rev=3183&view=rev Author: bradtofel Date: 2010-07-20 23:56:53 +0000 (Tue, 20 Jul 2010) Log Message: ----------- LOGGIN Modified Paths: -------------- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourceindex/ziplines/ZiplinesSearchResultSource.java Modified: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourceindex/ziplines/ZiplinesSearchResultSource.java =================================================================== --- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourceindex/ziplines/ZiplinesSearchResultSource.java 2010-07-20 23:54:26 UTC (rev 3182) +++ trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourceindex/ziplines/ZiplinesSearchResultSource.java 2010-07-20 23:56:53 UTC (rev 3183) @@ -25,21 +25,16 @@ package org.archive.wayback.resourceindex.ziplines; -import it.unimi.dsi.mg4j.util.FrontCodedStringList; - -import java.io.BufferedReader; -import java.io.FileNotFoundException; -import java.io.FileReader; import java.io.IOException; import java.io.PrintWriter; import java.util.ArrayList; import java.util.HashMap; import java.util.Iterator; +import org.apache.log4j.Logger; import org.archive.wayback.core.CaptureSearchResult; import org.archive.wayback.exception.ResourceIndexNotAvailableException; import org.archive.wayback.resourceindex.SearchResultSource; -import org.archive.wayback.resourceindex.SequencedSearchResultSource; import org.archive.wayback.resourceindex.cdx.CDXFormatToSearchResultAdapter; import org.archive.wayback.resourceindex.cdx.format.CDXFormat; import org.archive.wayback.resourceindex.cdx.format.CDXFormatException; @@ -73,6 +68,8 @@ * */ public class ZiplinesSearchResultSource implements SearchResultSource { + private static final Logger LOGGER = Logger.getLogger( + ZiplinesSearchResultSource.class.getName()); /** * Local path containing map of URL,TIMESTAMP,CHUNK,OFFSET for each 128K chunk @@ -100,6 +97,8 @@ String line = lines.next(); String[] parts = line.split("\\s"); if(parts.length != 2) { + LOGGER.error("Bad line(" + line +") in (" + + chunkMapPath + ")"); throw new IOException("Bad line(" + line +") in (" + chunkMapPath + ")"); } @@ -152,6 +151,8 @@ numBlocks++; String parts[] = blockDescriptor.split("\t"); if(parts.length != 3) { + LOGGER.error("Bad line(" + blockDescriptor +") in (" + + chunkMapPath + ")"); throw new ResourceIndexNotAvailableException("Bad line(" + blockDescriptor + ")"); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
Revision: 3182 http://archive-access.svn.sourceforge.net/archive-access/?rev=3182&view=rev Author: bradtofel Date: 2010-07-20 23:54:26 +0000 (Tue, 20 Jul 2010) Log Message: ----------- FEATURE: adding WWW-Authenticate HTTP header, to allow user to add credentials Modified Paths: -------------- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/exception/AuthenticationControlException.java Modified: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/exception/AuthenticationControlException.java =================================================================== --- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/exception/AuthenticationControlException.java 2010-07-20 23:53:12 UTC (rev 3181) +++ trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/exception/AuthenticationControlException.java 2010-07-20 23:54:26 UTC (rev 3182) @@ -56,10 +56,8 @@ super(message,"Authenication Problem",details); id = ID; } - /** - * @return the HTTP status code appropriate to this exception class. - */ - public int getStatus() { - return HttpServletResponse.SC_UNAUTHORIZED; + public void setupResponse(HttpServletResponse response) { + response.setStatus(HttpServletResponse.SC_UNAUTHORIZED); + response.addHeader("WWW-Authenticate","Basic realm=\"Secured-Wayback\""); } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
Revision: 3181 http://archive-access.svn.sourceforge.net/archive-access/?rev=3181&view=rev Author: bradtofel Date: 2010-07-20 23:53:12 +0000 (Tue, 20 Jul 2010) Log Message: ----------- Backing out Java 6 specific method call Modified Paths: -------------- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/archivalurl/FastArchivalUrlReplayParseEventHandler.java Modified: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/archivalurl/FastArchivalUrlReplayParseEventHandler.java =================================================================== --- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/archivalurl/FastArchivalUrlReplayParseEventHandler.java 2010-07-20 23:52:12 UTC (rev 3180) +++ trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/archivalurl/FastArchivalUrlReplayParseEventHandler.java 2010-07-20 23:53:12 UTC (rev 3181) @@ -266,7 +266,8 @@ OutputStream out = context.getOutputStream(); if(out != null) { - Charset charset = Charset.forName(context.getOutputCharset()); +// Charset charset = Charset.forName(context.getOutputCharset()); + String charset = context.getOutputCharset(); if(pre != null) { @@ -341,7 +342,8 @@ e.printStackTrace(); } if(tmp != null) { - Charset charset = Charset.forName(context.getOutputCharset()); +// Charset charset = Charset.forName(context.getOutputCharset()); + String charset = context.getOutputCharset(); out.write(tmp.getBytes(charset)); } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |