From d464a5fbd0cdf4a883b9b20aaf213b2e9677ec38 Mon Sep 17 00:00:00 2001 From: Eli Ribble Date: Fri, 6 Feb 2026 16:55:29 +0000 Subject: [PATCH] Show a tooltip when disabling the lookup button on status page And fix some auto-formatting --- .../static/js/address-or-report-suggestion.js | 21 +-- rmo/template/base.html | 8 +- rmo/template/status.html | 172 +++++++++++------- 3 files changed, 121 insertions(+), 80 deletions(-) diff --git a/html/static/js/address-or-report-suggestion.js b/html/static/js/address-or-report-suggestion.js index cf82e66a..6c40eec2 100644 --- a/html/static/js/address-or-report-suggestion.js +++ b/html/static/js/address-or-report-suggestion.js @@ -164,24 +164,23 @@ class AddressOrReportInput extends HTMLElement { this.shadowRoot.querySelectorAll('.suggestion-item').forEach(el => { el.addEventListener('click', e => { const type = el.dataset.type; + let detail = null; if (type == "report") { const index = parseInt(el.dataset.index); - const report = this._reports[index]; - this.value = _formatReportID(report.id); + detail = this._reports[index]; + this.value = _formatReportID(detail.id); this._suggestionsContainer.innerHTML = ""; } else if (type == "address") { const index = parseInt(el.dataset.index); - const address = this._addresses[index]; - this.SetValue(address); + detail = this._addresses[index]; + this.SetValue(detail); // Dispatch custom event - this.dispatchEvent(new CustomEvent('address-selected', { - bubbles: true, - composed: true, // Allows event to cross shadow DOM boundary - detail: { - location: address - } - })); } + this.dispatchEvent(new CustomEvent('suggestion-selected', { + bubbles: true, + composed: true, // Allows event to cross shadow DOM boundary + detail: detail, + })); }); }); } diff --git a/rmo/template/base.html b/rmo/template/base.html index 327dc56c..d96bdd81 100644 --- a/rmo/template/base.html +++ b/rmo/template/base.html @@ -15,6 +15,7 @@ {{ block "extraheader" . }}{{ end }} - - - - - +{{ define "title" }}Status{{ end }} +{{ define "extraheader" }} + + + + + + -{{end}} -{{define "content"}} -{{if (eq .District nil)}} - {{template "header-rmo" .}} -{{else}} - {{template "header-district" .District}} -{{end}} -
- -