From b67f753c941a7db9baa9b2c9ffe1a4efce5b47a3 Mon Sep 17 00:00:00 2001 From: Neil Mitchell Date: Fri, 12 Jan 2007 12:58:17 +0000 Subject: Make the search box in a form so that enter does the default search --- src/Haddock/Backends/Html.hs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src/Haddock') 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)) -- cgit v1.2.3