]> git.mjollnir.org Git - moodle.git/commit
I added all code to handle the cookies and the sideblock content, the icon and the...
authorurs_hunkler <urs_hunkler>
Sat, 5 Feb 2005 21:37:53 +0000 (21:37 +0000)
committerurs_hunkler <urs_hunkler>
Sat, 5 Feb 2005 21:37:53 +0000 (21:37 +0000)
commitc24a1ccd085b2ac48ef0d6d332ba170d66b0cdd3
tree2dda32998550558b246058b34bd8dbaa963c690e
parentb37cacae47f75669463139bfef0b5eb512b8316c
I added all code to handle the cookies and the sideblock content, the icon and the patches for hiding/showing the content of the sideblocks.

How it works:
_ within the "sideblockheading" a DIV with class="hide-show" holds a link calling the JS containerDisplaySwitching(). To the user it's represented by the icon "switch.gif" (a plus in a square) at the right end side of the header.
_ all content of the sideblock is surounded by a new <div class="blockcontent" id="'.$attributes['id']."_cont\">"
_ a call of the JS containerDisplaySwitching() changes the state of the appropriate DIV with the content to "display:none/inline" and writes this state into a cookie.
_ at the end of every block I added a call to the JS "containerDisplaySet()". This reads the block's state and hides the content or leaves it visible with every page load.
_ in the stylesheet I added the positioning of the icon:
.sideblockheading .hide-show {
    float:right;
}
.sideblockheading a img.hide-show-image {
    padding-top:0.25em;
}
lib/container.js [new file with mode: 0644]
lib/cookies.js [new file with mode: 0644]
lib/javascript.php
lib/weblib.php
pix/t/switch.gif [new file with mode: 0644]
theme/orangewhite/styles_layout.css
theme/standard/styles_layout.css