It looks to me that the line in collapsiblock.js is not behaving quite as promised.
if (status == 3 || $.cookie('collapsiblock-' + id) == 1) {
$(titleElt).addClass('collapsiblockCollapsed');
$(titleElt.target).slideUp();
}
else {
$.cookie('collapsiblock-' + id, 0);
}
Cookies are going good if the block is 'expandable by default'
But If I have it 'hidden by default' to start (status 3) , the user cannot lock it open later.
I was going to try and fix it, but wasn't sure if I was going to have to contest with the difference between status=0 and status=undefined ... I't prefer using constants there for the cookie value.
It was slightly puzzling until I spent a while in firebug.
Comments
Comment #1
nedjoThanks for noting the issue, a fix would be welcome, as would introducing constants for the cookie values.
Comment #2
xstevex commentedJust wondering if there was a solution found to this. I really want to have all blocks collapsed by default on my site but to remember if the person opens them, rather than change back.
Steve.
Comment #3
dman commentedThis is still open, so I'd better fix it...
Looking at it again, I see that I don't care about undefined vs 0, and that constants are overkill, as they would have to be declared bith serverside and clientside. So here's the fix.
Comment #4
dman commentedpatch!
Comment #5
nedjoThis looks good. I haven't tested. If you have and are confident it's working, pls apply to HEAD and DRUPAL-5.
Altogether I believe the cookie approach is wrong. I'll open a separate issue for that.
Comment #6
nedjoNew tangentially related issue opened: http://drupal.org/node/210958
Comment #7
dman commentedOK.I got that (slightly modified) into HEAD and DRUPAL-5
I'd missed the earlier changes for that active menu exposer, but caught the difference on the fresh check-outs.
Works on my test...
Comment #8
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.