r90729 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r90728‎ | r90729 | r90730 >
Date:19:52, 24 June 2011
Author:krinkle
Status:ok
Tags:
Comment:
(bug 29567) mw.util.addPortletLink should only wrap link in <span> for "vectorTabs" portlets
* Patch by Erwin Dokter
* This unbreaks test introduced in r90728
Modified paths:
  • /trunk/phase3/resources/mediawiki/mediawiki.util.js (modified) (history)

Diff [purge]

Index: trunk/phase3/resources/mediawiki/mediawiki.util.js
@@ -374,9 +374,14 @@
375375 // Unhide portlet if it was hidden before
376376 $portlet.removeClass( 'emptyPortlet' );
377377
378 - // Wrap the anchor tag in a <span> and create a list item for it
 378+ // Wrap the anchor tag in a list item (and a span if $portlet is a Vector tab)
379379 // and back up the selector to the list item
380 - var $item = $link.wrap( '<li><span></span></li>' ).parent().parent();
 380+ var $item;
 381+ if ( $portlet.hasClass( 'vectorTabs' ) ) {
 382+ $item = $link.wrap( '<li><span></span></li>' ).parent().parent();
 383+ } else {
 384+ $item = $link.wrap( '<li></li>' ).parent();
 385+ }
381386
382387 // Implement the properties passed to the function
383388 if ( id ) {

Follow-up revisions

RevisionCommit summaryAuthorDate
r90731Release-notes for r90729 (why doesn't this happen automatically ?)krinkle19:54, 24 June 2011
r945571.17wmf1: MFT r87099, r90729, r93141, r93517, r93891, r94155, r94277, r94372catrope20:12, 15 August 2011

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r90728Adding unit test for span presence in mw.util.addPortletLink...krinkle19:50, 24 June 2011

Status & tagging log