This commit is contained in:
Barış Soner Uşaklı
2018-02-15 12:46:04 -05:00
parent 854f79142e
commit a224c557c0
3 changed files with 19 additions and 1 deletions

View File

@@ -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 () {