Don't use id for controlbox panes
This commit is contained in:
parent
feaff64aab
commit
7f4bdb4098
@ -613,7 +613,7 @@
|
|||||||
background-color: #DCEAC5;
|
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: -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: -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+ */
|
background: -o-linear-gradient(top, rgba(255,255,255,1) 0%,rgba(240,240,240,1) 100%); /* Opera 11.10+ */
|
||||||
|
@ -1098,7 +1098,7 @@
|
|||||||
'<ul id="controlbox-tabs"></ul>'+
|
'<ul id="controlbox-tabs"></ul>'+
|
||||||
'<a class="close-chatbox-button icon-close"></a>'+
|
'<a class="close-chatbox-button icon-close"></a>'+
|
||||||
'</div>'+
|
'</div>'+
|
||||||
'<div id="controlbox-panes"></div>'
|
'<div class="controlbox-panes"></div>'
|
||||||
),
|
),
|
||||||
|
|
||||||
switchTab: function (ev) {
|
switchTab: function (ev) {
|
||||||
@ -1125,11 +1125,11 @@
|
|||||||
if ((!converse.prebind) && (!converse.connection)) {
|
if ((!converse.prebind) && (!converse.connection)) {
|
||||||
// Add login panel if the user still has to authenticate
|
// Add login panel if the user still has to authenticate
|
||||||
this.$el.html(this.template(this.model.toJSON()));
|
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();
|
this.loginpanel.render();
|
||||||
} else if (!this.contactspanel) {
|
} else if (!this.contactspanel) {
|
||||||
this.$el.html(this.template(this.model.toJSON()));
|
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();
|
this.contactspanel.render();
|
||||||
converse.xmppstatusview = new converse.XMPPStatusView({'model': converse.xmppstatus});
|
converse.xmppstatusview = new converse.XMPPStatusView({'model': converse.xmppstatus});
|
||||||
converse.xmppstatusview.render();
|
converse.xmppstatusview.render();
|
||||||
|
@ -676,7 +676,7 @@
|
|||||||
|
|
||||||
it("contains two tabs, 'Contacts' and 'ChatRooms'", $.proxy(function () {
|
it("contains two tabs, 'Contacts' and 'ChatRooms'", $.proxy(function () {
|
||||||
var cbview = this.chatboxesview.views.controlbox;
|
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().length).toBe(2);
|
||||||
expect($panels.children().first().attr('id')).toBe('users');
|
expect($panels.children().first().attr('id')).toBe('users');
|
||||||
expect($panels.children().first().is(':visible')).toBe(true);
|
expect($panels.children().first().is(':visible')).toBe(true);
|
||||||
@ -693,7 +693,7 @@
|
|||||||
it("is opened by clicking the 'Chatrooms' tab", $.proxy(function () {
|
it("is opened by clicking the 'Chatrooms' tab", $.proxy(function () {
|
||||||
var cbview = this.chatboxesview.views.controlbox;
|
var cbview = this.chatboxesview.views.controlbox;
|
||||||
var $tabs = cbview.$el.find('#controlbox-tabs');
|
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 $contacts = $panels.children().first();
|
||||||
var $chatrooms = $panels.children().last();
|
var $chatrooms = $panels.children().last();
|
||||||
spyOn(cbview, 'switchTab').andCallThrough();
|
spyOn(cbview, 'switchTab').andCallThrough();
|
||||||
|
Loading…
Reference in New Issue
Block a user