r83420 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r83419‎ | r83420 | r83421 >
Date:23:25, 6 March 2011
Author:krinkle
Status:ok
Tags:
Comment:
Fix for IE7, jQuery magic doesn't help here, it needs to be valid html, shorthand doesn't work in all browsers
Modified paths:
  • /trunk/phase3/resources/mediawiki.util/mediawiki.util.js (modified) (history)

Diff [purge]

Index: trunk/phase3/resources/mediawiki.util/mediawiki.util.js
@@ -344,7 +344,7 @@
345345 return null;
346346 }
347347 // Setup the anchor tag
348 - var $link = $( '<a />' ).attr( 'href', href ).text( text );
 348+ var $link = $( '<a></a>' ).attr( 'href', href ).text( text );
349349 if ( tooltip ) {
350350 $link.attr( 'title', tooltip );
351351 }
@@ -373,11 +373,11 @@
374374 if ( $ul.length === 0 ) {
375375 // If there's no <div> inside, append it to the portlet directly
376376 if ( $portlet.find( 'div:first' ).length === 0 ) {
377 - $portlet.append( '<ul/>' );
 377+ $portlet.append( '<ul></ul>' );
378378 } else {
379379 // otherwise if there's a div (such as div.body or div.pBody)
380380 // append the <ul> to last (most likely only) div
381 - $portlet.find( 'div' ).eq( -1 ).append( '<ul/>' );
 381+ $portlet.find( 'div' ).eq( -1 ).append( '<ul></ul>' );
382382 }
383383 // Select the created element
384384 $ul = $portlet.find( 'ul' ).eq( 0 );
@@ -392,7 +392,7 @@
393393
394394 // Wrap the anchor tag in a <span> and create a list item for it
395395 // and back up the selector to the list item
396 - var $item = $link.wrap( '<li><span /></li>' ).parent().parent();
 396+ var $item = $link.wrap( '<li><span></span></li>' ).parent().parent();
397397
398398 // Implement the properties passed to the function
399399 if ( id ) {

Follow-up revisions

RevisionCommit summaryAuthorDate
r834871.17wmf1: MFT r82696, r83270, r83284, r83374, r83390, r83392, r83402, r83403,...catrope21:44, 7 March 2011
r85354MFT r82518, r82530, r82538, r82547, r82550, r82565, r82572, r82608, r82696, r...demon18:25, 4 April 2011

Status & tagging log