From 02787004ffeb16c9d848b77b6e23598b58596348 Mon Sep 17 00:00:00 2001 From: Alex Biehl Date: Sun, 30 Apr 2017 10:07:46 +0200 Subject: Correctly remember collapsed sections (#608) Now the "collapsed" cookie stores which sections have changed state instead of which are collapsed. --- haddock-api/resources/html/haddock-util.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'haddock-api/resources') 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) -- cgit v1.2.3