forked from I2P_Developers/i2p.i2p
- /confighome validation fixes
- AJAX fixes - Translate 'router is down' message
This commit is contained in:
@ -230,6 +230,7 @@ public class I2PSnarkServlet extends Default {
|
||||
//out.write("<meta http-equiv=\"refresh\" content=\"" + delay + ";/i2psnark/" + peerString + "\">\n");
|
||||
out.write("<script src=\"/js/ajax.js\" type=\"text/javascript\"></script>\n" +
|
||||
"<script type=\"text/javascript\">\n" +
|
||||
"var failMessage = \"<b>" + _("Router is down") + "</b>\";\n" +
|
||||
"function requestAjax1() { ajax(\"/i2psnark/.ajax/xhr1.html" + peerString + "\", \"mainsection\", " + (delay*1000) + "); }\n" +
|
||||
"function initAjax(delayMs) { setTimeout(requestAjax1, " + (delay*1000) +"); }\n" +
|
||||
"</script>\n");
|
||||
|
@ -43,7 +43,7 @@ public class HomeHelper extends HelperBase {
|
||||
_x("FAQ") + S + _x("Frequently Asked Questions") + S + "http://www.i2p2.i2p/faq" + S + I + "help.png" + S +
|
||||
_x("Forum") + S + _x("Community forum") + S + "http://forum.i2p/" + S + I + "itoopie_sm.png" + S +
|
||||
//"ident.i2p" + S + _x("Short message service") + S + "http://ident.i2p/" + S + I + "itoopie_sm.png" + S +
|
||||
_x("Javadocs") + S + _x("Technical documentation") + S + "http://docs.i2p-projekt.i2p/javadoc/" + S + I + "book.png" + S +
|
||||
_x("Javadocs") + S + _x("Technical documentation") + S + "http://update.killyourtv.i2p/javadoc/" + S + I + "book.png" + S +
|
||||
_x("Key Server") + S + _x("OpenPGP Keyserver") + S + "http://keys.i2p/" + S + I + "book.png" + S +
|
||||
_x("Pastebin") + S + _x("I2P Pastebin") + S + "http://pastethis.i2p/" + S + I + "itoopie_sm.png" + S +
|
||||
"Planet I2P" + S + _x("I2P News") + S + "http://planet.i2p/" + S + I + "itoopie_sm.png" + S +
|
||||
@ -186,14 +186,14 @@ public class HomeHelper extends HelperBase {
|
||||
.append(app.name)
|
||||
.append("\"></td><td align=\"center\">");
|
||||
if (app.icon != null) {
|
||||
buf.append("<img height=\"16\" src=\"").append(app.icon).append("\">");
|
||||
buf.append("<img height=\"16\" alt=\"\" src=\"").append(app.icon).append("\">");
|
||||
}
|
||||
buf.append("</td><td align=\"left\">")
|
||||
.append(app.name)
|
||||
.append("</td><td align=\"left\"><a href=\"")
|
||||
.append(app.url)
|
||||
.append(app.url.replace("&", "&"))
|
||||
.append("\">")
|
||||
.append(app.url)
|
||||
.append(app.url.replace("&", "&"))
|
||||
.append("</a></td></tr>\n");
|
||||
}
|
||||
buf.append("<tr><td colspan=\"2\" align=\"center\"><b>")
|
||||
|
@ -81,4 +81,4 @@ input.default {
|
||||
<input type="submit" name="action" class="add" value="<%=intl._("Add item")%>" >
|
||||
</div>
|
||||
</form>
|
||||
</div></div></body></html>
|
||||
</div></body></html>
|
||||
|
@ -6,8 +6,9 @@
|
||||
<%=intl.title("home")%>
|
||||
<script src="/js/ajax.js" type="text/javascript"></script>
|
||||
<script type="text/javascript">
|
||||
var failMessage = "<b><%=intl._("Router is down")%></b>";
|
||||
function requestAjax1() { ajax("/xhr1.jsp", "xhr", 15000); }
|
||||
function initAjax() { setInterval(requestAjax1, 15000); }
|
||||
function initAjax() { setTimeout(requestAjax1, 15000); }
|
||||
</script>
|
||||
</head><body onload="initAjax()">
|
||||
<%
|
||||
|
@ -25,8 +25,7 @@ function ajaxDone(url, target, refresh) {
|
||||
document.getElementById(target).innerHTML = results;
|
||||
//document.getElementsbyClassName("hideifdown").style.display="block";
|
||||
} else {
|
||||
// TODO take from a translated variable
|
||||
document.getElementById(target).innerHTML="<b>Router is down</b>";
|
||||
document.getElementById(target).innerHTML = failMessage;
|
||||
//document.getElementByClassName("hideifdown").style.display="none";
|
||||
}
|
||||
setTimeout(function() {ajax(url, target, refresh);}, refresh);
|
||||
|
@ -18,7 +18,7 @@ public class RouterVersion {
|
||||
/** deprecated */
|
||||
public final static String ID = "Monotone";
|
||||
public final static String VERSION = CoreVersion.VERSION;
|
||||
public final static long BUILD = 2;
|
||||
public final static long BUILD = 3;
|
||||
|
||||
/** for example "-test" */
|
||||
public final static String EXTRA = "";
|
||||
|
Reference in New Issue
Block a user