Chanlist styling
authorCory Chaplin <cory.chaplin@laposte.net>
Mon, 10 Feb 2014 23:03:42 +0000 (00:03 +0100)
committerCory Chaplin <cory.chaplin@laposte.net>
Mon, 10 Feb 2014 23:03:42 +0000 (00:03 +0100)
client/assets/themes/basic/style.css
client/assets/themes/cli/style.css
client/assets/themes/mini/style.css
client/assets/themes/relaxed/style.css
client/src/applets/chanlist.js
client/src/index.html.tmpl

index f676b3c57c8e820a7414fd823938e7a0ea086fe7..7295569eb5a7b881b078a6ae1324f349caf8fc97 100644 (file)
     border-bottom-right-radius:0;
     border-top-right-radius:0;
 }
+#kiwi #chanlist {
+    margin: 0.5em 1em;
+}
+#kiwi #chanlist table {
+    border-collapse: collapse;
+    width: 100%;
+}
+#kiwi #chanlist thead {
+    text-align: center;
+}
+#kiwi #chanlist tbody td {
+    border: 1px solid #C4C4C4;
+    padding: 0.3em 1em;
+}
+#kiwi #chanlist .chanlist_name, #kiwi #chanlist .chanlist_num_users {
+    border-width: 0 1px 0 0;
+}
+#kiwi #chanlist .chanlist_topic {
+    border-width: 0;
+}
+#kiwi #chanlist tr:nth-child(even) {
+    background: none repeat scroll 0 0 #DBDBDB;
+}
 
 
 #kiwi .ui_menu .ui_menu_foot .close { float:right; font-size:0.9em; margin-right:1em; color: #999; }
index e85c6e54ff5a05a48de8a36deba6880c2d4c9805..63910a630920724579a9e0bb93b96fa66861ae36 100644 (file)
 #kiwi.chanlist_treeview .tabs ul li { display:block; float:none; }
 #kiwi.chanlist_treeview .tabs ul li .activity { float:right; }
 #kiwi.chanlist_treeview .tabs ul li.active { padding-left:1em; }
+#kiwi #chanlist {
+    margin: 0.5em 1em;
+}
+#kiwi #chanlist table {
+    border-collapse: collapse;
+    width: 100%;
+}
+#kiwi #chanlist thead {
+    text-align: center;
+}
+#kiwi #chanlist tbody td {
+    border: 1px solid #454545;
+    padding: 0.3em 1em;
+}
+#kiwi #chanlist .chanlist_name, #kiwi #chanlist .chanlist_num_users {
+    border-width: 0 1px 0 0;
+}
+#kiwi #chanlist .chanlist_topic {
+    border-width: 0;
+}
+#kiwi #chanlist tr:nth-child(even) {
+    background: none repeat scroll 0 0 #2B2929;
+}
 
 
 #kiwi .ui_menu {
index c181abc80ec20be70a013a37e91c02c6f8b4ac81..5e8b685850548a2700e7164414cdd521aba28fbb 100644 (file)
 #kiwi.chanlist_treeview .tabs ul li { display:block; float:none; }
 #kiwi.chanlist_treeview .tabs ul li .activity { float:right; }
 #kiwi.chanlist_treeview .tabs ul li.active { padding-left:1em; }
+#kiwi #chanlist {
+    margin: 0.5em 1em;
+}
+#kiwi #chanlist table {
+    border-collapse: collapse;
+    width: 100%;
+}
+#kiwi #chanlist thead {
+    text-align: center;
+}
+#kiwi #chanlist tbody td {
+    border: 1px solid #C4C4C4;
+    padding: 0.3em 1em;
+}
+#kiwi #chanlist .chanlist_name, #kiwi #chanlist .chanlist_num_users {
+    border-width: 0 1px 0 0;
+}
+#kiwi #chanlist .chanlist_topic {
+    border-width: 0;
+}
+#kiwi #chanlist tr:nth-child(even) {
+    background: none repeat scroll 0 0 #DBDBDB;
+}
 
 
 
index 7e9f65d0056ceb4f5fe1cd92f7e5883f83314abb..4e23ac7e773ee3db4388298b02ac0b5be8947992 100644 (file)
     border-bottom-right-radius:0;
     border-top-right-radius:0;
 }
