themes/openwrt: add an AJAX activity indicator toggle to turn refreshes on and off
authorJo-Philipp Wich <jow@openwrt.org>
Fri, 30 Sep 2011 17:47:53 +0000 (17:47 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Fri, 30 Sep 2011 17:47:53 +0000 (17:47 +0000)
themes/openwrt/htdocs/luci-static/openwrt.org/cascade.css
themes/openwrt/luasrc/view/themes/openwrt.org/header.htm

index e820229207b80cbd85fa2056bdc37c8dcce839d6..64bc5bd9b3f9ffa18d845bc315dfa0712bf31e7f 100644 (file)
@@ -166,6 +166,20 @@ div.hostinfo {
        padding: 0.5em;
 }
 
+#xhr_poll_status {
+       cursor: pointer;
+}
+
+#xhr_poll_status #xhr_poll_status_off {
+       font-weight: bold;
+       color: #FF0000;
+}
+
+#xhr_poll_status #xhr_poll_status_on {
+       font-weight: bold;
+       color: #00FF00;
+}
+
 #menubar {
        position: relative;
        width: 100%;
index 33a0de976c67ec18934d5ec32c89e598f6b2a617..c401a12e6b2f8dd6b887dbdff00769e681a2f549 100644 (file)
@@ -131,6 +131,11 @@ require("luci.http").prepare_content("application/xhtml+xml")
 <div class="hostinfo">
        <%=hostname%> | <%=luci.version.distversion%> |
        <%:Load%>: <%="%.2f" % load1%> <%="%.2f" % load5%> <%="%.2f" % load15%>
+       <span id="xhr_poll_status" style="display:none" onclick="XHR.running() ? XHR.halt() : XHR.run()">
+               | <%:Auto Refresh%>:
+               <span id="xhr_poll_status_on"><%:on%></span>
+               <span id="xhr_poll_status_off" style="display:none"><%:off%></span>
+       </span>
 </div>
 
 <ul id="modemenu"><%