diff options
5 files changed, 20 insertions, 27 deletions
diff --git a/modules/admin-full/luasrc/view/admin_network/iface_overview.htm b/modules/admin-full/luasrc/view/admin_network/iface_overview.htm index f77ee63e65..a88065833c 100644 --- a/modules/admin-full/luasrc/view/admin_network/iface_overview.htm +++ b/modules/admin-full/luasrc/view/admin_network/iface_overview.htm @@ -25,7 +25,7 @@ $Id$ -%> <script type="text/javascript" src="<%=resource%>/cbi.js"></script> -<script type="text/javascript"><![CDATA[ +<script type="text/javascript">//<![CDATA[ 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))) return; @@ -168,7 +168,7 @@ $Id$ }; update_status(); -]]></script> +//]]></script> <fieldset class="cbi-section" style="display:none"> <legend><%:Reconnecting interface%></legend> diff --git a/modules/admin-full/luasrc/view/admin_network/iface_status.htm b/modules/admin-full/luasrc/view/admin_network/iface_status.htm index 11590e1735..d4b0287203 100644 --- a/modules/admin-full/luasrc/view/admin_network/iface_status.htm +++ b/modules/admin-full/luasrc/view/admin_network/iface_status.htm @@ -1,6 +1,6 @@ <%+cbi/valueheader%> -<script type="text/javascript"><![CDATA[ +<script type="text/javascript">//<![CDATA[ var iwxhr = new XHR(); var update_status = function() { iwxhr.get('<%=luci.dispatcher.build_url("admin", "network", "iface_status", self.network)%>', null, @@ -78,7 +78,7 @@ }; update_status(); -]]></script> +//]]></script> <table> <tr class="cbi-section-table"> diff --git a/modules/admin-full/luasrc/view/admin_network/lease_status.htm b/modules/admin-full/luasrc/view/admin_network/lease_status.htm index 1d7c916f26..3635577f6c 100644 --- a/modules/admin-full/luasrc/view/admin_network/lease_status.htm +++ b/modules/admin-full/luasrc/view/admin_network/lease_status.htm @@ -1,4 +1,4 @@ -<script type="text/javascript"><![CDATA[ +<script type="text/javascript">//<![CDATA[ var stxhr = new XHR(); var update_status = function() { stxhr.get('<%=luci.dispatcher.build_url("admin", "network", "dhcplease_status")%>', null, @@ -9,7 +9,7 @@ { /* clear all rows */ while( tb.rows.length > 1 ) - tb.rows[1].parentNode.removeChild(tb.rows[1]); + tb.deleteRow(1); for( var i = 0; i < st.length; i++ ) { @@ -46,30 +46,23 @@ : 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.innerHTML = String.format( - '<td class="cbi-section-table-cell">%s</td>' + - '<td class="cbi-section-table-cell">%s</td>' + - '<td class="cbi-section-table-cell">%s</td>' + - '<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); + tr.insertCell(-1).innerHTML = st[i].hostname ? st[i].hostname : '?'; + tr.insertCell(-1).innerHTML = st[i].ipaddr; + tr.insertCell(-1).innerHTML = st[i].macaddr; + tr.insertCell(-1).innerHTML = timestr; } if( tb.rows.length == 1 ) { - var tr = document.createElement('tr'); + var tr = tb.insertRow(-1); 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(); -]]></script> +//]]></script> <fieldset class="cbi-section"> <legend><%:Active Leases%></legend> diff --git a/modules/admin-full/luasrc/view/admin_network/wifi_overview.htm b/modules/admin-full/luasrc/view/admin_network/wifi_overview.htm index f0d624cc2f..e2b241c32b 100644 --- a/modules/admin-full/luasrc/view/admin_network/wifi_overview.htm +++ b/modules/admin-full/luasrc/view/admin_network/wifi_overview.htm @@ -92,7 +92,7 @@ $Id$ <%+header%> <script type="text/javascript" src="<%=resource%>/cbi.js"></script> -<script type="text/javascript"><![CDATA[ +<script type="text/javascript">//<![CDATA[ var iwxhr = new XHR(); var wifidevs = <%=luci.http.write_json(netdevs)%>; var arptable = <%=luci.http.write_json(arpcache)%>; @@ -248,7 +248,7 @@ $Id$ }; update_status(); -]]></script> +//]]></script> <h2><a id="content" name="content"><%:Wireless Overview%></a></h2> diff --git a/modules/admin-full/luasrc/view/admin_network/wifi_status.htm b/modules/admin-full/luasrc/view/admin_network/wifi_status.htm index e4ba482770..01a49c43eb 100644 --- a/modules/admin-full/luasrc/view/admin_network/wifi_status.htm +++ b/modules/admin-full/luasrc/view/admin_network/wifi_status.htm @@ -1,6 +1,6 @@ <%+cbi/valueheader%> -<script type="text/javascript"><![CDATA[ +<script type="text/javascript">//<![CDATA[ var iwxhr = new XHR(); var update_status = function() { iwxhr.get('<%=luci.dispatcher.build_url("admin", "network", "wireless_status", self.ifname)%>', null, @@ -62,7 +62,7 @@ }; update_status(); -]]></script> +//]]></script> <table> <tr class="cbi-section-table"> |