Subscription cards are now expandable
This commit is contained in:
@@ -1,5 +1,10 @@
|
||||
let isSortOptionsOpen = false;
|
||||
|
||||
function toggleOpenSubscription(subId) {
|
||||
const subscriptionElement = document.querySelector('.subscription[data-id="' + subId + '"]');
|
||||
subscriptionElement.classList.toggle('is-open');
|
||||
}
|
||||
|
||||
function toggleSortOptions() {
|
||||
const sortOptions = document.querySelector("#sort-options");
|
||||
sortOptions.classList.toggle("is-open");
|
||||
@@ -74,7 +79,8 @@ function fillEditFormFields(subscription) {
|
||||
modal.classList.add("is-open");
|
||||
}
|
||||
|
||||
function openEditSubscription(id) {
|
||||
function openEditSubscription(event, id) {
|
||||
event.stopPropagation();
|
||||
const url = `endpoints/subscription/get.php?id=${id}`;
|
||||
fetch(url)
|
||||
.then((response) => {
|
||||
|
||||
@@ -556,12 +556,6 @@ function switchTheme() {
|
||||
document.cookie = `theme=${themeChoice}; expires=Fri, 31 Dec 9999 23:59:59 GMT; path=/`;
|
||||
}
|
||||
|
||||
function setHideNameOnMobileCookie() {
|
||||
const hideNameCheckbox = document.querySelector("#hidename");
|
||||
const value = hideNameCheckbox.checked;
|
||||
document.cookie = `hideNameOnMobile=${value}; expires=Fri, 31 Dec 9999 23:59:59 GMT; path=/`;
|
||||
}
|
||||
|
||||
function setShowMonthlyPriceCookie() {
|
||||
const showMonthlyPriceCheckbox = document.querySelector("#monthlyprice");
|
||||
const value = showMonthlyPriceCheckbox.checked;
|
||||
|
||||
Reference in New Issue
Block a user