From: Jo-Philipp Wich Date: Sun, 25 Sep 2011 20:51:03 +0000 (+0000) Subject: modules/admin-full: various javascript fixes in templates X-Git-Tag: 0.11.0~1703 X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=e3435a49e9ba289d6e43758fbcbc29804f7bbbc1;p=project%2Fluci.git modules/admin-full: various javascript fixes in templates --- 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 508ccbb928..69ae052723 100644 --- a/modules/admin-full/luasrc/view/admin_network/iface_status.htm +++ b/modules/admin-full/luasrc/view/admin_network/iface_status.htm @@ -19,7 +19,7 @@ '' + '
%s', ifc.type, ifc.is_up ? '' : '_disabled', - ifc.name + ifc.is_up ? ifc.ifname : '?' ); var d = document.getElementById('<%=self.option%>-ifc-description'); diff --git a/modules/admin-full/luasrc/view/admin_status/index.htm b/modules/admin-full/luasrc/view/admin_status/index.htm index 850c30ab19..f76511e0a5 100644 --- a/modules/admin-full/luasrc/view/admin_status/index.htm +++ b/modules/admin-full/luasrc/view/admin_status/index.htm @@ -123,7 +123,9 @@ $Id$ var wifidevs = <%=luci.http.write_json(netdevs)%>; var arptable = <%=luci.http.write_json(arpcache)%>; - var update_status = function() { + (function() { + var func = arguments.callee; + iwxhr.get('<%=REQUEST_URI%>', { status: 1 }, function(x, info) { @@ -457,12 +459,10 @@ $Id$ if (e = document.getElementById('conns')) e.innerHTML = progressbar(info.conncount, info.connmax); - window.setTimeout(update_status, 5000); + window.setTimeout(func, 5000); } ) - }; - - update_status(); + })(); //]]>

<%:Status%>