Commit aff91fc6 authored by JC Brand's avatar JC Brand

updates #212

* Make sure that the roster container has a fixed height, so that we can better
check whether the roster is overflowing.
* Call update after inserting the roster into the DOM
parent ef519342
......@@ -307,8 +307,7 @@
// Module-level functions
// ----------------------
this.giveFeedback = function (message, klass) {
$('.conn-feedback').text(message);
$('.conn-feedback').attr('class', 'conn-feedback');
$('.conn-feedback').attr('class', 'conn-feedback').text(message);
if (klass) {
$('.conn-feedback').addClass(klass);
}
......@@ -1517,9 +1516,9 @@
});
}
this.$el.html(widgets);
this.$el.find('.search-xmpp ul').append(markup);
this.$el.append(converse.rosterview.$el);
converse.rosterview.update(); // Will render live filter if needed.
return this;
},
......
......@@ -886,8 +886,8 @@ dl.add-converse-contact {
width: 100%;
position: relative;
margin: 0.5em 0 0 0;
max-height: 194px;
max-height: calc(100% - 25px);
height: 194px;
height: calc(100% - 25px);
}
#converse-roster .roster-filter {
margin: 0 0.5em;
......@@ -897,8 +897,8 @@ dl.add-converse-contact {
margin: 0;
overflow-y: auto;
overflow-x: hidden;
height: 195px;
height: calc(100% - 67px);
max-height: 195px;
max-height: calc(100% - 67px);
}
#converse-roster .group-toggle {
color: #666;
......
......@@ -984,8 +984,8 @@ dl.add-converse-contact {
width: 100%;
position: relative;
margin: 0.5em 0 0 0;
max-height: 194px;
max-height: ~"calc(100% - 25px)";
height: 194px;
height: ~"calc(100% - 25px)";
}
#converse-roster .roster-filter {
......@@ -997,8 +997,8 @@ dl.add-converse-contact {
margin: 0;
overflow-y: auto;
overflow-x: hidden;
height: 195px;
height: ~"calc(100% - 67px)";
max-height: 195px;
max-height: ~"calc(100% - 67px)";
}
#converse-roster .group-toggle {
......
jQuery.fn.hasScrollBar = function() {
var el = this.get(0);
if(el.offsetHeight < el.scrollHeight) {
return true;
}
else{
if (!$.contains(document, this.get(0))) {
return false;
}
if(this.parent().height() < this.get(0).scrollHeight) {
return true;
}
return false;
};
jQuery.fn.liveFilter = function(list, options) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment