Fixes bug in wikibits that causes addPortletLink to fail when adding tabs to the...
authorTrevor Parscal <tparscal@users.mediawiki.org>
Wed, 13 Oct 2010 21:58:04 +0000 (21:58 +0000)
committerTrevor Parscal <tparscal@users.mediawiki.org>
Wed, 13 Oct 2010 21:58:04 +0000 (21:58 +0000)
skins/common/wikibits.js

index 3b582dd..d9dcb80 100644 (file)
@@ -352,15 +352,16 @@ window.addPortletLink = function( portlet, href, text, id, tooltip, accesskey, n
        // unhide portlet if it was hidden before
        root.className = root.className.replace( /(^| )emptyPortlet( |$)/, "$2" );
 
-       var span = document.createElement( 'span' );
-       span.appendChild( document.createTextNode( text ) );
-
        var link = document.createElement( 'a' );
-       link.appendChild( span );
+       link.appendChild( document.createTextNode( text ) );
        link.href = href;
 
+       // Wrap in a span - make it work with vector tabs and has no effect on any other portlets
+       var span = document.createElement( 'span' );
+       span.appendChild( link );
+
        var item = document.createElement( 'li' );
-       item.appendChild( link );
+       item.appendChild( span );
        if ( id ) {
                item.id = id;
        }