mirror of
https://github.com/magicbug/Cloudlog
synced 2026-08-13 17:49:35 -04:00
Introduces note categories with support for filtering, assigning, and managing categories. Adds category selection and creation to add/edit forms, category filtering to the notes list, and modals for deleting/merging categories and confirming note deletion. Updates controller and model logic to handle categories, and improves UI for notes management.
18 lines
695 B
JavaScript
18 lines
695 B
JavaScript
(function() {
|
|
// Wire up delete confirmation modal for notes list/view pages
|
|
var deleteModal = document.getElementById('deleteNoteModal');
|
|
if (!deleteModal) return;
|
|
|
|
deleteModal.addEventListener('show.bs.modal', function (event) {
|
|
var button = event.relatedTarget;
|
|
if (!button) return;
|
|
var noteId = button.getAttribute('data-note-id');
|
|
var noteTitle = button.getAttribute('data-note-title') || '';
|
|
|
|
var idField = deleteModal.querySelector('#deleteNoteId');
|
|
if (idField) idField.value = noteId || '';
|
|
|
|
var titleSpan = deleteModal.querySelector('#deleteNoteTitle');
|
|
if (titleSpan) titleSpan.textContent = noteTitle ? '"' + noteTitle + '"' : '';
|
|
});
|
|
})();
|