r82963 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r82962‎ | r82963 | r82964 >
Date:21:20, 28 February 2011
Author:krinkle
Status:ok
Tags:
Comment:
Closing tags in jQuery-element creation. Bug in jQuery, using the shortcut doens't work in IE8, it needs to be <open></close>
Modified paths:
  • /trunk/phase3/resources/jquery/jquery.makeCollapsible.js (modified) (history)

Diff [purge]

Index: trunk/phase3/resources/jquery/jquery.makeCollapsible.js
@@ -210,7 +210,7 @@
211211 }
212212
213213 // Create toggle link with a space around the brackets (&nbsp;[text]&nbsp;)
214 - var $toggleLink = $( '<a href="#">' ).text( collapsetext ).wrap( '<span class="mw-collapsible-toggle">' ).parent().prepend( '&nbsp;[' ).append( ']&nbsp;' ).bind( 'click.mw-collapse', function(e){
 214+ var $toggleLink = $( '<a href="#"></a>' ).text( collapsetext ).wrap( '<span class="mw-collapsible-toggle"></span>' ).parent().prepend( '&nbsp;[' ).append( ']&nbsp;' ).bind( 'click.mw-collapse', function(e){
215215 toggleLinkDefault( this, e );
216216 } );
217217
@@ -276,7 +276,7 @@
277277 if ( $firstItem.attr( 'value' ) == '' || $firstItem.attr( 'value' ) == '-1' ) { // Will fail with ===
278278 $firstItem.attr( 'value', '1' );
279279 }
280 - $that.prepend( $toggleLink.wrap( '<li class="mw-collapsible-toggle-li">' ).parent() );
 280+ $that.prepend( $toggleLink.wrap( '<li class="mw-collapsible-toggle-li"></li>' ).parent() );
281281 } else {
282282 $toggleLink = $toggle.unbind( 'click.mw-collapse' ).bind( 'click.mw-collapse', function( e ){
283283 toggleLinkPremade( $toggle, e );
@@ -286,7 +286,7 @@
287287 } else { // <div>, <p> etc.
288288 // If a direct child .content-wrapper does not exists, create it
289289 if ( !$that.find( '> .mw-collapsible-content' ).size() ) {
290 - $that.wrapInner( '<div class="mw-collapsible-content">' );
 290+ $that.wrapInner( '<div class="mw-collapsible-content"></div>' );
291291 }
292292
293293 // The toggle-link will be the first child of the element

Status & tagging log