From 4c1196b93195f84cf4ef5c3d517368788848d967 Mon Sep 17 00:00:00 2001 From: Quin Kennedy Date: Fri, 5 Oct 2012 12:03:50 -0400 Subject: [PATCH] admin: fixed how comments are added to markup --- examples/admin/admin.html | 5 ++--- examples/admin/css/style.css | 3 +++ examples/admin/js/wsevents.js | 10 +++++++++- 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/examples/admin/admin.html b/examples/admin/admin.html index e397dac..7cbb4d5 100644 --- a/examples/admin/admin.html +++ b/examples/admin/admin.html @@ -52,15 +52,14 @@
-
+
{{name}}
-
+
{{name}}?
- {{config.description}}
diff --git a/examples/admin/css/style.css b/examples/admin/css/style.css index f0acce1..e69b294 100644 --- a/examples/admin/css/style.css +++ b/examples/admin/css/style.css @@ -317,7 +317,10 @@ body{ font-size:9pt; width:10px; margin-left:2px; + cursor:pointer; + display:none; } .clientinfo span{ background-color:yellow; + margin-right:10px; } \ No newline at end of file diff --git a/examples/admin/js/wsevents.js b/examples/admin/js/wsevents.js index 8196d6f..38bf0dd 100644 --- a/examples/admin/js/wsevents.js +++ b/examples/admin/js/wsevents.js @@ -146,8 +146,16 @@ var handleConfigMsg = function(msg){ var itemsMarkup = $(pubsubTemplate(clients[j])); itemsMarkup.find(".itemwrapper").click(clickItem).hover(overItem, outItem); //itemsMarkup.find(".deletebutton").click(clickDelete); - $("#"+msg.config.name.Safetify()+"_"+msg.config.remoteAddress.Safetify()).append(itemsMarkup); + var client = $("#"+msg.config.name.Safetify()+"_"+msg.config.remoteAddress.Safetify()); + client.append(itemsMarkup); addEndpoints(msg); + //update the description + if (msg.config.description){ + var idPart ="info_"+msg.config.name.Safetify()+"_"+msg.config.remoteAddress.Safetify(); + $("#button_"+idPart).css("display","inline-block"); + $("#"+idPart+" span").html(msg.config.description); + client.find(".clientnickname, .clientname").attr("title",msg.config.description); + } break; } }