Skip to content

Commit

Permalink
Initial frontend commit
Browse files Browse the repository at this point in the history
  • Loading branch information
drkieferredflint authored and BeyondEvil committed May 10, 2021
1 parent 9f34c01 commit ff08751
Showing 1 changed file with 5 additions and 21 deletions.
26 changes: 5 additions & 21 deletions src/pytest_html/resources/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,27 +49,11 @@ function showExtras(colresultElem) {
}

function hideExtras(colresultElem) {
const extras = colresultElem.parentNode.nextElementSibling;
const expandcollapse = colresultElem.firstElementChild;
extras.classList.add('collapsed');
expandcollapse.classList.remove('collapser');
expandcollapse.classList.add('expander');
}

function showFilters() {
let visibleString = getQueryParameter('visible') || 'all';
visibleString = visibleString.toLowerCase();
const checkedItems = visibleString.split(',');

const filterItems = document.getElementsByClassName('filter');
for (let i = 0; i < filterItems.length; i++) {
filterItems[i].hidden = false;

if (visibleString != 'all') {
filterItems[i].checked = checkedItems.includes(filterItems[i].getAttribute('data-test-result'));
filterTable(filterItems[i]);
}
}
const extras = colresultElem.parentNode.nextElementSibling;
const expandcollapse = colresultElem.firstElementChild;
extras.classList.add('collapsed');
expandcollapse.classList.remove('collapser');
expandcollapse.classList.add('expander');
}

function addCollapse() {
Expand Down

0 comments on commit ff08751

Please sign in to comment.