diff --git a/plugins/tables-filter.php b/plugins/tables-filter.php index c446af20..e7abe6fd 100644 --- a/plugins/tables-filter.php +++ b/plugins/tables-filter.php @@ -27,8 +27,17 @@ function tablesFilter(){ } var tables = qsa('li', qs('#tables')); for (var i = 0; i < tables.length; i++) { - var a = qsa('a', tables[i])[1]; + var a = null; var text = tables[i].getAttribute('data-table-name'); + if (text == null) { + a = qsa('a', tables[i])[1]; + text = a.innerHTML.trim(); + + tables[i].setAttribute('data-table-name', text); + a.setAttribute('data-link', 'main'); + } else { + a = qs('a[data-link="main"]', tables[i]); + } if (value == '') { tables[i].className = ''; a.innerHTML = text; @@ -55,22 +64,6 @@ if (sessionStorage){ }

-

-