Правка в логике разворачивания категорий по значениям в LS

parent 17440fc8
......@@ -77,10 +77,16 @@ $(document).ready(function () {
// Разворачиваем категории по стостоянию в localStorage:
function ShowTableStateByCats(catsState)
{
var $trTitle;
var $tr, $groupTr, $inheritedTr;
catsState.forEach(function(id){
$trTitle = $('tbody tr[data-id="' + id + '"] .cat-title', $tableCats);
$trTitle.click();
$tr = $('tbody tr[data-id="' + id + '"]', $tableCats);
$groupTr = $('.group', $tr);
$inheritedTr = $('tbody tr[data-parent="' + id + '"]', $tableCats);
$tr.addClass('open');
$groupTr.addClass('open');
$inheritedTr.addClass('open');
});
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment