mirror of
https://github.com/zulip/zulip.git
synced 2025-11-05 06:23:38 +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) {
|
function populate_streams(streams_data) {
|
||||||
var streams_table = $("#admin_streams_table").expectOne();
|
var streams_table = $("#admin_streams_table").expectOne();
|
||||||
all_streams = streams_data;
|
all_streams = streams_data;
|
||||||
streams_table.find("tr.stream_row").remove();
|
|
||||||
_.each(streams_data.streams, function (stream) {
|
list_render(streams_table, all_streams.streams, {
|
||||||
streams_table.append(templates.render("admin_streams_list", {stream: stream}));
|
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'));
|
loading.destroy_indicator($('#admin_page_streams_loading_indicator'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,16 +1,26 @@
|
|||||||
<div id="admin-streams-list" class="settings-section" data-name="streams-list-admin">
|
<div id="admin-streams-list" class="settings-section" data-name="streams-list-admin">
|
||||||
<div class="settings-section-title"><i class="icon-vector-exchange settings-section-icon"></i>
|
<div class="settings-section-title">
|
||||||
{{t "Delete streams" }}</div>
|
<div class="table-title">
|
||||||
|
<i class="icon-vector-exchange settings-section-icon"></i>
|
||||||
|
{{t "Delete streams" }}
|
||||||
|
</div>
|
||||||
|
<input type="text" class="search" placeholder="{{t 'Search streams' }}" />
|
||||||
|
<div class="clear-float"></div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div class="side-padded-container">
|
<div class="side-padded-container">
|
||||||
<p class="admin-streams-note">{{#tr this}}Most stream administration is done on the <a href="/#streams">Streams page</a>.{{/tr}}</p>
|
<p class="admin-streams-note">{{#tr this}}Most stream administration is done on the <a href="/#streams">Streams page</a>.{{/tr}}</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="progressive-table-wrapper">
|
||||||
<table class="table table-condensed table-striped">
|
<table class="table table-condensed table-striped">
|
||||||
<tbody id="admin_streams_table" class="admin_stream_table">
|
<thead>
|
||||||
<th>{{t "Name" }}</th>
|
<th>{{t "Name" }}</th>
|
||||||
<th>{{t "Actions" }}</th>
|
<th>{{t "Actions" }}</th>
|
||||||
</tbody>
|
</thead>
|
||||||
|
<tbody id="admin_streams_table" class="admin_stream_table"></tbody>
|
||||||
</table>
|
</table>
|
||||||
|
</div>
|
||||||
<div id="admin_page_streams_loading_indicator"></div>
|
<div id="admin_page_streams_loading_indicator"></div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user