Compare commits
2 Commits
bc626870d8
...
39e868daad
| Author | SHA1 | Date | |
|---|---|---|---|
| 39e868daad | |||
| 41e5f692f6 |
@ -39,41 +39,12 @@ def init_db():
|
|||||||
''')
|
''')
|
||||||
search_db.commit()
|
search_db.commit()
|
||||||
# If the table already existed, try to add the new columns.
|
# If the table already existed, try to add the new columns.
|
||||||
try:
|
# try:
|
||||||
cursor.execute("ALTER TABLE files ADD COLUMN hitcount INTEGER DEFAULT 0")
|
# cursor.execute("ALTER TABLE files ADD COLUMN category TEXT")
|
||||||
except sqlite3.OperationalError:
|
# except sqlite3.OperationalError:
|
||||||
# Likely the column already exists, so we ignore this error.
|
# # Likely the column already exists, so we ignore this error.
|
||||||
pass
|
# pass
|
||||||
try:
|
|
||||||
cursor.execute("ALTER TABLE files ADD COLUMN basefolder TEXT")
|
|
||||||
except sqlite3.OperationalError:
|
|
||||||
# Likely the column already exists, so we ignore this error.
|
|
||||||
pass
|
|
||||||
try:
|
|
||||||
cursor.execute("ALTER TABLE files ADD COLUMN category TEXT")
|
|
||||||
except sqlite3.OperationalError:
|
|
||||||
# Likely the column already exists, so we ignore this error.
|
|
||||||
pass
|
|
||||||
try:
|
|
||||||
cursor.execute("ALTER TABLE files ADD COLUMN titel TEXT")
|
|
||||||
except sqlite3.OperationalError:
|
|
||||||
# Likely the column already exists, so we ignore this error.
|
|
||||||
pass
|
|
||||||
try:
|
|
||||||
cursor.execute("ALTER TABLE files ADD COLUMN name TEXT")
|
|
||||||
except sqlite3.OperationalError:
|
|
||||||
# Likely the column already exists, so we ignore this error.
|
|
||||||
pass
|
|
||||||
try:
|
|
||||||
cursor.execute("ALTER TABLE files ADD COLUMN performance_date TEXT")
|
|
||||||
except sqlite3.OperationalError:
|
|
||||||
# Likely the column already exists, so we ignore this error.
|
|
||||||
pass
|
|
||||||
try:
|
|
||||||
cursor.execute("ALTER TABLE files ADD COLUMN site TEXT")
|
|
||||||
except sqlite3.OperationalError:
|
|
||||||
# Likely the column already exists, so we ignore this error.
|
|
||||||
pass
|
|
||||||
search_db.commit()
|
search_db.commit()
|
||||||
|
|
||||||
def scan_dir(directory):
|
def scan_dir(directory):
|
||||||
@ -200,16 +171,15 @@ def updatefileindex():
|
|||||||
date_match = re.search(r'(\d{1,2}\.\d{1,2}\.\d{2,4})', relative_path)
|
date_match = re.search(r'(\d{1,2}\.\d{1,2}\.\d{2,4})', relative_path)
|
||||||
if date_match:
|
if date_match:
|
||||||
date_str = date_match.group(1)
|
date_str = date_match.group(1)
|
||||||
# Convert to YYYY-MM-DD format
|
|
||||||
try:
|
|
||||||
date_obj = datetime.strptime(date_str, '%d.%m.%Y')
|
|
||||||
performance_date = date_obj.strftime('%d.%m.%Y')
|
|
||||||
except ValueError:
|
|
||||||
try:
|
|
||||||
date_obj = datetime.strptime(date_str, '%d.%m.%y')
|
|
||||||
performance_date = date_obj.strftime('%d.%m.%Y')
|
|
||||||
except ValueError:
|
|
||||||
performance_date = None
|
performance_date = None
|
||||||
|
for fmt in ('%d.%m.%Y', '%d.%m.%y', '%Y-%m-%d'):
|
||||||
|
try:
|
||||||
|
date_obj = datetime.strptime(date_str, fmt)
|
||||||
|
# Convert to ISO format YYYY-MM-DD
|
||||||
|
performance_date = date_obj.strftime('%Y-%m-%d')
|
||||||
|
break
|
||||||
|
except ValueError:
|
||||||
|
continue
|
||||||
else:
|
else:
|
||||||
performance_date = None
|
performance_date = None
|
||||||
|
|
||||||
@ -236,7 +206,52 @@ def updatefileindex():
|
|||||||
|
|
||||||
return "File index updated successfully"
|
return "File index updated successfully"
|
||||||
|
|
||||||
|
def convert_dates(search_db,
|
||||||
|
date_formats=('%d.%m.%Y', '%d.%m.%y')):
|
||||||
|
"""
|
||||||
|
Connects to the SQLite database at search_db, and for every row in table 'files':
|
||||||
|
- Reads the date from performance_date (expects 'dd.mm.yyyy' or 'dd.mm.yy').
|
||||||
|
- Parses it and reformats to ISO 'YYYY-MM-DD'.
|
||||||
|
- Updates the row (using id as primary key).
|
||||||
|
|
||||||
|
Only counts rows where the conversion was successful.
|
||||||
|
"""
|
||||||
|
# Regex to quickly filter out non-matching strings
|
||||||
|
date_regex = re.compile(r'^\d{1,2}\.\d{1,2}\.\d{2,4}$')
|
||||||
|
|
||||||
|
cur = search_db.cursor()
|
||||||
|
|
||||||
|
# Fetch all rows with a non-null date
|
||||||
|
cur.execute("SELECT id, performance_date FROM files")
|
||||||
|
rows = cur.fetchall()
|
||||||
|
|
||||||
|
converted_count = 0
|
||||||
|
|
||||||
|
for pk, raw_date in rows:
|
||||||
|
if not raw_date or not date_regex.match(raw_date):
|
||||||
|
continue
|
||||||
|
|
||||||
|
for fmt in date_formats:
|
||||||
|
try:
|
||||||
|
dt = datetime.strptime(raw_date, fmt)
|
||||||
|
new_date = dt.strftime('%Y-%m-%d')
|
||||||
|
# Only update if the reformatted date is different
|
||||||
|
if new_date != raw_date:
|
||||||
|
cur.execute(
|
||||||
|
"UPDATE files SET performance_date = ? WHERE id = ?",
|
||||||
|
(new_date, pk)
|
||||||
|
)
|
||||||
|
converted_count += 1
|
||||||
|
break # stop trying other formats
|
||||||
|
except ValueError:
|
||||||
|
continue
|
||||||
|
|
||||||
|
search_db.commit()
|
||||||
|
search_db.close()
|
||||||
|
print(f"Converted {converted_count} rows to ISO format.")
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
convert_dates(search_db)
|
||||||
init_db() # Initialize the database schema if it doesn't exist
|
init_db() # Initialize the database schema if it doesn't exist
|
||||||
updatefileindex() # Update the file index
|
updatefileindex() # Update the file index
|
||||||
search_db.close() # Close the search database connection
|
search_db.close() # Close the search database connection
|
||||||
|
|||||||
100
search.py
100
search.py
@ -17,87 +17,91 @@ def searchcommand():
|
|||||||
query = request.form.get("query", "").strip()
|
query = request.form.get("query", "").strip()
|
||||||
category = request.form.get("category", "").strip()
|
category = request.form.get("category", "").strip()
|
||||||
searchfolder = request.form.get("folder", "").strip()
|
searchfolder = request.form.get("folder", "").strip()
|
||||||
|
datefrom = request.form.get("datefrom", "").strip()
|
||||||
|
dateto = request.form.get("dateto", "").strip()
|
||||||
|
|
||||||
include_transcript = request.form.get("includeTranscript") in ["true", "on"]
|
include_transcript = request.form.get("includeTranscript") in ["true", "on"]
|
||||||
words = [w for w in query.split() if w]
|
words = [w for w in query.split() if w]
|
||||||
cursor = search_db.cursor()
|
cursor = search_db.cursor()
|
||||||
|
|
||||||
|
# Determine allowed basefolders
|
||||||
allowed_basefolders = list(session['folders'].keys())
|
allowed_basefolders = list(session['folders'].keys())
|
||||||
|
if searchfolder and searchfolder in allowed_basefolders:
|
||||||
# if the search folder is allowed to be searched, select it
|
|
||||||
# if not just allowed_basefolders rules apply
|
|
||||||
if searchfolder != "" and searchfolder in allowed_basefolders:
|
|
||||||
allowed_basefolders = [searchfolder]
|
allowed_basefolders = [searchfolder]
|
||||||
|
|
||||||
if not include_transcript:
|
# Build conditions and parameters
|
||||||
conditions = []
|
conditions = []
|
||||||
params = []
|
params = []
|
||||||
# Apply query words to relative_path and filename
|
|
||||||
for word in words:
|
|
||||||
conditions.append("(relative_path LIKE ? OR filename LIKE ?)")
|
|
||||||
params.extend([f"%{word}%", f"%{word}%"])
|
|
||||||
# Search category in filename
|
|
||||||
if category:
|
|
||||||
conditions.append("(filename LIKE ?)")
|
|
||||||
params.extend([f"%{category}%"])
|
|
||||||
# Only include rows where basefolder is in allowed_basefolders
|
|
||||||
if allowed_basefolders:
|
|
||||||
placeholders = ",".join("?" for _ in allowed_basefolders)
|
|
||||||
conditions.append(f"basefolder IN ({placeholders})")
|
|
||||||
params.extend(allowed_basefolders)
|
|
||||||
|
|
||||||
sql = "SELECT * FROM files"
|
|
||||||
if conditions:
|
|
||||||
sql += " WHERE " + " AND ".join(conditions)
|
|
||||||
|
|
||||||
cursor.execute(sql, params)
|
|
||||||
raw_results = cursor.fetchall()
|
|
||||||
results = [dict(row) for row in raw_results]
|
|
||||||
|
|
||||||
# Randomize the list before sorting to break ties randomly.
|
|
||||||
random.shuffle(results)
|
|
||||||
results.sort(key=lambda x: x["hitcount"], reverse=True)
|
|
||||||
|
|
||||||
|
# Choose fields for word search
|
||||||
|
if include_transcript:
|
||||||
|
fields = ['filename', 'transcript']
|
||||||
else:
|
else:
|
||||||
# Advanced search: include transcript. Count transcript hits.
|
fields = ['relative_path', 'filename']
|
||||||
conditions = []
|
|
||||||
params = []
|
|
||||||
# Apply query words for filename and transcript
|
|
||||||
for word in words:
|
for word in words:
|
||||||
conditions.append("(filename LIKE ? OR transcript LIKE ?)")
|
field_clauses = [f"{f} LIKE ?" for f in fields]
|
||||||
params.extend([f"%{word}%", f"%{word}%"])
|
conditions.append(f"({ ' OR '.join(field_clauses) })")
|
||||||
# Search category in filename
|
for _ in fields:
|
||||||
|
params.append(f"%{word}%")
|
||||||
|
|
||||||
|
# Category filter
|
||||||
if category:
|
if category:
|
||||||
conditions.append("(filename LIKE ?)")
|
conditions.append("filename LIKE ?")
|
||||||
params.extend([f"%{category}%"])
|
params.append(f"%{category}%")
|
||||||
# Only include rows where basefolder is in allowed_basefolders
|
|
||||||
|
# Basefolder filter
|
||||||
if allowed_basefolders:
|
if allowed_basefolders:
|
||||||
placeholders = ",".join("?" for _ in allowed_basefolders)
|
placeholders = ",".join("?" for _ in allowed_basefolders)
|
||||||
conditions.append(f"basefolder IN ({placeholders})")
|
conditions.append(f"basefolder IN ({placeholders})")
|
||||||
params.extend(allowed_basefolders)
|
params.extend(allowed_basefolders)
|
||||||
|
|
||||||
|
# Date range filters
|
||||||
|
if datefrom:
|
||||||
|
try:
|
||||||
|
conditions.append("performance_date >= ?")
|
||||||
|
params.append(datefrom)
|
||||||
|
except ValueError:
|
||||||
|
pass
|
||||||
|
if dateto:
|
||||||
|
try:
|
||||||
|
conditions.append("performance_date <= ?")
|
||||||
|
params.append(dateto)
|
||||||
|
except ValueError:
|
||||||
|
pass
|
||||||
|
# Ensure we only include entries with dates when filtering by date
|
||||||
|
if datefrom or dateto:
|
||||||
|
conditions.append("performance_date IS NOT NULL")
|
||||||
|
|
||||||
|
# Build and execute SQL
|
||||||
sql = "SELECT * FROM files"
|
sql = "SELECT * FROM files"
|
||||||
if conditions:
|
if conditions:
|
||||||
sql += " WHERE " + " AND ".join(conditions)
|
sql += " WHERE " + " AND ".join(conditions)
|
||||||
cursor.execute(sql, params)
|
cursor.execute(sql, params)
|
||||||
raw_results = cursor.fetchall()
|
raw_results = cursor.fetchall()
|
||||||
|
|
||||||
|
# Process results
|
||||||
results = []
|
results = []
|
||||||
for row in raw_results:
|
for row in raw_results:
|
||||||
result = dict(row)
|
record = dict(row)
|
||||||
transcript = result.get("transcript") or ""
|
if include_transcript:
|
||||||
total_hits = sum(transcript.lower().count(word.lower()) for word in words)
|
transcript = record.get('transcript', '') or ''
|
||||||
result["transcript_hits"] = total_hits
|
record['transcript_hits'] = sum(
|
||||||
result.pop("transcript", None)
|
transcript.lower().count(w.lower()) for w in words
|
||||||
results.append(result)
|
)
|
||||||
|
record.pop('transcript', None)
|
||||||
|
results.append(record)
|
||||||
|
|
||||||
# Randomize the list before sorting to break ties randomly.
|
# Randomize and sort
|
||||||
random.shuffle(results)
|
random.shuffle(results)
|
||||||
results.sort(key=lambda x: x["transcript_hits"], reverse=True)
|
key = 'transcript_hits' if include_transcript else 'hitcount'
|
||||||
|
results.sort(key=lambda x: x.get(key, 0), reverse=True)
|
||||||
|
|
||||||
|
# Limit results
|
||||||
results = results[:100]
|
results = results[:100]
|
||||||
return jsonify(results=results)
|
return jsonify(results=results)
|
||||||
|
|
||||||
|
|
||||||
def search():
|
def search():
|
||||||
allowed_basefolders = list(session['folders'].keys())
|
allowed_basefolders = list(session['folders'].keys())
|
||||||
title_short = app_config.get('TITLE_SHORT', 'Default Title')
|
title_short = app_config.get('TITLE_SHORT', 'Default Title')
|
||||||
|
|||||||
@ -7,6 +7,7 @@
|
|||||||
<title>{% block title %}Meine Links{% endblock %}</title>
|
<title>{% block title %}Meine Links{% endblock %}</title>
|
||||||
|
|
||||||
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet" />
|
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet" />
|
||||||
|
<link href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.10.5/font/bootstrap-icons.css" rel="stylesheet">
|
||||||
<link rel="stylesheet" href="{{ url_for('static', filename='theme.css') }}">
|
<link rel="stylesheet" href="{{ url_for('static', filename='theme.css') }}">
|
||||||
<link rel="stylesheet" href="{{ url_for('static', filename='app.css') }}">
|
<link rel="stylesheet" href="{{ url_for('static', filename='app.css') }}">
|
||||||
|
|
||||||
|
|||||||
@ -28,6 +28,7 @@
|
|||||||
|
|
||||||
<!-- Bootstrap CSS for modern styling -->
|
<!-- Bootstrap CSS for modern styling -->
|
||||||
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
|
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
|
||||||
|
<link href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.10.5/font/bootstrap-icons.css" rel="stylesheet">
|
||||||
|
|
||||||
<!-- Your CSS -->
|
<!-- Your CSS -->
|
||||||
<link rel="stylesheet" href="{{ url_for('static', filename='theme.css') }}">
|
<link rel="stylesheet" href="{{ url_for('static', filename='theme.css') }}">
|
||||||
@ -50,19 +51,39 @@
|
|||||||
</a>
|
</a>
|
||||||
<h1>{{ title_long }}</h1>
|
<h1>{{ title_long }}</h1>
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
<div class="search-container">
|
<div class="search-container">
|
||||||
<h1>Suche</h1>
|
<h1>Suche</h1>
|
||||||
<form id="searchForm" method="post" class="mb-4">
|
<form id="searchForm" method="post" class="mb-4">
|
||||||
|
|
||||||
|
<!-- Suchwörter -->
|
||||||
<div class="mb-3">
|
<div class="mb-3">
|
||||||
<label for="query" class="form-label">Suchwörter:</label>
|
<label for="query" class="h5 form-label">Suchwörter:</label>
|
||||||
<input type="text" id="query" name="query" class="form-control" required>
|
<input type="text" id="query" name="query" class="form-control" required>
|
||||||
</div>
|
</div>
|
||||||
<!-- Radio Button for Kategorie -->
|
|
||||||
|
<!-- Toggle für Suchoptionen -->
|
||||||
|
<div class="d-flex align-items-center mb-2">
|
||||||
|
<h2 class="h5 mb-0">Suchoptionen</h2>
|
||||||
|
<button class="btn btn-sm btn-link p-0"
|
||||||
|
type="button"
|
||||||
|
data-bs-toggle="collapse"
|
||||||
|
data-bs-target="#searchOptions"
|
||||||
|
aria-expanded="false"
|
||||||
|
aria-controls="searchOptions"
|
||||||
|
aria-label="Toggle Suchoptionen">
|
||||||
|
<i class="bi bi-plus-lg"></i>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Suchoptionen einklappbar -->
|
||||||
|
<div id="searchOptions" class="collapse border rounded p-3 mb-3">
|
||||||
|
|
||||||
|
<!-- Kategorie -->
|
||||||
<div class="mb-3">
|
<div class="mb-3">
|
||||||
<label class="form-label">Kategorie:</label>
|
<label class="form-label">Kategorie:</label>
|
||||||
<div>
|
<div>
|
||||||
<div class="form-check form-check-inline">
|
<div class="form-check form-check-inline">
|
||||||
<!-- "Alles" is default if nothing is selected -->
|
|
||||||
<input class="form-check-input" type="radio" name="category" id="none" value="" checked>
|
<input class="form-check-input" type="radio" name="category" id="none" value="" checked>
|
||||||
<label class="form-check-label" for="none">Alles</label>
|
<label class="form-check-label" for="none">Alles</label>
|
||||||
</div>
|
</div>
|
||||||
@ -88,7 +109,10 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- dropdown search folder-->
|
|
||||||
|
<hr>
|
||||||
|
|
||||||
|
<!-- In Ordner suchen -->
|
||||||
<div class="mb-3">
|
<div class="mb-3">
|
||||||
<label for="folder" class="form-label">In Ordner suchen:</label>
|
<label for="folder" class="form-label">In Ordner suchen:</label>
|
||||||
<select id="folder" name="folder" class="form-select">
|
<select id="folder" name="folder" class="form-select">
|
||||||
@ -98,23 +122,46 @@
|
|||||||
{% endfor %}
|
{% endfor %}
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<!-- Checkbox for transcript search -->
|
|
||||||
|
<hr>
|
||||||
|
|
||||||
|
<!-- Transkript durchsuchen -->
|
||||||
<div class="form-check mb-3">
|
<div class="form-check mb-3">
|
||||||
<input type="checkbox" class="form-check-input" id="includeTranscript" name="includeTranscript">
|
<input type="checkbox" class="form-check-input" id="includeTranscript" name="includeTranscript">
|
||||||
<label class="form-check-label" for="includeTranscript">Im Transkript suchen</label>
|
<label class="form-check-label" for="includeTranscript">Im Transkript suchen</label>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<hr>
|
||||||
|
|
||||||
|
<!-- Zeitraum -->
|
||||||
|
<div class="row g-2 mb-3">
|
||||||
|
<div class="col-12 col-md-6">
|
||||||
|
<label for="datefrom" class="form-label">Datum von:</label>
|
||||||
|
<input type="date" id="datefrom" name="datefrom" class="form-control">
|
||||||
|
</div>
|
||||||
|
<div class="col-12 col-md-6">
|
||||||
|
<label for="dateto" class="form-label">Datum bis:</label>
|
||||||
|
<input type="date" id="dateto" name="dateto" class="form-control">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<!-- Ende Suchoptionen -->
|
||||||
|
|
||||||
|
<!-- Buttons -->
|
||||||
<div class="mb-3">
|
<div class="mb-3">
|
||||||
<button type="submit" class="btn btn-primary">Suchen</button>
|
<button type="submit" class="btn btn-primary">Suchen</button>
|
||||||
<!-- Clear Button -->
|
<button type="button" id="clearBtn" class="btn btn-secondary ms-2">zurücksetzen</button>
|
||||||
<button type="button" id="clearBtn" class="btn btn-secondary ms-2">neue Suche</button>
|
<button type="button" id="backBtn" class="btn btn-secondary ms-2">beenden</button>
|
||||||
<!-- Back Button -->
|
|
||||||
<button type="button" id="backBtn" class="btn btn-secondary ms-2">zurück</button>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</form>
|
</form>
|
||||||
<!-- Container for AJAX-loaded results -->
|
|
||||||
|
<!-- AJAX-loaded results -->
|
||||||
<div id="results"></div>
|
<div id="results"></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
document.addEventListener('DOMContentLoaded', function() {
|
document.addEventListener('DOMContentLoaded', function() {
|
||||||
|
|
||||||
@ -209,6 +256,8 @@ document.addEventListener('DOMContentLoaded', function() {
|
|||||||
formData.append('query', query);
|
formData.append('query', query);
|
||||||
formData.append('category', category);
|
formData.append('category', category);
|
||||||
formData.append('folder', document.getElementById('folder').value);
|
formData.append('folder', document.getElementById('folder').value);
|
||||||
|
formData.append('datefrom', document.getElementById('datefrom').value);
|
||||||
|
formData.append('dateto', document.getElementById('dateto').value);
|
||||||
formData.append('includeTranscript', includeTranscript);
|
formData.append('includeTranscript', includeTranscript);
|
||||||
|
|
||||||
fetch('/searchcommand', {
|
fetch('/searchcommand', {
|
||||||
@ -241,12 +290,18 @@ document.addEventListener('DOMContentLoaded', function() {
|
|||||||
localStorage.removeItem("searchResponse");
|
localStorage.removeItem("searchResponse");
|
||||||
localStorage.removeItem("searchQuery");
|
localStorage.removeItem("searchQuery");
|
||||||
localStorage.removeItem("searchCategory");
|
localStorage.removeItem("searchCategory");
|
||||||
|
localStorage.removeItem("folder");
|
||||||
|
localStorage.removeItem("datefrom");
|
||||||
|
localStorage.removeItem("dateto");
|
||||||
localStorage.removeItem("searchIncludeTranscript");
|
localStorage.removeItem("searchIncludeTranscript");
|
||||||
// Reset form fields to defaults
|
// Reset form fields to defaults
|
||||||
document.getElementById('query').value = '';
|
document.getElementById('query').value = '';
|
||||||
document.querySelector('input[name="category"][value=""]').checked = true;
|
document.querySelector('input[name="category"][value=""]').checked = true;
|
||||||
const otherRadios = document.querySelectorAll('input[name="category"]:not([value=""])');
|
const otherRadios = document.querySelectorAll('input[name="category"]:not([value=""])');
|
||||||
otherRadios.forEach(radio => radio.checked = false);
|
otherRadios.forEach(radio => radio.checked = false);
|
||||||
|
document.getElementById('folder').value = ''; // Reset to "Alle"
|
||||||
|
document.getElementById('datefrom').value = ''; // Reset date from
|
||||||
|
document.getElementById('dateto').value = ''; // Reset date to
|
||||||
document.getElementById('includeTranscript').checked = false;
|
document.getElementById('includeTranscript').checked = false;
|
||||||
// Clear the results div
|
// Clear the results div
|
||||||
document.getElementById('results').innerHTML = '';
|
document.getElementById('results').innerHTML = '';
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user