From 3ebd223cc238cc11305c0500007909beac10bbf9 Mon Sep 17 00:00:00 2001 From: JC Brand Date: Fri, 26 Oct 2012 11:41:39 +0200 Subject: [PATCH] Fix broken events for chatrooms panel. CSS tweaks. --- converse.js | 33 ++++++++++++++++----------------- 1 file changed, 16 insertions(+), 17 deletions(-) diff --git a/converse.js b/converse.js index 46e2c55be..bd21308cf 100644 --- a/converse.js +++ b/converse.js @@ -421,7 +421,7 @@ template: _.template( '
' + - 'X' + + 'X' + '' + 'Avatar of {{fullname}}' + '
{{ fullname }}
' + @@ -546,32 +546,31 @@ }); xmppchat.RoomsPanel = Backbone.View.extend({ - el: '#chatrooms', + tagName: 'div', + id: 'chatrooms', events: { 'submit form.add-chatroom': 'createChatRoom', 'click a.open-room': 'createChatRoom' }, room_template: _.template( - '
' + + '
' + '' + '{{name}}
'), tab_template: _.template('
  • Rooms
  • '), template: _.template( - ''), + '
    '+ + ''+ + ''+ + '
    '+ + '
    '+ + '
    Available chatrooms
    '+ + '
    '), render: function () { $('#controlbox-tabs').append(this.tab_template()); - $('#controlbox-panes').append(this.template()); + $('#controlbox-panes').append(this.$el.html(this.template()).hide()); return this; }, @@ -586,7 +585,7 @@ xmppchat.connection.muc.listRooms(xmppchat.connection.muc_domain, $.proxy(function (iq) { var room, name, jid, i, rooms = $(iq).find('query').find('item'); - this.$el.find('#available-chatrooms').find('dd.chatroom').remove(); + this.$el.find('#available-chatrooms').find('dd.available-chatroom').remove(); if (rooms.length) { this.$el.find('#available-chatrooms dt').show(); } else { @@ -639,7 +638,7 @@ className: 'chatbox', id: 'controlbox', events: { - 'click a.close-controlbox-button': 'closeChat', + 'click a.close-chatbox-button': 'closeChat', 'click ul#controlbox-tabs li a': 'switchTab' }, @@ -650,7 +649,7 @@ template: _.template( '
    '+ '
      '+ - 'X'+ + 'X'+ '
      '+ '
      ' ), @@ -760,7 +759,7 @@ template: _.template( '
      ' + - 'X' + + 'X' + '
      {{ name }}
      ' + '

      ' + '

      ' +