mirror of
https://github.com/zulip/zulip.git
synced 2025-11-05 14:35:27 +00:00
Change admin streams list to render progressively.
This commit is contained in:
committed by
Tim Abbott
parent
0e4f2f732d
commit
db40d62092
@@ -19,10 +19,20 @@ function failed_listing_streams(xhr) {
|
||||
function populate_streams(streams_data) {
|
||||
var streams_table = $("#admin_streams_table").expectOne();
|
||||
all_streams = streams_data;
|
||||
streams_table.find("tr.stream_row").remove();
|
||||
_.each(streams_data.streams, function (stream) {
|
||||
streams_table.append(templates.render("admin_streams_list", {stream: stream}));
|
||||
});
|
||||
|
||||
list_render(streams_table, all_streams.streams, {
|
||||
name: "admin_streams_list",
|
||||
modifier: function (item) {
|
||||
return templates.render("admin_streams_list", { stream: item });
|
||||
},
|
||||
filter: {
|
||||
element: streams_table.closest(".settings-section").find(".search"),
|
||||
callback: function (item, value) {
|
||||
return item.name.toLowerCase().match(value);
|
||||
},
|
||||
},
|
||||
}).init();
|
||||
|
||||
loading.destroy_indicator($('#admin_page_streams_loading_indicator'));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user