From: Krinkle Date: Fri, 24 Jun 2011 19:52:35 +0000 (+0000) Subject: (bug 29567) mw.util.addPortletLink should only wrap link in for "vectorTabs... X-Git-Tag: 1.31.0-rc.0~29306 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/banques/ajouter.php?a=commitdiff_plain;h=14cd4f309e01a4047570f0c72617ed9d3c5c47e5;p=lhc%2Fweb%2Fwiklou.git (bug 29567) mw.util.addPortletLink should only wrap link in for "vectorTabs" portlets * Patch by Erwin Dokter * This unbreaks test introduced in r90728 --- diff --git a/resources/mediawiki/mediawiki.util.js b/resources/mediawiki/mediawiki.util.js index 1f4d95f693..189046f7bc 100644 --- a/resources/mediawiki/mediawiki.util.js +++ b/resources/mediawiki/mediawiki.util.js @@ -374,9 +374,14 @@ // Unhide portlet if it was hidden before $portlet.removeClass( 'emptyPortlet' ); - // Wrap the anchor tag in a and create a list item for it + // Wrap the anchor tag in a list item (and a span if $portlet is a Vector tab) // and back up the selector to the list item - var $item = $link.wrap( '
  • ' ).parent().parent(); + var $item; + if ( $portlet.hasClass( 'vectorTabs' ) ) { + $item = $link.wrap( '
  • ' ).parent().parent(); + } else { + $item = $link.wrap( '
  • ' ).parent(); + } // Implement the properties passed to the function if ( id ) {