X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=resources%2Fmediawiki.special%2Fmediawiki.special.preferences.js;h=0078724f9516959ed85c245998aa0dda70c1e700;hb=d5be6194bbb76dba7c58c8ed8b95d9b60c555943;hp=3302ec636bc8325c60dd871e64b1f2fde24f8a3f;hpb=64351077ef4705e1a386eb0dfefe74bbb031717a;p=lhc%2Fweb%2Fwiklou.git diff --git a/resources/mediawiki.special/mediawiki.special.preferences.js b/resources/mediawiki.special/mediawiki.special.preferences.js index 3302ec636b..0078724f95 100644 --- a/resources/mediawiki.special/mediawiki.special.preferences.js +++ b/resources/mediawiki.special/mediawiki.special.preferences.js @@ -11,7 +11,7 @@ jQuery( function ( $ ) { }; $( '#prefsubmit' ).attr( 'id', 'prefcontrol' ); - $preftoc = $('') + $preftoc = $( '' ) .attr( 'role', 'tablist' ); $preferences = $( '#preferences' ) .addClass( 'jsprefs' ) @@ -34,7 +34,7 @@ jQuery( function ( $ ) { $( '
' ).addClass( 'mw-navigation-hint' ) .text( mediaWiki.msg( 'prefs-tabs-navigation-hint' ) ) .attr( 'tabIndex', 0 ) - .on( 'focus blur', function( e ) { + .on( 'focus blur', function ( e ) { if ( e.type === 'blur' || e.type === 'focusout' ) { $( this ).css( 'height', '0' ); } else { @@ -81,7 +81,7 @@ jQuery( function ( $ ) { // Populate the prefToc $legends.each( function ( i, legend ) { - var $legend = $(legend), + var $legend = $( legend ), ident, $li, $a; if ( i === 0 ) { $legend.parent().show(); @@ -106,12 +106,12 @@ jQuery( function ( $ ) { } ); // Enable keyboard users to use left and right keys to switch tabs - $preftoc.on( 'keydown', function( event ) { + $preftoc.on( 'keydown', function ( event ) { var keyLeft = 37, keyRight = 39, $el; - if( event.keyCode === keyLeft ) { + if ( event.keyCode === keyLeft ) { $el = $( '#preftoc li.selected' ).prev().find( 'a' ); } else if ( event.keyCode === keyRight ) { $el = $( '#preftoc li.selected' ).next().find( 'a' ); @@ -139,14 +139,14 @@ jQuery( function ( $ ) { if ( 'onhashchange' in window && ( document.documentMode === undefined || document.documentMode >= 8 ) ) { - $(window).on( 'hashchange' , function () { + $( window ).on( 'hashchange' , function () { var hash = window.location.hash; if ( hash.match( /^#mw-prefsection-[\w\-]+/ ) ) { switchPrefTab( hash.replace( '#mw-prefsection-', '' ) ); } else if ( hash === '' ) { switchPrefTab( 'personal', 'noHash' ); } - }); + } ); // In older browsers we'll bind a click handler as fallback. // We must not have onhashchange *and* the click handlers, other wise // the click handler calls switchPrefTab() which sets the hash value, @@ -155,7 +155,7 @@ jQuery( function ( $ ) { $preftoc.on( 'click', 'li a', function ( e ) { switchPrefTab( $( this ).attr( 'href' ).replace( '#mw-prefsection-', '' ) ); e.preventDefault(); - }); + } ); } /** @@ -229,7 +229,7 @@ jQuery( function ( $ ) { while ( localTime >= 1440 ) { localTime -= 1440; } - $localtimeHolder.text( minutesToHours( localTime ) ); + $localtimeHolder.text( mediaWiki.language.convertNumber( minutesToHours( localTime ) ) ); } if ( $tzSelect.length && $tzTextbox.length ) {