保誠-保戶業務員媒合平台
PAMapp/node_modules/istanbul-reports/lib/html/assets/sorter.js
@@ -23,6 +23,31 @@
        return getTableHeader().querySelectorAll('th')[n];
    }
    function onFilterInput() {
        const searchValue = document.getElementById('fileSearch').value;
        const rows = document.getElementsByTagName('tbody')[0].children;
        for (let i = 0; i < rows.length; i++) {
            const row = rows[i];
            if (
                row.textContent
                    .toLowerCase()
                    .includes(searchValue.toLowerCase())
            ) {
                row.style.display = '';
            } else {
                row.style.display = 'none';
            }
        }
    }
    // loads the search box
    function addSearchBox() {
        var template = document.getElementById('filterTemplate');
        var templateClone = template.content.cloneNode(true);
        templateClone.getElementById('fileSearch').oninput = onFilterInput;
        template.parentElement.appendChild(templateClone);
    }
    // loads all columns
    function loadColumns() {
        var colNodes = getTableHeader().querySelectorAll('th'),
@@ -161,6 +186,7 @@
        }
        cols = loadColumns();
        loadData();
        addSearchBox();
        addSortIndicators();
        enableUI();
    };