mirror of
https://github.com/zulip/zulip.git
synced 2026-06-24 21:08:25 +08:00
settings: Clean up muted_topics/users rendering logic.
This commit removes the unnecessary `data-list-widget` attribute
present in the <div> and <tbody> tag for muted_topics and muted_users table.
It became unnecessary/useless in 19cf6d0e04 and
then was renamed while still useless.
Also uses the correct variable name `muted_topic` and `muted_user`
instead of `muted_topics` and `muted_users` to render a item of their list
in DOM through Listwidget.
This commit is contained in:
parent
5e49ddf4e1
commit
d6c00521b3
@ -16,8 +16,8 @@ export function populate_list() {
|
||||
|
||||
ListWidget.create(muted_topics_table, all_muted_topics, {
|
||||
name: "muted-topics-list",
|
||||
modifier(muted_topics) {
|
||||
return render_muted_topic_ui_row({muted_topics});
|
||||
modifier(muted_topic) {
|
||||
return render_muted_topic_ui_row({muted_topic});
|
||||
},
|
||||
filter: {
|
||||
element: $search_input,
|
||||
|
||||
@ -21,8 +21,8 @@ export function populate_list() {
|
||||
|
||||
ListWidget.create(muted_users_table, all_muted_users, {
|
||||
name: "muted-users-list",
|
||||
modifier(muted_users) {
|
||||
return render_muted_user_ui_row({muted_users});
|
||||
modifier(muted_user) {
|
||||
return render_muted_user_ui_row({muted_user});
|
||||
},
|
||||
filter: {
|
||||
element: $search_input,
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
{{#with muted_topics}}
|
||||
{{#with muted_topic}}
|
||||
<tr data-stream-id="{{stream_id}}" data-stream="{{stream}}" data-topic="{{topic}}" data-date-muted="{{date_muted_str}}">
|
||||
<td>{{stream}}</td>
|
||||
<td>{{topic}}</td>
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
{{#with muted_users}}
|
||||
{{#with muted_user}}
|
||||
<tr data-user-id="{{user_id}}" data-user-name="{{user_name}}" data-date-muted="{{date_muted_str}}">
|
||||
<td>{{user_name}}</td>
|
||||
<td>{{date_muted_str}}</td>
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<div id="muted-topic-settings" class="settings-section" data-name="muted-topics">
|
||||
<input id="muted_topics_search" class="search" type="text" placeholder="{{t 'Filter muted topics' }}" aria-label="{{t 'Filter muted topics' }}"/>
|
||||
<div class="progressive-table-wrapper" data-simplebar data-list-widget="muted-topics-list">
|
||||
<div class="progressive-table-wrapper" data-simplebar>
|
||||
<table class="table table-condensed table-striped wrapped-table">
|
||||
<thead class="table-sticky-headers">
|
||||
<th data-sort="alphabetic" data-sort-prop="stream">{{t "Stream" }}</th>
|
||||
@ -8,7 +8,7 @@
|
||||
<th data-sort="numeric" data-sort-prop="date_muted">{{t "Date muted" }}</th>
|
||||
<th class="actions">{{t "Actions" }}</th>
|
||||
</thead>
|
||||
<tbody id="muted_topics_table" class="required-text" data-empty="{{t 'You have not muted any topics yet.'}}" data-list-widget="muted-topics-list"></tbody>
|
||||
<tbody id="muted_topics_table" class="required-text" data-empty="{{t 'You have not muted any topics yet.'}}"></tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -1,13 +1,13 @@
|
||||
<div id="muted-user-settings" class="settings-section" data-name="muted-users">
|
||||
<input id="muted_users_search" class="search" type="text" placeholder="{{t 'Filter muted users' }}" aria-label="{{t 'Filter muted users' }}"/>
|
||||
<div class="progressive-table-wrapper" data-simplebar data-list-widget="muted-users-list">
|
||||
<div class="progressive-table-wrapper" data-simplebar>
|
||||
<table class="table table-condensed table-striped wrapped-table">
|
||||
<thead class="table-sticky-headers">
|
||||
<th data-sort="alphabetic" data-sort-prop="user_name">{{t "User" }}</th>
|
||||
<th data-sort="numeric" data-sort-prop="date_muted">{{t "Date muted" }}</th>
|
||||
<th class="actions">{{t "Actions" }}</th>
|
||||
</thead>
|
||||
<tbody id="muted_users_table" class="required-text" data-empty="{{t 'You have not muted any users yet.'}}" data-list-widget="muted-users-list"></tbody>
|
||||
<tbody id="muted_users_table" class="required-text" data-empty="{{t 'You have not muted any users yet.'}}"></tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user