diff options
author | Neil Mitchell <http://www.cs.york.ac.uk/~ndm/> | 2007-01-12 12:58:17 +0000 |
---|---|---|
committer | Neil Mitchell <http://www.cs.york.ac.uk/~ndm/> | 2007-01-12 12:58:17 +0000 |
commit | b67f753c941a7db9baa9b2c9ffe1a4efce5b47a3 (patch) | |
tree | 243f43ba1d31942d3904b3eb75acee7bdabe6cd0 | |
parent | 4bdbe1b8f953b0df172e26ac1ae3010fe0bbe04e (diff) |
Make the search box in a form so that enter does the default search
-rw-r--r-- | src/Haddock/Backends/Html.hs | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/Haddock/Backends/Html.hs b/src/Haddock/Backends/Html.hs index a57236dc..4a8c41d8 100644 --- a/src/Haddock/Backends/Html.hs +++ b/src/Haddock/Backends/Html.hs @@ -448,10 +448,12 @@ ppHtmlIndex odir doctitle maybe_package maybe_html_help_format search_box = tda [colspan 2, thestyle "padding-top:5px;"] << search where search :: Html - search = "Search: " +++ input ! [identifier "searchbox", strAttr "onkeyup" "quick_search()"] - +++ " " +++ input ! [value "Search", thetype "button", onclick "full_search()"] - +++ " " +++ thespan ! [identifier "searchmsg"] << " " - + search = form ! [strAttr "onsubmit" "full_search(); return false;", action ""] << ( + "Search: " + +++ input ! [identifier "searchbox", strAttr "onkeyup" "quick_search()"] + +++ " " +++ input ! [value "Search", thetype "submit"] + +++ " " +++ thespan ! [identifier "searchmsg"] << " ") + index_html = td << setTrClass (table ! [identifier "indexlist", cellpadding 0, cellspacing 5] << aboves (map indexElt index)) |