Add perfectScrollbar to default streams table.

This adds perfectScrollbar to the default streams table
because it currently is inside another perfectScrollbar which
actually makes it impossible to scroll the table normally without
enabling the perfectScrollbar library on this.

Fixes: #6391.
This commit is contained in:
Brock Whittaker
2017-09-15 14:01:36 -07:00
committed by Tim Abbott
parent 5db810b5d7
commit d1ef863f96
3 changed files with 14 additions and 0 deletions

View File

@@ -198,6 +198,10 @@ var list_render = (function () {
// clear and re-initialize the list with the newly filtered subset // clear and re-initialize the list with the newly filtered subset
// of items. // of items.
prototype.clear().init(); prototype.clear().init();
if (opts.filter.onupdate) {
opts.filter.onupdate();
}
}); });
} }

View File

@@ -50,9 +50,14 @@ exports.build_default_stream_table = function (streams_data) {
callback: function (item, value) { callback: function (item, value) {
return item.name.toLowerCase().indexOf(value) >= 0; return item.name.toLowerCase().indexOf(value) >= 0;
}, },
onupdate: function () {
ui.update_scrollbar(table);
},
}, },
}).init(); }).init();
ui.set_up_scrollbar(table.closest(".progressive-table-wrapper"));
loading.destroy_indicator($('#admin_page_default_streams_loading_indicator')); loading.destroy_indicator($('#admin_page_default_streams_loading_indicator'));
self.remove = function (stream_id) { self.remove = function (stream_id) {

View File

@@ -599,10 +599,15 @@ input[type=checkbox].inline-block {
} }
.progressive-table-wrapper { .progressive-table-wrapper {
position: relative;
max-height: calc(95vh - 200px); max-height: calc(95vh - 200px);
overflow: auto; overflow: auto;
} }
#admin-default-streams-list .progressive-table-wrapper {
max-height: calc(95vh - 270px);
}
.bots_list { .bots_list {
display: none; display: none;
list-style-type: none; list-style-type: none;