From 63601400e476c6cf43d985f3e7b9864681695ed4 Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Fri, 18 Jan 2013 16:46:04 +0100 Subject: Update to MediaWiki 1.20.2 this update includes: * adjusted Arch Linux skin * updated FluxBBAuthPlugin * patch for https://bugzilla.wikimedia.org/show_bug.cgi?id=44024 --- resources/mediawiki/mediawiki.debug.js | 68 +++++++++++++++++++++------------- 1 file changed, 42 insertions(+), 26 deletions(-) (limited to 'resources/mediawiki/mediawiki.debug.js') diff --git a/resources/mediawiki/mediawiki.debug.js b/resources/mediawiki/mediawiki.debug.js index a2bfbcbe..1ad1a623 100644 --- a/resources/mediawiki/mediawiki.debug.js +++ b/resources/mediawiki/mediawiki.debug.js @@ -5,12 +5,13 @@ * @since 1.19 */ -( function ( $, mw, undefined ) { -"use strict"; +( function ( mw, $ ) { + 'use strict'; - var hovzer = $.getFootHovzer(); + var debug, + hovzer = $.getFootHovzer(); - var debug = mw.Debug = { + debug = mw.Debug = { /** * Toolbar container element * @@ -93,7 +94,7 @@ * Constructs the HTML for the debugging toolbar */ buildHtml: function () { - var $container, $bits, panes, id; + var $container, $bits, panes, id, gitInfo; $container = $( '
' ); @@ -106,9 +107,9 @@ * @return {jQuery} */ function bitDiv( id ) { - return $( '
' ).attr({ + return $( '
' ).prop({ id: 'mw-debug-' + id, - 'class': 'mw-debug-bit' + className: 'mw-debug-bit' }) .appendTo( $bits ); } @@ -122,8 +123,8 @@ */ function paneLabel( id, text ) { return $( '' ) - .attr({ - 'class': 'mw-debug-panelabel', + .prop({ + className: 'mw-debug-panelabel', href: '#mw-debug-pane-' + id }) .text( text ); @@ -138,12 +139,12 @@ * @return {jQuery} */ function paneTriggerBitDiv( id, text, count ) { - if( count ) { + if ( count ) { text = text + ' (' + count + ')'; } - return $( '
' ).attr({ + return $( '
' ).prop({ id: 'mw-debug-' + id, - 'class': 'mw-debug-bit mw-debug-panelink' + className: 'mw-debug-bit mw-debug-panelink' }) .append( paneLabel( id, text ) ) .appendTo( $bits ); @@ -159,9 +160,24 @@ paneTriggerBitDiv( 'includes', 'PHP includes', this.data.includes.length ); + gitInfo = ''; + if ( this.data.gitRevision !== false ) { + gitInfo = '(' + this.data.gitRevision.substring( 0, 7 ) + ')'; + if ( this.data.gitViewUrl !== false ) { + gitInfo = $( '' ) + .attr( 'href', this.data.gitViewUrl ) + .text( gitInfo ); + } + } + bitDiv( 'mwversion' ) - .append( $( '' ).text( 'MediaWiki' ) ) - .append( ': ' + this.data.mwVersion ); + .append( $( 'MediaWiki' ) ) + .append( document.createTextNode( ': ' + this.data.mwVersion + ' ' ) ) + .append( gitInfo ); + + if ( this.data.gitBranch !== false ) { + bitDiv( 'gitbranch' ).text( 'Git branch: ' + this.data.gitBranch ); + } bitDiv( 'phpversion' ) .append( $( '' ).text( 'PHP' ) ) @@ -191,8 +207,8 @@ } $( '
' ) - .attr({ - 'class': 'mw-debug-pane', + .prop({ + className: 'mw-debug-pane', id: 'mw-debug-pane-' + id }) .append( panes[id] ) @@ -210,9 +226,9 @@ $table = $( '' ); - $('').css( 'width', /*padding=*/20 + ( 10*/*fontSize*/11 ) ).appendTo( $table ); - $('').appendTo( $table ); - $('').css( 'width', 350 ).appendTo( $table ); + $( '' ).css( 'width', /* padding = */ 20 + ( 10 * /* fontSize = */ 11 ) ).appendTo( $table ); + $( '' ).appendTo( $table ); + $( '' ).css( 'width', 350 ).appendTo( $table ); entryTypeText = function( entryType ) { @@ -235,7 +251,7 @@ $( '' ) .append( $( '' ) - .append( $('').css( 'width', '4em' ) ) - .append( $('') ) - .append( $('').css( 'width', '8em' ) ) - .append( $('').css( 'width', '18em' ) ) + .append( $( '' ).css( 'width', '4em' ) ) + .append( $( '' ) ) + .append( $( '' ).css( 'width', '8em' ) ) + .append( $( '' ).css( 'width', '18em' ) ) .appendTo( $table ); for ( i = 0, length = this.data.queries.length; i < length; i += 1 ) { @@ -285,7 +301,7 @@ for ( i = 0, length = this.data.debugLog.length; i < length; i += 1 ) { line = this.data.debugLog[i]; $( '
  • ' ) - .html( mw.html.escape( line ).replace( /\n/g, "
    \n" ) ) + .html( mw.html.escape( line ).replace( /\n/g, '
    \n' ) ) .appendTo( $list ); } @@ -348,4 +364,4 @@ } }; -} )( jQuery, mediaWiki ); +}( mediaWiki, jQuery ) ); -- cgit v1.2.2
  • ' ) .text( entry.typeText ) - .attr( 'class', 'mw-debug-console-' + entry.type ) + .addClass( 'mw-debug-console-' + entry.type ) ) .append( $( '' ).html( entry.msg ) ) .append( $( '' ).text( entry.caller ) ) @@ -254,10 +270,10 @@ $table = $( '
    ' ); $( '
    #SQLTimeCall#SQLTimeCall