r56230 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r56229‎ | r56230 | r56231 >
Date:13:44, 12 September 2009
Author:churchofemacs
Status:resolved (Comments)
Tags:
Comment:
Don't include TOC in the printable version if it is hidden (bug 482). Original patch by Shane King (r6350) was lost in r7073.
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/skins/common/wikibits.js (modified) (history)

Diff [purge]

Index: trunk/phase3/skins/common/wikibits.js
@@ -163,6 +163,7 @@
164164 }
165165
166166 function toggleToc() {
 167+ var tocmain = document.getElementById('toc');
167168 var toc = document.getElementById('toc').getElementsByTagName('ul')[0];
168169 var toggleLink = document.getElementById('togglelink');
169170
@@ -170,10 +171,12 @@
171172 changeText(toggleLink, tocHideText);
172173 toc.style.display = 'block';
173174 document.cookie = "hidetoc=0";
 175+ tocmain.className = '';
174176 } else {
175177 changeText(toggleLink, tocShowText);
176178 toc.style.display = 'none';
177179 document.cookie = "hidetoc=1";
 180+ tocmain.className = 'tochidden';
178181 }
179182 }
180183
Index: trunk/phase3/RELEASE-NOTES
@@ -491,6 +491,7 @@
492492 * (bug 20578) Wrong localized image metadata - duplicated string?
493493 * (bug 20556) Stub threshold's "other" <input> in Special:Preferences now has a
494494 correct type="text" parameter
 495+* (bug 482) Don't include TOC in the printable version if it has been hidden
495496
496497 == API changes in 1.16 ==
497498

Follow-up revisions

RevisionCommit summaryAuthorDate
r56280Follow-up on r56230 - toc class was lost http://de.wikipedia.org/w/index.php?...churchofemacs20:23, 13 September 2009

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r6350(bug 482) Don't print TOC box when hidden. Patch by Shane King (http://bugzil...vibber12:57, 23 November 2004
r7073Complete TOC recode: proper HTML list; CSS for layout; JS recode; hidden TOC ...tomgilder23:21, 15 January 2005

Comments

#Comment by Brion VIBBER (talk | contribs)   20:23, 29 September 2009

To clarify since I spent 5 minutes trying to figure out what the heck this meant -- this sets a class on the outer TOC box which is hidden in commonPrint.css; this hides the *entire* TOC box instead of just the *contents* of the box. The box itself and its header line remain visible on screen so the user can click the link to re-show it, but this isn't useful in print.

Status & tagging log