CSS classes added for nick modes #143
authorDarren <darren@darrenwhitlen.com>
Mon, 31 Dec 2012 08:28:17 +0000 (08:28 +0000)
committerDarren <darren@darrenwhitlen.com>
Mon, 31 Dec 2012 08:28:17 +0000 (08:28 +0000)
client/assets/dev/view.js

index 2bd1921b781c8a48973d8143062b3788441141c2..6a09edd259964a1763d7a942931242ae7bb84d9e 100644 (file)
@@ -14,7 +14,8 @@ _kiwi.view.MemberList = Backbone.View.extend({
         var $this = $(this.el);\r
         $this.empty();\r
         this.model.forEach(function (member) {\r
-            $('<li><a class="nick"><span class="prefix">' + member.get("prefix") + '</span>' + member.get("nick") + '</a></li>')\r
+            var prefix_css_class = (member.get('modes') || []).join(' ');\r
+            $('<li class="mode ' + prefix_css_class + '"><a class="nick"><span class="prefix">' + member.get("prefix") + '</span>' + member.get("nick") + '</a></li>')\r
                 .appendTo($this)\r
                 .data('member', member);\r
         });\r