diff options
author | Alex Biehl <alexbiehl@gmail.com> | 2017-04-30 10:07:46 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-04-30 10:07:46 +0200 |
commit | 02787004ffeb16c9d848b77b6e23598b58596348 (patch) | |
tree | adbd2c81257422c55997f3bf1f327712d93a018e /haddock-api/resources/html/haddock-util.js | |
parent | 393920f125d1870c4fec5a09a5ac2dddc8da746b (diff) |
Correctly remember collapsed sections (#608)
Now the "collapsed" cookie stores which sections have changed state instead of which are collapsed.
Diffstat (limited to 'haddock-api/resources/html/haddock-util.js')
-rw-r--r-- | haddock-api/resources/html/haddock-util.js | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/haddock-api/resources/html/haddock-util.js b/haddock-api/resources/html/haddock-util.js index 05bdaef5..967e2026 100644 --- a/haddock-api/resources/html/haddock-util.js +++ b/haddock-api/resources/html/haddock-util.js @@ -52,17 +52,17 @@ function toggleSection(id) { var b = toggleShow(document.getElementById("section." + id)); toggleCollapser(document.getElementById("control." + id), b); - rememberCollapsed(id, b); + rememberCollapsed(id); return b; } var collapsed = {}; -function rememberCollapsed(id, b) +function rememberCollapsed(id) { - if(b) + if(collapsed[id]) delete collapsed[id] else - collapsed[id] = null; + collapsed[id] = true; var sections = []; for(var i in collapsed) |