「MediaWiki:Common.js/IEFixes.js」の版間の差分

提供:Tsubopedia
*>Frozen-mikan
(en:MediaWiki:Common.js/IEFixes.js から hlist に関する箇所を複製。Template‐ノート:Navbox#hlistクラスの導入 を参照)
 
(1版)
 
(相違点なし)

2014年3月9日 (日) 23:05時点における最新版

/* Internet Explorer 用のスクリプト群 */

/* [[en:MediaWiki:Common.js/IEFixes.js]] から hlist に関する箇所を複製。 */
/**
 * Helper script for .hlist class in Common.css
 * Last updated: January 24, 2013
 * @source mediawiki.org/wiki/Snippets/Horizontal_lists
 * @maintainer: [[User:Edokter]]
 * @revision: 3.1
 */
/* Fix wrapping issue in IE 8 and up for hlist in table; put a soft-hyphen in front of list items. */
if ( $.client.profile().versionNumber > 7 ) {
    mw.util.addCSS( 'table.hlist li:before { content: "\\ad"; }' );
}
/* Add pseudo-selector class to last-child list items in IE 8 */
if ( $.client.profile().versionNumber === 8 ) {
    $( '.hlist' ).find( 'dd:last-child, dt:last-child, li:last-child' )
        .addClass( 'hlist-last-child' );
}
/* Generate interpuncts and parentheses for IE < 8 */
if ( $.client.profile().versionNumber < 8 ) {
    var hlists = $( '.hlist' );
    hlists.find( 'dt:not(:last-child)' )
        .append( ': ' );
    hlists.find( 'dd:not(:last-child)' )
        .append( '<b>·</b> ' );
    hlists.find( 'li:not(:last-child)' )
        .append( '<b>·</b> ' );
    hlists.find( 'dl dl, dl ol, dl ul, ol dl, ol ol, ol ul, ul dl, ul ol, ul ul' )
        .prepend( '( ' ).append( ') ' );
}