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 --- skins/common/commonContent.css | 2 - skins/common/commonElements.css | 12 +- skins/common/commonPrint.css | 5 +- skins/common/config.js | 66 +- skins/common/images/Arr_.png | Bin 246 -> 96 bytes skins/common/images/Arr_l.png | Bin 257 -> 205 bytes skins/common/images/Arr_u.png | Bin 423 -> 207 bytes skins/common/images/add.png | Bin 555 -> 526 bytes skins/common/images/ajax-loader.gif | Bin 3208 -> 1788 bytes skins/common/images/ar/button_bold.png | Bin 626 -> 533 bytes skins/common/images/ar/button_headline.png | Bin 560 -> 487 bytes skins/common/images/ar/button_italic.png | Bin 605 -> 532 bytes skins/common/images/ar/button_link.png | Bin 643 -> 557 bytes skins/common/images/ar/button_nowiki.png | Bin 963 -> 875 bytes skins/common/images/arrow_disabled_first_25.png | Bin 369 -> 318 bytes skins/common/images/arrow_disabled_last_25.png | Bin 374 -> 323 bytes skins/common/images/arrow_disabled_left_25.png | Bin 352 -> 301 bytes skins/common/images/arrow_disabled_right_25.png | Bin 358 -> 307 bytes skins/common/images/arrow_first_25.png | Bin 405 -> 352 bytes skins/common/images/arrow_last_25.png | Bin 395 -> 342 bytes skins/common/images/arrow_left_25.png | Bin 383 -> 330 bytes skins/common/images/arrow_right_25.png | Bin 394 -> 341 bytes skins/common/images/be-tarask/button_bold.png | Bin 554 -> 550 bytes skins/common/images/be-tarask/button_italic.png | Bin 580 -> 539 bytes skins/common/images/be-tarask/button_link.png | Bin 459 -> 419 bytes skins/common/images/button_bold.png | Bin 271 -> 250 bytes skins/common/images/button_extlink.png | Bin 456 -> 435 bytes skins/common/images/button_headline.png | Bin 461 -> 440 bytes skins/common/images/button_hr.png | Bin 247 -> 222 bytes skins/common/images/button_image.png | Bin 504 -> 483 bytes skins/common/images/button_italic.png | Bin 271 -> 250 bytes skins/common/images/button_link.png | Bin 301 -> 280 bytes skins/common/images/button_media.png | Bin 749 -> 728 bytes skins/common/images/button_nowiki.png | Bin 342 -> 322 bytes skins/common/images/button_sig.png | Bin 949 -> 926 bytes skins/common/images/button_template.png | Bin 210 -> 188 bytes skins/common/images/cc-0.png | Bin 1103 -> 969 bytes skins/common/images/cc-by-nc-sa.png | Bin 4263 -> 1530 bytes skins/common/images/cc-by-sa.png | Bin 4109 -> 1377 bytes skins/common/images/cc-by.png | Bin 4063 -> 1165 bytes skins/common/images/closewindow.png | Bin 148 -> 108 bytes skins/common/images/closewindow19x19.png | Bin 3357 -> 833 bytes skins/common/images/critical-32.png | Bin 1892 -> 1763 bytes skins/common/images/cyrl/button_bold.png | Bin 275 -> 254 bytes skins/common/images/cyrl/button_italic.png | Bin 457 -> 423 bytes skins/common/images/cyrl/button_link.png | Bin 347 -> 278 bytes skins/common/images/de/button_bold.png | Bin 308 -> 255 bytes skins/common/images/de/button_italic.png | Bin 313 -> 260 bytes skins/common/images/download-32.png | Bin 1846 -> 1759 bytes skins/common/images/fa/button_bold.png | Bin 496 -> 459 bytes skins/common/images/fa/button_headline.png | Bin 429 -> 392 bytes skins/common/images/fa/button_italic.png | Bin 563 -> 512 bytes skins/common/images/fa/button_link.png | Bin 522 -> 485 bytes skins/common/images/fa/button_nowiki.png | Bin 963 -> 875 bytes skins/common/images/gnu-fdl.png | Bin 1655 -> 1573 bytes skins/common/images/icons/fileicon-c.png | Bin 1948 -> 1753 bytes skins/common/images/icons/fileicon-cpp.png | Bin 1577 -> 1382 bytes skins/common/images/icons/fileicon-deb.png | Bin 4726 -> 4527 bytes skins/common/images/icons/fileicon-djvu.png | Bin 10615 -> 10436 bytes skins/common/images/icons/fileicon-dvi.png | Bin 12628 -> 12476 bytes skins/common/images/icons/fileicon-exe.png | Bin 5627 -> 5469 bytes skins/common/images/icons/fileicon-h.png | Bin 998 -> 803 bytes skins/common/images/icons/fileicon-html.png | Bin 7376 -> 7171 bytes skins/common/images/icons/fileicon-iso.png | Bin 6304 -> 6105 bytes skins/common/images/icons/fileicon-java.png | Bin 5901 -> 5706 bytes skins/common/images/icons/fileicon-mid.png | Bin 6515 -> 6316 bytes skins/common/images/icons/fileicon-mov.png | Bin 7716 -> 7579 bytes skins/common/images/icons/fileicon-o.png | Bin 1937 -> 1742 bytes skins/common/images/icons/fileicon-ogg.png | Bin 3346 -> 3151 bytes skins/common/images/icons/fileicon-pdf.png | Bin 4909 -> 4710 bytes skins/common/images/icons/fileicon-ps.png | Bin 2985 -> 2786 bytes skins/common/images/icons/fileicon-rm.png | Bin 2714 -> 2519 bytes skins/common/images/icons/fileicon-rpm.png | Bin 4000 -> 3784 bytes skins/common/images/icons/fileicon-svg.png | Bin 4978 -> 4793 bytes skins/common/images/icons/fileicon-tar.png | Bin 6224 -> 6025 bytes skins/common/images/icons/fileicon-tex.png | Bin 3937 -> 3738 bytes skins/common/images/icons/fileicon-ttf.png | Bin 3392 -> 3193 bytes skins/common/images/icons/fileicon-txt.png | Bin 3582 -> 3388 bytes skins/common/images/icons/fileicon.png | Bin 884 -> 789 bytes skins/common/images/info-32.png | Bin 1940 -> 1892 bytes skins/common/images/ksh/button_S_italic.png | Bin 3201 -> 368 bytes skins/common/images/magnify-clip-rtl.png | Bin 252 -> 208 bytes skins/common/images/mediawiki.png | Bin 22736 -> 22589 bytes skins/common/images/nextredirectltr.png | Bin 187 -> 121 bytes skins/common/images/nextredirectrtl.png | Bin 187 -> 121 bytes skins/common/images/poweredby_mediawiki_88x31.png | Bin 3605 -> 3525 bytes skins/common/images/public-domain.png | Bin 2248 -> 2017 bytes skins/common/images/redirectltr.png | Bin 355 -> 128 bytes skins/common/images/redirectrtl.png | Bin 359 -> 132 bytes skins/common/images/remove.png | Bin 3271 -> 555 bytes skins/common/images/spinner.gif | Bin 4648 -> 1819 bytes skins/common/images/tooltip_icon.png | Bin 391 -> 352 bytes skins/common/images/warning-32.png | Bin 1349 -> 1301 bytes skins/common/images/wiki.png | Bin 24482 -> 24358 bytes skins/common/mwsuggest.js | 1063 --------------------- skins/common/oldshared.css | 6 - skins/common/preview.js | 128 --- skins/common/shared.css | 61 +- skins/common/upload.js | 19 +- skins/common/wikibits.js | 56 +- skins/common/wikistandard.css | 180 ---- 101 files changed, 107 insertions(+), 1491 deletions(-) delete mode 100644 skins/common/mwsuggest.js delete mode 100644 skins/common/preview.js delete mode 100644 skins/common/wikistandard.css (limited to 'skins/common') diff --git a/skins/common/commonContent.css b/skins/common/commonContent.css index 61799187..0fe8489e 100644 --- a/skins/common/commonContent.css +++ b/skins/common/commonContent.css @@ -86,13 +86,11 @@ html .thumbimage { } html .thumbcaption { border: none; - text-align: left; line-height: 1.4em; padding: 3px !important; font-size: 94%; } div.magnify { - float: right; border: none !important; background: none !important; } diff --git a/skins/common/commonElements.css b/skins/common/commonElements.css index 5590bfa1..02fd29fe 100644 --- a/skins/common/commonElements.css +++ b/skins/common/commonElements.css @@ -1,6 +1,7 @@ -/* -** MediaWiki style sheet for general styles on basic content elements -*/ +/** + * MediaWiki style sheet for general styles on basic content elements + * This style sheet is used by the monobook and vector skins + */ /* Links */ a { @@ -78,7 +79,6 @@ h6 { padding-top: .5em; padding-bottom: .17em; border-bottom: 1px solid #aaa; - width: auto; } h1 { font-size: 188%; @@ -183,7 +183,7 @@ blockquote { font-family: Times, "Times New Roman", serif; font-style: italic; }*/ -pre, code, tt, kbd, samp { +pre, code, tt, kbd, samp, .mw-code { /* * Some browsers will render the monospace text too small, namely Firefox, Chrome and Safari. * Specifying any valid, second value will trigger correct behaviour without forcing a different font. @@ -193,7 +193,7 @@ pre, code, tt, kbd, samp { code { background-color: #f9f9f9; } -pre { +pre, .mw-code { padding: 1em; border: 1px dashed #2f6fab; color: black; diff --git a/skins/common/commonPrint.css b/skins/common/commonPrint.css index 4efabee3..48dd943f 100644 --- a/skins/common/commonPrint.css +++ b/skins/common/commonPrint.css @@ -158,7 +158,7 @@ p { line-height: 1.2em; } -pre { +pre, .mw-code { border: 1pt dashed black; white-space: pre; font-size: 8pt; @@ -246,7 +246,6 @@ span.texhtml { /* Galleries (see shared.css for more info) */ li.gallerybox { vertical-align: top; - border: solid 2px white; display: -moz-inline-box; display: inline-block; } @@ -320,7 +319,7 @@ td.diff-context { */ table.wikitable, table.mw_metadata { - margin: 1em 1em 1em 0; + margin: 1em 0; border: 1px #aaa solid; background: white; border-collapse: collapse; diff --git a/skins/common/config.js b/skins/common/config.js index 23f7302c..b1e28aba 100644 --- a/skins/common/config.js +++ b/skins/common/config.js @@ -1,6 +1,17 @@ -(function( $ ) { - $( document ).ready( function() { +( function ( $ ) { + $( document ).ready( function () { + var $label, labelText; + function syncText() { + var value = $(this).val() + .replace( /[\[\]\{\}|#<>%+? ]/g, '_' ) + .replace( /&/, '&' ) + .replace( /__+/g, '_' ) + .replace( /^_+/, '' ) + .replace( /_+$/, '' ); + value = value.substr( 0, 1 ).toUpperCase() + value.substr( 1 ); + $label.text( labelText.replace( '$1', value ) ); + } // Set up the help system $( '.mw-help-field-data' ) @@ -8,7 +19,7 @@ .closest( '.mw-help-field-container' ) .find( '.mw-help-field-hint' ) .show() - .click( function() { + .click( function () { $(this) .closest( '.mw-help-field-container' ) .find( '.mw-help-field-data' ) @@ -17,22 +28,26 @@ // Show/hide code for DB-specific options // FIXME: Do we want slow, fast, or even non-animated (instantaneous) showing/hiding here? - $( '.dbRadio' ).each( function() { $( '#' + $(this).attr( 'rel' ) ).hide(); } ); - $( '#' + $( '.dbRadio:checked' ).attr( 'rel' ) ).show(); - $( '.dbRadio' ).click( function() { - var $checked = $( '.dbRadio:checked' ); - var $wrapper = $( '#' + $checked.attr( 'rel' ) ); - if ( !$wrapper.is( ':visible' ) ) { + $( '.dbRadio' ).each( function () { + $( document.getElementById( $(this).attr( 'rel' ) ) ).hide(); + } ); + $( document.getElementById( $( '.dbRadio:checked' ).attr( 'rel' ) ) ).show(); + $( '.dbRadio' ).click( function () { + var $checked = $( '.dbRadio:checked' ), + $wrapper = $( document.getElementById( $checked.attr( 'rel' ) ) ); + if ( $wrapper.is( ':hidden' ) ) { $( '.dbWrapper' ).hide( 'slow' ); $wrapper.show( 'slow' ); } } ); // Scroll to the bottom of upgrade log - $( '#config-live-log' ).find( '> textarea' ).each( function() { this.scrollTop = this.scrollHeight; } ); + $( '#config-live-log' ).children( 'textarea' ).each( function () { + this.scrollTop = this.scrollHeight; + } ); // Show/hide Creative Commons thingy - $( '.licenseRadio' ).click( function() { + $( '.licenseRadio' ).click( function () { var $wrapper = $( '#config-cc-wrapper' ); if ( $( '#config__LicenseCode_cc-choose' ).is( ':checked' ) ) { $wrapper.show( 'slow' ); @@ -42,7 +57,7 @@ } ); // Show/hide random stuff (email, upload) - $( '.showHideRadio' ).click( function() { + $( '.showHideRadio' ).click( function () { var $wrapper = $( '#' + $(this).attr( 'rel' ) ); if ( $(this).is( ':checked' ) ) { $wrapper.show( 'slow' ); @@ -50,7 +65,7 @@ $wrapper.hide( 'slow' ); } } ); - $( '.hideShowRadio' ).click( function() { + $( '.hideShowRadio' ).click( function () { var $wrapper = $( '#' + $(this).attr( 'rel' ) ); if ( $(this).is( ':checked' ) ) { $wrapper.hide( 'slow' ); @@ -64,9 +79,10 @@ $( '.enabledByOther' ).closest( '.config-block' ).hide(); // Enable/disable "other" textboxes - $( '.enableForOther' ).click( function() { - var $textbox = $( '#' + $(this).attr( 'rel' ) ); - if ( $(this).val() == 'other' ) { // FIXME: Ugh, this is ugly + $( '.enableForOther' ).click( function () { + var $textbox = $( document.getElementById( $(this).attr( 'rel' ) ) ); + // FIXME: Ugh, this is ugly + if ( $(this).val() === 'other' ) { $textbox.removeProp( 'readonly' ).closest( '.config-block' ).slideDown( 'fast' ); } else { $textbox.prop( 'readonly', true ).closest( '.config-block' ).slideUp( 'fast' ); @@ -77,26 +93,16 @@ $label = $( 'label[for=config__NamespaceType_site-name]' ); labelText = $label.text(); $label.text( labelText.replace( '$1', '' ) ); - $( '#config_wgSitename' ).bind( 'keyup change', syncText ).each( syncText ); - function syncText() { - var value = $(this).val() - .replace( /[\[\]\{\}|#<>%+? ]/g, '_' ) - .replace( /&/, '&' ) - .replace( /__+/g, '_' ) - .replace( /^_+/, '' ) - .replace( /_+$/, '' ); - value = value.substr( 0, 1 ).toUpperCase() + value.substr( 1 ); - $label.text( labelText.replace( '$1', value ) ); - } + $( '#config_wgSitename' ).on( 'keyup change', syncText ).each( syncText ); // Show/Hide memcached servers when needed - $("input[name$='config_wgMainCacheType']").change( function() { + $( 'input[name$="config_wgMainCacheType"]' ).change( function () { var $memc = $( "#config-memcachewrapper" ); - if( $( "input[name$='config_wgMainCacheType']:checked" ).val() == 'memcached' ) { + if( $( 'input[name$="config_wgMainCacheType"]:checked' ).val() === 'memcached' ) { $memc.show( 'slow' ); } else { $memc.hide( 'slow' ); } } ); } ); -})(jQuery); +}( jQuery ) ); diff --git a/skins/common/images/Arr_.png b/skins/common/images/Arr_.png index 8d8d5d9c..bc67a4b6 100644 Binary files a/skins/common/images/Arr_.png and b/skins/common/images/Arr_.png differ diff --git a/skins/common/images/Arr_l.png b/skins/common/images/Arr_l.png index f49e20a2..2246254f 100644 Binary files a/skins/common/images/Arr_l.png and b/skins/common/images/Arr_l.png differ diff --git a/skins/common/images/Arr_u.png b/skins/common/images/Arr_u.png index 957f8612..6132836b 100644 Binary files a/skins/common/images/Arr_u.png and b/skins/common/images/Arr_u.png differ diff --git a/skins/common/images/add.png b/skins/common/images/add.png index f82f45db..3497423c 100644 Binary files a/skins/common/images/add.png and b/skins/common/images/add.png differ diff --git a/skins/common/images/ajax-loader.gif b/skins/common/images/ajax-loader.gif index 3288d103..72203fdd 100644 Binary files a/skins/common/images/ajax-loader.gif and b/skins/common/images/ajax-loader.gif differ diff --git a/skins/common/images/ar/button_bold.png b/skins/common/images/ar/button_bold.png index 619cd21e..e524f6cb 100644 Binary files a/skins/common/images/ar/button_bold.png and b/skins/common/images/ar/button_bold.png differ diff --git a/skins/common/images/ar/button_headline.png b/skins/common/images/ar/button_headline.png index f1480a66..04fb8f11 100644 Binary files a/skins/common/images/ar/button_headline.png and b/skins/common/images/ar/button_headline.png differ diff --git a/skins/common/images/ar/button_italic.png b/skins/common/images/ar/button_italic.png index 21245978..6ec73e9e 100644 Binary files a/skins/common/images/ar/button_italic.png and b/skins/common/images/ar/button_italic.png differ diff --git a/skins/common/images/ar/button_link.png b/skins/common/images/ar/button_link.png index a68144f3..c9c63f6c 100644 Binary files a/skins/common/images/ar/button_link.png and b/skins/common/images/ar/button_link.png differ diff --git a/skins/common/images/ar/button_nowiki.png b/skins/common/images/ar/button_nowiki.png index 88ab9a13..12b986b4 100644 Binary files a/skins/common/images/ar/button_nowiki.png and b/skins/common/images/ar/button_nowiki.png differ diff --git a/skins/common/images/arrow_disabled_first_25.png b/skins/common/images/arrow_disabled_first_25.png index dd55a9c0..78a493e6 100644 Binary files a/skins/common/images/arrow_disabled_first_25.png and b/skins/common/images/arrow_disabled_first_25.png differ diff --git a/skins/common/images/arrow_disabled_last_25.png b/skins/common/images/arrow_disabled_last_25.png index fd24cd10..2a64fd03 100644 Binary files a/skins/common/images/arrow_disabled_last_25.png and b/skins/common/images/arrow_disabled_last_25.png differ diff --git a/skins/common/images/arrow_disabled_left_25.png b/skins/common/images/arrow_disabled_left_25.png index a450a5ee..8f979aab 100644 Binary files a/skins/common/images/arrow_disabled_left_25.png and b/skins/common/images/arrow_disabled_left_25.png differ diff --git a/skins/common/images/arrow_disabled_right_25.png b/skins/common/images/arrow_disabled_right_25.png index d110ad8f..11022f62 100644 Binary files a/skins/common/images/arrow_disabled_right_25.png and b/skins/common/images/arrow_disabled_right_25.png differ diff --git a/skins/common/images/arrow_first_25.png b/skins/common/images/arrow_first_25.png index ec47aa9a..52b32a5a 100644 Binary files a/skins/common/images/arrow_first_25.png and b/skins/common/images/arrow_first_25.png differ diff --git a/skins/common/images/arrow_last_25.png b/skins/common/images/arrow_last_25.png index 15e18f95..caf50331 100644 Binary files a/skins/common/images/arrow_last_25.png and b/skins/common/images/arrow_last_25.png differ diff --git a/skins/common/images/arrow_left_25.png b/skins/common/images/arrow_left_25.png index ecd33102..f363bf66 100644 Binary files a/skins/common/images/arrow_left_25.png and b/skins/common/images/arrow_left_25.png differ diff --git a/skins/common/images/arrow_right_25.png b/skins/common/images/arrow_right_25.png index 64a3c4ee..9e1b550c 100644 Binary files a/skins/common/images/arrow_right_25.png and b/skins/common/images/arrow_right_25.png differ diff --git a/skins/common/images/be-tarask/button_bold.png b/skins/common/images/be-tarask/button_bold.png index d02aeeeb..5c10cfe2 100644 Binary files a/skins/common/images/be-tarask/button_bold.png and b/skins/common/images/be-tarask/button_bold.png differ diff --git a/skins/common/images/be-tarask/button_italic.png b/skins/common/images/be-tarask/button_italic.png index 99972127..72209d74 100644 Binary files a/skins/common/images/be-tarask/button_italic.png and b/skins/common/images/be-tarask/button_italic.png differ diff --git a/skins/common/images/be-tarask/button_link.png b/skins/common/images/be-tarask/button_link.png index b87f245b..09c86fb1 100644 Binary files a/skins/common/images/be-tarask/button_link.png and b/skins/common/images/be-tarask/button_link.png differ diff --git a/skins/common/images/button_bold.png b/skins/common/images/button_bold.png index eeb91c30..75c3f109 100644 Binary files a/skins/common/images/button_bold.png and b/skins/common/images/button_bold.png differ diff --git a/skins/common/images/button_extlink.png b/skins/common/images/button_extlink.png index fdc77acd..458943c1 100644 Binary files a/skins/common/images/button_extlink.png and b/skins/common/images/button_extlink.png differ diff --git a/skins/common/images/button_headline.png b/skins/common/images/button_headline.png index 29966703..9cf751d9 100644 Binary files a/skins/common/images/button_headline.png and b/skins/common/images/button_headline.png differ diff --git a/skins/common/images/button_hr.png b/skins/common/images/button_hr.png index 55f6001a..19e4ad45 100644 Binary files a/skins/common/images/button_hr.png and b/skins/common/images/button_hr.png differ diff --git a/skins/common/images/button_image.png b/skins/common/images/button_image.png index a3f1ef60..69192965 100644 Binary files a/skins/common/images/button_image.png and b/skins/common/images/button_image.png differ diff --git a/skins/common/images/button_italic.png b/skins/common/images/button_italic.png index 7074050c..527fbd14 100644 Binary files a/skins/common/images/button_italic.png and b/skins/common/images/button_italic.png differ diff --git a/skins/common/images/button_link.png b/skins/common/images/button_link.png index 486c1e87..eb5634b9 100644 Binary files a/skins/common/images/button_link.png and b/skins/common/images/button_link.png differ diff --git a/skins/common/images/button_media.png b/skins/common/images/button_media.png index 00d29766..4194ec18 100644 Binary files a/skins/common/images/button_media.png and b/skins/common/images/button_media.png differ diff --git a/skins/common/images/button_nowiki.png b/skins/common/images/button_nowiki.png index dcad330d..c647de2b 100644 Binary files a/skins/common/images/button_nowiki.png and b/skins/common/images/button_nowiki.png differ diff --git a/skins/common/images/button_sig.png b/skins/common/images/button_sig.png index fa2af657..ff7348a9 100644 Binary files a/skins/common/images/button_sig.png and b/skins/common/images/button_sig.png differ diff --git a/skins/common/images/button_template.png b/skins/common/images/button_template.png index 576874ce..53b6f92f 100644 Binary files a/skins/common/images/button_template.png and b/skins/common/images/button_template.png differ diff --git a/skins/common/images/cc-0.png b/skins/common/images/cc-0.png index 18eb1773..9d3fe5f8 100644 Binary files a/skins/common/images/cc-0.png and b/skins/common/images/cc-0.png differ diff --git a/skins/common/images/cc-by-nc-sa.png b/skins/common/images/cc-by-nc-sa.png index d15370de..0d24a713 100644 Binary files a/skins/common/images/cc-by-nc-sa.png and b/skins/common/images/cc-by-nc-sa.png differ diff --git a/skins/common/images/cc-by-sa.png b/skins/common/images/cc-by-sa.png index ee07a661..518fb647 100644 Binary files a/skins/common/images/cc-by-sa.png and b/skins/common/images/cc-by-sa.png differ diff --git a/skins/common/images/cc-by.png b/skins/common/images/cc-by.png index 2658ee4d..9cca2f92 100644 Binary files a/skins/common/images/cc-by.png and b/skins/common/images/cc-by.png differ diff --git a/skins/common/images/closewindow.png b/skins/common/images/closewindow.png index 99ae141f..990702e2 100644 Binary files a/skins/common/images/closewindow.png and b/skins/common/images/closewindow.png differ diff --git a/skins/common/images/closewindow19x19.png b/skins/common/images/closewindow19x19.png index 762fd2a2..c96d9ffb 100644 Binary files a/skins/common/images/closewindow19x19.png and b/skins/common/images/closewindow19x19.png differ diff --git a/skins/common/images/critical-32.png b/skins/common/images/critical-32.png index 0b238c22..dce5667a 100644 Binary files a/skins/common/images/critical-32.png and b/skins/common/images/critical-32.png differ diff --git a/skins/common/images/cyrl/button_bold.png b/skins/common/images/cyrl/button_bold.png index 1c932f85..eae30d98 100644 Binary files a/skins/common/images/cyrl/button_bold.png and b/skins/common/images/cyrl/button_bold.png differ diff --git a/skins/common/images/cyrl/button_italic.png b/skins/common/images/cyrl/button_italic.png index 46e6737a..b958d220 100644 Binary files a/skins/common/images/cyrl/button_italic.png and b/skins/common/images/cyrl/button_italic.png differ diff --git a/skins/common/images/cyrl/button_link.png b/skins/common/images/cyrl/button_link.png index aa28e85a..12ad3731 100644 Binary files a/skins/common/images/cyrl/button_link.png and b/skins/common/images/cyrl/button_link.png differ diff --git a/skins/common/images/de/button_bold.png b/skins/common/images/de/button_bold.png index 3ce6f38e..367d5bc1 100644 Binary files a/skins/common/images/de/button_bold.png and b/skins/common/images/de/button_bold.png differ diff --git a/skins/common/images/de/button_italic.png b/skins/common/images/de/button_italic.png index af7b6d27..fdd8c9f9 100644 Binary files a/skins/common/images/de/button_italic.png and b/skins/common/images/de/button_italic.png differ diff --git a/skins/common/images/download-32.png b/skins/common/images/download-32.png index c571ea30..e5b8318e 100644 Binary files a/skins/common/images/download-32.png and b/skins/common/images/download-32.png differ diff --git a/skins/common/images/fa/button_bold.png b/skins/common/images/fa/button_bold.png index 25fca045..c54d094c 100644 Binary files a/skins/common/images/fa/button_bold.png and b/skins/common/images/fa/button_bold.png differ diff --git a/skins/common/images/fa/button_headline.png b/skins/common/images/fa/button_headline.png index 831a4bef..9890d155 100644 Binary files a/skins/common/images/fa/button_headline.png and b/skins/common/images/fa/button_headline.png differ diff --git a/skins/common/images/fa/button_italic.png b/skins/common/images/fa/button_italic.png index 273ab247..33f91ed6 100644 Binary files a/skins/common/images/fa/button_italic.png and b/skins/common/images/fa/button_italic.png differ diff --git a/skins/common/images/fa/button_link.png b/skins/common/images/fa/button_link.png index 345271aa..76b939e6 100644 Binary files a/skins/common/images/fa/button_link.png and b/skins/common/images/fa/button_link.png differ diff --git a/skins/common/images/fa/button_nowiki.png b/skins/common/images/fa/button_nowiki.png index 88ab9a13..12b986b4 100644 Binary files a/skins/common/images/fa/button_nowiki.png and b/skins/common/images/fa/button_nowiki.png differ diff --git a/skins/common/images/gnu-fdl.png b/skins/common/images/gnu-fdl.png index b599c2fa..3feaf57f 100644 Binary files a/skins/common/images/gnu-fdl.png and b/skins/common/images/gnu-fdl.png differ diff --git a/skins/common/images/icons/fileicon-c.png b/skins/common/images/icons/fileicon-c.png index fdd06989..0d603b70 100644 Binary files a/skins/common/images/icons/fileicon-c.png and b/skins/common/images/icons/fileicon-c.png differ diff --git a/skins/common/images/icons/fileicon-cpp.png b/skins/common/images/icons/fileicon-cpp.png index d11d827e..123688f0 100644 Binary files a/skins/common/images/icons/fileicon-cpp.png and b/skins/common/images/icons/fileicon-cpp.png differ diff --git a/skins/common/images/icons/fileicon-deb.png b/skins/common/images/icons/fileicon-deb.png index b52a4eba..87ca3fab 100644 Binary files a/skins/common/images/icons/fileicon-deb.png and b/skins/common/images/icons/fileicon-deb.png differ diff --git a/skins/common/images/icons/fileicon-djvu.png b/skins/common/images/icons/fileicon-djvu.png index b93b3f20..1da22761 100644 Binary files a/skins/common/images/icons/fileicon-djvu.png and b/skins/common/images/icons/fileicon-djvu.png differ diff --git a/skins/common/images/icons/fileicon-dvi.png b/skins/common/images/icons/fileicon-dvi.png index ab6a51f2..f37878d8 100644 Binary files a/skins/common/images/icons/fileicon-dvi.png and b/skins/common/images/icons/fileicon-dvi.png differ diff --git a/skins/common/images/icons/fileicon-exe.png b/skins/common/images/icons/fileicon-exe.png index cc1aae51..dc020eb8 100644 Binary files a/skins/common/images/icons/fileicon-exe.png and b/skins/common/images/icons/fileicon-exe.png differ diff --git a/skins/common/images/icons/fileicon-h.png b/skins/common/images/icons/fileicon-h.png index 73a547e5..339bf025 100644 Binary files a/skins/common/images/icons/fileicon-h.png and b/skins/common/images/icons/fileicon-h.png differ diff --git a/skins/common/images/icons/fileicon-html.png b/skins/common/images/icons/fileicon-html.png index 09e31f1a..f28f8a26 100644 Binary files a/skins/common/images/icons/fileicon-html.png and b/skins/common/images/icons/fileicon-html.png differ diff --git a/skins/common/images/icons/fileicon-iso.png b/skins/common/images/icons/fileicon-iso.png index 2cddf489..c73d2294 100644 Binary files a/skins/common/images/icons/fileicon-iso.png and b/skins/common/images/icons/fileicon-iso.png differ diff --git a/skins/common/images/icons/fileicon-java.png b/skins/common/images/icons/fileicon-java.png index c26b3f2c..a1b4f225 100644 Binary files a/skins/common/images/icons/fileicon-java.png and b/skins/common/images/icons/fileicon-java.png differ diff --git a/skins/common/images/icons/fileicon-mid.png b/skins/common/images/icons/fileicon-mid.png index 4143e8bb..ce2bebb2 100644 Binary files a/skins/common/images/icons/fileicon-mid.png and b/skins/common/images/icons/fileicon-mid.png differ diff --git a/skins/common/images/icons/fileicon-mov.png b/skins/common/images/icons/fileicon-mov.png index 37e479aa..952de1f2 100644 Binary files a/skins/common/images/icons/fileicon-mov.png and b/skins/common/images/icons/fileicon-mov.png differ diff --git a/skins/common/images/icons/fileicon-o.png b/skins/common/images/icons/fileicon-o.png index 872a6548..f3523d96 100644 Binary files a/skins/common/images/icons/fileicon-o.png and b/skins/common/images/icons/fileicon-o.png differ diff --git a/skins/common/images/icons/fileicon-ogg.png b/skins/common/images/icons/fileicon-ogg.png index 2c935e2a..ef4d8016 100644 Binary files a/skins/common/images/icons/fileicon-ogg.png and b/skins/common/images/icons/fileicon-ogg.png differ diff --git a/skins/common/images/icons/fileicon-pdf.png b/skins/common/images/icons/fileicon-pdf.png index a19b16f3..8c8da92b 100644 Binary files a/skins/common/images/icons/fileicon-pdf.png and b/skins/common/images/icons/fileicon-pdf.png differ diff --git a/skins/common/images/icons/fileicon-ps.png b/skins/common/images/icons/fileicon-ps.png index ec1145be..e8728331 100644 Binary files a/skins/common/images/icons/fileicon-ps.png and b/skins/common/images/icons/fileicon-ps.png differ diff --git a/skins/common/images/icons/fileicon-rm.png b/skins/common/images/icons/fileicon-rm.png index b803e055..81dbe0b7 100644 Binary files a/skins/common/images/icons/fileicon-rm.png and b/skins/common/images/icons/fileicon-rm.png differ diff --git a/skins/common/images/icons/fileicon-rpm.png b/skins/common/images/icons/fileicon-rpm.png index e1ff985f..1903aacc 100644 Binary files a/skins/common/images/icons/fileicon-rpm.png and b/skins/common/images/icons/fileicon-rpm.png differ diff --git a/skins/common/images/icons/fileicon-svg.png b/skins/common/images/icons/fileicon-svg.png index 23b675a2..b782113a 100644 Binary files a/skins/common/images/icons/fileicon-svg.png and b/skins/common/images/icons/fileicon-svg.png differ diff --git a/skins/common/images/icons/fileicon-tar.png b/skins/common/images/icons/fileicon-tar.png index 7c7a910b..e5fd1b74 100644 Binary files a/skins/common/images/icons/fileicon-tar.png and b/skins/common/images/icons/fileicon-tar.png differ diff --git a/skins/common/images/icons/fileicon-tex.png b/skins/common/images/icons/fileicon-tex.png index 6f782647..a4372841 100644 Binary files a/skins/common/images/icons/fileicon-tex.png and b/skins/common/images/icons/fileicon-tex.png differ diff --git a/skins/common/images/icons/fileicon-ttf.png b/skins/common/images/icons/fileicon-ttf.png index f5dc07a1..1ed4e740 100644 Binary files a/skins/common/images/icons/fileicon-ttf.png and b/skins/common/images/icons/fileicon-ttf.png differ diff --git a/skins/common/images/icons/fileicon-txt.png b/skins/common/images/icons/fileicon-txt.png index 1b611016..9e988e71 100644 Binary files a/skins/common/images/icons/fileicon-txt.png and b/skins/common/images/icons/fileicon-txt.png differ diff --git a/skins/common/images/icons/fileicon.png b/skins/common/images/icons/fileicon.png index 9d8e3222..59696a38 100644 Binary files a/skins/common/images/icons/fileicon.png and b/skins/common/images/icons/fileicon.png differ diff --git a/skins/common/images/info-32.png b/skins/common/images/info-32.png index 70d7f20a..ab09e1d5 100644 Binary files a/skins/common/images/info-32.png and b/skins/common/images/info-32.png differ diff --git a/skins/common/images/ksh/button_S_italic.png b/skins/common/images/ksh/button_S_italic.png index 6ef742a7..15496c08 100644 Binary files a/skins/common/images/ksh/button_S_italic.png and b/skins/common/images/ksh/button_S_italic.png differ diff --git a/skins/common/images/magnify-clip-rtl.png b/skins/common/images/magnify-clip-rtl.png index 8398a82c..cfddc279 100644 Binary files a/skins/common/images/magnify-clip-rtl.png and b/skins/common/images/magnify-clip-rtl.png differ diff --git a/skins/common/images/mediawiki.png b/skins/common/images/mediawiki.png index 915f847d..8c421183 100644 Binary files a/skins/common/images/mediawiki.png and b/skins/common/images/mediawiki.png differ diff --git a/skins/common/images/nextredirectltr.png b/skins/common/images/nextredirectltr.png index 7d60cdcf..cd657c33 100644 Binary files a/skins/common/images/nextredirectltr.png and b/skins/common/images/nextredirectltr.png differ diff --git a/skins/common/images/nextredirectrtl.png b/skins/common/images/nextredirectrtl.png index 3d5b3959..b788f334 100644 Binary files a/skins/common/images/nextredirectrtl.png and b/skins/common/images/nextredirectrtl.png differ diff --git a/skins/common/images/poweredby_mediawiki_88x31.png b/skins/common/images/poweredby_mediawiki_88x31.png index 835e860b..30e1d2ea 100644 Binary files a/skins/common/images/poweredby_mediawiki_88x31.png and b/skins/common/images/poweredby_mediawiki_88x31.png differ diff --git a/skins/common/images/public-domain.png b/skins/common/images/public-domain.png index 296e66c8..ebf01072 100644 Binary files a/skins/common/images/public-domain.png and b/skins/common/images/public-domain.png differ diff --git a/skins/common/images/redirectltr.png b/skins/common/images/redirectltr.png index 0c731b6c..695f2a13 100644 Binary files a/skins/common/images/redirectltr.png and b/skins/common/images/redirectltr.png differ diff --git a/skins/common/images/redirectrtl.png b/skins/common/images/redirectrtl.png index ad0a12d1..c954a2ad 100644 Binary files a/skins/common/images/redirectrtl.png and b/skins/common/images/redirectrtl.png differ diff --git a/skins/common/images/remove.png b/skins/common/images/remove.png index ba2c147d..cd03d6da 100644 Binary files a/skins/common/images/remove.png and b/skins/common/images/remove.png differ diff --git a/skins/common/images/spinner.gif b/skins/common/images/spinner.gif index 37d3a43d..6146be4e 100644 Binary files a/skins/common/images/spinner.gif and b/skins/common/images/spinner.gif differ diff --git a/skins/common/images/tooltip_icon.png b/skins/common/images/tooltip_icon.png index 17bc2e14..ba5718ab 100644 Binary files a/skins/common/images/tooltip_icon.png and b/skins/common/images/tooltip_icon.png differ diff --git a/skins/common/images/warning-32.png b/skins/common/images/warning-32.png index 6267cbc9..b14a8315 100644 Binary files a/skins/common/images/warning-32.png and b/skins/common/images/warning-32.png differ diff --git a/skins/common/images/wiki.png b/skins/common/images/wiki.png index 4ca6efd6..48595b00 100644 Binary files a/skins/common/images/wiki.png and b/skins/common/images/wiki.png differ diff --git a/skins/common/mwsuggest.js b/skins/common/mwsuggest.js deleted file mode 100644 index dac59546..00000000 --- a/skins/common/mwsuggest.js +++ /dev/null @@ -1,1063 +0,0 @@ -/* - * OpenSearch ajax suggestion engine for MediaWiki - * - * uses core MediaWiki open search support to fetch suggestions - * and show them below search boxes and other inputs - * - * by Robert Stojnic (April 2008) - */ - -// Make sure wgMWSuggestTemplate is defined -if ( !mw.config.exists( 'wgMWSuggestTemplate' ) ) { - mw.config.set( 'wgMWSuggestTemplate', mw.config.get( 'wgServer' ) + mw.config.get( 'wgScriptPath' ) - + "/api.php?action=opensearch\x26search={searchTerms}\x26namespace={namespaces}\x26suggest" ); -} - -// search_box_id -> Results object -window.os_map = {}; -// cached data, url -> json_text -window.os_cache = {}; -// global variables for suggest_keypress -window.os_cur_keypressed = 0; -window.os_keypressed_count = 0; -// type: Timer -window.os_timer = null; -// tie mousedown/up events -window.os_mouse_pressed = false; -window.os_mouse_num = -1; -// if true, the last change was made by mouse (and not keyboard) -window.os_mouse_moved = false; -// delay between keypress and suggestion (in ms) -window.os_search_timeout = 250; -// these pairs of inputs/forms will be autoloaded at startup -window.os_autoload_inputs = ['searchInput', 'searchInput2', 'powerSearchText', 'searchText']; -window.os_autoload_forms = ['searchform', 'searchform2', 'powersearch', 'search']; -// if we stopped the service -window.os_is_stopped = false; -// max lines to show in suggest table -window.os_max_lines_per_suggest = 7; -// number of steps to animate expansion/contraction of container width -window.os_animation_steps = 6; -// num of pixels of smallest step -window.os_animation_min_step = 2; -// delay between steps (in ms) -window.os_animation_delay = 30; -// max width of container in percent of normal size (1 == 100%) -window.os_container_max_width = 2; -// currently active animation timer -window.os_animation_timer = null; -// whether MWSuggest is enabled. Set to false when os_MWSuggestDisable() is called -window.os_enabled = true; - -/** - * is a new HTML5 element that allows you to manually - * supply suggestion lists and have them rendered according to the - * right platform conventions. Opera as of version 11 has a fatal - * problem: the suggestion lags behind what the user types by one - * keypress. (Reported as DSK-276870 to Opera's secret bug tracker.) - * There are also problems with other browsers, including Firefox and - * Safari: See bug 31602 for details. - */ -window.os_use_datalist = false; - -/** Timeout timer class that will fetch the results */ -window.os_Timer = function( id, r, query ) { - this.id = id; - this.r = r; - this.query = query; -}; - -/** Property class for single search box */ -window.os_Results = function( name, formname ) { - this.searchform = formname; // id of the searchform - this.searchbox = name; // id of the searchbox - this.container = name + 'Suggest'; // div that holds results - this.resultTable = name + 'Result'; // id base for the result table (+num = table row) - this.resultText = name + 'ResultText'; // id base for the spans within result tables (+num) - this.toggle = name + 'Toggle'; // div that has the toggle (enable/disable) link - this.query = null; // last processed query - this.results = null; // parsed titles - this.resultCount = 0; // number of results - this.original = null; // query that user entered - this.selected = -1; // which result is selected - this.containerCount = 0; // number of results visible in container - this.containerRow = 0; // height of result field in the container - this.containerTotal = 0; // total height of the container will all results - this.visible = false; // if container is visible - this.stayHidden = false; // don't try to show if lost focus -}; - -/** Timer user to animate expansion/contraction of container width */ -window.os_AnimationTimer = function( r, target ) { - this.r = r; - var current = document.getElementById(r.container).offsetWidth; - this.inc = Math.round( ( target - current ) / os_animation_steps ); - if( this.inc < os_animation_min_step && this.inc >=0 ) { - this.inc = os_animation_min_step; // minimal animation step - } - if( this.inc > -os_animation_min_step && this.inc < 0 ) { - this.inc = -os_animation_min_step; - } - this.target = target; -}; - -/****************** - * Initialization - ******************/ - -/** Initialization, call upon page onload */ -window.os_MWSuggestInit = function() { - if ( !window.os_enabled ) { - return; - } - - for( var i = 0; i < os_autoload_inputs.length; i++ ) { - var id = os_autoload_inputs[i]; - var form = os_autoload_forms[i]; - element = document.getElementById( id ); - if( element != null ) { - os_initHandlers( id, form, element ); - } - } -}; - -/* Teardown, called when things like SimpleSearch need to disable MWSuggest */ -window.os_MWSuggestTeardown = function() { - for( var i = 0; i < os_autoload_inputs.length; i++ ) { - var id = os_autoload_inputs[i]; - var form = os_autoload_forms[i]; - element = document.getElementById( id ); - if( element != null ) { - os_teardownHandlers( id, form, element ); - } - } -}; - -/* Call this to disable MWSuggest. Works regardless of whether MWSuggest has been initialized already. */ -window.os_MWSuggestDisable = function() { - window.os_MWSuggestTeardown(); - window.os_enabled = false; -} - - -/** Init Result objects and event handlers */ -window.os_initHandlers = function( name, formname, element ) { - var r = new os_Results( name, formname ); - var formElement = document.getElementById( formname ); - if( !formElement ) { - // Older browsers (Opera 8) cannot get form elements - return; - } - // event handler - os_hookEvent( element, 'keyup', os_eventKeyup ); - os_hookEvent( element, 'keydown', os_eventKeydown ); - os_hookEvent( element, 'keypress', os_eventKeypress ); - if ( !os_use_datalist ) { - // These are needed for the div hack to hide it if the user blurs. - os_hookEvent( element, 'blur', os_eventBlur ); - os_hookEvent( element, 'focus', os_eventFocus ); - // We don't want browser auto-suggestions interfering with our div, but - // autocomplete must be on for datalist to work (at least in Opera - // 10.10). - element.setAttribute( 'autocomplete', 'off' ); - } - // stopping handler - os_hookEvent( formElement, 'submit', os_eventOnsubmit ); - os_map[name] = r; - // toggle link - if( document.getElementById( r.toggle ) == null ) { - // TODO: disable this while we figure out a way for this to work in all browsers - /* if( name == 'searchInput' ) { - // special case: place above the main search box - var t = os_createToggle( r, 'os-suggest-toggle' ); - var searchBody = document.getElementById( 'searchBody' ); - var first = searchBody.parentNode.firstChild.nextSibling.appendChild(t); - } else { - // default: place below search box to the right - var t = os_createToggle( r, 'os-suggest-toggle-def' ); - var top = element.offsetTop + element.offsetHeight; - var left = element.offsetLeft + element.offsetWidth; - t.style.position = 'absolute'; - t.style.top = top + 'px'; - t.style.left = left + 'px'; - element.parentNode.appendChild( t ); - // only now width gets calculated, shift right - left -= t.offsetWidth; - t.style.left = left + 'px'; - t.style.visibility = 'visible'; - } */ - } - -}; - -window.os_teardownHandlers = function( name, formname, element ) { - var formElement = document.getElementById( formname ); - if( !formElement ) { - // Older browsers (Opera 8) cannot get form elements - return; - } - - os_unhookEvent( element, 'keyup', os_eventKeyup ); - os_unhookEvent( element, 'keydown', os_eventKeydown ); - os_unhookEvent( element, 'keypress', os_eventKeypress ); - if ( !os_use_datalist ) { - // These are needed for the div hack to hide it if the user blurs. - os_unhookEvent( element, 'blur', os_eventBlur ); - os_unhookEvent( element, 'focus', os_eventFocus ); - // We don't want browser auto-suggestions interfering with our div, but - // autocomplete must be on for datalist to work (at least in Opera - // 10.10). - element.removeAttribute( 'autocomplete' ); - } - // stopping handler - os_unhookEvent( formElement, 'submit', os_eventOnsubmit ); -}; - - -window.os_hookEvent = function( element, hookName, hookFunct ) { - if ( element.addEventListener ) { - element.addEventListener( hookName, hookFunct, false ); - } else if ( window.attachEvent ) { - element.attachEvent( 'on' + hookName, hookFunct ); - } -}; - -window.os_unhookEvent = function( element, hookName, hookFunct ) { - if ( element.removeEventListener ) { - element.removeEventListener( hookName, hookFunct, false ); - } else if ( element.detachEvent ) { - element.detachEvent( 'on' + hookName, hookFunct ); - } -} - -/******************** - * Keyboard events - ********************/ - -/** Event handler that will fetch results on keyup */ -window.os_eventKeyup = function( e ) { - var targ = os_getTarget( e ); - var r = os_map[targ.id]; - if( r == null ) { - return; // not our event - } - - // some browsers won't generate keypressed for arrow keys, catch it - if( os_keypressed_count == 0 ) { - os_processKey( r, os_cur_keypressed, targ ); - } - var query = targ.value; - os_fetchResults( r, query, os_search_timeout ); -}; - -/** catch arrows up/down and escape to hide the suggestions */ -window.os_processKey = function( r, keypressed, targ ) { - if ( keypressed == 40 && !r.visible && os_timer == null ) { - // If the user hits the down arrow, fetch results immediately if none - // are already displayed. - r.query = ''; - os_fetchResults( r, targ.value, 0 ); - } - // Otherwise, if we're not using datalist, we need to handle scrolling and - // so on. - if ( os_use_datalist ) { - return; - } - if ( keypressed == 40 ) { // Arrow Down - if ( r.visible ) { - os_changeHighlight( r, r.selected, r.selected + 1, true ); - } - } else if ( keypressed == 38 ) { // Arrow Up - if ( r.visible ) { - os_changeHighlight( r, r.selected, r.selected - 1, true ); - } - } else if( keypressed == 27 ) { // Escape - document.getElementById( r.searchbox ).value = r.original; - r.query = r.original; - os_hideResults( r ); - } else if( r.query != document.getElementById( r.searchbox ).value ) { - // os_hideResults( r ); // don't show old suggestions - } -}; - -/** When keys is held down use a timer to output regular events */ -window.os_eventKeypress = function( e ) { - var targ = os_getTarget( e ); - var r = os_map[targ.id]; - if( r == null ) { - return; // not our event - } - - var keypressed = os_cur_keypressed; - - os_keypressed_count++; - os_processKey( r, keypressed, targ ); -}; - -/** Catch the key code (Firefox bug) */ -window.os_eventKeydown = function( e ) { - if ( !e ) { - e = window.event; - } - var targ = os_getTarget( e ); - var r = os_map[targ.id]; - if( r == null ) { - return; // not our event - } - - os_mouse_moved = false; - - os_cur_keypressed = ( e.keyCode == undefined ) ? e.which : e.keyCode; - os_keypressed_count = 0; -}; - - -/** When the form is submitted hide everything, cancel updates... */ -window.os_eventOnsubmit = function( e ) { - var targ = os_getTarget( e ); - - os_is_stopped = true; - // kill timed requests - if( os_timer != null && os_timer.id != null ) { - clearTimeout( os_timer.id ); - os_timer = null; - } - // Hide all suggestions - for( i = 0; i < os_autoload_inputs.length; i++ ) { - var r = os_map[os_autoload_inputs[i]]; - if( r != null ) { - var b = document.getElementById( r.searchform ); - if( b != null && b == targ ) { - // set query value so the handler won't try to fetch additional results - r.query = document.getElementById( r.searchbox ).value; - } - os_hideResults( r ); - } - } - return true; -}; - - - -/** Hide results from the user, either making the div visibility=hidden or - * detaching the datalist from the input. */ -window.os_hideResults = function( r ) { - if ( os_use_datalist ) { - document.getElementById( r.searchbox ).setAttribute( 'list', '' ); - } else { - var c = document.getElementById( r.container ); - if ( c != null ) { - c.style.visibility = 'hidden'; - } - } - r.visible = false; - r.selected = -1; -}; - -window.os_decodeValue = function( value ) { - if ( decodeURIComponent ) { - return decodeURIComponent( value ); - } - if( unescape ) { - return unescape( value ); - } - return null; -}; - -window.os_encodeQuery = function( value ) { - if ( encodeURIComponent ) { - return encodeURIComponent( value ); - } - if( escape ) { - return escape( value ); - } - return null; -}; - -/** Handles data from XMLHttpRequest, and updates the suggest results */ -window.os_updateResults = function( r, query, text, cacheKey ) { - os_cache[cacheKey] = text; - r.query = query; - r.original = query; - if( text == '' ) { - r.results = null; - r.resultCount = 0; - os_hideResults( r ); - } else { - try { - var p = eval( '(' + text + ')' ); // simple json parse, could do a safer one - if( p.length < 2 || p[1].length == 0 ) { - r.results = null; - r.resultCount = 0; - os_hideResults( r ); - return; - } - if ( os_use_datalist ) { - os_setupDatalist( r, p[1] ); - } else { - os_setupDiv( r, p[1] ); - } - } catch( e ) { - // bad response from server or such - os_hideResults( r ); - os_cache[cacheKey] = null; - } - } -}; - -/** - * Create and populate a . - * - * @param r os_Result object - * @param results Array of the new results to replace existing ones - */ -window.os_setupDatalist = function( r, results ) { - var s = document.getElementById( r.searchbox ); - var c = document.getElementById( r.container ); - if ( c == null ) { - c = document.createElement( 'datalist' ); - c.setAttribute( 'id', r.container ); - document.body.appendChild( c ); - } else { - c.innerHTML = ''; - } - s.setAttribute( 'list', r.container ); - - r.results = []; - r.resultCount = results.length; - r.visible = true; - for ( i = 0; i < results.length; i++ ) { - var title = os_decodeValue( results[i] ); - var opt = document.createElement( 'option' ); - opt.value = title; - r.results[i] = title; - c.appendChild( opt ); - } -}; - -/** Fetch namespaces from checkboxes or hidden fields in the search form, - if none defined use wgSearchNamespaces */ -window.os_getNamespaces = function( r ) { - var namespaces = ''; - var elements = document.forms[r.searchform].elements; - for( i = 0; i < elements.length; i++ ) { - var name = elements[i].name; - if( typeof name != 'undefined' && name.length > 2 && name[0] == 'n' && - name[1] == 's' && ( - ( elements[i].type == 'checkbox' && elements[i].checked ) || - ( elements[i].type == 'hidden' && elements[i].value == '1' ) - ) - ) { - if( namespaces != '' ) { - namespaces += '|'; - } - namespaces += name.substring( 2 ); - } - } - if( namespaces == '' ) { - namespaces = mw.config.get( 'wgSearchNamespaces' ).join('|'); - } - return namespaces; -}; - -/** Update results if user hasn't already typed something else */ -window.os_updateIfRelevant = function( r, query, text, cacheKey ) { - var t = document.getElementById( r.searchbox ); - if( t != null && t.value == query ) { // check if response is still relevant - os_updateResults( r, query, text, cacheKey ); - } - r.query = query; -}; - -/** Fetch results after some timeout */ -window.os_delayedFetch = function() { - if( os_timer == null ) { - return; - } - var r = os_timer.r; - var query = os_timer.query; - os_timer = null; - var path = mw.config.get( 'wgMWSuggestTemplate' ).replace( "{namespaces}", os_getNamespaces( r ) ) - .replace( "{dbname}", mw.config.get( 'wgDBname' ) ) - .replace( "{searchTerms}", os_encodeQuery( query ) ); - - // try to get from cache, if not fetch using ajax - var cached = os_cache[path]; - if( cached != null && cached != undefined ) { - os_updateIfRelevant( r, query, cached, path ); - } else { - var xmlhttp = sajax_init_object(); - if( xmlhttp ) { - try { - xmlhttp.open( 'GET', path, true ); - xmlhttp.onreadystatechange = function() { - if ( xmlhttp.readyState == 4 && typeof os_updateIfRelevant == 'function' ) { - os_updateIfRelevant( r, query, xmlhttp.responseText, path ); - } - }; - xmlhttp.send( null ); - } catch ( e ) { - if ( window.location.hostname == 'localhost' ) { - alert( "Your browser blocks XMLHttpRequest to 'localhost', try using a real hostname for development/testing." ); - } - throw e; - } - } - } -}; - -/** Init timed update via os_delayedUpdate() */ -window.os_fetchResults = function( r, query, timeout ) { - if( query == '' ) { - r.query = ''; - os_hideResults( r ); - return; - } else if( query == r.query ) { - return; // no change - } - - os_is_stopped = false; // make sure we're running - - // cancel any pending fetches - if( os_timer != null && os_timer.id != null ) { - clearTimeout( os_timer.id ); - } - // schedule delayed fetching of results - if( timeout != 0 ) { - os_timer = new os_Timer( setTimeout( "os_delayedFetch()", timeout ), r, query ); - } else { - os_timer = new os_Timer( null, r, query ); - os_delayedFetch(); // do it now! - } -}; - -/** Find event target */ -window.os_getTarget = function( e ) { - if ( !e ) { - e = window.event; - } - if ( e.target ) { - return e.target; - } else if ( e.srcElement ) { - return e.srcElement; - } else { - return null; - } -}; - -/** Check if x is a valid integer */ -window.os_isNumber = function( x ) { - if( x == '' || isNaN( x ) ) { - return false; - } - for( var i = 0; i < x.length; i++ ) { - var c = x.charAt( i ); - if( !( c >= '0' && c <= '9' ) ) { - return false; - } - } - return true; -}; - -/** Call this to enable suggestions on input (id=inputId), on a form (name=formName) */ -window.os_enableSuggestionsOn = function( inputId, formName ) { - os_initHandlers( inputId, formName, document.getElementById( inputId ) ); -}; - -/** Call this to disable suggestios on input box (id=inputId) */ -window.os_disableSuggestionsOn = function( inputId ) { - r = os_map[inputId]; - if( r != null ) { - // cancel/hide results - os_timer = null; - os_hideResults( r ); - // turn autocomplete on ! - document.getElementById( inputId ).setAttribute( 'autocomplete', 'on' ); - // remove descriptor - os_map[inputId] = null; - } - - // Remove the element from the os_autoload_* arrays - var index = os_autoload_inputs.indexOf( inputId ); - if ( index >= 0 ) { - os_autoload_inputs[index] = os_autoload_forms[index] = ''; - } -}; - -/************************************************ - * Div-only functions (irrelevant for datalist) - ************************************************/ - -/** Event: loss of focus of input box */ -window.os_eventBlur = function( e ) { - var targ = os_getTarget( e ); - var r = os_map[targ.id]; - if( r == null ) { - return; // not our event - } - if( !os_mouse_pressed ) { - os_hideResults( r ); - // force canvas to stay hidden - r.stayHidden = true; - // cancel any pending fetches - if( os_timer != null && os_timer.id != null ) { - clearTimeout( os_timer.id ); - } - os_timer = null; - } -}; - -/** Event: focus (catch only when stopped) */ -window.os_eventFocus = function( e ) { - var targ = os_getTarget( e ); - var r = os_map[targ.id]; - if( r == null ) { - return; // not our event - } - r.stayHidden = false; -}; - -/** - * Create and populate a
, for non--supporting browsers. - * - * @param r os_Result object - * @param results Array of the new results to replace existing ones - */ -window.os_setupDiv = function( r, results ) { - var c = document.getElementById( r.container ); - if ( c == null ) { - c = os_createContainer( r ); - } - c.innerHTML = os_createResultTable( r, results ); - // init container table sizes - var t = document.getElementById( r.resultTable ); - r.containerTotal = t.offsetHeight; - r.containerRow = t.offsetHeight / r.resultCount; - os_fitContainer( r ); - os_trimResultText( r ); - os_showResults( r ); -}; - -/** Create the result table to be placed in the container div */ -window.os_createResultTable = function( r, results ) { - var c = document.getElementById( r.container ); - var width = c.offsetWidth - os_operaWidthFix( c.offsetWidth ); - var html = ''; - r.results = []; - r.resultCount = results.length; - for( i = 0; i < results.length; i++ ) { - var title = os_decodeValue( results[i] ); - r.results[i] = title; - html += ''; - } - html += '
' + title + '
'; - return html; -}; - -/** Show results div */ -window.os_showResults = function( r ) { - if( os_is_stopped ) { - return; - } - if( r.stayHidden ) { - return; - } - os_fitContainer( r ); - var c = document.getElementById( r.container ); - r.selected = -1; - if( c != null ) { - c.scrollTop = 0; - c.style.visibility = 'visible'; - r.visible = true; - } -}; - -window.os_operaWidthFix = function( x ) { - // For browsers that don't understand overflow-x, estimate scrollbar width - if( typeof document.body.style.overflowX != 'string' ) { - return 30; - } - return 0; -}; - -/** Brower-dependent functions to find window inner size, and scroll status */ -window.f_clientWidth = function() { - return f_filterResults( - window.innerWidth ? window.innerWidth : 0, - document.documentElement ? document.documentElement.clientWidth : 0, - document.body ? document.body.clientWidth : 0 - ); -}; - -window.f_clientHeight = function() { - return f_filterResults( - window.innerHeight ? window.innerHeight : 0, - document.documentElement ? document.documentElement.clientHeight : 0, - document.body ? document.body.clientHeight : 0 - ); -}; - -window.f_scrollLeft = function() { - return f_filterResults( - window.pageXOffset ? window.pageXOffset : 0, - document.documentElement ? document.documentElement.scrollLeft : 0, - document.body ? document.body.scrollLeft : 0 - ); -}; - -window.f_scrollTop = function() { - return f_filterResults( - window.pageYOffset ? window.pageYOffset : 0, - document.documentElement ? document.documentElement.scrollTop : 0, - document.body ? document.body.scrollTop : 0 - ); -}; - -window.f_filterResults = function( n_win, n_docel, n_body ) { - var n_result = n_win ? n_win : 0; - if ( n_docel && ( !n_result || ( n_result > n_docel ) ) ) { - n_result = n_docel; - } - return n_body && ( !n_result || ( n_result > n_body ) ) ? n_body : n_result; -}; - -/** Get the height available for the results container */ -window.os_availableHeight = function( r ) { - var absTop = document.getElementById( r.container ).style.top; - var px = absTop.lastIndexOf( 'px' ); - if( px > 0 ) { - absTop = absTop.substring( 0, px ); - } - return f_clientHeight() - ( absTop - f_scrollTop() ); -}; - -/** Get element absolute position {left,top} */ -window.os_getElementPosition = function( elemID ) { - var offsetTrail = document.getElementById( elemID ); - var offsetLeft = 0; - var offsetTop = 0; - while ( offsetTrail ) { - offsetLeft += offsetTrail.offsetLeft; - offsetTop += offsetTrail.offsetTop; - offsetTrail = offsetTrail.offsetParent; - } - if ( navigator.userAgent.indexOf('Mac') != -1 && typeof document.body.leftMargin != 'undefined' ) { - offsetLeft += document.body.leftMargin; - offsetTop += document.body.topMargin; - } - return { left:offsetLeft, top:offsetTop }; -}; - -/** Create the container div that will hold the suggested titles */ -window.os_createContainer = function( r ) { - var c = document.createElement( 'div' ); - var s = document.getElementById( r.searchbox ); - var pos = os_getElementPosition( r.searchbox ); - var left = pos.left; - var top = pos.top + s.offsetHeight; - c.className = 'os-suggest'; - c.setAttribute( 'id', r.container ); - document.body.appendChild( c ); - - // dynamically generated style params - // IE workaround, cannot explicitely set "style" attribute - c = document.getElementById( r.container ); - c.style.top = top + 'px'; - c.style.left = left + 'px'; - c.style.width = s.offsetWidth + 'px'; - - // mouse event handlers - c.onmouseover = function( event ) { os_eventMouseover( r.searchbox, event ); }; - c.onmousemove = function( event ) { os_eventMousemove( r.searchbox, event ); }; - c.onmousedown = function( event ) { return os_eventMousedown( r.searchbox, event ); }; - c.onmouseup = function( event ) { os_eventMouseup( r.searchbox, event ); }; - return c; -}; - -/** change container height to fit to screen */ -window.os_fitContainer = function( r ) { - var c = document.getElementById( r.container ); - var h = os_availableHeight( r ) - 20; - var inc = r.containerRow; - h = parseInt( h / inc ) * inc; - if( h < ( 2 * inc ) && r.resultCount > 1 ) { // min: two results - h = 2 * inc; - } - if( ( h / inc ) > os_max_lines_per_suggest ) { - h = inc * os_max_lines_per_suggest; - } - if( h < r.containerTotal ) { - c.style.height = h + 'px'; - r.containerCount = parseInt( Math.round( h / inc ) ); - } else { - c.style.height = r.containerTotal + 'px'; - r.containerCount = r.resultCount; - } -}; - -/** If some entries are longer than the box, replace text with "..." */ -window.os_trimResultText = function( r ) { - // find max width, first see if we could expand the container to fit it - var maxW = 0; - for( var i = 0; i < r.resultCount; i++ ) { - var e = document.getElementById( r.resultText + i ); - if( e.offsetWidth > maxW ) { - maxW = e.offsetWidth; - } - } - var w = document.getElementById( r.container ).offsetWidth; - var fix = 0; - if( r.containerCount < r.resultCount ) { - fix = 20; // give 20px for scrollbar - } else { - fix = os_operaWidthFix( w ); - } - if( fix < 4 ) { - fix = 4; // basic padding - } - maxW += fix; - - // resize container to fit more data if permitted - var normW = document.getElementById( r.searchbox ).offsetWidth; - var prop = maxW / normW; - if( prop > os_container_max_width ) { - prop = os_container_max_width; - } else if( prop < 1 ) { - prop = 1; - } - var newW = Math.round( normW * prop ); - if( w != newW ) { - w = newW; - if( os_animation_timer != null ) { - clearInterval( os_animation_timer.id ); - } - os_animation_timer = new os_AnimationTimer( r, w ); - os_animation_timer.id = setInterval( "os_animateChangeWidth()", os_animation_delay ); - w -= fix; // this much is reserved - } - - // trim results - if( w < 10 ) { - return; - } - for( var i = 0; i < r.resultCount; i++ ) { - var e = document.getElementById( r.resultText + i ); - var replace = 1; - var lastW = e.offsetWidth + 1; - var iteration = 0; - var changedText = false; - while( e.offsetWidth > w && ( e.offsetWidth < lastW || iteration < 2 ) ) { - changedText = true; - lastW = e.offsetWidth; - var l = e.innerHTML; - e.innerHTML = l.substring( 0, l.length - replace ) + '...'; - iteration++; - replace = 4; // how many chars to replace - } - if( changedText ) { - // show hint for trimmed titles - document.getElementById( r.resultTable + i ).setAttribute( 'title', r.results[i] ); - } - } -}; - -/** Invoked on timer to animate change in container width */ -window.os_animateChangeWidth = function() { - var r = os_animation_timer.r; - var c = document.getElementById( r.container ); - var w = c.offsetWidth; - var normW = document.getElementById( r.searchbox ).offsetWidth; - var normL = os_getElementPosition( r.searchbox ).left; - var inc = os_animation_timer.inc; - var target = os_animation_timer.target; - var nw = w + inc; - if( ( inc > 0 && nw >= target ) || ( inc <= 0 && nw <= target ) ) { - // finished ! - c.style.width = target + 'px'; - clearInterval( os_animation_timer.id ); - os_animation_timer = null; - } else { - // in-progress - c.style.width = nw + 'px'; - if( document.documentElement.dir == 'rtl' ) { - c.style.left = ( normL + normW + ( target - nw ) - os_animation_timer.target - 1 ) + 'px'; - } - } -}; - -/** Change the highlighted row (i.e. suggestion), from position cur to next */ -window.os_changeHighlight = function( r, cur, next, updateSearchBox ) { - if ( next >= r.resultCount ) { - next = r.resultCount - 1; - } - if ( next < -1 ) { - next = -1; - } - r.selected = next; - if ( cur == next ) { - return; // nothing to do. - } - - if( cur >= 0 ) { - var curRow = document.getElementById( r.resultTable + cur ); - if( curRow != null ) { - curRow.className = 'os-suggest-result'; - } - } - var newText; - if( next >= 0 ) { - var nextRow = document.getElementById( r.resultTable + next ); - if( nextRow != null ) { - nextRow.className = os_HighlightClass(); - } - newText = r.results[next]; - } else { - newText = r.original; - } - - // adjust the scrollbar if any - if( r.containerCount < r.resultCount ) { - var c = document.getElementById( r.container ); - var vStart = c.scrollTop / r.containerRow; - var vEnd = vStart + r.containerCount; - if( next < vStart ) { - c.scrollTop = next * r.containerRow; - } else if( next >= vEnd ) { - c.scrollTop = ( next - r.containerCount + 1 ) * r.containerRow; - } - } - - // update the contents of the search box - if( updateSearchBox ) { - os_updateSearchQuery( r, newText ); - } -}; - -window.os_HighlightClass = function() { - var match = navigator.userAgent.match(/AppleWebKit\/(\d+)/); - if ( match ) { - var webKitVersion = parseInt( match[1] ); - if ( webKitVersion < 523 ) { - // CSS system highlight colors broken on old Safari - // https://bugs.webkit.org/show_bug.cgi?id=6129 - // Safari 3.0.4, 3.1 known ok - return 'os-suggest-result-hl-webkit'; - } - } - return 'os-suggest-result-hl'; -}; - -window.os_updateSearchQuery = function( r, newText ) { - document.getElementById( r.searchbox ).value = newText; - r.query = newText; -}; - - -/******************** - * Mouse events - ********************/ - -/** Mouse over the container */ -window.os_eventMouseover = function( srcId, e ) { - var targ = os_getTarget( e ); - var r = os_map[srcId]; - if( r == null || !os_mouse_moved ) { - return; // not our event - } - var num = os_getNumberSuffix( targ.id ); - if( num >= 0 ) { - os_changeHighlight( r, r.selected, num, false ); - } -}; - -/* Get row where the event occured (from its id) */ -window.os_getNumberSuffix = function( id ) { - var num = id.substring( id.length - 2 ); - if( !( num.charAt( 0 ) >= '0' && num.charAt( 0 ) <= '9' ) ) { - num = num.substring( 1 ); - } - if( os_isNumber( num ) ) { - return parseInt( num ); - } else { - return -1; - } -}; - -/** Save mouse move as last action */ -window.os_eventMousemove = function( srcId, e ) { - os_mouse_moved = true; -}; - -/** Mouse button held down, register possible click */ -window.os_eventMousedown = function( srcId, e ) { - var targ = os_getTarget( e ); - var r = os_map[srcId]; - if( r == null ) { - return; // not our event - } - var num = os_getNumberSuffix( targ.id ); - - os_mouse_pressed = true; - if( num >= 0 ) { - os_mouse_num = num; - // os_updateSearchQuery( r, r.results[num] ); - } - // keep the focus on the search field - document.getElementById( r.searchbox ).focus(); - - return false; // prevents selection -}; - -/** Mouse button released, check for click on some row */ -window.os_eventMouseup = function( srcId, e ) { - var targ = os_getTarget( e ); - var r = os_map[srcId]; - if( r == null ) { - return; // not our event - } - var num = os_getNumberSuffix( targ.id ); - - if( num >= 0 && os_mouse_num == num ) { - os_updateSearchQuery( r, r.results[num] ); - os_hideResults( r ); - document.getElementById( r.searchform ).submit(); - } - os_mouse_pressed = false; - // keep the focus on the search field - document.getElementById( r.searchbox ).focus(); -}; - -/** Toggle stuff seems to be dead code? */ - -/** Return the span element that contains the toggle link */ -window.os_createToggle = function( r, className ) { - var t = document.createElement( 'span' ); - t.className = className; - t.setAttribute( 'id', r.toggle ); - var link = document.createElement( 'a' ); - link.setAttribute( 'href', 'javascript:void(0);' ); - link.onclick = function() { os_toggle( r.searchbox, r.searchform ); }; - var msg = document.createTextNode( wgMWSuggestMessages[0] ); - link.appendChild( msg ); - t.appendChild( link ); - return t; -}; - -/** Call when user clicks on some of the toggle links */ -window.os_toggle = function( inputId, formName ) { - r = os_map[inputId]; - var msg = ''; - if( r == null ) { - os_enableSuggestionsOn( inputId, formName ); - r = os_map[inputId]; - msg = wgMWSuggestMessages[0]; - } else{ - os_disableSuggestionsOn( inputId, formName ); - msg = wgMWSuggestMessages[1]; - } - // change message - var link = document.getElementById( r.toggle ).firstChild; - link.replaceChild( document.createTextNode( msg ), link.firstChild ); -}; - -hookEvent( 'load', os_MWSuggestInit ); diff --git a/skins/common/oldshared.css b/skins/common/oldshared.css index 84d42c9f..6dcdf6f1 100644 --- a/skins/common/oldshared.css +++ b/skins/common/oldshared.css @@ -55,12 +55,6 @@ div.floatleft p { font-style: italic; } - -/* Print-specific things to hide */ -.printfooter { - display: none; -} - /* table standards */ table.rimage { float: right; diff --git a/skins/common/preview.js b/skins/common/preview.js deleted file mode 100644 index 9e76ca09..00000000 --- a/skins/common/preview.js +++ /dev/null @@ -1,128 +0,0 @@ -/** - * Live preview script for MediaWiki - */ -(function( $ ) { - window.doLivePreview = function( e ) { - e.preventDefault(); - - $( mw ).trigger( 'LivePreviewPrepare' ); - - var postData = $('#editform').formToArray(); - postData.push( { 'name' : 'wpPreview', 'value' : '1' } ); - - // Hide active diff, used templates, old preview if shown - var copyElements = ['#wikiPreview', '.templatesUsed', '.hiddencats', - '#catlinks']; - var copySelector = copyElements.join(','); - - $.each( copyElements, function(k,v) { $(v).fadeOut('fast'); } ); - - // Display a loading graphic - var loadSpinner = $('
'); - $('#wikiPreview').before( loadSpinner ); - - var page = $('
'); - var target = $('#editform').attr('action'); - - if ( !target ) { - target = window.location.href; - } - - page.load( target + ' ' + copySelector, postData, - function() { - - for( var i=0; i