MCPcopy Create free account
hub / github.com/adobe/Marinus / add_paging_html

Function add_paging_html

web_server/public/javascripts/utilities.js:343–369  ·  view source on GitHub ↗
(formName, display_function)

Source from the content-addressed store, hash-verified

341}
342
343function add_paging_html(formName, display_function) {
344 let html = '<div>';
345 html += '<form id="pagingForm-' + formName + '">';
346 html += '<nav aria-label="Page navigation">';
347 html += '<ul class="pagination">';
348 html += '<li class="page-item"><label for="pageLimit-' + formName + '" id="label-aligned-0">Results per page:&nbsp;</label></li>';
349 html += '<li class="page-item"><input type="number" style="width:100px;" value="' + LIMIT.toString() + '" step="100" name="pageLimit-' + formName + '" id="pageLimit-' + formName + '" min="100" max="1000"></input>&nbsp;</li>';
350 html += '<li class="page-item">';
351 html += '<a class="page-link" href="#" aria-label="Previous" id="prevPage-' + formName + '">';
352 html += '<span aria-hidden="true">&laquo;</span>';
353 html += '<span class="sr-only">Previous</span>';
354 html += '</a></li>';
355 html += '<li class="page-item">';
356 html += '<a class="page-link" href="#" aria-label="Next" id="nextPage-' + formName + '">';
357 html += '<span aria-hidden="true">&raquo;</span>';
358 html += '<span class="sr-only">Next</span>';
359 html += '</a></li></ul></nav>';
360 html += '</form>';
361 html += '</div>';
362
363
364 PAGING_FUNCTIONS[formName] = display_function;
365
366 window.setTimeout(function () { kill_paging_form(formName) }, 1000);
367
368 return (html);
369}
370
371function do_page_refresh(formName) {
372 LIMIT = document.getElementById("pageLimit-" + formName).value;

Callers 3

display_scan_casFunction · 0.85
displayIPListFunction · 0.85
displayDomainListFunction · 0.85

Calls 1

kill_paging_formFunction · 0.85

Tested by

no test coverage detected