diff --git a/apps/home/static/home/js/tabs/filters.js b/apps/home/static/home/js/tabs/filters.js index 7a98169..2e386c3 100644 --- a/apps/home/static/home/js/tabs/filters.js +++ b/apps/home/static/home/js/tabs/filters.js @@ -73,7 +73,15 @@ async function loadFilterData() { await loadTableData(filterTableId, "/api/filters/", "GET"); } -// Table Delete Btns +// region Table Share Btn + +// getTableFiltersComponent(filterTableId).filter(".js-tableShareBtn").on("click", async () => { +// createModal({ +// title: "Share" +// }) +// }); + +// region Table Delete Btns $(filterModalId).find(".modal-del-btn").on("click", async function() { $(filterModalId).modal("hide"); @@ -119,7 +127,7 @@ $(filterModalId).find(".modal-del-btn").on("click", async function() { }); }); -getTableFiltersComponent(filterTableId).find(".table-del-btn").on("click", async function() { +getTableFiltersComponent(filterTableId).find(".js-tableDeleteBtn").on("click", async function() { const rows = getSelectedTableRows(filterTableId); const isMany = rows.length > 1; const names = rows.map(row => row.name); @@ -169,7 +177,7 @@ getTableFiltersComponent(filterTableId).find(".table-del-btn").on("click", async // region New/Edit Modal -$(filterTableId).closest('.js-tableBody').siblings('.js-tableFilters').on("click", ".table-new-btn", async function() { +$(filterTableId).closest('.js-tableBody').siblings('.js-tableFilters').on("click", ".js-tableAddBtn", async function() { await openDataModal(filterModalId, -1); }); @@ -195,9 +203,10 @@ $(document).ready(async function() { }); async function loadMatchingAlgorithms() { + const $input = $(filterModalId).find('[data-field="matching_algorithm"]'); const data = await ajaxRequest("/api/filters/", "OPTIONS"); data.actions.GET.matching_algorithm.choices.forEach(algorithm => { - $(filterModalId).find('[data-field="matching_algorithm"]').append($( + $input.append($( "