diff options
author | Mark Lentczner <markl@glyphic.com> | 2010-08-14 03:44:46 +0000 |
---|---|---|
committer | Mark Lentczner <markl@glyphic.com> | 2010-08-14 03:44:46 +0000 |
commit | 9931362030c9536caf5c1d04a34d428b59bf3b04 (patch) | |
tree | 3cf8a28b8d0b8b34bb78b327affbff359b319dd2 /src/Haddock/Backends/Xhtml/Utils.hs | |
parent | d7f6809cabbface09dc1b016591774b729413f00 (diff) |
build style menu in javascript
moved to javascript, so as to not polute the content with the style menu
removed menu building code in Themes.hs
removed onclick in Utils.hs
changed text of button in header from "Source code" to "Source"
more consistent with links in rest of page
Diffstat (limited to 'src/Haddock/Backends/Xhtml/Utils.hs')
-rw-r--r-- | src/Haddock/Backends/Xhtml/Utils.hs | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/src/Haddock/Backends/Xhtml/Utils.hs b/src/Haddock/Backends/Xhtml/Utils.hs index edb5e659..d3b75b43 100644 --- a/src/Haddock/Backends/Xhtml/Utils.hs +++ b/src/Haddock/Backends/Xhtml/Utils.hs @@ -24,7 +24,6 @@ module Haddock.Backends.Xhtml.Utils ( hsep, - onclick, collapser, collapseId, ) where @@ -153,10 +152,6 @@ ubxparens :: Html -> Html ubxparens h = toHtml "(#" +++ h +++ toHtml "#)" -onclick :: String -> HtmlAttr -onclick = strAttr "onclick" - - dcolon, arrow, darrow, forallSymbol :: Bool -> Html dcolon unicode = toHtml (if unicode then "∷" else "::") arrow unicode = toHtml (if unicode then "→" else "->") @@ -186,7 +181,7 @@ linkedAnchor n = anchor ! [href ('#':n)] -- use cookies from JavaScript to have a more persistent state. collapser :: String -> String -> [HtmlAttr] -collapser id_ classes = [ theclass cs, onclick js ] +collapser id_ classes = [ theclass cs, strAttr "onclick" js ] where cs = unwords (words classes ++ ["collapser"]) js = "toggleSection(this,'" ++ id_ ++ "')" |