modules/admin-full: IE fixes
authorJo-Philipp Wich <jow@openwrt.org>
Thu, 18 Nov 2010 01:34:56 +0000 (01:34 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Thu, 18 Nov 2010 01:34:56 +0000 (01:34 +0000)
modules/admin-full/luasrc/view/admin_network/iface_overview.htm
modules/admin-full/luasrc/view/admin_network/iface_status.htm
modules/admin-full/luasrc/view/admin_network/lease_status.htm
modules/admin-full/luasrc/view/admin_network/wifi_overview.htm
modules/admin-full/luasrc/view/admin_network/wifi_status.htm

index f77ee63e651f879d450b07153bad472a6e80b22d..a88065833cfe22c5ffe3834eaaf57443938ed35f 100644 (file)
@@ -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>
index 11590e17353ea570f332aa932b2b8a01972cf452..d4b0287203059097473737536ffef1e7b233d6f4 100644 (file)
@@ -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">
index 1d7c916f265058f3a443ec51f1312e76745f4469..3635577f6c7fc788c680fe0be5fd42b2cb066f96 100644 (file)
@@ -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++ )
                                        {
                                                                : 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>
index f0d624cc2f8d37bb9b18dcb85e515405ba0a6a43..e2b241c32b2b08d48f429caf16383e4c126ffc8f 100644 (file)
@@ -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>
 
index e4ba48277063c6212099227006b7b3f00680b4fd..01a49c43eb222c7a6a044c4c2f05ee80f41493ef 100644 (file)
@@ -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">