From 2485ffc74ca8498c70824bd84db80ba5443cc589 Mon Sep 17 00:00:00 2001 From: Michelle <88682822+emshahh@users.noreply.github.com> Date: Fri, 7 Jun 2024 15:28:26 -0400 Subject: [PATCH] removed reason col --- .../static/js/candidate_url_list.js | 45 ++++++++++++------- 1 file changed, 29 insertions(+), 16 deletions(-) diff --git a/sde_indexing_helper/static/js/candidate_url_list.js b/sde_indexing_helper/static/js/candidate_url_list.js index 14f63a17..515fc079 100644 --- a/sde_indexing_helper/static/js/candidate_url_list.js +++ b/sde_indexing_helper/static/js/candidate_url_list.js @@ -44,14 +44,14 @@ function modalContents(tableName) { if (checkboxCount > 0 && tableName === uniqueId) { $modal = $("#hideShowColumnsModal").modal({ - backdrop: 'static', + backdrop: "static", keyboard: true, }); return; } $modal = $("#hideShowColumnsModal").modal({ - backdrop: 'static', + backdrop: "static", keyboard: true, }); var table = $(tableName).DataTable(); @@ -101,13 +101,16 @@ function initializeDataTable() { colReorder: true, stateSave: true, layout: { - bottomEnd: 'inputPaging', + bottomEnd: "inputPaging", topEnd: null, topStart: { - info:true, + info: true, pageLength: { - menu: [[25, 50, 100, 500],["Show 25", "Show 50", "Show 100", "Show 500"]] - }, + menu: [ + [25, 50, 100, 500], + ["Show 25", "Show 50", "Show 100", "Show 500"], + ], + }, buttons: [ "spacer", "csv", @@ -120,8 +123,8 @@ function initializeDataTable() { }, }, ], - } - }, + }, + }, serverSide: true, orderCellsTop: true, pagingType: "input", @@ -166,9 +169,9 @@ function initializeDataTable() { let alteredLines = []; lines.forEach((line) => { let newLine = ""; - newLine = line.replace("open_in_new",""); + newLine = line.replace("open_in_new", ""); alteredLines.push(newLine); - }) + }); return alteredLines.join("\n") + appliedFiltersInfo; }, }, @@ -262,7 +265,10 @@ function initializeDataTable() { ], createdRow: function (row, data, dataIndex) { if (data["excluded"]) { - $(row).attr("style", "background-color: rgba(255, 61, 87, 0.36) !important"); + $(row).attr( + "style", + "background-color: rgba(255, 61, 87, 0.36) !important" + ); } }, }); @@ -343,12 +349,17 @@ function initializeDataTable() { class: "text-center whiteText", sortable: true, }, - { data: "reason", class: "text-center whiteText", sortable: false }, + { + data: "reason", + class: "text-center whiteText", + sortable: false, + visible: false, + }, { data: "candidate_urls_count", class: "text-center whiteText", sortable: true, - }, + }, { data: null, sortable: false, @@ -792,7 +803,7 @@ function handleHideorShowKeypress() { $("#hideShowColumnsModal").modal("hide"); } //Confirm modal selections via enter - if(event.key == "Enter" && $("#hideShowColumnsModal").is(":visible")) { + if (event.key == "Enter" && $("#hideShowColumnsModal").is(":visible")) { var table = $(uniqueId).DataTable(); $("[id^='checkbox_']").each(function () { var checkboxValue = $(this).val(); @@ -804,7 +815,7 @@ function handleHideorShowKeypress() { $("#hideShowColumnsModal").modal("hide"); } }); - + $("body").on("click", ".modal-backdrop", function () { $("#hideShowColumnsModal").modal("hide"); }); @@ -827,7 +838,9 @@ function handleHideorShowSubmitButton() { function handleDocumentTypeSelect() { $("body").on("click", ".document_type_select", function () { - $match_pattern = $(this).parents(".document_type_dropdown").data("match-pattern"); + $match_pattern = $(this) + .parents(".document_type_dropdown") + .data("match-pattern"); postDocumentTypePatterns( $match_pattern, (match_pattern_type = 1),