modules/admin-full: IE fixes

This commit is contained in:
Jo-Philipp Wich 2010-11-18 01:34:56 +00:00
parent bc82b2fe59
commit a5dc680dee
5 changed files with 20 additions and 27 deletions

View file

@ -25,7 +25,7 @@ $Id$
-%> -%>
<script type="text/javascript" src="<%=resource%>/cbi.js"></script> <script type="text/javascript" src="<%=resource%>/cbi.js"></script>
<script type="text/javascript"><![CDATA[ <script type="text/javascript">//<![CDATA[
function iface_shutdown(id, reconnect) { function iface_shutdown(id, reconnect) {
if (!reconnect && !confirm(String.format('<%_Really shutdown interface "%s" ?\nYou might loose access to this router if you are connected via this interface.%>', id))) if (!reconnect && !confirm(String.format('<%_Really shutdown interface "%s" ?\nYou might loose access to this router if you are connected via this interface.%>', id)))
return; return;
@ -168,7 +168,7 @@ $Id$
}; };
update_status(); update_status();
]]></script> //]]></script>
<fieldset class="cbi-section" style="display:none"> <fieldset class="cbi-section" style="display:none">
<legend><%:Reconnecting interface%></legend> <legend><%:Reconnecting interface%></legend>

View file

@ -1,6 +1,6 @@
<%+cbi/valueheader%> <%+cbi/valueheader%>
<script type="text/javascript"><![CDATA[ <script type="text/javascript">//<![CDATA[
var iwxhr = new XHR(); var iwxhr = new XHR();
var update_status = function() { var update_status = function() {
iwxhr.get('<%=luci.dispatcher.build_url("admin", "network", "iface_status", self.network)%>', null, iwxhr.get('<%=luci.dispatcher.build_url("admin", "network", "iface_status", self.network)%>', null,
@ -78,7 +78,7 @@
}; };
update_status(); update_status();
]]></script> //]]></script>
<table> <table>
<tr class="cbi-section-table"> <tr class="cbi-section-table">

View file

@ -1,4 +1,4 @@
<script type="text/javascript"><![CDATA[ <script type="text/javascript">//<![CDATA[
var stxhr = new XHR(); var stxhr = new XHR();
var update_status = function() { var update_status = function() {
stxhr.get('<%=luci.dispatcher.build_url("admin", "network", "dhcplease_status")%>', null, stxhr.get('<%=luci.dispatcher.build_url("admin", "network", "dhcplease_status")%>', null,
@ -9,7 +9,7 @@
{ {
/* clear all rows */ /* clear all rows */
while( tb.rows.length > 1 ) while( tb.rows.length > 1 )
tb.rows[1].parentNode.removeChild(tb.rows[1]); tb.deleteRow(1);
for( var i = 0; i < st.length; i++ ) for( var i = 0; i < st.length; i++ )
{ {
@ -46,30 +46,23 @@
: String.format('%dh %dm %ds', h, m, s); : String.format('%dh %dm %ds', h, m, s);
} }
var tr = document.createElement('tr'); var tr = tb.insertRow(-1);
tr.className = 'cbi-section-table-row cbi-rowstyle-' + ((i % 2) + 1); tr.className = 'cbi-section-table-row cbi-rowstyle-' + ((i % 2) + 1);
tr.innerHTML = String.format( tr.insertCell(-1).innerHTML = st[i].hostname ? st[i].hostname : '?';
'<td class="cbi-section-table-cell">%s</td>' + tr.insertCell(-1).innerHTML = st[i].ipaddr;
'<td class="cbi-section-table-cell">%s</td>' + tr.insertCell(-1).innerHTML = st[i].macaddr;
'<td class="cbi-section-table-cell">%s</td>' + tr.insertCell(-1).innerHTML = timestr;
'<td class="cbi-section-table-cell">%s</td>',
st[i].hostname ? st[i].hostname : '?',
st[i].ipaddr,
st[i].macaddr,
timestr
);
tb.rows[0].parentNode.appendChild(tr);
} }
if( tb.rows.length == 1 ) if( tb.rows.length == 1 )
{ {
var tr = document.createElement('tr'); var tr = tb.insertRow(-1);
tr.className = 'cbi-section-table-row'; tr.className = 'cbi-section-table-row';
tr.innerHTML = '<td colspan="4"><em><br /><%:There are no active leases.%></em></td>';
tb.rows[0].parentNode.appendChild(tr); var td = tr.insertCell(-1);
td.colSpan = 4;
td.innerHTML = '<em><br /><%:There are no active leases.%></em>';
} }
} }
@ -79,7 +72,7 @@
}; };
update_status(); update_status();
]]></script> //]]></script>
<fieldset class="cbi-section"> <fieldset class="cbi-section">
<legend><%:Active Leases%></legend> <legend><%:Active Leases%></legend>

View file

@ -92,7 +92,7 @@ $Id$
<%+header%> <%+header%>
<script type="text/javascript" src="<%=resource%>/cbi.js"></script> <script type="text/javascript" src="<%=resource%>/cbi.js"></script>
<script type="text/javascript"><![CDATA[ <script type="text/javascript">//<![CDATA[
var iwxhr = new XHR(); var iwxhr = new XHR();
var wifidevs = <%=luci.http.write_json(netdevs)%>; var wifidevs = <%=luci.http.write_json(netdevs)%>;
var arptable = <%=luci.http.write_json(arpcache)%>; var arptable = <%=luci.http.write_json(arpcache)%>;
@ -248,7 +248,7 @@ $Id$
}; };
update_status(); update_status();
]]></script> //]]></script>
<h2><a id="content" name="content"><%:Wireless Overview%></a></h2> <h2><a id="content" name="content"><%:Wireless Overview%></a></h2>

View file

@ -1,6 +1,6 @@
<%+cbi/valueheader%> <%+cbi/valueheader%>
<script type="text/javascript"><![CDATA[ <script type="text/javascript">//<![CDATA[
var iwxhr = new XHR(); var iwxhr = new XHR();
var update_status = function() { var update_status = function() {
iwxhr.get('<%=luci.dispatcher.build_url("admin", "network", "wireless_status", self.ifname)%>', null, iwxhr.get('<%=luci.dispatcher.build_url("admin", "network", "wireless_status", self.ifname)%>', null,
@ -62,7 +62,7 @@
}; };
update_status(); update_status();
]]></script> //]]></script>
<table> <table>
<tr class="cbi-section-table"> <tr class="cbi-section-table">