diff options
author | Mark Lentczner <markl@glyphic.com> | 2010-08-17 18:19:52 +0000 |
---|---|---|
committer | Mark Lentczner <markl@glyphic.com> | 2010-08-17 18:19:52 +0000 |
commit | 2ba3903b23ef41e3a0b08579f23bb38405b96ab6 (patch) | |
tree | 1b66c6a5a9366b0b178365b4414bfcf2aa46843f /src/Haddock/Backends/Xhtml.hs | |
parent | d7b77654bc1a36cef5a305429cc015aafcb2d391 (diff) |
clean up collapser logics
javascript code for collapasble sections cleaned up
rewrote class utilities in javascript to be more robust
refactored utilities for generating collapsable sections
made toc be same color as synopsis
module list has needed clear attribute in CSS
Diffstat (limited to 'src/Haddock/Backends/Xhtml.hs')
-rw-r--r-- | src/Haddock/Backends/Xhtml.hs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/Haddock/Backends/Xhtml.hs b/src/Haddock/Backends/Xhtml.hs index d28c31cc..8ea55e9b 100644 --- a/src/Haddock/Backends/Xhtml.hs +++ b/src/Haddock/Backends/Xhtml.hs @@ -264,7 +264,7 @@ mkNode ss p (Node s leaf pkg short ts) = where modAttrs = case ts of [] -> [theclass "module"] - _ -> collapser p "module" + _ -> collapseControl p True "module" htmlModule = thespan ! modAttrs << (if leaf @@ -278,7 +278,7 @@ mkNode ss p (Node s leaf pkg short ts) = shortDescr = maybe noHtml origDocToHtml short htmlPkg = maybe noHtml (thespan ! [theclass "package"] <<) pkg - subtree = mkNodeList (s:ss) p ts ! [identifier p, theclass "show"] + subtree = mkNodeList (s:ss) p ts ! collapseSection p True "" -- | Turn a module tree into a flat list of full module names. E.g., @@ -504,10 +504,10 @@ ifaceToHtml maybe_source_url maybe_wiki_url iface unicode | no_doc_at_all = noHtml | otherwise = divSynposis $ - paragraph ! collapser "syn" "caption" << "Synopsis" +++ + paragraph ! collapseControl "syn" False "caption" << "Synopsis" +++ shortDeclList ( mapMaybe (processExport True linksInfo unicode) exports - ) ! ([identifier "syn"] ++ collapser "syn" "hide") + ) ! (collapseSection "syn" False "" ++ collapseToggle "syn") -- if the documentation doesn't begin with a section header, then -- add one ("Documentation"). |