refactor: standardize 'prevent_default' helpers and batch format modules

- Renamed internal 'preventDefault' helpers to 'prevent_default' for project-wide snake_case consistency.
- Corrected native event method calls from 'prevent_default()' to 'preventDefault()' to resolve runtime TypeErrors.
- Applied batch formatting (printWidth: 80) to Journals and IDAA Recovery Meetings modules.
- Removed deprecated 'preventDefault' imports from svelte/legacy.
- Fixed Journal Entry 404 by migrating loader to V3 API helper.
This commit is contained in:
Scott Idem
2026-02-06 14:45:53 -05:00
parent 5bd4f7454d
commit 7ce5e1f825
24 changed files with 1083 additions and 479 deletions

View File

@@ -116,7 +116,7 @@
window.open('/journals');
// } else {
// // Left click - toggle menu
// event.prevent_default(); // Prevent default middle-click behavior
// event.preventDefault(); // Prevent default middle-click behavior
// show_menu__all_journals = !show_menu__all_journals;
}
}}

View File

@@ -60,12 +60,13 @@ export async function load({ params, parent }) {
);
}
// Load event journal entry object
const load_journal_entry_obj = await journals_func.load_ae_obj_id__journal_entry({
api_cfg: ae_acct.api,
journal_entry_id: journal_entry_id,
try_cache: true,
log_lvl: log_lvl
});
const load_journal_entry_obj =
await journals_func.load_ae_obj_id__journal_entry({
api_cfg: ae_acct.api,
journal_entry_id: journal_entry_id,
try_cache: true,
log_lvl: log_lvl
});
// const load_journal_entry_obj = await load_ae_obj_id({
// api_cfg: ae_acct.api,

View File

@@ -78,7 +78,7 @@
function prevent_default<T extends Event>(fn: (event: T) => void) {
return function (event: T) {
event.prevent_default();
event.preventDefault();
fn(event);
};
}

View File

@@ -44,25 +44,25 @@
});
function handle_drag_enter(e: DragEvent) {
e.prevent_default();
e.preventDefault();
e.stopPropagation();
is_dragging = true;
}
function handle_drag_leave(e: DragEvent) {
e.prevent_default();
e.preventDefault();
e.stopPropagation();
is_dragging = false;
}
function handle_drag_over(e: DragEvent) {
e.prevent_default();
e.preventDefault();
e.stopPropagation();
is_dragging = true;
}
function handle_drop(e: DragEvent) {
e.prevent_default();
e.preventDefault();
e.stopPropagation();
is_dragging = false;