Merge "Check validity and availability of usernames during signup via AJAX"
[lhc/web/wiklou.git] / resources / mediawiki / mediawiki.hlist.js
1 /*!
2 * .hlist fallbacks for IE 6, 7 and 8.
3 * @author [[User:Edokter]]
4 */
5 ( function ( mw, $ ) {
6 var profile = $.client.profile();
7
8 if ( profile.name === 'msie' ) {
9 if ( profile.versionNumber === 8 ) {
10 /* IE 8: Add pseudo-selector class to last-child list items */
11 mw.hook( 'wikipage.content' ).add( function ( $content ) {
12 $content.find( '.hlist' ).find( 'dd:last-child, dt:last-child, li:last-child' )
13 .addClass( 'hlist-last-child' );
14 } );
15 }
16 else if ( profile.versionNumber <= 7 ) {
17 /* IE 7 and below: Generate interpuncts and parentheses */
18 mw.hook( 'wikipage.content' ).add( function ( $content ) {
19 var $hlists = $content.find( '.hlist' );
20 $hlists.find( 'dt:not(:last-child)' )
21 .append( ': ' );
22 $hlists.find( 'dd:not(:last-child)' )
23 .append( '<b>·</b> ' );
24 $hlists.find( 'li:not(:last-child)' )
25 .append( '<b>·</b> ' );
26 $hlists.find( 'dl dl, dl ol, dl ul, ol dl, ol ol, ol ul, ul dl, ul ol, ul ul' )
27 .prepend( '( ' ).append( ') ' );
28 } );
29 }
30 }
31 }( mediaWiki, jQuery ) );