Initial commit: Notes Manager App (notes.braetter-int.de)
- Python/Flask Backend - SQLAlchemy Models (notes, tasks, templates, users) - Gunicorn + Nginx Deploy-Konfiguration - Static Assets (CSS/JS) - Jinja2 Templates
This commit is contained in:
14
app/static/js/app.js
Executable file
14
app/static/js/app.js
Executable file
@@ -0,0 +1,14 @@
|
||||
document.addEventListener('DOMContentLoaded', () => {
|
||||
const content = document.getElementById('content');
|
||||
document.querySelectorAll('.template-btn').forEach(btn => {
|
||||
btn.addEventListener('click', () => {
|
||||
if (!content) return;
|
||||
const tpl = btn.getAttribute('data-template');
|
||||
if (content.value.trim() && !confirm('Vorhandenen Inhalt durch Vorlage ersetzen?')) {
|
||||
return;
|
||||
}
|
||||
content.value = tpl;
|
||||
content.focus();
|
||||
});
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user