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 @@ ...@@ -307,8 +307,7 @@
// Module-level functions // Module-level functions
// ---------------------- // ----------------------
this.giveFeedback = function (message, klass) { this.giveFeedback = function (message, klass) {
$('.conn-feedback').text(message); $('.conn-feedback').attr('class', 'conn-feedback').text(message);
$('.conn-feedback').attr('class', 'conn-feedback');
if (klass) { if (klass) {
$('.conn-feedback').addClass(klass); $('.conn-feedback').addClass(klass);
} }
...@@ -1517,9 +1516,9 @@ ...@@ -1517,9 +1516,9 @@
}); });
} }
this.$el.html(widgets); this.$el.html(widgets);
this.$el.find('.search-xmpp ul').append(markup); this.$el.find('.search-xmpp ul').append(markup);
this.$el.append(converse.rosterview.$el); this.$el.append(converse.rosterview.$el);
converse.rosterview.update(); // Will render live filter if needed.
return this; return this;
}, },
......
...@@ -886,8 +886,8 @@ dl.add-converse-contact { ...@@ -886,8 +886,8 @@ dl.add-converse-contact {
width: 100%; width: 100%;
position: relative; position: relative;
margin: 0.5em 0 0 0; margin: 0.5em 0 0 0;
max-height: 194px; height: 194px;
max-height: calc(100% - 25px); height: calc(100% - 25px);
} }
#converse-roster .roster-filter { #converse-roster .roster-filter {
margin: 0 0.5em; margin: 0 0.5em;
...@@ -897,8 +897,8 @@ dl.add-converse-contact { ...@@ -897,8 +897,8 @@ dl.add-converse-contact {
margin: 0; margin: 0;
overflow-y: auto; overflow-y: auto;
overflow-x: hidden; overflow-x: hidden;
height: 195px; max-height: 195px;
height: calc(100% - 67px); max-height: calc(100% - 67px);
} }
#converse-roster .group-toggle { #converse-roster .group-toggle {
color: #666; color: #666;
......
...@@ -984,8 +984,8 @@ dl.add-converse-contact { ...@@ -984,8 +984,8 @@ dl.add-converse-contact {
width: 100%; width: 100%;
position: relative; position: relative;
margin: 0.5em 0 0 0; margin: 0.5em 0 0 0;
max-height: 194px; height: 194px;
max-height: ~"calc(100% - 25px)"; height: ~"calc(100% - 25px)";
} }
#converse-roster .roster-filter { #converse-roster .roster-filter {
...@@ -997,8 +997,8 @@ dl.add-converse-contact { ...@@ -997,8 +997,8 @@ dl.add-converse-contact {
margin: 0; margin: 0;
overflow-y: auto; overflow-y: auto;
overflow-x: hidden; overflow-x: hidden;
height: 195px; max-height: 195px;
height: ~"calc(100% - 67px)"; max-height: ~"calc(100% - 67px)";
} }
#converse-roster .group-toggle { #converse-roster .group-toggle {
......
jQuery.fn.hasScrollBar = function() { jQuery.fn.hasScrollBar = function() {
var el = this.get(0); if (!$.contains(document, this.get(0))) {
if(el.offsetHeight < el.scrollHeight) { return false;
}
if(this.parent().height() < this.get(0).scrollHeight) {
return true; return true;
} }
else{
return false; return false;
}
}; };
jQuery.fn.liveFilter = function(list, options) { 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