diff --git a/tpl/css/wallets_balance.css b/tpl/css/wallets_balance.css index 4b1da9c..bba132d 100644 --- a/tpl/css/wallets_balance.css +++ b/tpl/css/wallets_balance.css @@ -37,3 +37,7 @@ position: sticky; top: 0px; } + +#splw { + margin-left: 20px; +} \ No newline at end of file diff --git a/tpl/js/wallets_balance.js b/tpl/js/wallets_balance.js index db3724e..67fc2ba 100644 --- a/tpl/js/wallets_balance.js +++ b/tpl/js/wallets_balance.js @@ -21,7 +21,6 @@ function recherche(select) { filter = input.value.toUpperCase(); table = document.getElementById("soldes"); tr = table.getElementsByTagName("tr"); - th = table.getElementsByTagName("th"); // Loop through all table rows, and hide those who don't match the search query for (i = 0; i < tr.length; i++) { @@ -39,3 +38,35 @@ function recherche(select) { } } + +// Affichage des simples portefeuilles + +var checkWallets = document.querySelector('input[value="splw"]'); + +checkWallets.onchange = function() { + var table, tr, td, i, txtValue; + table = document.getElementById("soldes"); + tr = table.getElementsByTagName("tr"); + + if(checkWallets.checked) { + for (i = 0; i < tr.length; i++) { + td = tr[i].getElementsByTagName("td")[2]; + if (td) { + txtValue = td.textContent || td.innerText; + if (txtValue == " ") { + tr[i].style.display = ""; + } + } + } + } else { + for (i = 0; i < tr.length; i++) { + td = tr[i].getElementsByTagName("td")[2]; + if (td) { + txtValue = td.textContent || td.innerText; + if (txtValue == " ") { + tr[i].style.display = "none"; + } + } + } + } +}; diff --git a/tpl/wallets_balance.html b/tpl/wallets_balance.html index cd3fe7e..1d4a695 100644 --- a/tpl/wallets_balance.html +++ b/tpl/wallets_balance.html @@ -6,6 +6,7 @@ +
SoldeClé publiquePseudo