mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-02-14 10:37:45 +01:00
fix privilege filters
This commit is contained in:
@@ -36,7 +36,7 @@ define('admin/manage/privileges', [
|
||||
Privileges.setupPrivilegeTable();
|
||||
|
||||
highlightRow();
|
||||
$('.privilege-filters button:last-child').click();
|
||||
$('.privilege-filters button:first-child').click();
|
||||
};
|
||||
|
||||
Privileges.setupPrivilegeTable = function () {
|
||||
@@ -133,7 +133,7 @@ define('admin/manage/privileges', [
|
||||
throwConfirmModal('copyToAllGroup', Privileges.copyPrivilegesToAllCategories.bind(null, cid, groupName));
|
||||
});
|
||||
|
||||
$privTableCon.on('click', '.privilege-filters > button', filterPrivileges);
|
||||
$privTableCon.on('click', '.privilege-filters button', filterPrivileges);
|
||||
|
||||
mousetrap.bind('ctrl+s', function (ev) {
|
||||
throwConfirmModal('save', Privileges.commit);
|
||||
|
||||
@@ -2,13 +2,15 @@
|
||||
<table class="table table-striped privilege-table">
|
||||
<thead>
|
||||
<tr class="privilege-table-header">
|
||||
<th class="privilege-filters btn-toolbar" colspan="100">
|
||||
<th class="privilege-filters" colspan="100">
|
||||
<div class="btn-toolbar justify-content-end gap-1">
|
||||
<button type="button" data-filter="3,5" class="btn btn-outline-secondary">[[admin/manage/categories:privileges.section-viewing]]</button>
|
||||
<button type="button" data-filter="6,15" class="btn btn-outline-secondary">[[admin/manage/categories:privileges.section-posting]]</button>
|
||||
<button type="button" data-filter="16,18" class="btn btn-outline-secondary">[[admin/manage/categories:privileges.section-moderation]]</button>
|
||||
<!-- IF privileges.columnCountGroupOther -->
|
||||
<button type="button" data-filter="19,99" class="btn btn-outline-secondary float-end">[[admin/manage/categories:privileges.section-other]]</button>
|
||||
<button type="button" data-filter="19,99" class="btn btn-outline-secondary">[[admin/manage/categories:privileges.section-other]]</button>
|
||||
<!-- END -->
|
||||
<button type="button" data-filter="16,18" class="btn btn-outline-secondary float-end">[[admin/manage/categories:privileges.section-moderation]]</button>
|
||||
<button type="button" data-filter="6,15" class="btn btn-outline-secondary float-end">[[admin/manage/categories:privileges.section-posting]]</button>
|
||||
<button type="button" data-filter="3,5" class="btn btn-outline-secondary float-end">[[admin/manage/categories:privileges.section-viewing]]</button>
|
||||
</div>
|
||||
</th>
|
||||
</tr><tr><!-- zebrastripe reset --></tr>
|
||||
<tr>
|
||||
@@ -85,13 +87,15 @@
|
||||
<table class="table table-striped privilege-table">
|
||||
<thead>
|
||||
<tr class="privilege-table-header">
|
||||
<th class="privilege-filters btn-toolbar" colspan="100">
|
||||
<th class="privilege-filters" colspan="100">
|
||||
<div class="btn-toolbar justify-content-end gap-1">
|
||||
<button type="button" data-filter="3,5" class="btn btn-outline-secondary">[[admin/manage/categories:privileges.section-viewing]]</button>
|
||||
<button type="button" data-filter="6,15" class="btn btn-outline-secondary">[[admin/manage/categories:privileges.section-posting]]</button>
|
||||
<button type="button" data-filter="16,18" class="btn btn-outline-secondary">[[admin/manage/categories:privileges.section-moderation]]</button>
|
||||
<!-- IF privileges.columnCountUserOther -->
|
||||
<button type="button" data-filter="19,99" class="btn btn-outline-secondary float-end">[[admin/manage/categories:privileges.section-other]]</button>
|
||||
<button type="button" data-filter="19,99" class="btn btn-outline-secondary">[[admin/manage/categories:privileges.section-other]]</button>
|
||||
<!-- END -->
|
||||
<button type="button" data-filter="16,18" class="btn btn-outline-secondary float-end">[[admin/manage/categories:privileges.section-moderation]]</button>
|
||||
<button type="button" data-filter="6,15" class="btn btn-outline-secondary float-end">[[admin/manage/categories:privileges.section-posting]]</button>
|
||||
<button type="button" data-filter="3,5" class="btn btn-outline-secondary float-end">[[admin/manage/categories:privileges.section-viewing]]</button>
|
||||
</div>
|
||||
</th>
|
||||
</tr><tr><!-- zebrastripe reset --></tr>
|
||||
<tr>
|
||||
|
||||
@@ -3,13 +3,15 @@
|
||||
<thead>
|
||||
{{{ if !isAdminPriv }}}
|
||||
<tr class="privilege-table-header">
|
||||
<th class="privilege-filters btn-toolbar" colspan="100">
|
||||
<th class="privilege-filters" colspan="100">
|
||||
<div class="btn-toolbar justify-content-end gap-1">
|
||||
<button type="button" data-filter="9,15" class="btn btn-outline-secondary">[[admin/manage/categories:privileges.section-viewing]]</button>
|
||||
<button type="button" data-filter="3,8" class="btn btn-outline-secondary">[[admin/manage/categories:privileges.section-posting]]</button>
|
||||
<button type="button" data-filter="16,18" class="btn btn-outline-secondary">[[admin/manage/categories:privileges.section-moderation]]</button>
|
||||
<!-- IF privileges.columnCountGroupOther -->
|
||||
<button type="button" data-filter="19,99" class="btn btn-outline-secondary float-end">[[admin/manage/categories:privileges.section-other]]</button>
|
||||
<button type="button" data-filter="19,99" class="btn btn-outline-secondary">[[admin/manage/categories:privileges.section-other]]</button>
|
||||
<!-- END -->
|
||||
<button type="button" data-filter="16,18" class="btn btn-outline-secondary float-end">[[admin/manage/categories:privileges.section-moderation]]</button>
|
||||
<button type="button" data-filter="3,8" class="btn btn-outline-secondary float-end">[[admin/manage/categories:privileges.section-posting]]</button>
|
||||
<button type="button" data-filter="9,15" class="btn btn-outline-secondary float-end">[[admin/manage/categories:privileges.section-viewing]]</button>
|
||||
</div>
|
||||
</th>
|
||||
</tr><tr><!-- zebrastripe reset --></tr>
|
||||
{{{ end }}}
|
||||
@@ -65,13 +67,15 @@
|
||||
<thead>
|
||||
{{{ if !isAdminPriv }}}
|
||||
<tr class="privilege-table-header">
|
||||
<th class="privilege-filters btn-toolbar" colspan="100">
|
||||
<th class="privilege-filters" colspan="100">
|
||||
<div class="btn-toolbar justify-content-end gap-1">
|
||||
<button type="button" data-filter="9,15" class="btn btn-outline-secondary">[[admin/manage/categories:privileges.section-viewing]]</button>
|
||||
<button type="button" data-filter="16,18" class="btn btn-outline-secondary">[[admin/manage/categories:privileges.section-moderation]]</button>
|
||||
<button type="button" data-filter="3,8" class="btn btn-outline-secondary">[[admin/manage/categories:privileges.section-posting]]</button>
|
||||
<!-- IF privileges.columnCountUserOther -->
|
||||
<button type="button" data-filter="19,99" class="btn btn-outline-secondary float-end">[[admin/manage/categories:privileges.section-other]]</button>
|
||||
<button type="button" data-filter="19,99" class="btn btn-outline-secondary">[[admin/manage/categories:privileges.section-other]]</button>
|
||||
<!-- END -->
|
||||
<button type="button" data-filter="16,18" class="btn btn-outline-secondary float-end">[[admin/manage/categories:privileges.section-moderation]]</button>
|
||||
<button type="button" data-filter="3,8" class="btn btn-outline-secondary float-end">[[admin/manage/categories:privileges.section-posting]]</button>
|
||||
<button type="button" data-filter="9,15" class="btn btn-outline-secondary float-end">[[admin/manage/categories:privileges.section-viewing]]</button>
|
||||
</div>
|
||||
</th>
|
||||
</tr><tr><!-- zebrastripe reset --></tr>
|
||||
{{{ end }}}
|
||||
|
||||
Reference in New Issue
Block a user