aboutsummaryrefslogtreecommitdiff
path: root/haddock-api
diff options
context:
space:
mode:
authorAlex Biehl <alexbiehl@gmail.com>2017-04-30 10:07:46 +0200
committerGitHub <noreply@github.com>2017-04-30 10:07:46 +0200
commit02787004ffeb16c9d848b77b6e23598b58596348 (patch)
treeadbd2c81257422c55997f3bf1f327712d93a018e /haddock-api
parent393920f125d1870c4fec5a09a5ac2dddc8da746b (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')
-rw-r--r--haddock-api/resources/html/haddock-util.js8
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)