From 152e46ab15be01822280be7481e4ac4e6987c5ba Mon Sep 17 00:00:00 2001 From: calzoneman Date: Wed, 16 Oct 2013 23:22:37 -0500 Subject: [PATCH] Add errDialog function --- changelog | 4 ++++ www/assets/js/callbacks.js | 2 +- www/assets/js/util.js | 21 +++++++++++++++++++++ 3 files changed, 26 insertions(+), 1 deletion(-) diff --git a/changelog b/changelog index 882b5693..6d0f661c 100644 --- a/changelog +++ b/changelog @@ -1,3 +1,7 @@ +Wed Oct 16 23:21 2013 CDT + * www/assets/js/util.js: Add an errDialog function that shows an + error message over the chatbox (instead of alert()) + Wed Oct 16 23:09 2013 CDT * www/assets/js/util.js: Add a special handler so that clicking anywhere on the page clears a userlist dropdown, not just right diff --git a/www/assets/js/callbacks.js b/www/assets/js/callbacks.js index 72505b7d..52794891 100644 --- a/www/assets/js/callbacks.js +++ b/www/assets/js/callbacks.js @@ -75,7 +75,7 @@ Callbacks = { }, errorMsg: function(data) { - alert(data.msg); + errDialog(data.msg); }, costanza: function (data) { diff --git a/www/assets/js/util.js b/www/assets/js/util.js index 415c6e4c..cbda794f 100644 --- a/www/assets/js/util.js +++ b/www/assets/js/util.js @@ -1716,3 +1716,24 @@ function unhidePlayer() { $("#ytapiplayer").attr("width", PLAYER.size.width) .attr("height", PLAYER.size.height); } + +function errDialog(err) { + var div = $("
").addClass("profile-box") + .css("padding", "10px") + .text(err) + .appendTo($("body")); + + $("
").appendTo(div); + $("