channel info window tidying
authorDarren <darren@darrenwhitlen.com>
Sun, 5 Jan 2014 23:24:17 +0000 (23:24 +0000)
committerDarren <darren@darrenwhitlen.com>
Sun, 5 Jan 2014 23:24:17 +0000 (23:24 +0000)
client/assets/css/style.css
client/src/views/channelinfo.js

index a6fe3e259fe5b9c13f7d687b1d5e78f7f9161c6a..e4454382a2eba24f9d22ac05983f4e64f75e2b59 100644 (file)
@@ -404,6 +404,7 @@ html, body { height:100%; }
 #kiwi .channel_info .channel_url {
     display: none;
 }
+#kiwi .channel_info .channel-banlist table { display: none; }
 #kiwi .channel_info .remove-ban { cursor: pointer; }
 
 
index 97dfde303cd05dd5ec78fe7c0c0be90b9f0b79dc..edf78710a771aa95df2ce8d4a8cce041dd07917b 100644 (file)
@@ -24,6 +24,8 @@ _kiwi.view.ChannelInfo = Backbone.View.extend({
         this.menu.$el.appendTo(channel.view.$container);
         this.menu.show();
 
+        this.menu.$el.offset({top: _kiwi.app.view.$el.find('.panels').offset().top});
+
         // Menu box will call this destroy on closing
         this.$el.dispose = _.bind(this.dispose, this);
 
@@ -86,7 +88,9 @@ _kiwi.view.ChannelInfo = Backbone.View.extend({
 
     updateInfo: function (channel, new_val) {
         var that = this,
-            modes, url, banlist;
+            title, modes, url, banlist;
+
+        this.menu.setTitle(channel.get('name'));
 
         modes = channel.get('info_modes');
         if (modes) {
@@ -109,7 +113,7 @@ _kiwi.view.ChannelInfo = Backbone.View.extend({
 
         url = channel.get('info_url');
         if (url) {
-            this.$el.find('.channel_url a')
+            this.$el.find('.channel_url')
                 .text(url)
                 .attr('href', url);
 
@@ -118,7 +122,7 @@ _kiwi.view.ChannelInfo = Backbone.View.extend({
 
         banlist = channel.get('banlist');
         if (banlist && banlist.length) {
-            var $table = this.$el.find('.channel_banlist table tbody');
+            var $table = this.$el.find('.channel-banlist table tbody');
 
             $table.empty();
             _.each(banlist, function(ban) {
@@ -131,6 +135,8 @@ _kiwi.view.ChannelInfo = Backbone.View.extend({
 
                 $table.append($tr);
             });
+
+            this.$el.find('.channel-banlist table').slideDown();
         }
     },