Bugfix for incorrect roster height when allow_contact_requests=false.
Also update changelog and fix some linting errors. Fixes #360
This commit is contained in:
parent
abae9ad6c0
commit
b177a6a7a0
11
converse.js
11
converse.js
@ -3810,7 +3810,6 @@
|
|||||||
handleIncomingSubscription: function (jid) {
|
handleIncomingSubscription: function (jid) {
|
||||||
var bare_jid = Strophe.getBareJidFromJid(jid);
|
var bare_jid = Strophe.getBareJidFromJid(jid);
|
||||||
var item = this.get(bare_jid);
|
var item = this.get(bare_jid);
|
||||||
|
|
||||||
if (!converse.allow_contact_requests) {
|
if (!converse.allow_contact_requests) {
|
||||||
converse.connection.roster.unauthorize(bare_jid);
|
converse.connection.roster.unauthorize(bare_jid);
|
||||||
return true;
|
return true;
|
||||||
@ -4148,6 +4147,11 @@
|
|||||||
label_contacts: LABEL_CONTACTS,
|
label_contacts: LABEL_CONTACTS,
|
||||||
label_groups: LABEL_GROUPS
|
label_groups: LABEL_GROUPS
|
||||||
}));
|
}));
|
||||||
|
if (!converse.allow_contact_requests) {
|
||||||
|
// XXX: if we ever support live editing of config then
|
||||||
|
// we'll need to be able to remove this class on the fly.
|
||||||
|
this.$el.addClass('no-contact-requests');
|
||||||
|
}
|
||||||
return this;
|
return this;
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -5546,7 +5550,7 @@
|
|||||||
'rooms': {
|
'rooms': {
|
||||||
'open': function (jids, nick) {
|
'open': function (jids, nick) {
|
||||||
if (!nick) {
|
if (!nick) {
|
||||||
nick = Strophe.getNodeFromJid(converse.bare_jid)
|
nick = Strophe.getNodeFromJid(converse.bare_jid);
|
||||||
}
|
}
|
||||||
if (typeof nick !== "string") {
|
if (typeof nick !== "string") {
|
||||||
throw new TypeError('rooms.open: invalid nick, must be string');
|
throw new TypeError('rooms.open: invalid nick, must be string');
|
||||||
@ -5555,7 +5559,7 @@
|
|||||||
var chatroom = converse.chatboxes.get(jid);
|
var chatroom = converse.chatboxes.get(jid);
|
||||||
converse.log('jid');
|
converse.log('jid');
|
||||||
if (!chatroom) {
|
if (!chatroom) {
|
||||||
var chatroom = converse.chatboxviews.showChat({
|
chatroom = converse.chatboxviews.showChat({
|
||||||
'id': jid,
|
'id': jid,
|
||||||
'jid': jid,
|
'jid': jid,
|
||||||
'name': Strophe.unescapeNode(Strophe.getNodeFromJid(jid)),
|
'name': Strophe.unescapeNode(Strophe.getNodeFromJid(jid)),
|
||||||
@ -5576,7 +5580,6 @@
|
|||||||
'get': function (jids) {
|
'get': function (jids) {
|
||||||
if (typeof jids === "undefined") {
|
if (typeof jids === "undefined") {
|
||||||
throw new TypeError("rooms.get: You need to provide at least one JID");
|
throw new TypeError("rooms.get: You need to provide at least one JID");
|
||||||
return null;
|
|
||||||
} else if (typeof jids === "string") {
|
} else if (typeof jids === "string") {
|
||||||
return getWrappedChatBox(jids);
|
return getWrappedChatBox(jids);
|
||||||
}
|
}
|
||||||
|
@ -677,10 +677,12 @@
|
|||||||
position: relative;
|
position: relative;
|
||||||
margin: 0.5em 0 0 0;
|
margin: 0.5em 0 0 0;
|
||||||
height: 194px;
|
height: 194px;
|
||||||
height: calc(100% - 68px);
|
height: calc(100% - 50px - 20px);
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
/* (jQ addClass:) if input has value: */
|
/* (jQ addClass:) if input has value: */
|
||||||
/* (jQ addClass:) if mouse is over the 'x' input area*/ }
|
/* (jQ addClass:) if mouse is over the 'x' input area*/ }
|
||||||
|
#conversejs #converse-roster.no-contact-requests {
|
||||||
|
height: calc(100% - 25px - 20px); }
|
||||||
#conversejs #converse-roster .filter-type {
|
#conversejs #converse-roster .filter-type {
|
||||||
display: table-cell;
|
display: table-cell;
|
||||||
float: right;
|
float: right;
|
||||||
|
@ -11,6 +11,8 @@ Changelog
|
|||||||
* #357 Fix the known bug where a state notification reopens a chat box. [floriancargoet]
|
* #357 Fix the known bug where a state notification reopens a chat box. [floriancargoet]
|
||||||
* #358 Bugfix. Chat rooms show the same occupants bug. [floriancargoet]
|
* #358 Bugfix. Chat rooms show the same occupants bug. [floriancargoet]
|
||||||
* #359 Fix a timeout bug in chat state notifications. [floriancargoet]
|
* #359 Fix a timeout bug in chat state notifications. [floriancargoet]
|
||||||
|
* #360 Incorrect roster height when ``allow_contact_requests=true``. [floriancargoet, jcbrand]
|
||||||
|
* #362 Add API for retrieving and opening rooms. [pzia]
|
||||||
* #364 Text selection in chat boxes not shown in Firefox. [jcbrand]
|
* #364 Text selection in chat boxes not shown in Firefox. [jcbrand]
|
||||||
|
|
||||||
0.9.1 (2015-03-26)
|
0.9.1 (2015-03-26)
|
||||||
|
@ -740,9 +740,13 @@
|
|||||||
position: relative;
|
position: relative;
|
||||||
margin: 0.5em 0 0 0;
|
margin: 0.5em 0 0 0;
|
||||||
height: $roster-height;
|
height: $roster-height;
|
||||||
height: calc(100% - 68px);
|
height: calc(100% - #{$controlbox-dropdown-height*2} - 20px);
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
|
||||||
|
&.no-contact-requests {
|
||||||
|
height: calc(100% - #{$controlbox-dropdown-height} - 20px);
|
||||||
|
}
|
||||||
|
|
||||||
.filter-type {
|
.filter-type {
|
||||||
display: table-cell;
|
display: table-cell;
|
||||||
float: right;
|
float: right;
|
||||||
|
Loading…
Reference in New Issue
Block a user