+#kiwi #chanlist {
+    margin: 0.5em 1em;
+}
+#kiwi #chanlist table {
+    border-collapse: collapse;
+    width: 100%;
+}
+#kiwi #chanlist thead {
+    text-align: center;
+}
+#kiwi #chanlist tbody td {
+    border: 1px solid #C4C4C4;
+    padding: 0.3em 1em;
+}
+#kiwi #chanlist .chanlist_name, #kiwi #chanlist .chanlist_num_users {
+    border-width: 0 1px 0 0;
+}
+#kiwi #chanlist .chanlist_topic {
+    border-width: 0;
+}
+#kiwi #chanlist tr:nth-child(even) {
+    background: none repeat scroll 0 0 #DBDBDB;
+}
 
 
 #kiwi .applet > div.settings button.save {
index fb3cee32c77c3bf903741c74cf75098a02d627ff..60d73c2c212dc89aea531c02f5bf2120f850f9a8 100644 (file)
@@ -3,16 +3,16 @@
     var View = Backbone.View.extend({\r
         events: {\r
             "click .chan": "chanClick",\r
-            "click #channels_name": "sortChannelsByNameClick",\r
-            "click #users": "sortChannelsByUsersClick"\r
+            "click #channel_name_title": "sortChannelsByNameClick",\r
+            "click #users_title": "sortChannelsByUsersClick"\r
         },\r
 \r
         \r
         \r
         initialize: function (options) {\r
             var text = {\r
-                channel_name: '<a id="channels_name">' + _kiwi.global.i18n.translate('client_applets_chanlist_channelname').fetch() + '</a>',\r
-                users: '<a id="users">' + _kiwi.global.i18n.translate('client_applets_chanlist_users').fetch() + '</a>',\r
+                channel_name: '<a id="channel_name_title">' + _kiwi.global.i18n.translate('client_applets_chanlist_channelname').fetch() + '</a>',\r
+                users: '<a id="users_title">' + _kiwi.global.i18n.translate('client_applets_chanlist_users').fetch() + '</a>',\r
                 topic: _kiwi.global.i18n.translate('client_applets_chanlist_topic').fetch()\r
             };\r
             this.$el = $(_.template($('#tmpl_channel_list').html().trim(), text));\r
             }\r
 \r
             // Clean the sorting icon and add the new one\r
-            $('#chanlist #users').find('span').remove();\r
-            $('#chanlist #channels_name').find('span').remove();\r
+            $('#chanlist #users_title').find('span').remove();\r
+            $('#chanlist #channel_name_title').find('span').remove();\r
             switch (this.order) {\r
                 case 'user_desc':\r
                 default:\r
-                    $('#users').append(icon_desc);\r
+                    $('#users_title').append(icon_desc);\r
                     break;\r
                 case 'user_asc':\r
-                    $('#users').append(icon_asc);\r
+                    $('#users_title').append(icon_asc);\r
                     break;\r
                 case 'name_asc':\r
-                    $('#channels_name').append(icon_asc);\r
+                    $('#channel_name_title').append(icon_asc);\r
                     break;\r
                 case 'name_desc':\r
-                    $('#channels_name').append(icon_desc);\r
+                    $('#channel_name_title').append(icon_desc);\r
                     break;\r
             }\r
             \r
             _.each(channels, function (chan) {\r
                 var row;\r
                 row = document.createElement("tr");\r
-                row.innerHTML = '<td><a class="chan" data-channel="' + chan.channel + '">' + _.escape(chan.channel) + '</a></td><td class="num_users" style="text-align: center;">' + chan.num_users + '</td><td style="padding-left: 2em;">' + formatIRCMsg(_.escape(chan.topic)) + '</td>';\r
+                row.innerHTML = '<td class="chanlist_name"><a class="chan" data-channel="' + chan.channel + '">' + _.escape(chan.channel) + '</a></td><td class="chanlist_num_users" style="text-align: center;">' + chan.num_users + '</td><td style="padding-left: 2em;" class="chanlist_topic">' + formatIRCMsg(_.escape(chan.topic)) + '</td>';\r
                 chan.dom = row;\r
                 that.view.channels.push(chan);\r
             });\r
index f0406de77739ad2f0918633c7cfc25a610b61fd6..270b22b006ec8d8a775548aa28c524b30abcd6e6 100644 (file)
 \r
 \r
     <script type="text/html" id="tmpl_channel_list">\r
-        <div>\r
-            <table id="chanlist" style="margin:1em 2em;">\r
+        <div id="chanlist">\r
+            <table>\r
                 <thead style="font-weight: bold;">\r
                     <tr>\r
                         <td><%= channel_name %></td>\r