Skip to content

Commit 933852b

Browse files
committed
Add 'Show Affected URLs' button and configure click handler
1 parent 3f85f26 commit 933852b

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

sde_indexing_helper/static/js/candidate_url_list.js

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -387,6 +387,14 @@ function initializeDataTable() {
387387
data: "candidate_urls_count",
388388
class: "text-center whiteText",
389389
sortable: true,
390+
render: function (data, type, row) {
391+
return `<div style="display: flex; align-items: center; justify-content: center;">
392+
<span style="min-width: 50px; text-align: right; padding-right: 10px;">${data}</span>
393+
<button type="button" class="btn btn-sm view-affected-urls" data-row-id="${row.id}">
394+
<i class="fa fa-eye"></i>
395+
</button>
396+
</div>`;
397+
},
390398
},
391399
{
392400
data: null,
@@ -813,6 +821,7 @@ function setupClickHandlers() {
813821
handleDeleteIncludePatternButtonClick();
814822
handleDeleteTitlePatternButtonClick();
815823
handleDeleteDivisionButtonClick();
824+
handleShowAffectedURLsListButtonClick();
816825

817826
handleDocumentTypeSelect();
818827
handleDivisionSelect();
@@ -1126,6 +1135,14 @@ function handleExcludeIndividualUrlClick() {
11261135
});
11271136
}
11281137

1138+
function handleShowAffectedURLsListButtonClick() {
1139+
$("body").on("click", ".view-affected-urls", function () {
1140+
var matchPatternId = $(this).data("row-id");
1141+
console.log(matchPatternId);
1142+
});
1143+
}
1144+
1145+
11291146
function handleDeleteExcludePatternButtonClick() {
11301147
$("body").on("click", ".delete-exclude-pattern-button", function () {
11311148
var patternRowId = $(this).data("row-id");

0 commit comments

Comments
 (0)