summaryrefslogtreecommitdiff
path: root/app/views/layouts/admin.html.erb
diff options
context:
space:
mode:
authorerdgeist <erdgeist@erdgeist.org>2026-06-30 03:36:51 +0200
committererdgeist <erdgeist@erdgeist.org>2026-06-30 03:44:44 +0200
commit97f51a73d4a2e7fb42ccf1107abf07e985cfa13a (patch)
treecb4c992d384020d878fe06dac1d4f2fc1905f8e2 /app/views/layouts/admin.html.erb
parentefc802b22eae15de5fc18465182628e379caf099 (diff)
Improve admin search overlay layout and behaviour
- Widen overlay (300px -> min(520px, 90vw)), centre instead of hardcoded left:400px, so it scales from mobile to desktop - Split title and unique_name into separate JSON fields and DOM elements; two-line result layout (bold title, small grey monospace path) instead of "Title (path)" wrapping awkwardly - Add small margin between title and path line - Fix event handler stacking: keyup/escape/outside-click handlers were being rebound on every display_toggle call. Moved all bindings to initialize(), display_toggle() now only shows/hides - Switch search input from keyup to input event, catching paste and cut via mouse which keyup misses - Add Escape key and outside-click to dismiss the overlay - Stop clearing search box and results on close; reopening now preserves prior search, matching standard search UI behaviour - Link search results to node_path instead of edit_node_path, since opening edit auto-locks the node - Add "press Enter to see all results" hint in dropdown - Disable browser autocomplete on search input
Diffstat (limited to 'app/views/layouts/admin.html.erb')
-rw-r--r--app/views/layouts/admin.html.erb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/views/layouts/admin.html.erb b/app/views/layouts/admin.html.erb
index c1cada3..4536693 100644
--- a/app/views/layouts/admin.html.erb
+++ b/app/views/layouts/admin.html.erb
@@ -46,7 +46,7 @@
46 <div id="search_widget" style="display: none;"> 46 <div id="search_widget" style="display: none;">
47 <div> 47 <div>
48 <%= form_tag admin_search_path, method: :get do %> 48 <%= form_tag admin_search_path, method: :get do %>
49 <span>Search: </span><%= text_field_tag :search_term %> 49 <span>Search: </span><%= text_field_tag :search_term, nil, autocomplete: "off" %>
50 <% end %> 50 <% end %>
51 </div> 51 </div>
52 <div id="search_results" style="display: none"> 52 <div id="search_results" style="display: none">