diff options
author | Jo-Philipp Wich <jow@openwrt.org> | 2011-09-30 17:47:53 +0000 |
---|---|---|
committer | Jo-Philipp Wich <jow@openwrt.org> | 2011-09-30 17:47:53 +0000 |
commit | d77b8373648b7b7c5edda70da8b235730c1288c0 (patch) | |
tree | 3976f6a870dfb3b3a77448d8a3394c8d574bc7a0 /themes | |
parent | 3b2d4ab1834693d802e0aad7037832da502eae3a (diff) |
themes/openwrt: add an AJAX activity indicator toggle to turn refreshes on and off
Diffstat (limited to 'themes')
-rw-r--r-- | themes/openwrt/htdocs/luci-static/openwrt.org/cascade.css | 14 | ||||
-rw-r--r-- | themes/openwrt/luasrc/view/themes/openwrt.org/header.htm | 5 |
2 files changed, 19 insertions, 0 deletions
diff --git a/themes/openwrt/htdocs/luci-static/openwrt.org/cascade.css b/themes/openwrt/htdocs/luci-static/openwrt.org/cascade.css index e82022920..64bc5bd9b 100644 --- a/themes/openwrt/htdocs/luci-static/openwrt.org/cascade.css +++ b/themes/openwrt/htdocs/luci-static/openwrt.org/cascade.css @@ -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%; diff --git a/themes/openwrt/luasrc/view/themes/openwrt.org/header.htm b/themes/openwrt/luasrc/view/themes/openwrt.org/header.htm index 33a0de976..c401a12e6 100644 --- a/themes/openwrt/luasrc/view/themes/openwrt.org/header.htm +++ b/themes/openwrt/luasrc/view/themes/openwrt.org/header.htm @@ -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"><% |