From: Kaldari Date: Fri, 9 Nov 2012 02:19:04 +0000 (-0800) Subject: Oops, restoring the line I accidently deleted. X-Git-Tag: 1.31.0-rc.0~21692 X-Git-Url: http://git.cyclocoop.org/%22%20%20.%20generer_url_ecrire%28%22mots_tous%22%29%20.%20%22?a=commitdiff_plain;h=79daaea1a8cd204107379ca3114dae004b08f204;p=lhc%2Fweb%2Fwiklou.git Oops, restoring the line I accidently deleted. Change-Id: Iefef1881648190c96ac8f6e0b57642018beb3643 --- diff --git a/resources/jquery/jquery.badge.js b/resources/jquery/jquery.badge.js index 3a2a337b81..982974761d 100644 --- a/resources/jquery/jquery.badge.js +++ b/resources/jquery/jquery.badge.js @@ -39,11 +39,13 @@ // If a badge already exists, reuse it if ( $badge.length ) { $badge.find( '.mw-badge-content' ).text( text ); + } else { + // Otherwise, create a new badge with the specified text and style + div = document.createElement( 'div' ); + div.className = 'mw-badge mw-badge-' + ( inline ? 'inline' : 'overlay' ); + div.innerHTML = '' + text + ''; + $( div ).appendTo( this ); } - // Otherwise, create a new badge with the specified text and style - div = document.createElement( 'div' ); - div.className = 'mw-badge mw-badge-' + ( inline ? 'inline' : 'overlay' ); - div.innerHTML = '' + text + ''; } else { $badge.remove(); }