From ca32f08966f1b51fcb19460f0996bb0c4048e6fe Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Sat, 3 Dec 2011 13:29:22 +0100 Subject: Update to MediaWiki 1.18.0 * also update ArchLinux skin to chagnes in MonoBook * Use only css to hide our menu bar when printing --- resources/mediawiki/mediawiki.log.js | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) (limited to 'resources/mediawiki/mediawiki.log.js') diff --git a/resources/mediawiki/mediawiki.log.js b/resources/mediawiki/mediawiki.log.js index 55bf77f0..38f3411f 100644 --- a/resources/mediawiki/mediawiki.log.js +++ b/resources/mediawiki/mediawiki.log.js @@ -2,7 +2,7 @@ * Implementation for mediaWiki.log stub */ -(function ($, mw) { +(function( $ ) { /** * Log output to the console. @@ -13,16 +13,16 @@ * * @author Michael Dale * @author Trevor Parscal - * @param {string} string Message to output to console + * @param logmsg string Message to output to console. */ - mediaWiki.log = function( string ) { - // Allow log messages to use a configured prefix + mw.log = function( logmsg ) { + // Allow log messages to use a configured prefix to identify the source window (ie. frame) if ( mw.config.exists( 'mw.log.prefix' ) ) { - string = mw.config.get( 'mw.log.prefix' ) + '> ' + string; + logmsg = mw.config.get( 'mw.log.prefix' ) + '> ' + logmsg; } // Try to use an existing console - if ( typeof window.console !== 'undefined' && typeof window.console.log == 'function' ) { - window.console.log( string ); + if ( window.console !== undefined && $.isFunction( window.console.log ) ) { + window.console.log( logmsg ); } else { // Set timestamp var d = new Date(); @@ -35,7 +35,7 @@ if ( !$log.length ) { $log = $( '
' ) .css( { - 'position': 'absolute', + 'position': 'fixed', 'overflow': 'auto', 'z-index': 500, 'bottom': '0px', @@ -44,8 +44,10 @@ 'height': '150px', 'background-color': 'white', 'border-top': 'solid 2px #ADADAD' - } ) - .appendTo( 'body' ); + } ); + $( 'body' ) + .css( 'padding-bottom', '150px' ) // don't hide anything + .append( $log ); } $log.append( $( '
' ) @@ -53,12 +55,13 @@ 'border-bottom': 'solid 1px #DDDDDD', 'font-size': 'small', 'font-family': 'monospace', + 'white-space': 'pre-wrap', 'padding': '0.125em 0.25em' } ) - .text( string ) - .append( '[' + time + ']' ) + .text( logmsg ) + .prepend( '[' + time + ']' ) ); } }; -})(jQuery, mediaWiki); +})(jQuery); -- cgit v1.2.3-54-g00ecf