From b9e17872acd54de8aecb0ed345fdd551dce5cd2e Mon Sep 17 00:00:00 2001 From: Jonathan Rosenbaum Date: Wed, 11 Oct 2017 08:05:43 +0000 Subject: [PATCH] Shows if banned. * tr becomes red * title becomes banned * not all td currently change, however, it is sufficient to get the message across, and let the greeter know there is an issue. --- js/shop.js | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/js/shop.js b/js/shop.js index 32d3f8a..997fd86 100644 --- a/js/shop.js +++ b/js/shop.js @@ -17,11 +17,22 @@ $(function(){ $(".shop_user_role").css({fontSize: ".75em", fontWeight: "bold"}) // return banned list - var banned_list; + var banned_list, bl; $.post("json/contact.php", {banned: 1}, function (data) { - banned_list = data; + if (data) { + bl = $.parseJSON(data); + $(bl).each(function(i,v) { + if (i === 0) { + banned_list = "#" + v; + } else { + banned_list = banned_list + ",#" + v; + } + }); + } }); + $(banned_list).css({backgroundColor: "red"}).prop("title","BANNED"); + // error handler for shops with a popup dialog (TODO) function error_handler(input,error_span,error,error_text,event) { var trans_error = 0;