Add system setting table with cache and also add cache supports for user setting (#18058)
This commit is contained in:
parent
5d3dbffa15
commit
f860a6d2e4
59 changed files with 1117 additions and 436 deletions
34
web_src/js/features/admin/users.js
Normal file
34
web_src/js/features/admin/users.js
Normal file
|
@ -0,0 +1,34 @@
|
|||
import $ from 'jquery';
|
||||
|
||||
export function initAdminUserListSearchForm() {
|
||||
const searchForm = window.config.pageData.adminUserListSearchForm;
|
||||
if (!searchForm) return;
|
||||
|
||||
const $form = $('#user-list-search-form');
|
||||
if (!$form.length) return;
|
||||
|
||||
$form.find(`button[name=sort][value=${searchForm.SortType}]`).addClass('active');
|
||||
|
||||
if (searchForm.StatusFilterMap) {
|
||||
for (const [k, v] of Object.entries(searchForm.StatusFilterMap)) {
|
||||
if (!v) continue;
|
||||
$form.find(`input[name="status_filter[${k}]"][value=${v}]`).prop('checked', true);
|
||||
}
|
||||
}
|
||||
|
||||
$form.find(`input[type=radio]`).click(() => {
|
||||
$form.submit();
|
||||
return false;
|
||||
});
|
||||
|
||||
$form.find('.j-reset-status-filter').click(() => {
|
||||
$form.find(`input[type=radio]`).each((_, e) => {
|
||||
const $e = $(e);
|
||||
if ($e.attr('name').startsWith('status_filter[')) {
|
||||
$e.prop('checked', false);
|
||||
}
|
||||
});
|
||||
$form.submit();
|
||||
return false;
|
||||
});
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue