r71181 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r71180‎ | r71181 | r71182 >
Date:00:35, 17 August 2010
Author:tparscal
Status:ok
Tags:
Comment:
Fixed syntax errors
Modified paths:
  • /branches/resourceloader/phase3/resources/mediawiki/legacy/mediawiki.legacy.IEFixes.js (modified) (history)

Diff [purge]

Index: branches/resourceloader/phase3/resources/mediawiki/legacy/mediawiki.legacy.IEFixes.js
@@ -35,29 +35,29 @@
3636 /* Functions */
3737
3838 'hookit': function() {
39 - if ( !doneIETransform && document.getElementById && document.getElementById( 'bodyContent' ) ) {
40 - doneIETransform = true;
41 - relativeforfloats();
42 - fixalpha();
 39+ if ( !mw.legacy.doneIETransform && document.getElementById && document.getElementById( 'bodyContent' ) ) {
 40+ mw.legacy.doneIETransform = true;
 41+ mw.legacy.relativeforfloats();
 42+ mw.legacy.fixalpha();
4343 }
4444 },
4545 /**
4646 * Fixes PNG alpha transparency
4747 */
48 - 'fixalpha': ( logoId ) {
 48+ 'fixalpha': function( logoId ) {
4949 // bg
50 - if ( isMSIE55 && !doneIEAlphaFix ) {
 50+ if ( mw.legacy.isMSIE55 && !mw.legacy.doneIEAlphaFix ) {
5151 var plogo = document.getElementById( logoId || 'p-logo' );
5252 if ( !plogo ) {
5353 return;
5454 }
55 - var logoa = plogo.getElementsByTagName('a')[0];
 55+ var logoa = plogo.getElementsByTagName( 'a' )[0];
5656 if ( !logoa ) {
5757 return;
5858 }
5959 var bg = logoa.currentStyle.backgroundImage;
6060 var imageUrl = bg.substring( 5, bg.length - 2 );
61 - doneIEAlphaFix = true;
 61+ mw.legacy.doneIEAlphaFix = true;
6262 if ( imageUrl.substr( imageUrl.length - 4 ).toLowerCase() == '.png' ) {
6363 var logospan = logoa.appendChild( document.createElement( 'span' ) );
6464 logoa.style.backgroundImage = 'none';
@@ -92,8 +92,8 @@
9393 var tables = bc.getElementsByTagName( 'table' );
9494 var divs = bc.getElementsByTagName( 'div' );
9595 }
96 - setrelative( tables );
97 - setrelative( divs );
 96+ mw.legacy.setrelative( tables );
 97+ mw.legacy.setrelative( divs );
9898 },
9999 'setrelative': function ( nodes ) {
100100 var i = 0;
@@ -108,7 +108,7 @@
109109 }
110110 },
111111 'onbeforeprint': function() {
112 - expandedURLs = [];
 112+ mw.legacy.expandedURLs = [];
113113 var contentEl = document.getElementById( 'content' );
114114 if ( contentEl ) {
115115 var allLinks = contentEl.getElementsByTagName( 'a' );
@@ -118,15 +118,15 @@
119119 var expandedText = document.createTextNode( ' (' + allLinks[i].href + ')' );
120120 expandedLink.appendChild( expandedText );
121121 allLinks[i].parentNode.insertBefore( expandedLink, allLinks[i].nextSibling );
122 - expandedURLs[i] = expandedLink;
 122+ mw.legacy.expandedURLs[i] = expandedLink;
123123 }
124124 }
125125 }
126126 },
127127 'onafterprint': function() {
128 - for ( var i = 0; i < expandedURLs.length; i++ ) {
129 - if ( expandedURLs[i] ) {
130 - expandedURLs[i].removeNode( true );
 128+ for ( var i = 0; i < mw.legacy.expandedURLs.length; i++ ) {
 129+ if ( mw.legacy.expandedURLs[i] ) {
 130+ mw.legacy.expandedURLs[i].removeNode( true );
131131 }
132132 }
133133 }

Status & tagging log