Changeset f010b27


Ignore:
Timestamp:
Mar 3, 2012 8:17:02 PM (8 years ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
21ce36d
Parents:
b0a682f
Message:

Home page:

  • Convert ajax to use shared script
  • CSS tweaks
  • Add missing icons Silk icons: See licenses/LICENSE-SilkIcons?.txt
Files:
7 added
4 edited

Legend:

Unmodified
Added
Removed
  • apps/routerconsole/java/src/net/i2p/router/web/HomeHelper.java

    rb0a682f rf010b27  
    4848        _x("Pastebin") + S + _x("I2P Pastebin") + S + "http://pastethis.i2p/" + S + I + "itoopie_sm.png" + S +
    4949        "Planet I2P" + S + _x("I2P News") + S + "http://planet.i2p/" + S + I + "itoopie_sm.png" + S +
     50        //_x("Plugins") + S + _x("Add-on directory") + S + "http://*TBD*.i2p/" + S + I + "plugin.png" + S +
    5051        _x("Postman's Tracker") + S + _x("Bittorrent tracker") + S + "http://tracker2.postman.i2p/" + S + I + "itoopie_sm.png" + S +
    5152        _x("Project Website") + S + _x("I2P home page") + S + "http://www.i2p2.i2p/" + S + I + "help.png" + S +
  • apps/routerconsole/jsp/home.jsp

    rb0a682f rf010b27  
    22<%@page pageEncoding="UTF-8"%>
    33<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    4 
    54<html><head>
    65<%@include file="css.jsi" %>
    76<%=intl.title("home")%>
    8 
     7<script src="/js/ajax.js" type="text/javascript"></script>
    98<script type="text/javascript">
    10 var page = "home";
    11 function ajax(url,target) {
    12   // native XMLHttpRequest object
    13   if (window.XMLHttpRequest) {
    14     req = new XMLHttpRequest();
    15     req.onreadystatechange = function() {ajaxDone(target);};
    16     req.open("GET", url, true);
    17     req.send(null);
    18     // IE/Windows ActiveX version
    19   } else if (window.ActiveXObject) {
    20     req = new ActiveXObject("Microsoft.XMLDOM");
    21     if (req) {
    22       req.onreadystatechange = function() {ajaxDone(target);};
    23       req.open("GET", url, true);
    24       req.send(null);
    25     }
    26   }
    27   //setTimeout("ajax(page,'scriptoutput')", 5000);
    28 }
    29 
    30 function ajaxDone(target) {
    31   // only if req is "loaded"
    32   if (req.readyState == 4) {
    33     // only if "OK"
    34     if (req.status == 200) {
    35       results = req.responseText;
    36       document.getElementById(target).innerHTML = results;
    37       document.getElementById("langbox").style.display="block";
    38       document.getElementById("home").style.display="block";
    39     } else {
    40       document.getElementById(target).innerHTML="<b><%=intl._("Router is down")%></b>";
    41       document.getElementById("home").style.display="none";
    42       document.getElementById("langbox").style.display="none";
    43     }
    44   }
    45 }
    46 
    47 function requestAjax1() { ajax("/xhr1.jsp", "xhr"); }
    48 function initAjax() { setInterval(requestAjax1, 15000);  }
    49 
     9  function requestAjax1() { ajax("/xhr1.jsp", "xhr", 15000); }
     10  function initAjax() { setInterval(requestAjax1, 15000);  }
    5011</script>
    51 
    52 
    53 
    5412</head><body onload="initAjax()">
    55 
    56 
    5713<%
    5814    String consoleNonce = System.getProperty("router.consoleNonce");
     
    6218    }
    6319%>
    64 
    6520<div class="routersummaryouter" id="appsummary">
    6621 <div class="routersummary">
     
    8237    <a href="/home?lang=ar&amp;consoleNonce=<%=consoleNonce%>"><img height="11" width="16" style="padding: 0 2px;" src="/flags.jsp?c=lang_ar" title="عربية" alt="عربية"></a>
    8338    <a href="/home?lang=zh&amp;consoleNonce=<%=consoleNonce%>"><img height="11" width="16" style="padding: 0 2px;" src="/flags.jsp?c=cn" title="中文" alt="中文"></a>
     39    <a href="/home?lang=cs&amp;consoleNonce=<%=consoleNonce%>"><img height="11" width="16" style="padding: 0 2px;" src="/flags.jsp?c=cz" title="Czech" alt="Czech"></a>
    8440    <a href="/home?lang=da&amp;consoleNonce=<%=consoleNonce%>"><img height="11" width="16" style="padding: 0 2px;" src="/flags.jsp?c=dk" title="Danish" alt="Danish"></a>
    8541    <a href="/home?lang=de&amp;consoleNonce=<%=consoleNonce%>"><img height="11" width="16" style="padding: 0 2px;" src="/flags.jsp?c=de" title="Deutsch" alt="Deutsch"></a>
    8642    <a href="/home?lang=ee&amp;consoleNonce=<%=consoleNonce%>"><img height="11" width="16" style="padding: 0 2px;" src="/flags.jsp?c=ee" title="Eesti" alt="Eesti"></a>
    8743    <a href="/home?lang=es&amp;consoleNonce=<%=consoleNonce%>"><img height="11" width="16" style="padding: 0 2px;" src="/flags.jsp?c=es" title="Español" alt="Español"></a>
    88     <a href="/home?lang=fi&amp;consoleNonce=<%=consoleNonce%>"><img height="11" width="16" style="padding: 0 2px;" src="/flags.jsp?c=fi" title="Suomi" alt="Suomi"></a>
    89     <a href="/home?lang=fr&amp;consoleNonce=<%=consoleNonce%>"><img height="11" width="16" style="padding: 0 2px;" src="/flags.jsp?c=fr" title="Français" alt="Français"></a><br>
     44    <a href="/home?lang=fi&amp;consoleNonce=<%=consoleNonce%>"><img height="11" width="16" style="padding: 0 2px;" src="/flags.jsp?c=fi" title="Suomi" alt="Suomi"></a><br>
     45    <a href="/home?lang=fr&amp;consoleNonce=<%=consoleNonce%>"><img height="11" width="16" style="padding: 0 2px;" src="/flags.jsp?c=fr" title="Français" alt="Français"></a>
    9046    <a href="/home?lang=it&amp;consoleNonce=<%=consoleNonce%>"><img height="11" width="16" style="padding: 0 2px;" src="/flags.jsp?c=it" title="Italiano" alt="Italiano"></a>
    9147    <a href="/home?lang=nl&amp;consoleNonce=<%=consoleNonce%>"><img height="11" width="16" style="padding: 0 2px;" src="/flags.jsp?c=nl" title="Nederlands" alt="Nederlands"></a>
     
    12379  <div class="search">
    12480    <form action="/search.jsp" method="POST">
    125       <table><tr><td align="right">
     81      <table class="search"><tr><td align="right">
    12682        <input size="50" type="text" class="search" name="query" />
    12783      </td><td align="left">
  • apps/routerconsole/jsp/js/ajax.js

    rb0a682f rf010b27  
    2424      results = req.responseText;
    2525      document.getElementById(target).innerHTML = results;
    26       document.getElementById("lowersection").style.display="block";
     26      //document.getElementsbyClassName("hideifdown").style.display="block";
    2727    } else {
     28      // TODO take from a translated variable
    2829      document.getElementById(target).innerHTML="<b>Router is down</b>";
    29       document.getElementById("lowersection").style.display="none";
     30      //document.getElementByClassName("hideifdown").style.display="none";
    3031    }
    3132    setTimeout(function() {ajax(url, target, refresh);}, refresh);
  • installer/resources/themes/console/light/console.css

    rb0a682f rf010b27  
    631631
    632632div.search {
    633      margin: 20px;
     633     margin: 20px 20px 20px 240px;
    634634     padding: 8px;
    635635     width: auto;
    636636}
    637637
    638 div.search table {
     638table.search {
    639639     background: none;
    640640     margin: 20px;
Note: See TracChangeset for help on using the changeset viewer.