mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-12 08:55:47 +01:00
closes #6326
This commit is contained in:
@@ -65,5 +65,7 @@
|
||||
"alert.find-user": "Find a User",
|
||||
"alert.user-search": "Search for a user here...",
|
||||
"alert.find-group": "Find a Group",
|
||||
"alert.group-search": "Search for a group here..."
|
||||
"alert.group-search": "Search for a group here...",
|
||||
"collapse-all": "Collapse All",
|
||||
"expand-all": "Expand All"
|
||||
}
|
||||
@@ -37,6 +37,20 @@ define('admin/manage/categories', ['vendor/jquery/serializeObject/jquery.ba-seri
|
||||
el.find('i').toggleClass('fa-minus').toggleClass('fa-plus');
|
||||
el.closest('[data-cid]').find('> ul[data-cid]').toggleClass('hidden');
|
||||
});
|
||||
|
||||
$('#collapse-all').on('click', function () {
|
||||
toggleAll(false);
|
||||
});
|
||||
|
||||
$('#expand-all').on('click', function () {
|
||||
toggleAll(true);
|
||||
});
|
||||
|
||||
function toggleAll(expand) {
|
||||
var el = $('.categories .toggle');
|
||||
el.find('i').toggleClass('fa-minus', expand).toggleClass('fa-plus', !expand);
|
||||
el.closest('[data-cid]').find('> ul[data-cid]').toggleClass('hidden', !expand);
|
||||
}
|
||||
};
|
||||
|
||||
Categories.throwCreateModal = function () {
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
<button id="collapse-all" class="btn btn-default">[[admin/manage/categories:collapse-all]]</button> <button id="expand-all" class="btn btn-default">[[admin/manage/categories:expand-all]]</button>
|
||||
<hr/>
|
||||
<div class="categories"></div>
|
||||
|
||||
<button data-action="create" class="floating-button mdl-button mdl-js-button mdl-button--fab mdl-js-ripple-effect mdl-button--colored">
|
||||
|
||||
Reference in New Issue
Block a user