Trying in vain to fix filtering.
This commit is contained in:
parent
5a1f978aa2
commit
5ad652d372
2 changed files with 134 additions and 47 deletions
|
|
@ -25,6 +25,15 @@
|
|||
{% endfor %}
|
||||
</ul>
|
||||
|
||||
<div class="mt-3">
|
||||
<button type="button" class="btn btn-outline-primary btn-sm" onclick="addNewUpdate()">
|
||||
Add update
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<input type="hidden" name="updates" id="updatesPayload">
|
||||
<input type="hidden" name="delete_update_ids" id="deleteUpdatesPayload">
|
||||
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/github-markdown-css@5/github-markdown.min.css">
|
||||
<style>
|
||||
textarea.auto-md {
|
||||
|
|
@ -45,6 +54,16 @@
|
|||
<script src="https://cdn.jsdelivr.net/npm/marked/marked.min.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/dompurify/dist/purify.min.js"></script>
|
||||
<script>
|
||||
// Track deletions for existing notes
|
||||
const deletedUpdateIds = new Set();
|
||||
|
||||
function addNewUpdate() {
|
||||
// Create a temporary client-only id so we can manage the DOM before saving
|
||||
const tempId = `new_${Date.now()}`;
|
||||
const li = document.createElement('li');
|
||||
li.className = 'list-group-item';
|
||||
}
|
||||
|
||||
// Initial render
|
||||
document.addEventListener('DOMContentLoaded', () => {
|
||||
const ids = [ {% for n in items %} {{ n.id }}{% if not loop.last %}, {% endif %}{% endfor %} ];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue