front-end update

This commit is contained in:
Szakalakamaka
2020-11-07 18:27:41 +01:00
parent f356274cfa
commit e534dcdc28
11 changed files with 263 additions and 198 deletions

View File

@@ -14,10 +14,28 @@ var state = {
}
var myList, data, previousSort;
console.log("raz dwa trzy")
state.querySet = listForPagination;
buildTable();
document.querySelector('#btn-list-1').addEventListener('click', function() {
var x = document.getElementById("list-wrapper");
if (x.style.display === "none") {
x.style.display = "block";
} else {
x.style.display = "none";
}
})
document.querySelector('#btn-list-2').addEventListener('click', function() {
var x = document.getElementById("advanced-wrapper");
if (x.style.display === "none") {
x.style.display = "block";
} else {
x.style.display = "none";
}
})
for (let i = 3; i >= 0; i--) {
document.querySelector('#btn-sort-' + i).addEventListener('click', function() {
addButtonListeners(i)