From: Trevor Parscal Date: Wed, 13 Oct 2010 21:58:04 +0000 (+0000) Subject: Fixes bug in wikibits that causes addPortletLink to fail when adding tabs to the... X-Git-Tag: 1.31.0-rc.0~34520 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/banques/%7B%7B%20url_for%28%27admin_users%27%29%20%7D%7D?a=commitdiff_plain;h=07a395bd9beae9e9e88d032f9a135a454eed4ca4;p=lhc%2Fweb%2Fwiklou.git Fixes bug in wikibits that causes addPortletLink to fail when adding tabs to the vector skin. --- diff --git a/skins/common/wikibits.js b/skins/common/wikibits.js index 3b582dd954..d9dcb802b9 100644 --- a/skins/common/wikibits.js +++ b/skins/common/wikibits.js @@ -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; }