forked from I2P_Developers/i2p.i2p
basic XHR
This commit is contained in:
@ -69,7 +69,7 @@
|
||||
<script src="/js/ajax.js" type="text/javascript"></script>
|
||||
<script type="text/javascript">
|
||||
var failMessage = "<hr><b><%=intl._t("Router is down")%><\/b>";
|
||||
function requestAjax1() { ajax("/welcomexhr.jsp", "xhr", "1000"); }
|
||||
function requestAjax1() { ajax("/welcomexhr1.jsp", "xhr", "1000"); }
|
||||
function initAjax() { setTimeout(requestAjax1, "1000"); }
|
||||
</script>
|
||||
<%
|
||||
@ -144,7 +144,10 @@
|
||||
// Bandwidth test in progress (w/ AJAX)
|
||||
%>
|
||||
<h3><%=intl._t("Bandwidth Test in Progress")%></h3>
|
||||
<p>Ajax TODO - wait 60 seconds then click next</p>
|
||||
<div id="xhr">
|
||||
<!-- for non-script -->
|
||||
<%=intl._t("Javascript is disabled - wait 60 seconds for the bandwidth test to complete and then click Next")%>
|
||||
</div>
|
||||
<%
|
||||
|
||||
} else if (ipg == 5) {
|
||||
|
16
apps/routerconsole/jsp/welcomexhr1.jsp
Normal file
16
apps/routerconsole/jsp/welcomexhr1.jsp
Normal file
@ -0,0 +1,16 @@
|
||||
<%@page contentType="text/html"%><%@page pageEncoding="UTF-8"%><jsp:useBean class="net.i2p.router.web.helpers.WizardHelper" id="wizhelper" scope="session" /><%
|
||||
String i2pcontextId = request.getParameter("i2p.contextId");
|
||||
try {
|
||||
if (i2pcontextId != null) {
|
||||
session.setAttribute("i2p.contextId", i2pcontextId);
|
||||
} else {
|
||||
i2pcontextId = (String) session.getAttribute("i2p.contextId");
|
||||
}
|
||||
} catch (IllegalStateException ise) {}
|
||||
wizhelper.setContextId(i2pcontextId);
|
||||
if (wizhelper.isNDTComplete()) {
|
||||
%><%=wizhelper._t("Bandwidth test is complete, click Next")%><%
|
||||
} else {
|
||||
%><%=wizhelper._t("Bandwidth test in progress...")%><%
|
||||
}
|
||||
%>
|
Reference in New Issue
Block a user