diff options
| author | erdgeist <erdgeist@erdgeist.org> | 2026-08-20 12:50:30 +0200 |
|---|---|---|
| committer | erdgeist <erdgeist@erdgeist.org> | 2026-08-20 12:50:30 +0200 |
| commit | a8cf725312d245d8d1f1df0fff22718975ce249e (patch) | |
| tree | c5084dfe79e6eac647b0253a305361aa8ff6efbc /public/javascripts/admin_search.js | |
| parent | 4df88b601b1900c287051d827eaff46f498f60d0 (diff) | |
Add redirect ui in in nodes#edit and apply some minor cleanup
Also give search inputs a magnifier and a clear control: input_group
wraps a field with an icon and, where clearing is meaningful, a
button that empties it and any hidden companion named by data-clears.
Clean up some inconistency between field hints presented as p and as
span.
Remove stray console.log.
Diffstat (limited to 'public/javascripts/admin_search.js')
| -rw-r--r-- | public/javascripts/admin_search.js | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/public/javascripts/admin_search.js b/public/javascripts/admin_search.js index e20e511a..746cecc1 100644 --- a/public/javascripts/admin_search.js +++ b/public/javascripts/admin_search.js | |||
| @@ -263,6 +263,20 @@ move_to_search = { | |||
| 263 | } | 263 | } |
| 264 | }; | 264 | }; |
| 265 | 265 | ||
| 266 | redirect_search = { | ||
| 267 | initialize_search : function() { | ||
| 268 | initSearchPicker({ | ||
| 269 | inputSelector: "#redirect_search_term", | ||
| 270 | resultsSelector: "#redirect_search_results", | ||
| 271 | showRestricted: true, | ||
| 272 | onSelect: function(node) { | ||
| 273 | $("#redirect_search_term").val(node.title); | ||
| 274 | $("#page_redirect_node_id").val(node.node_id); | ||
| 275 | } | ||
| 276 | }); | ||
| 277 | } | ||
| 278 | }; | ||
| 279 | |||
| 266 | restore_search = { | 280 | restore_search = { |
| 267 | initialize_search : function() { | 281 | initialize_search : function() { |
| 268 | initSearchPicker({ | 282 | initSearchPicker({ |
