From 474109a5df0a06f5343ab184838fe2d80e3872a8 Mon Sep 17 00:00:00 2001
From: Jake Vanderwerf <get@jakevanderwerf.ca>
Date: Sun, 11 Jan 2026 19:23:20 +0000
Subject: [PATCH] =Fixed timeline CRUD.js issue where this.activeItem was set null when we still needed it
---
assets/js/concise/CRUD.js | 7 +------
1 files changed, 1 insertions(+), 6 deletions(-)
diff --git a/assets/js/concise/CRUD.js b/assets/js/concise/CRUD.js
index 9e2e9bd..5815706 100644
--- a/assets/js/concise/CRUD.js
+++ b/assets/js/concise/CRUD.js
@@ -145,7 +145,6 @@
this.modals[name].subscribe((event, data) => {
switch (event) {
case 'modal-close':
- this.activeItem = null;
const formId = this.ui.modals[name].form.dataset.formId;
if (formId) {
this.formController.cleanupForm(formId);
@@ -599,7 +598,6 @@
let query = e.target.value.trim();
let key = `${this.content}-search`;
- console.log('Maybe search', query);
if (query.length === 0) {
this.deleteFilter('search', '');
return;
@@ -613,7 +611,6 @@
window.debouncer.schedule(
key,
() => {
- console.log('Searching for', query);
this.a11y.announce(`Searching for "${query}"...`);
this.store.setFilters({ search: query, page: 1 });
},
@@ -812,7 +809,7 @@
openEditModal(itemID) {
let item = this.store.get(parseInt(itemID));
if (!item) return;
- this.activeItem = itemID;
+ this.activeItem = item.id;
this.ui.modals.edit.modal.dataset.itemId = itemID;
this.ui.modals.edit.modal.dataset.content = this.content;
this.ui.modals.edit.h2.textContent = `Editing ${item.fields.post_title === '' ? this.singular : item.fields.post_title}`;
@@ -1439,8 +1436,6 @@
let el = this.ui.filters[name];
if (typeof el === 'object') {
if (!Object.hasOwn(this.ui.filters[name], value)) {
- console.log('Sub filter el not found: ', value);
- console.log(name);
return false;
}
el = this.ui.filters[name][value];
--
Gitblit v1.10.0