mirror of https://github.com/zulip/zulip.git
data export: Fix sort feature regression.
02cfb47
removed a couple HTML tags that were
being used to sort the table. We fix this,
but disable filtering exports by marking the
input type as `hidden`. We use this approach as
it seems `list_render` doesn't like an
undefined `opts.filter.element`, which is
what happens if we simply remove the `filter`
key.
This commit is contained in:
parent
d09a80260b
commit
2a020fa6cc
|
@ -18,8 +18,8 @@ exports.populate_exports_table = function (exports) {
|
||||||
}
|
}
|
||||||
|
|
||||||
var exports_table = $('#admin_exports_table').expectOne();
|
var exports_table = $('#admin_exports_table').expectOne();
|
||||||
var exports_list = list_render.create(exports_table, exports, {
|
var exports_list = list_render.create(exports_table, Object.values(exports), {
|
||||||
name: "admin-exports-list",
|
name: "admin_exports_list",
|
||||||
modifier: function (data) {
|
modifier: function (data) {
|
||||||
if (data.export_data.deleted_timestamp === undefined) {
|
if (data.export_data.deleted_timestamp === undefined) {
|
||||||
return render_admin_export_list({
|
return render_admin_export_list({
|
||||||
|
@ -46,7 +46,7 @@ exports.populate_exports_table = function (exports) {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
parent_container: $("#data-exports").expectOne(),
|
parent_container: $("#data-exports").expectOne(),
|
||||||
});
|
}).init();
|
||||||
|
|
||||||
exports_list.add_sort_function("user", function (a, b) {
|
exports_list.add_sort_function("user", function (a, b) {
|
||||||
var a_name = people.get_full_name(a.acting_user_id).toLowerCase();
|
var a_name = people.get_full_name(a.acting_user_id).toLowerCase();
|
||||||
|
|
|
@ -28,7 +28,9 @@
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
<div class="admin-table-wrapper">
|
<input type="hidden" class="search" placeholder="{{t 'Filter exports' }}"
|
||||||
|
aria-label="{{t 'Filter exports' }}"/>
|
||||||
|
<div class="progressive-table-wrapper" data-simplebar data-list-render="admin_exports_list">
|
||||||
<table class="table table-condensed table-striped wrapped-table admin_exports_table">
|
<table class="table table-condensed table-striped wrapped-table admin_exports_table">
|
||||||
<thead>
|
<thead>
|
||||||
<th class="active" data-sort="user">{{t "Requesting user" }}</th>
|
<th class="active" data-sort="user">{{t "Requesting user" }}</th>
|
||||||
|
|
Loading…
Reference in New Issue