Don't include TOC in the printable version if it is hidden (bug 482). Original patch...
authorTobias <churchofemacs@users.mediawiki.org>
Sat, 12 Sep 2009 13:44:23 +0000 (13:44 +0000)
committerTobias <churchofemacs@users.mediawiki.org>
Sat, 12 Sep 2009 13:44:23 +0000 (13:44 +0000)
RELEASE-NOTES
skins/common/wikibits.js

index bca7966..4c17d26 100644 (file)
@@ -491,6 +491,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
 * (bug 20578) Wrong localized image metadata - duplicated string?
 * (bug 20556) Stub threshold's "other" <input> in Special:Preferences now has a
   correct type="text" parameter
+* (bug 482) Don't include TOC in the printable version if it has been hidden
 
 == API changes in 1.16 ==
 
index 94753da..14305f5 100644 (file)
@@ -163,6 +163,7 @@ function changeText(el, newText) {
 }
 
 function toggleToc() {
+       var tocmain = document.getElementById('toc');
        var toc = document.getElementById('toc').getElementsByTagName('ul')[0];
        var toggleLink = document.getElementById('togglelink');
 
@@ -170,10 +171,12 @@ function toggleToc() {
                changeText(toggleLink, tocHideText);
                toc.style.display = 'block';
                document.cookie = "hidetoc=0";
+               tocmain.className = '';
        } else {
                changeText(toggleLink, tocShowText);
                toc.style.display = 'none';
                document.cookie = "hidetoc=1";
+               tocmain.className = 'tochidden';
        }
 }