From 1606b2a13efd78f69acd359bd6ff1024a75f4a8a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hugo=20H=C3=B6rnquist?= Date: Thu, 27 Jul 2023 22:36:20 +0200 Subject: Add hover text in search result view. Hovering a field now shows its text. Adding title for empty elements isn't the best (when data is empty, usualy due to someone not filling in the subject field), but having empty tags is just as bad. --- mu4web/main.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/mu4web/main.py b/mu4web/main.py index 776f655..3cc39dc 100644 --- a/mu4web/main.py +++ b/mu4web/main.py @@ -418,7 +418,9 @@ def search_result(q: str, by: Optional[str], direction: str) -> HTML: if data and key == 'date': dt = datetime.fromtimestamp(int(data)) data = dt.strftime('%Y-%m-%d %H:%M') - rowdata.append(('td', ('a', {'href': '/?id=' + row['msgid']}, data))) + rowdata.append(('td', ('a', {'href': '/?id=' + row['msgid'], + 'title': data or '' + }, data))) body.append(('tr', rowdata)) if len(rows) == 0: -- cgit v1.2.3