Fomafix has uploaded a new change for review. https://gerrit.wikimedia.org/r/307688
Change subject: Adapt to changes in TOC in core ...................................................................... Adapt to changes in TOC in core * Use .toc instead of #toc in JavaScript to allow multiple TOCs. * Use .toc and #toc in CSS as in core. * Remove cellpadding because the TOC is no <table> anymore. Change-Id: I32844d5cefb2ee7b03676fc3f0acef5bb543b54c --- M modules/ext.toctree.css M modules/ext.toctree.js 2 files changed, 8 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/TocTree refs/changes/88/307688/1 diff --git a/modules/ext.toctree.css b/modules/ext.toctree.css index 5c2562c..609dd33 100644 --- a/modules/ext.toctree.css +++ b/modules/ext.toctree.css @@ -9,10 +9,12 @@ * @licence GNU General Public Licence 2.0 or later */ +.toc .tocUl, #toc .tocUl { padding-left: 2em; } +.toc.tocFloat, #toc.tocFloat { float: left; margin: 0 2em 1em 0; @@ -30,6 +32,7 @@ left: -2em; } +.noFloat .toc.tocFloat, .noFloat #toc.tocFloat { float: none; margin: 0; @@ -37,12 +40,14 @@ } /* toc-floated CSS */ +.toc.tocFloat, #toc.tocFloat { float: left; margin: 0 2em 1em 0; max-width: 20em; } +.noFloat .toc.tocFloat, .noFloat #toc.tocFloat { float: none; margin: 0; @@ -50,6 +55,7 @@ } @media print { + .toc.tocFloat, #toc.tocFloat { background: #ffffff; } @@ -58,6 +64,7 @@ display: none; } + .toc .tocUl, #toc .tocUl { padding-left: 0; } diff --git a/modules/ext.toctree.js b/modules/ext.toctree.js index 6f6c4d1..00a9c90 100644 --- a/modules/ext.toctree.js +++ b/modules/ext.toctree.js @@ -28,13 +28,12 @@ } function init( $content ) { - var $toc = $content.find( '#toc' ); + var $toc = $content.find( '.toc' ); if ( $toc.length > 0 ) { if ( mw.user.options.get( 'toc-floated' ) ) { $toc.addClass( 'tocFloat' ); } - $toc.attr( 'cellspacing', 0 ); var $mainUl = $toc.find( 'ul:first' ); var $mainList = $toc.find( 'li' ); -- To view, visit https://gerrit.wikimedia.org/r/307688 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I32844d5cefb2ee7b03676fc3f0acef5bb543b54c Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/TocTree Gerrit-Branch: master Gerrit-Owner: Fomafix <foma...@googlemail.com> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits