From 7f4bdb40988f02e476eb37d8b4915333bc3bd2d1 Mon Sep 17 00:00:00 2001 From: JC Brand Date: Thu, 3 Oct 2013 13:41:41 +0200 Subject: [PATCH] Don't use id for controlbox panes --- converse.css | 2 +- converse.js | 6 +++--- spec/MainSpec.js | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/converse.css b/converse.css index fdcd4739e..6965b635c 100644 --- a/converse.css +++ b/converse.css @@ -613,7 +613,7 @@ background-color: #DCEAC5; } -#chatpanel div#controlbox-panes { +#chatpanel div.controlbox-panes { background: -moz-linear-gradient(top, rgba(255,255,255,1) 0%, rgba(240,240,240,1) 100%); /* FF3.6+ */ background: -ms-linear-gradient(top, rgba(255,255,255,1) 0%,rgba(240,240,240,1) 100%); /* IE10+ */ background: -o-linear-gradient(top, rgba(255,255,255,1) 0%,rgba(240,240,240,1) 100%); /* Opera 11.10+ */ diff --git a/converse.js b/converse.js index 9a755e380..7e9a9fc28 100644 --- a/converse.js +++ b/converse.js @@ -1098,7 +1098,7 @@ ''+ ''+ ''+ - '
' + '
' ), switchTab: function (ev) { @@ -1125,11 +1125,11 @@ if ((!converse.prebind) && (!converse.connection)) { // Add login panel if the user still has to authenticate this.$el.html(this.template(this.model.toJSON())); - this.loginpanel = new converse.LoginPanel({'$parent': this.$el.find('#controlbox-panes'), 'model': this}); + this.loginpanel = new converse.LoginPanel({'$parent': this.$el.find('.controlbox-panes'), 'model': this}); this.loginpanel.render(); } else if (!this.contactspanel) { this.$el.html(this.template(this.model.toJSON())); - this.contactspanel = new converse.ContactsPanel({'$parent': this.$el.find('#controlbox-panes')}); + this.contactspanel = new converse.ContactsPanel({'$parent': this.$el.find('.controlbox-panes')}); this.contactspanel.render(); converse.xmppstatusview = new converse.XMPPStatusView({'model': converse.xmppstatus}); converse.xmppstatusview.render(); diff --git a/spec/MainSpec.js b/spec/MainSpec.js index 808d174ea..4e66bc980 100644 --- a/spec/MainSpec.js +++ b/spec/MainSpec.js @@ -676,7 +676,7 @@ it("contains two tabs, 'Contacts' and 'ChatRooms'", $.proxy(function () { var cbview = this.chatboxesview.views.controlbox; - var $panels = cbview.$el.find('#controlbox-panes'); + var $panels = cbview.$el.find('.controlbox-panes'); expect($panels.children().length).toBe(2); expect($panels.children().first().attr('id')).toBe('users'); expect($panels.children().first().is(':visible')).toBe(true); @@ -693,7 +693,7 @@ it("is opened by clicking the 'Chatrooms' tab", $.proxy(function () { var cbview = this.chatboxesview.views.controlbox; var $tabs = cbview.$el.find('#controlbox-tabs'); - var $panels = cbview.$el.find('#controlbox-panes'); + var $panels = cbview.$el.find('.controlbox-panes'); var $contacts = $panels.children().first(); var $chatrooms = $panels.children().last(); spyOn(cbview, 'switchTab').andCallThrough();