class names update for javascript purposed classes
Some checks are pending
Build and Push Docker Image / build (push) Waiting to run

This commit is contained in:
Corban-Lee Jones 2024-11-03 22:40:53 +00:00
parent 887589216b
commit 7ec8e0ab5a
3 changed files with 22 additions and 15 deletions

View File

@ -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($(
"<option>",
{
text: algorithm.display_name,
@ -205,4 +214,8 @@ async function loadMatchingAlgorithms() {
}
));
});
if ($input.next('.corbz-select-container').length) {
$input.next('.corbz-select-container').remove();
$input.initCorbzSelect();
}
}

View File

@ -161,7 +161,7 @@ $(styleModalId).find(".modal-del-btn").on("click", async function() {
});
});
getTableFiltersComponent(styleTableId).find(".table-del-btn").on("click", async function() {
getTableFiltersComponent(styleTableId).find(".js-tableDeleteBtn").on("click", async function() {
const rows = getSelectedTableRows(styleTableId);
const isMany = rows.length > 1;
@ -237,7 +237,7 @@ getTableFiltersComponent(styleTableId).find(".table-del-btn").on("click", async
// region New/Edit Modal
$(styleTableId).closest(".js-tableBody").siblings(".js-tableFilters").on("click", ".table-new-btn", async function() {
$(styleTableId).closest(".js-tableBody").siblings(".js-tableFilters").on("click", ".js-tableAddBtn", async function() {
await openDataModal(styleModalId, -1);
});

View File

@ -33,12 +33,6 @@ function initSubscriptionsModule() {
className: "col-icon",
render: data => renderPopoverBadgesColumn(data.map(item => item.name), "bi-funnel")
},
{
title: "Rules",
data: "unique_rules_detail",
className: "col-icon",
render: data => renderPopoverBadgesColumn(data.map(item => item.name), "bi-vr")
},
{
title: "Style",
data: "message_style_detail",
@ -152,7 +146,7 @@ $(subModalId).find(".modal-del-btn").on("click", async function() {
});
})
getTableFiltersComponent(subTableId).find(".table-del-btn").on("click", async function() {
getTableFiltersComponent(subTableId).find(".js-tableDeleteBtn").on("click", async function() {
const rows = getSelectedTableRows(subTableId);
const names = rows.map(row => row.name);
const isMany = names.length > 1;
@ -169,7 +163,7 @@ getTableFiltersComponent(subTableId).find(".table-del-btn").on("click", async fu
title: `Delete ${isMany ? "Many Subscriptions" : "Subscription"}`,
texts: [
{
content: `<p>Do you wish to permanently delete ${isMany ? "these" : "these"} subscription${isMany ? "s" : ""}?</p>`,
content: `<p>Do you wish to permanently delete ${isMany ? "these" : "this"} subscription${isMany ? "s" : ""}?</p>`,
html: true
},
{
@ -196,7 +190,7 @@ getTableFiltersComponent(subTableId).find(".table-del-btn").on("click", async fu
// region New/Edit Modal
$(subTableId).closest('.js-tableBody').siblings('.js-tableFilters').on("click", ".table-new-btn", async function() {
$(subTableId).closest('.js-tableBody').siblings('.js-tableFilters').on("click", ".js-tableAddBtn", async function() {
await openSubModal(-1);
});