diff options
author | Aaron LI <aaronly.me@outlook.com> | 2016-11-15 10:13:50 +0800 |
---|---|---|
committer | Aaron LI <aaronly.me@outlook.com> | 2016-11-15 10:13:50 +0800 |
commit | a9b8b7fd3a70da9e32dee70fba45723f986f6115 (patch) | |
tree | 07cf316d3fef0bb2c73198c9be08ff43c1981ee0 /fg21sim/webui/static/js/websocket.js | |
parent | 0ec84f939da1d2da883a4265f4fc92395c00281d (diff) | |
download | fg21sim-a9b8b7fd3a70da9e32dee70fba45723f986f6115.tar.bz2 |
webui: Change log toggle icons opacity according to toggle status
Diffstat (limited to 'fg21sim/webui/static/js/websocket.js')
-rw-r--r-- | fg21sim/webui/static/js/websocket.js | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/fg21sim/webui/static/js/websocket.js b/fg21sim/webui/static/js/websocket.js index 0fcf98e..1d739ae 100644 --- a/fg21sim/webui/static/js/websocket.js +++ b/fg21sim/webui/static/js/websocket.js @@ -239,19 +239,24 @@ $(document).ready(function () { /* Logging messages controls */ $("#log-toggle-debug").on("click", function () { - toggleLogMessages("debug"); + var status = toggleLogMessages("debug"); + $(this).fadeTo("fast", status ? 1.0 : 0.5); }); $("#log-toggle-info").on("click", function () { - toggleLogMessages("info"); + var status = toggleLogMessages("info"); + $(this).fadeTo("fast", status ? 1.0 : 0.5); }); $("#log-toggle-warning").on("click", function () { - toggleLogMessages("warning"); + var status = toggleLogMessages("warning"); + $(this).fadeTo("fast", status ? 1.0 : 0.5); }); $("#log-toggle-error").on("click", function () { - toggleLogMessages("error"); + var status = toggleLogMessages("error"); toggleLogMessages("critical"); + $(this).fadeTo("fast", status ? 1.0 : 0.5); }); $("#log-delete").on("click", function () { + // TODO: add a confirmation dialog deleteLogMessages(); }); |