From: John Runyon Date: Thu, 11 Oct 2012 06:22:51 +0000 (+0300) Subject: Fixed error box with multiple messages, slightly more styling. X-Git-Url: https://jfr.im/git/z_archive/KronOS.git/commitdiff_plain/8e9adb3f33e2b7b89b4a285f9302ff6180cf3e90 Fixed error box with multiple messages, slightly more styling. --- diff --git a/frontend/index.html b/frontend/index.html index 8571bc2..5105166 100644 --- a/frontend/index.html +++ b/frontend/index.html @@ -19,6 +19,7 @@ $(document).ready(function () {
+

click to close

diff --git a/frontend/style.css b/frontend/style.css index 9673b40..0481bf6 100644 --- a/frontend/style.css +++ b/frontend/style.css @@ -2,6 +2,13 @@ display:none; } +div#error { + background-color:#aa0000; + border:solid 1px black; + padding:.2em; + margin:.5em; +} + div#banner { text-align:center; margin:0 auto; diff --git a/frontend/webos.js b/frontend/webos.js index f22820e..1a4ea55 100644 --- a/frontend/webos.js +++ b/frontend/webos.js @@ -22,7 +22,11 @@ function processResponse(resp) { } } } else { - $("div#error").html(resp.error.reason); - $("div#error").fadeIn('fast').delay(5000).fadeOut('slow'); + $("div#error").append('

'+resp.error.reason+'

'); + $("div#error").slideDown(400); + $("div#error").click(function () { + $("div#error").slideUp(400); + $("div#error").html('

click to close

'); + }); } }