r57403 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r57402‎ | r57403 | r57404 >
Date:20:41, 5 October 2009
Author:tparscal
Status:resolved
Tags:
Comment:
Fixes bug that cause the table of contents to be rendered partially offscreen in IE7. Also added some CSS rules to removed bullets from list items in the table of contents for IE7.
Modified paths:
  • /trunk/extensions/UsabilityInitiative/css/wikiEditor.toc.css (modified) (history)
  • /trunk/extensions/UsabilityInitiative/js/plugins/jquery.wikiEditor.toc.js (modified) (history)

Diff [purge]

Index: trunk/extensions/UsabilityInitiative/css/wikiEditor.toc.css
@@ -22,6 +22,10 @@
2323 padding: 0;
2424 margin: 0.5em 1em;
2525 list-style: none;
 26+ /* IE needs to be told in great detail how to act, or it misbehaves */
 27+ list-style-image: none;
 28+ list-style-position: outside;
 29+ list-style-type: none;
2630 }
2731 .wikiEditor-ui-toc ul ul {
2832 padding: 0;
Index: trunk/extensions/UsabilityInitiative/js/plugins/jquery.wikiEditor.toc.js
@@ -26,6 +26,8 @@
2727 context.modules.$toc = $( '<div />' )
2828 .addClass( 'wikiEditor-ui-toc' )
2929 .attr( 'id', 'wikiEditor-ui-toc' );
 30+ // If we ask for this later (after we insert the TOC) then in IE this measurement will be incorrect
 31+ var height = context.$ui.find( '.wikiEditor-ui-bottom' ).height()
3032 context.$ui.find( '.wikiEditor-ui-bottom' )
3133 .append( context.modules.$toc );
3234 context.modules.$toc.height(
@@ -33,10 +35,7 @@
3436 );
3537 // Make some css modifications to make room for the toc on the right...
3638 // Perhaps this could be configurable?
37 - context.modules.$toc
38 - .css( { 'width': '12em',
39 - 'marginTop': -( context.$ui.find( '.wikiEditor-ui-bottom' ).height() )
40 - } );
 39+ context.modules.$toc.css( { 'width': '12em', 'marginTop': -( height ) } );
4140 context.$ui.find( '.wikiEditor-ui-text' )
4241 .css( ( $( 'body.rtl' ).size() ? 'marginLeft' : 'marginRight' ), '12em' );
4342 // Add the TOC to the document

Follow-up revisions

RevisionCommit summaryAuthorDate
r57409EditToolbar: (bug 20900) Tables inserted on top regardless of cursor position...catrope21:43, 5 October 2009
r57719wmf-deployment: Merge babaco fixes from trunk...catrope20:20, 14 October 2009

Status & tagging log