summaryrefslogtreecommitdiff
path: root/Gemfile
diff options
context:
space:
mode:
authorerdgeist <erdgeist@erdgeist.org>2026-07-13 03:48:28 +0200
committererdgeist <erdgeist@erdgeist.org>2026-07-13 03:48:28 +0200
commit5f56fa867f073d8d1aecbfbba4a340ea414cfb0d (patch)
tree5f39c0386b2e5819289e916ccdb67b987c2131fa /Gemfile
parent70653b681d10917b77dced08f577446ced7568f1 (diff)
Add loadOnFocus to initSearchPicker; asset search shows recent by defaulterdgeist-revive-events
initSearchPicker's input handler has always short-circuited on an empty term -- correct for every existing picker, none of which want results appearing before anything's typed. The asset picker does want exactly that (show the last few uploaded images without requiring a search first), so this adds an opt-in loadOnFocus option instead of changing the shared default: it fires once when the input gains focus with no term yet, reusing the same request/render path a real search uses rather than a separate code path. The AJAX call itself was pulled out into a named runSearch function so both triggers could share it without duplicating the success/render logic. RelatedAssetsController#search now treats a blank term as "show the most recently created, unattached images" (limit 5) rather than returning nothing, matching the new client behavior. A real search term still returns up to 10 name-matched results, unchanged.
Diffstat (limited to 'Gemfile')
0 files changed, 0 insertions, 0 deletions