From 9db190c7e736ec8d063187d4241b59feaf7dc2d1 Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Wed, 22 Jun 2011 11:28:20 +0200 Subject: update to MediaWiki 1.17.0 --- skins/common/IEFixes.js | 41 +- skins/common/ajax.js | 196 +- skins/common/ajaxwatch.js | 262 +- skins/common/block.js | 48 +- skins/common/changepassword.js | 16 - skins/common/cologneblue.css | 247 +- skins/common/commonPrint.css | 316 +- skins/common/common_rtl.css | 12 +- skins/common/config-cc.css | 56 + skins/common/config.css | 164 + skins/common/config.js | 102 + skins/common/diff.css | 84 +- skins/common/edit.js | 44 +- skins/common/enhancedchanges.js | 4 +- skins/common/history.js | 25 +- skins/common/htmlform.js | 4 +- skins/common/images/Arr_d.png | Bin 215 -> 205 bytes skins/common/images/Arr_l.png | Bin 263 -> 257 bytes skins/common/images/Arr_r.png | Bin 210 -> 206 bytes skins/common/images/Arr_u.png | Bin 425 -> 423 bytes skins/common/images/add.png | Bin 3329 -> 3222 bytes skins/common/images/ar/button_bold.png | Bin 741 -> 626 bytes skins/common/images/ar/button_headline.png | Bin 629 -> 560 bytes skins/common/images/ar/button_italic.png | Bin 692 -> 605 bytes skins/common/images/ar/button_link.png | Bin 741 -> 643 bytes skins/common/images/ar/button_nowiki.png | Bin 1185 -> 963 bytes skins/common/images/arrow_disabled_first_25.png | Bin 481 -> 369 bytes skins/common/images/arrow_disabled_last_25.png | Bin 480 -> 374 bytes skins/common/images/arrow_disabled_left_25.png | Bin 460 -> 352 bytes skins/common/images/arrow_disabled_right_25.png | Bin 447 -> 358 bytes skins/common/images/arrow_first_25.png | Bin 482 -> 405 bytes skins/common/images/arrow_last_25.png | Bin 484 -> 395 bytes skins/common/images/arrow_left_25.png | Bin 462 -> 383 bytes skins/common/images/arrow_right_25.png | Bin 449 -> 394 bytes skins/common/images/be-tarask/button_italic.png | Bin 592 -> 580 bytes skins/common/images/be-tarask/button_link.png | Bin 466 -> 459 bytes skins/common/images/button_bold.png | Bin 288 -> 271 bytes skins/common/images/button_extlink.png | Bin 494 -> 456 bytes skins/common/images/button_headline.png | Bin 465 -> 461 bytes skins/common/images/button_hr.png | Bin 251 -> 247 bytes skins/common/images/button_image.png | Bin 584 -> 504 bytes skins/common/images/button_italic.png | Bin 292 -> 271 bytes skins/common/images/button_link.png | Bin 337 -> 301 bytes skins/common/images/button_media.png | Bin 780 -> 749 bytes skins/common/images/button_nowiki.png | Bin 352 -> 342 bytes skins/common/images/button_sig.png | Bin 953 -> 949 bytes skins/common/images/button_template.png | Bin 233 -> 210 bytes skins/common/images/cc-by-nc-sa.png | Bin 0 -> 4263 bytes skins/common/images/cc-by-sa.png | Bin 0 -> 4109 bytes skins/common/images/closewindow.png | Bin 0 -> 148 bytes skins/common/images/critical-32.png | Bin 0 -> 2395 bytes skins/common/images/cyrl/button_italic.png | Bin 460 -> 457 bytes skins/common/images/de/button_bold.png | Bin 328 -> 308 bytes skins/common/images/de/button_italic.png | Bin 351 -> 313 bytes skins/common/images/download-32.png | Bin 0 -> 2057 bytes skins/common/images/fa/button_bold.png | Bin 500 -> 496 bytes skins/common/images/fa/button_headline.png | Bin 434 -> 429 bytes skins/common/images/fa/button_italic.png | Bin 573 -> 563 bytes skins/common/images/fa/button_link.png | Bin 535 -> 522 bytes skins/common/images/fa/button_nowiki.png | Bin 1185 -> 963 bytes skins/common/images/gnu-fdl.png | Bin 1730 -> 1655 bytes skins/common/images/help-question-hover.gif | Bin 0 -> 1246 bytes skins/common/images/help-question.gif | Bin 0 -> 126 bytes skins/common/images/icons/fileicon-c.png | Bin 2211 -> 1948 bytes skins/common/images/icons/fileicon-cpp.png | Bin 1882 -> 1577 bytes skins/common/images/icons/fileicon-deb.png | Bin 4801 -> 4726 bytes skins/common/images/icons/fileicon-djvu.png | Bin 10752 -> 10615 bytes skins/common/images/icons/fileicon-dvi.png | Bin 12778 -> 12628 bytes skins/common/images/icons/fileicon-exe.png | Bin 5680 -> 5627 bytes skins/common/images/icons/fileicon-h.png | Bin 1191 -> 998 bytes skins/common/images/icons/fileicon-html.png | Bin 7422 -> 7376 bytes skins/common/images/icons/fileicon-iso.png | Bin 6450 -> 6304 bytes skins/common/images/icons/fileicon-java.png | Bin 5989 -> 5901 bytes skins/common/images/icons/fileicon-mid.png | Bin 6657 -> 6515 bytes skins/common/images/icons/fileicon-o.png | Bin 2204 -> 1937 bytes skins/common/images/icons/fileicon-ogg.png | Bin 3750 -> 3346 bytes skins/common/images/icons/fileicon-pdf.png | Bin 4976 -> 4909 bytes skins/common/images/icons/fileicon-ps.png | Bin 3012 -> 2985 bytes skins/common/images/icons/fileicon-rm.png | Bin 2851 -> 2714 bytes skins/common/images/icons/fileicon-rpm.png | Bin 4103 -> 4000 bytes skins/common/images/icons/fileicon-svg.png | Bin 5094 -> 4978 bytes skins/common/images/icons/fileicon-tar.png | Bin 6347 -> 6224 bytes skins/common/images/icons/fileicon-tex.png | Bin 3997 -> 3937 bytes skins/common/images/icons/fileicon-ttf.png | Bin 3469 -> 3392 bytes skins/common/images/icons/fileicon-txt.png | Bin 3638 -> 3582 bytes skins/common/images/icons/fileicon.png | Bin 1121 -> 884 bytes skins/common/images/info-32.png | Bin 0 -> 2159 bytes skins/common/images/ksh/button_S_italic.png | Bin 3206 -> 3201 bytes skins/common/images/mediawiki.png | Bin 22987 -> 22736 bytes skins/common/images/poweredby_mediawiki_88x31.png | Bin 1927 -> 3605 bytes skins/common/images/public-domain.png | Bin 2251 -> 2248 bytes skins/common/images/redirectltr.png | Bin 381 -> 355 bytes skins/common/images/redirectrtl.png | Bin 381 -> 359 bytes skins/common/images/remove.png | Bin 3346 -> 3271 bytes skins/common/images/tick-32.png | Bin 0 -> 1457 bytes skins/common/images/tipsy-arrow.gif | Bin 0 -> 205 bytes skins/common/images/tooltip_icon.png | Bin 430 -> 391 bytes skins/common/images/warning-32.png | Bin 0 -> 1895 bytes skins/common/images/wiki.png | Bin 24801 -> 24482 bytes skins/common/jquery.js | 4384 --------------------- skins/common/jquery.min.js | 433 -- skins/common/metadata.js | 8 +- skins/common/mwsuggest.js | 351 +- skins/common/nostalgia.css | 49 +- skins/common/oldshared.css | 232 +- skins/common/prefs.js | 111 +- skins/common/preview.js | 155 +- skins/common/protect.js | 26 +- skins/common/quickbar-right.css | 1 - skins/common/quickbar.css | 1 - skins/common/rightclickedit.js | 48 - skins/common/search.css | 14 + skins/common/search.js | 10 +- skins/common/shared.css | 329 +- skins/common/upload.js | 50 +- skins/common/wikibits.js | 414 +- skins/common/wikiprintable.css | 4 +- skins/common/wikistandard.css | 212 +- 118 files changed, 2222 insertions(+), 6231 deletions(-) delete mode 100644 skins/common/changepassword.js create mode 100644 skins/common/config-cc.css create mode 100644 skins/common/config.css create mode 100644 skins/common/config.js create mode 100644 skins/common/images/cc-by-nc-sa.png create mode 100644 skins/common/images/cc-by-sa.png create mode 100644 skins/common/images/closewindow.png create mode 100644 skins/common/images/critical-32.png create mode 100644 skins/common/images/download-32.png create mode 100644 skins/common/images/help-question-hover.gif create mode 100644 skins/common/images/help-question.gif create mode 100644 skins/common/images/info-32.png create mode 100644 skins/common/images/tick-32.png create mode 100644 skins/common/images/tipsy-arrow.gif create mode 100644 skins/common/images/warning-32.png delete mode 100644 skins/common/jquery.js delete mode 100644 skins/common/jquery.min.js delete mode 100644 skins/common/quickbar-right.css delete mode 100644 skins/common/quickbar.css delete mode 100644 skins/common/rightclickedit.js create mode 100644 skins/common/search.css (limited to 'skins/common') diff --git a/skins/common/IEFixes.js b/skins/common/IEFixes.js index 762d7a78..ba4dc66b 100644 --- a/skins/common/IEFixes.js +++ b/skins/common/IEFixes.js @@ -1,23 +1,23 @@ // IE fixes javascript -var isMSIE55 = ( window.showModalDialog && window.clipboardData && window.createPopup ); -var doneIETransform; -var doneIEAlphaFix; +window.isMSIE55 = ( window.showModalDialog && window.clipboardData && window.createPopup ); +window.doneIETransform = undefined; +window.doneIEAlphaFix = undefined; -if ( document.attachEvent ) { - document.attachEvent( 'onreadystatechange', hookit ); -} - -function hookit() { +window.hookit = function() { if ( !doneIETransform && document.getElementById && document.getElementById( 'bodyContent' ) ) { doneIETransform = true; relativeforfloats(); fixalpha(); } +}; + +if ( document.attachEvent ) { + document.attachEvent( 'onreadystatechange', window.hookit ); } // png alpha transparency fixes -function fixalpha( logoId ) { +window.fixalpha = function( logoId ) { // bg if ( isMSIE55 && !doneIEAlphaFix ) { var plogo = document.getElementById( logoId || 'p-logo' ); @@ -61,10 +61,10 @@ function fixalpha( logoId ) { linkFix.style.width = '100%'; } } -} +}; // fix ie6 disappering float bug -function relativeforfloats() { +window.relativeforfloats = function() { var bc = document.getElementById( 'bodyContent' ); if ( bc ) { var tables = bc.getElementsByTagName( 'table' ); @@ -72,8 +72,9 @@ function relativeforfloats() { } setrelative( tables ); setrelative( divs ); -} -function setrelative( nodes ) { +}; + +window.setrelative = function( nodes ) { var i = 0; while ( i < nodes.length ) { if( ( ( nodes[i].style.float && nodes[i].style.float != ( 'none' ) || @@ -84,7 +85,7 @@ function setrelative( nodes ) { } i++; } -} +}; // Expand links for printing String.prototype.hasClass = function( classWanted ) { @@ -95,11 +96,11 @@ String.prototype.hasClass = function( classWanted ) { } } return false; -} +}; -var expandedURLs; +window.expandedURLs = undefined; -onbeforeprint = function() { +window.onbeforeprint = function() { expandedURLs = []; var contentEl = document.getElementById( 'content' ); @@ -117,12 +118,12 @@ onbeforeprint = function() { } } } -} +}; -onafterprint = function() { +window.onafterprint = function() { for ( var i = 0; i < expandedURLs.length; i++ ) { if ( expandedURLs[i] ) { expandedURLs[i].removeNode( true ); } } -} +}; diff --git a/skins/common/ajax.js b/skins/common/ajax.js index afcfa708..1cad75ed 100644 --- a/skins/common/ajax.js +++ b/skins/common/ajax.js @@ -1,167 +1,177 @@ // remote scripting library // (c) copyright 2005 modernmethod, inc -var sajax_debug_mode = false; -var sajax_request_type = "GET"; +window.sajax_debug_mode = false; +window.sajax_request_type = 'GET'; /** -* if sajax_debug_mode is true, this function outputs given the message into -* the element with id = sajax_debug; if no such element exists in the document, -* it is injected. -*/ -function sajax_debug(text) { + * if sajax_debug_mode is true, this function outputs given the message into + * the element with id = sajax_debug; if no such element exists in the document, + * it is injected. + */ +window.sajax_debug = function(text) { if (!sajax_debug_mode) return false; - var e= document.getElementById('sajax_debug'); + var e = document.getElementById( 'sajax_debug' ); - if (!e) { - e= document.createElement("p"); - e.className= 'sajax_debug'; - e.id= 'sajax_debug'; + if ( !e ) { + e = document.createElement( 'p' ); + e.className = 'sajax_debug'; + e.id = 'sajax_debug'; - var b= document.getElementsByTagName("body")[0]; + var b = document.getElementsByTagName( 'body' )[0]; - if (b.firstChild) b.insertBefore(e, b.firstChild); - else b.appendChild(e); + if ( b.firstChild ) { + b.insertBefore( e, b.firstChild ); + } else { + b.appendChild( e ); + } } - var m= document.createElement("div"); + var m = document.createElement( 'div' ); m.appendChild( document.createTextNode( text ) ); e.appendChild( m ); return true; -} +}; /** -* compatibility wrapper for creating a new XMLHttpRequest object. -*/ -function sajax_init_object() { - sajax_debug("sajax_init_object() called..") + * Compatibility wrapper for creating a new XMLHttpRequest object. + */ +window.sajax_init_object = function() { + sajax_debug( 'sajax_init_object() called..' ); var A; try { // Try the new style before ActiveX so we don't // unnecessarily trigger warnings in IE 7 when // set to prompt about ActiveX usage A = new XMLHttpRequest(); - } catch (e) { + } catch ( e ) { try { - A=new ActiveXObject("Msxml2.XMLHTTP"); - } catch (e) { + A = new ActiveXObject( 'Msxml2.XMLHTTP' ); + } catch ( e ) { try { - A=new ActiveXObject("Microsoft.XMLHTTP"); - } catch (oc) { - A=null; + A = new ActiveXObject( 'Microsoft.XMLHTTP' ); + } catch ( oc ) { + A = null; } } } - if (!A) - sajax_debug("Could not create connection object."); + if ( !A ) { + sajax_debug( 'Could not create connection object.' ); + } return A; -} +}; /** -* Perform an ajax call to mediawiki. Calls are handeled by AjaxDispatcher.php -* func_name - the name of the function to call. Must be registered in $wgAjaxExportList -* args - an array of arguments to that function -* target - the target that will handle the result of the call. If this is a function, -* if will be called with the XMLHttpRequest as a parameter; if it's an input -* element, its value will be set to the resultText; if it's another type of -* element, its innerHTML will be set to the resultText. -* -* Example: -* sajax_do_call('doFoo', [1, 2, 3], document.getElementById("showFoo")); -* -* This will call the doFoo function via MediaWiki's AjaxDispatcher, with -* (1, 2, 3) as the parameter list, and will show the result in the element -* with id = showFoo -*/ -function sajax_do_call(func_name, args, target) { + * Perform an AJAX call to MediaWiki. Calls are handled by AjaxDispatcher.php + * func_name - the name of the function to call. Must be registered in $wgAjaxExportList + * args - an array of arguments to that function + * target - the target that will handle the result of the call. If this is a function, + * if will be called with the XMLHttpRequest as a parameter; if it's an input + * element, its value will be set to the resultText; if it's another type of + * element, its innerHTML will be set to the resultText. + * + * Example: + * sajax_do_call( 'doFoo', [1, 2, 3], document.getElementById( 'showFoo' ) ); + * + * This will call the doFoo function via MediaWiki's AjaxDispatcher, with + * (1, 2, 3) as the parameter list, and will show the result in the element + * with id = showFoo + */ +window.sajax_do_call = function(func_name, args, target) { var i, x, n; var uri; var post_data; uri = wgServer + - ((wgScript == null) ? (wgScriptPath + "/index.php") : wgScript) + - "?action=ajax"; - if (sajax_request_type == "GET") { - if (uri.indexOf("?") == -1) - uri = uri + "?rs=" + encodeURIComponent(func_name); - else - uri = uri + "&rs=" + encodeURIComponent(func_name); - for (i = 0; i < args.length; i++) - uri = uri + "&rsargs[]=" + encodeURIComponent(args[i]); - //uri = uri + "&rsrnd=" + new Date().getTime(); + ( ( wgScript == null ) ? ( wgScriptPath + '/index.php' ) : wgScript ) + + '?action=ajax'; + if ( sajax_request_type == 'GET' ) { + if ( uri.indexOf( '?' ) == -1 ) { + uri = uri + '?rs=' + encodeURIComponent( func_name ); + } else { + uri = uri + '&rs=' + encodeURIComponent( func_name ); + } + for ( i = 0; i < args.length; i++ ) { + uri = uri + '&rsargs[]=' + encodeURIComponent( args[i] ); + } + //uri = uri + '&rsrnd=' + new Date().getTime(); post_data = null; } else { - post_data = "rs=" + encodeURIComponent(func_name); - for (i = 0; i < args.length; i++) - post_data = post_data + "&rsargs[]=" + encodeURIComponent(args[i]); + post_data = 'rs=' + encodeURIComponent( func_name ); + for ( i = 0; i < args.length; i++ ) { + post_data = post_data + '&rsargs[]=' + encodeURIComponent( args[i] ); + } } x = sajax_init_object(); - if (!x) { - alert("AJAX not supported"); + if ( !x ) { + alert( 'AJAX not supported' ); return false; } try { - x.open(sajax_request_type, uri, true); - } catch (e) { - if (window.location.hostname == "localhost") { - alert("Your browser blocks XMLHttpRequest to 'localhost', try using a real hostname for development/testing."); + x.open( sajax_request_type, uri, true ); + } catch ( e ) { + if ( window.location.hostname == 'localhost' ) { + alert( "Your browser blocks XMLHttpRequest to 'localhost', try using a real hostname for development/testing." ); } throw e; } - if (sajax_request_type == "POST") { - x.setRequestHeader("Method", "POST " + uri + " HTTP/1.1"); - x.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); + if ( sajax_request_type == 'POST' ) { + x.setRequestHeader( 'Method', 'POST ' + uri + ' HTTP/1.1' ); + x.setRequestHeader( 'Content-Type', 'application/x-www-form-urlencoded' ); } - x.setRequestHeader("Pragma", "cache=yes"); - x.setRequestHeader("Cache-Control", "no-transform"); + x.setRequestHeader( 'Pragma', 'cache=yes' ); + x.setRequestHeader( 'Cache-Control', 'no-transform' ); x.onreadystatechange = function() { - if (x.readyState != 4) + if ( x.readyState != 4 ) { return; + } - sajax_debug("received (" + x.status + " " + x.statusText + ") " + x.responseText); + sajax_debug( 'received (' + x.status + ' ' + x.statusText + ') ' + x.responseText ); - //if (x.status != 200) - // alert("Error: " + x.status + " " + x.statusText + ": " + x.responseText); + //if ( x.status != 200 ) + // alert( 'Error: ' + x.status + ' ' + x.statusText + ': ' + x.responseText ); //else if ( typeof( target ) == 'function' ) { target( x ); - } - else if ( typeof( target ) == 'object' ) { + } else if ( typeof( target ) == 'object' ) { if ( target.tagName == 'INPUT' ) { - if (x.status == 200) target.value= x.responseText; - //else alert("Error: " + x.status + " " + x.statusText + " (" + x.responseText + ")"); - } - else { - if (x.status == 200) target.innerHTML = x.responseText; - else target.innerHTML= "
Error: " + x.status + " " + x.statusText + " (" + x.responseText + ")
"; + if ( x.status == 200 ) { + target.value= x.responseText; + } + //else alert( 'Error: ' + x.status + ' ' + x.statusText + ' (' + x.responseText + ')' ); + } else { + if ( x.status == 200 ) { + target.innerHTML = x.responseText; + } else { + target.innerHTML = '
Error: ' + x.status + + ' ' + x.statusText + ' (' + x.responseText + ')
'; + } } - } - else { - alert("bad target for sajax_do_call: not a function or object: " + target); + } else { + alert( 'bad target for sajax_do_call: not a function or object: ' + target ); } return; - } + }; - sajax_debug(func_name + " uri = " + uri + " / post = " + post_data); - x.send(post_data); - sajax_debug(func_name + " waiting.."); + sajax_debug( func_name + ' uri = ' + uri + ' / post = ' + post_data ); + x.send( post_data ); + sajax_debug( func_name + ' waiting..' ); delete x; return true; -} +}; /** * @return boolean whether the browser supports XMLHttpRequest */ -function wfSupportsAjax() { +window.wfSupportsAjax = function() { var request = sajax_init_object(); var supportsAjax = request ? true : false; delete request; return supportsAjax; -} - +}; diff --git a/skins/common/ajaxwatch.js b/skins/common/ajaxwatch.js index 7f546014..aaf6360c 100644 --- a/skins/common/ajaxwatch.js +++ b/skins/common/ajaxwatch.js @@ -1,180 +1,120 @@ -// dependencies: -// * ajax.js: - /*extern sajax_init_object, sajax_do_call */ -// * wikibits.js: - /*extern changeText, hookEvent, jsMsg */ +/** + * Animate watch/unwatch links to use asynchronous API requests to + * watch pages, rather than clicking on links. Requires jQuery. + * Uses jsMsg() from wikibits.js. + */ -// These should have been initialized in the generated js -/*extern wgAjaxWatch, wgPageName */ - -if(typeof wgAjaxWatch === "undefined" || !wgAjaxWatch) { - var wgAjaxWatch = { - watchMsg: "Watch", - unwatchMsg: "Unwatch", - watchingMsg: "Watching...", - unwatchingMsg: "Unwatching...", - 'tooltip-ca-watchMsg': "Add this page to your watchlist", - 'tooltip-ca-unwatchMsg': "Remove this page from your watchlist" - }; +if ( typeof wgAjaxWatch === 'undefined' || !wgAjaxWatch ) { + window.wgAjaxWatch = { }; } -wgAjaxWatch.supported = true; // supported on current page and by browser -wgAjaxWatch.watching = false; // currently watching page -wgAjaxWatch.inprogress = false; // ajax request in progress -wgAjaxWatch.timeoutID = null; // see wgAjaxWatch.ajaxCall -wgAjaxWatch.watchLinks = []; // "watch"/"unwatch" links -wgAjaxWatch.iconMode = false; // new icon driven functionality -wgAjaxWatch.imgBasePath = ""; // base img path derived from icons on load - -wgAjaxWatch.setLinkText = function( newText ) { - if( wgAjaxWatch.iconMode ) { - for ( i = 0; i < wgAjaxWatch.watchLinks.length; i++ ) { - wgAjaxWatch.watchLinks[i].firstChild.alt = newText; - if ( newText == wgAjaxWatch.watchingMsg || newText == wgAjaxWatch.unwatchingMsg ) { - wgAjaxWatch.watchLinks[i].className += ' loading'; - } else if ( newText == wgAjaxWatch.watchMsg || newText == wgAjaxWatch.unwatchMsg ) { - wgAjaxWatch.watchLinks[i].className = - wgAjaxWatch.watchLinks[i].className.replace( /loading/i, '' ); - // update the title text on the link - var keyCommand = wgAjaxWatch.watchLinks[i].title.match( /\[.*?\]$/ ) ? - wgAjaxWatch.watchLinks[i].title.match( /\[.*?\]$/ )[0] : ""; - wgAjaxWatch.watchLinks[i].title = ( newText == wgAjaxWatch.watchMsg ? - wgAjaxWatch['tooltip-ca-watchMsg'] : wgAjaxWatch['tooltip-ca-unwatchMsg'] ) - + " " + keyCommand; - } +wgAjaxWatch.setLinkText = function( $link, action ) { + if ( action == 'watch' || action == 'unwatch' ) { + // save the accesskey from the title + var keyCommand = $link.attr( 'title' ).match( /\[.*?\]$/ ) ? $link.attr( 'title' ).match( /\[.*?\]$/ )[0] : ''; + $link.attr( 'title', mediaWiki.msg( 'tooltip-ca-' + action ) + ' ' + keyCommand ); + } + if ( $link.data( 'icon' ) ) { + $link.attr( 'alt', mediaWiki.msg( action ) ); + if ( action == 'watching' || action == 'unwatching' ) { + $link.addClass( 'loading' ); + } else { + $link.removeClass( 'loading' ); } } else { - for ( i = 0; i < wgAjaxWatch.watchLinks.length; i++ ) { - changeText( wgAjaxWatch.watchLinks[i], newText ); - } + $link.html( mediaWiki.msg( action ) ); } }; -wgAjaxWatch.setLinkID = function( newId ) { - // We can only set the first one - wgAjaxWatch.watchLinks[0].parentNode.setAttribute( 'id', newId ); -}; - -wgAjaxWatch.setHref = function( string ) { - for( i = 0; i < wgAjaxWatch.watchLinks.length; i++ ) { - if( string == 'watch' ) { - wgAjaxWatch.watchLinks[i].href = wgAjaxWatch.watchLinks[i].href - .replace( /&action=unwatch/, '&action=watch' ); - } else if( string == 'unwatch' ) { - wgAjaxWatch.watchLinks[i].href = wgAjaxWatch.watchLinks[i].href - .replace( /&action=watch/, '&action=unwatch' ); - } - } -} - -wgAjaxWatch.ajaxCall = function() { - if(!wgAjaxWatch.supported) { - return true; - } else if (wgAjaxWatch.inprogress) { - return false; - } - if(!wfSupportsAjax()) { - // Lazy initialization so we don't toss up - // ActiveX warnings on initial page load - // for IE 6 users with security settings. - wgAjaxWatch.supported = false; - return true; +wgAjaxWatch.processResult = function( response ) { + response = response.watch; + var $link = $( this ); + // To ensure we set the same status for all watch links with the + // same target we trigger a custom event on *all* watch links. + if( response.watched !== undefined ) { + wgAjaxWatch.$links.trigger( 'mw-ajaxwatch', [response.title, 'watch'] ); + } else if ( response.unwatched !== undefined ) { + wgAjaxWatch.$links.trigger( 'mw-ajaxwatch', [response.title, 'unwatch'] ); + } else { + // Either we got an error code or it just plain broke. + window.location.href = $link.attr( 'href' ); + return; } - wgAjaxWatch.inprogress = true; - wgAjaxWatch.setLinkText( wgAjaxWatch.watching - ? wgAjaxWatch.unwatchingMsg : wgAjaxWatch.watchingMsg); - sajax_do_call( - "wfAjaxWatch", - [wgPageName, (wgAjaxWatch.watching ? "u" : "w")], - wgAjaxWatch.processResult - ); - // if the request isn't done in 10 seconds, allow user to try again - wgAjaxWatch.timeoutID = window.setTimeout( - function() { wgAjaxWatch.inprogress = false; }, - 10000 - ); - return false; -}; + jsMsg( response.message, 'watch' ); -wgAjaxWatch.processResult = function(request) { - if(!wgAjaxWatch.supported) { - return; - } - var response = request.responseText; - if( response.match(/^/) ) { - wgAjaxWatch.watching = true; - wgAjaxWatch.setLinkText(wgAjaxWatch.unwatchMsg); - wgAjaxWatch.setLinkID("ca-unwatch"); - wgAjaxWatch.setHref( 'unwatch' ); - } else if( response.match(/^/) ) { - wgAjaxWatch.watching = false; - wgAjaxWatch.setLinkText(wgAjaxWatch.watchMsg); - wgAjaxWatch.setLinkID("ca-watch"); - wgAjaxWatch.setHref( 'watch' ); + // Bug 12395 - update the watch checkbox on edit pages when the + // page is watched or unwatched via the tab. + if( response.watched !== undefined ) { + $( '#wpWatchthis' ).attr( 'checked', '1' ); } else { - // Either we got a error code or it just plain broke. - window.location.href = wgAjaxWatch.watchLinks[0].href; - return; + $( '#wpWatchthis' ).removeAttr( 'checked' ); } - jsMsg( response.substr(4), 'watch' ); - wgAjaxWatch.inprogress = false; - if(wgAjaxWatch.timeoutID) { - window.clearTimeout(wgAjaxWatch.timeoutID); - } - // Bug 12395 - avoid some watch link confusion on edit - var watchthis = document.getElementById("wpWatchthis"); - if( watchthis && response.match(/^<[uw]#>/) ) { - watchthis.checked = response.match(/^/) ? "checked" : ""; - } - return; }; -wgAjaxWatch.onLoad = function() { - // This document structure hardcoding sucks. We should make a class and - // toss all this out the window. - - var el1 = document.getElementById("ca-unwatch"); - var el2 = null; - if ( !el1 ) { - el1 = document.getElementById("mw-unwatch-link1"); - el2 = document.getElementById("mw-unwatch-link2"); - } - if( el1 ) { - wgAjaxWatch.watching = true; - } else { - wgAjaxWatch.watching = false; - el1 = document.getElementById("ca-watch"); - if ( !el1 ) { - el1 = document.getElementById("mw-watch-link1"); - el2 = document.getElementById("mw-watch-link2"); - } - if( !el1 ) { - wgAjaxWatch.supported = false; - return; +$( document ).ready( function() { + var $links = $( '.mw-watchlink a, a.mw-watchlink' ); + // BC with older skins + $links = $links + .add( $( '#ca-watch a, #ca-unwatch a, a#mw-unwatch-link1' ) ) + .add( $( 'a#mw-unwatch-link2, a#mw-watch-link2, a#mw-watch-link1' ) ); + // allowing people to add inline animated links is a little scary + $links = $links.filter( ':not( #bodyContent *, #content * )' ); + + $links.each( function() { + var $link = $( this ); + $link + .data( 'icon', $link.parents( 'li' ).hasClass( 'icon' ) ) + .data( 'action', $link.attr( 'href' ).match( /[\?&]action=unwatch/i ) ? 'unwatch' : 'watch' ); + var title = $link.attr( 'href' ).match( /[\?&]title=(.*?)&/i )[1]; + $link.data( 'target', decodeURIComponent( title ).replace( /_/g, ' ' ) ); + }); + + $links.click( function( event ) { + var $link = $( this ); + + if( wgAjaxWatch.supported === false || !wgEnableWriteAPI || !wfSupportsAjax() ) { + // Lazy initialization so we don't toss up + // ActiveX warnings on initial page load + // for IE 6 users with security settings. + wgAjaxWatch.$links.unbind( 'click' ); + return true; } - } - - // Detect if the watch/unwatch feature is in icon mode - if ( el1.className.match( /icon/i ) ) { - wgAjaxWatch.iconMode = true; - } - - // The id can be either for the parent (Monobook-based) or the element - // itself (non-Monobook) - wgAjaxWatch.watchLinks.push( el1.tagName.toLowerCase() == "a" - ? el1 : el1.firstChild ); - if( el2 ) { - wgAjaxWatch.watchLinks.push( el2 ); - } + wgAjaxWatch.setLinkText( $link, $link.data( 'action' ) + 'ing' ); + $.get( wgScriptPath + + '/api' + wgScriptExtension + '?action=watch&format=json&title=' + + encodeURIComponent( $link.data( 'target' ) ) + + ( $link.data( 'action' ) == 'unwatch' ? '&unwatch' : '' ), + {}, + wgAjaxWatch.processResult, + 'json' + ); - // I couldn't get for (watchLink in wgAjaxWatch.watchLinks) to work, if - // you can be my guest. - for( i = 0; i < wgAjaxWatch.watchLinks.length; i++ ) { - wgAjaxWatch.watchLinks[i].onclick = wgAjaxWatch.ajaxCall; - } - return; -}; + return false; + }); + + // When a request returns, a custom event 'mw-ajaxwatch' is triggered + // on *all* watch links, so they can be updated if necessary + $links.bind( 'mw-ajaxwatch', function( event, target, action ) { + var $link = $( this ); + var foo = $link.data( 'target' ); + if( $link.data( 'target' ) == target ) { + var otheraction = action == 'watch' + ? 'unwatch' + : 'watch'; + + $link.data( 'action', otheraction ); + wgAjaxWatch.setLinkText( $link, otheraction ); + $link.attr( 'href', $link.attr( 'href' ).replace( '/&action=' + action + '/', '&action=' + otheraction ) ); + if( $link.parents( 'li' ).attr( 'id' ) == 'ca-' + action ) { + $link.parents( 'li' ).attr( 'id', 'ca-' + otheraction ); + // update the link text with the new message + $link.text( mediaWiki.msg( otheraction ) ); + } + }; + return false; + }); -hookEvent("load", wgAjaxWatch.onLoad); + wgAjaxWatch.$links = $links; +}); diff --git a/skins/common/block.js b/skins/common/block.js index ad04f810..fb86cbd6 100644 --- a/skins/common/block.js +++ b/skins/common/block.js @@ -1,6 +1,34 @@ -addOnloadHook( considerChangingExpiryFocus ); +// @TODO: find some better JS file for this +// Note: borrows from IP.php +window.isIPv4Address = function( address, allowBlock ) { + var block = allowBlock ? '(?:\\/(?:3[0-2]|[12]?\\d))?' : ''; + var RE_IP_BYTE = '(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|0?[0-9]?[0-9])'; + var RE_IP_ADD = '(?:' + RE_IP_BYTE + '\\.){3}' + RE_IP_BYTE; + return address.search( new RegExp( '^' + RE_IP_ADD + block + '$' ) ) != -1; +}; + +// @TODO: find some better JS file for this +// Note: borrows from IP.php +window.isIPv6Address = function( address, allowBlock ) { + var block = allowBlock ? '(?:\\/(?:12[0-8]|1[01][0-9]|[1-9]?\\d))?' : ''; + var RE_IPV6_ADD = + '(?:' + // starts with "::" (including "::") + ':(?::|(?::' + '[0-9A-Fa-f]{1,4}' + '){1,7})' + + '|' + // ends with "::" (except "::") + '[0-9A-Fa-f]{1,4}' + '(?::' + '[0-9A-Fa-f]{1,4}' + '){0,6}::' + + '|' + // contains no "::" + '[0-9A-Fa-f]{1,4}' + '(?::' + '[0-9A-Fa-f]{1,4}' + '){7}' + + ')'; + if ( address.search( new RegExp( '^' + RE_IPV6_ADD + block + '$' ) ) != -1 ) { + return true; + } + var RE_IPV6_ADD = // contains one "::" in the middle (single '::' check below) + '[0-9A-Fa-f]{1,4}' + '(?:::?' + '[0-9A-Fa-f]{1,4}' + '){1,6}'; + return address.search( new RegExp( '^' + RE_IPV6_ADD + block + '$' ) ) != -1 + && address.search( /::/ ) != -1 && address.search( /::.*::/ ) == -1; +}; -function considerChangingExpiryFocus() { +window.considerChangingExpiryFocus = function() { if ( !document.getElementById ) { return; } @@ -18,9 +46,9 @@ function considerChangingExpiryFocus() { } else { field.style.display = 'none'; } -} +}; -function updateBlockOptions() { +window.updateBlockOptions = function() { if ( !document.getElementById ) { return; } @@ -30,9 +58,10 @@ function updateBlockOptions() { return; } - var addy = target.value; - var isEmpty = addy.match(/^\s*$/); - var isIp = addy.match(/^(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}|:(:[0-9A-Fa-f]{1,4}){1,7}|[0-9A-Fa-f]{1,4}(:{1,2}[0-9A-Fa-f]{1,4}|::$){1,7})(\/\d+)?$/); + var addy = target.value.replace( /(^\s*|\s*$)/, '' ); // trim + var isEmpty = (addy == ""); + + var isIp = isIPv4Address( addy, true ) || isIPv6Address( addy, true ); var isIpRange = isIp && addy.match(/\/\d+$/); var anonymousRow = document.getElementById( 'wpAnonOnlyRow' ); @@ -54,4 +83,7 @@ function updateBlockOptions() { if( watchuserRow ) { watchuserRow.style.display = isIpRange && !isEmpty ? 'none' : ''; } -} +}; + +addOnloadHook( updateBlockOptions ); +addOnloadHook( considerChangingExpiryFocus ); diff --git a/skins/common/changepassword.js b/skins/common/changepassword.js deleted file mode 100644 index 1e3e2069..00000000 --- a/skins/common/changepassword.js +++ /dev/null @@ -1,16 +0,0 @@ - -function onNameChange() { - if ( wgUserName != document.getElementById('wpName').value ) { - document.getElementById('wpPassword').disabled = true; - document.getElementById('wpComment').disabled = false; - } else { - document.getElementById('wpPassword').disabled = false; - document.getElementById('wpComment').disabled = true; - } -} - -function onNameChangeHook() { - document.getElementById( 'wpName' ).onblur = onNameChange; -} - -addOnloadHook( onNameChangeHook ); diff --git a/skins/common/cologneblue.css b/skins/common/cologneblue.css index 2329d233..c7b6eac1 100644 --- a/skins/common/cologneblue.css +++ b/skins/common/cologneblue.css @@ -1,101 +1,210 @@ -body { margin: 0px; padding: 0px; color: black; } -#specialform { display: inline; } -#content { top: 0; margin: 0; padding: 0; } +body { + margin: 0px; + padding: 0px; + color: black; +} + +#specialform { + display: inline; +} + +#content { + top: 0; + margin: 0; + padding: 0; +} + #mw-data-after-content { - font-family: Verdana, Arial, sans-serif; - color: black; - font-size: 8pt; + font-family: Verdana, Arial, sans-serif; + color: black; + font-size: 8pt; +} + +#topbar { + padding: 0px; } -#topbar { padding: 0px; } + #powersearch { - background: #DDEEFF; border-style: solid; border-width: 1px; padding: 2px; + background: #DDEEFF; + border-style: solid; + border-width: 1px; + padding: 2px; } + #quickbar { - width: 140px; top: 18ex; padding: 2px; visibility: visible; z-index: 99; + width: 140px; + top: 18ex; + padding: 2px; + visibility: visible; + z-index: 99; } + #article, #article td, #article th, #article p { - font-family: Verdana, Arial, sans-serif; - font-size: 10pt; color: black; + font-family: Verdana, Arial, sans-serif; + font-size: 10pt; + color: black; } + #article p { - padding-top: 0; padding-bottom: 0; - margin-top: 1ex; margin-bottom: 0; + padding-top: 0; + padding-bottom: 0; + margin-top: 1ex; + margin-bottom: 0; +} + +p, pre, td, th, li, dd, dt { + line-height: 12pt; +} + +textarea { + overflow: auto; +} + +#footer { + padding: 4px; +} + +#footer form { + display: inline; } -p, pre, td, th, li, dd, dt { line-height: 12pt; } -textarea { overflow: auto; } -#footer { padding: 4px; } -#footer form { display: inline; } #sitetitle { - font-family: Times, serif; - color: white; - font-weight: normal; font-size: 32pt; - line-height: 32pt; + font-family: Times, serif; + color: white; + font-weight: normal; + font-size: 32pt; + line-height: 32pt; } + td.top { - background-color: #6688AA; color: white; - margin-top: 4px; margin-bottom: 4px; - padding-top: 0; padding-bottom: 0; - text-transform: uppercase; - font-family: Verdana, Arial, sans-serif; font-size: 8pt; + background-color: #6688AA; + color: white; + margin-top: 4px; + margin-bottom: 4px; + padding-top: 0; + padding-bottom: 0; + text-transform: uppercase; + font-family: Verdana, Arial, sans-serif; + font-size: 8pt; } + td.top a { - font-family: Verdana, Arial, sans-serif; - background-color: #6688AA; color: white; - text-decoration: none; font-size: 10pt; + font-family: Verdana, Arial, sans-serif; + background-color: #6688AA; + color: white; + text-decoration: none; + font-size: 10pt; } + td.bottom { - font-family: Verdana, Arial, sans-serif; - font-size: 10pt; - padding: 0; + font-family: Verdana, Arial, sans-serif; + font-size: 10pt; + padding: 0; } + #pagestats { - font-family: Verdana, Arial, sans-serif; - color: black; - font-size: 9pt; + font-family: Verdana, Arial, sans-serif; + color: black; + font-size: 9pt; } + #sitesub { - font-family: Verdana, Arial, sans-serif; - font-size: 9pt; font-weight: bold; - color: black; - padding-top: 0; + font-family: Verdana, Arial, sans-serif; + font-size: 9pt; font-weight: bold; + color: black; + padding-top: 0; } + #quickbar { - font-family: Verdana, Arial, sans-serif; - font-size: 8pt; font-weight: bold; line-height: 9.5pt; - text-decoration: none; - color: black; - padding: 0; margin-top: 0; + font-family: Verdana, Arial, sans-serif; + font-size: 8pt; + font-weight: bold; + line-height: 9.5pt; + text-decoration: none; + color: black; + padding: 0; + margin-top: 0; +} + +#quickbar a { + color: #446688; } -#quickbar a { color: #446688; } #quickbar h6 { - font-family: Verdana, Arial, sans-serif; - font-size: 10pt; font-weight: bold; line-height: 12pt; - text-decoration: none; - color: #666666; - padding: 0; margin-bottom: 2px; margin-top: 6px; + font-family: Verdana, Arial, sans-serif; + font-size: 10pt; + font-weight: bold; + line-height: 12pt; + text-decoration: none; + color: #666666; + padding: 0; + margin-bottom: 2px; + margin-top: 6px; +} + +#quickbar form { + padding: 0; + margin-top: 0; } -#quickbar form { padding: 0; margin-top: 0; } h1 { - color: #666666; - font-family: Verdana, Arial, sans-serif; - font-size: 180%; line-height: 21pt; + color: #666666; + font-family: Verdana, Arial, sans-serif; + font-size: 180%; + line-height: 21pt; +} + +h1 .editsection { + font-size: 55.6%; +} + +h1.pagetitle { + padding-bottom: 0; + margin-bottom: 0; } -h1 .editsection { font-size: 55.6%; } -h1.pagetitle { padding-bottom: 0; margin-bottom: 0; } + #article p.subtitle { - color: #666666; font-size: 11pt; font-weight: bold; - padding-top: 0; margin-top: 0; padding-bottom: 1ex; -} - -a { color: #223366; } -a.external { color: #336644; } -a:visited { color: #8D0749; } -a.printable { text-decoration: underline; } -a.stub, #quickbar a.stub { color:#772233; text-decoration:none; } -a.new, #quickbar a.new { color: #CC2200; } -h2, h3, h4, h5, h6 { margin-bottom: 0; } -small { font-size: 75%; } -input.mw-searchInput { width: 106px; } + color: #666666; + font-size: 11pt; + font-weight: bold; + padding-top: 0; + margin-top: 0; + padding-bottom: 1ex; +} + +a { + color: #223366; +} + +a.external { + color: #336644; +} + +a:visited { + color: #8D0749; +} + +a.printable { + text-decoration: underline; +} + +a.stub, #quickbar a.stub { + color: #772233; + text-decoration: none; +} + +a.new, #quickbar a.new { + color: #CC2200; +} + +h2, h3, h4, h5, h6 { + margin-bottom: 0; +} + +small { + font-size: 75%; +} + +input.mw-searchInput { + width: 106px; +} \ No newline at end of file diff --git a/skins/common/commonPrint.css b/skins/common/commonPrint.css index 0932fcea..56203aa4 100644 --- a/skins/common/commonPrint.css +++ b/skins/common/commonPrint.css @@ -8,13 +8,15 @@ /* Thanks to A List Apart (http://alistapart.com/) for useful extras */ a.stub, -a.new{ color:#ba0000; text-decoration:none; } +a.new { + color: #ba0000; + text-decoration: none; +} -#toc { - /*border:1px solid #2f6fab;*/ - border:1px solid #aaaaaa; - background-color:#f9f9f9; - padding:5px; +#toc { + border: 1px solid #aaaaaa; + background-color: #f9f9f9; + padding: 5px; } .tocindent { margin-left: 2em; @@ -24,54 +26,67 @@ a.new{ color:#ba0000; text-decoration:none; } } /* images */ -div.floatright { - float: right; - clear: right; - margin: 0; - position:relative; - border: 0.5em solid White; - border-width: 0.5em 0 0.8em 1.4em; -} -div.floatright p { font-style: italic;} -div.floatleft { - float: left; - margin: 0.3em 0.5em 0.5em 0; - position:relative; - border: 0.5em solid White; - border-width: 0.5em 1.4em 0.8em 0; -} -div.floatleft p { font-style: italic; } +div.floatright { + float: right; + clear: right; + position: relative; + margin: 0.5em 0 0.8em 1.4em; +} +div.floatright p { + font-style: italic; +} +div.floatleft { + float: left; + clear: left; + position: relative; + margin: 0.5em 1.4em 0.8em 0; +} +div.floatleft p { + font-style: italic; +} +div.center { + text-align: center; +} + /* thumbnails */ div.thumb { - margin-bottom: 0.5em; - border-style: solid; border-color: White; - width: auto; - overflow: hidden; + border: none; + width: auto; + margin-top: 0.5em; + margin-bottom: 0.8em; + background-color: transparent; } div.thumbinner { - border:1px solid #cccccc; - padding: 3px !important; - background-color:#f9f9f9; - font-size: 94%; - text-align: center; + border:1px solid #cccccc; + padding: 3px !important; + background-color: White; + font-size: 94%; + text-align: center; + overflow: hidden; } html .thumbimage { - border:1px solid #cccccc; + border: 1px solid #cccccc; } html .thumbcaption { - border: none; - padding: 0.3em 0 0.1em 0; + border: none; + text-align: left; + line-height: 1.4em; + padding: 3px !important; + font-size: 94%; +} + +div.magnify { + display: none; } -div.magnify { display: none; } div.tright { - float: right; - clear: right; - border-width: 0.5em 0 0.8em 1.4em; + float: right; + clear: right; + margin: 0.5em 0 0.8em 1.4em; } div.tleft { - float: left; - margin-right:0.5em; - border-width: 0.5em 1.4em 0.8em 0; + float: left; + clear: left; + margin: 0.5em 1.4em 0.8em 0; } img.thumbborder { border: 1px solid #dddddd; @@ -79,20 +94,20 @@ img.thumbborder { /* table standards */ table.rimage { - float:right; - width:1pt; - position:relative; - margin-left:1em; - margin-bottom:1em; - text-align:center; + float: right; + width: 1pt; + position: relative; + margin-left: 1em; + margin-bottom: 1em; + text-align: center; } body { - background: White; - /*font-size: 11pt !important;*/ - color: Black; - margin: 0; - padding: 0; + background: White; + /*font-size: 11pt !important;*/ + color: Black; + margin: 0; + padding: 0; } .noprint, @@ -109,25 +124,26 @@ li#viewcount, li#about, li#disclaimer, li#privacy, +#footer-places, #mw-hidden-catlinks { - /* Hides all the elements irrelevant for printing */ - display: none; + /* Hides all the elements irrelevant for printing */ + display: none; } -ul { - list-style-type: square; +ul { + list-style-type: square; } #content { - background: none; - border: none ! important; - padding: 0 ! important; - margin: 0 ! important; + background: none; + border: none ! important; + padding: 0 ! important; + margin: 0 ! important; } #footer { background : white; color : black; - border-top: 1px solid black; + border-top: 1px solid black; } h1, h2, h3, h4, h5, h6 { @@ -135,8 +151,8 @@ h1, h2, h3, h4, h5, h6 { } p, .documentDescription { - margin: 1em 0 ! important; - line-height: 1.2em; + margin: 1em 0 ! important; + line-height: 1.2em; } .tocindent p { @@ -144,55 +160,55 @@ p, .documentDescription { } pre { - border: 1pt dashed black; - white-space: pre; - font-size: 8pt; - overflow: auto; - padding: 1em 0; - background : white; - color : black; + border: 1pt dashed black; + white-space: pre; + font-size: 8pt; + overflow: auto; + padding: 1em 0; + background: white; + color: black; } table.listing, table.listing td { - border: 1pt solid black; - border-collapse: collapse; + border: 1pt solid black; + border-collapse: collapse; } a { - color: Black !important; - background: none !important; - padding: 0 !important; + color: Black !important; + background: none !important; + padding: 0 !important; } a:link, a:visited { - color: #520; - background: transparent; - text-decoration: underline; + color: #520; + background: transparent; + text-decoration: underline; } #content a.external.text:after, #content a.external.autonumber:after { - /* Expand URLs for printing */ - content: " (" attr(href) ") "; + /* Expand URLs for printing */ + content: " (" attr(href) ") "; } #globalWrapper { - width: 100% !important; - min-width: 0 !important; + width: 100% !important; + min-width: 0 !important; } #content { - background : white; - color : black; + background: white; + color: black; } #column-content { - margin: 0 !important; + margin: 0 !important; } #column-content #content { - padding: 1em; - margin: 0 !important; + padding: 1em; + margin: 0 !important; } /* MSIE/Win doesn't understand 'inherit' */ a, a.external, a.new, a.stub { @@ -206,44 +222,122 @@ a, a.external, a.new, a.stub { text-decoration: inherit ! important; } -img { border: none; } -img.tex { vertical-align: middle; } +img { + border: none; + vertical-align: middle; +} + +/* math */ span.texhtml { font-family: serif; } #siteNotice { display: none; } -div.gallerybox { - border: 1px solid #cccccc; - background-color:#f9f9f9; - width: 150px; +/* Galleries (see shared.css for more info) */ +li.gallerybox { + vertical-align: top; + background-color: #f9f9f9; + border: solid 2px white; + display: -moz-inline-box; + display: inline-block; } -div.gallerytext { - overflow: visible; -} +ul.gallery, li.gallerybox { + zoom: 1; + *display: inline; +} + +ul.gallery { + margin: 2px; + padding: 2px; + display: block; +} +li.gallerycaption { + font-weight: bold; + text-align: center; + display: block; + word-wrap: break-word; +} + +li.gallerybox div.thumb { + text-align: center; + border: 1px solid #ccc; + margin: 2px; +} + +div.gallerytext { + overflow: hidden; + font-size: 94%; + padding: 2px 4px; + word-wrap: break-word; +} /* ** Diff rendering */ -table.diff { background:white; } -td.diff-otitle { background:#ffffff; } -td.diff-ntitle { background:#ffffff; } +table.diff { + background: white; +} +td.diff-otitle { + background: #ffffff; +} +td.diff-ntitle { + background: #ffffff; +} td.diff-addedline { - background:#ccffcc; - font-size: smaller; - border: solid 2px black; + background: #ccffcc; + font-size: smaller; + border: solid 2px black; } td.diff-deletedline { - background:#ffffaa; - font-size: smaller; - border: dotted 2px black; + background: #ffffaa; + font-size: smaller; + border: dotted 2px black; } td.diff-context { - background:#eeeeee; - font-size: smaller; + background: #eeeeee; + font-size: smaller; } .diffchange { - color: silver; - font-weight: bold; - text-decoration: underline; + color: silver; + font-weight: bold; + text-decoration: underline; +} + +/* +** Table rendering +** As on shared.css but with white background. +*/ +table.wikitable { + margin: 1em 1em 1em 0; + border: 1px #aaa solid; + background: white; + border-collapse: collapse; +} +.wikitable th, .wikitable td { + border: 1px #aaa solid; + padding: 0.2em; +} +.wikitable th { + text-align: center; + background: white; + font-weight: bold; +} +.wikitable caption { + font-weight: bold; +} + +a.sortheader { + margin: 0px 0.3em; +} + +/* Some pagination options */ +.wikitable, .thumb, img { + page-break-inside: avoid; +} +h2, h3, h4, h5, h6, h7 { + page-break-after: avoid; +} +p { + widows: 3; + orphans: 3; } diff --git a/skins/common/common_rtl.css b/skins/common/common_rtl.css index 2e8bb980..a0c485f0 100644 --- a/skins/common/common_rtl.css +++ b/skins/common/common_rtl.css @@ -10,14 +10,14 @@ #preftoc li { list-style: none; } #prefcontrol { float: right; } fieldset.prefsection, -fieldset.operaprefsection { - margin-left: 0; - margin-right: 18em; +fieldset.operaprefsection { + margin-left: 0; + margin-right: 18em; } /* page history */ -#pagehistory .history-user { - margin-right: 1.4em; - margin-left: 0.4em; +#pagehistory .history-user { + margin-right: 1.4em; + margin-left: 0.4em; } .editsection { float: left; diff --git a/skins/common/config-cc.css b/skins/common/config-cc.css new file mode 100644 index 00000000..c629ad3f --- /dev/null +++ b/skins/common/config-cc.css @@ -0,0 +1,56 @@ +/** + * Copy of CC standard stylesheet, plus tweaks for iframe usage + */ + +body { + margin:0px; + background:#eee; + font-family:verdana; + color:#333; +} + +#main { + border:1px solid #D0D0D0; + background:#fff; + margin: 0.5em; +} + +/* Looks like you have to specify the width of #menu +or IE5 Mac stretches it all the way across the div, and +Opera streches it half way. */ + +#main #menu { + border-left:1px dotted #ccc; + /* border-bottom:1px solid #000;*/ + float:right; + width:230px; + background:white; + margin:0px 0px 10px 10px; +} + +td, h3, p,h1,pre { + margin:0px 20px 20px 20px; + font-size:11px; + line-height:140%; +} + +.header { + padding-left: 10px; + padding-top:10px; +} + +.nav { + padding-left:10px; + padding-bottom:10px; + font-size:11px; + margin-bottom:16px; +} + +#menu p { + font-size:11px; +} + +.dent { + margin-left:64px; +} + diff --git a/skins/common/config.css b/skins/common/config.css new file mode 100644 index 00000000..341a9038 --- /dev/null +++ b/skins/common/config.css @@ -0,0 +1,164 @@ +.env-check { + font-size: 90%; + margin: 1em 0 1em 2.5em; +} + +.config-section { + margin-top: 2em; +} +.config-block { + margin-top: 2em; + display: block; + +} +.config-block-label { + display: block; + margin-bottom: .2em; +} +.config-block-label label, .config-label { + font-weight: bold; + padding-right: .5em; + padding-top: .2em; +} +.config-block-elements { + margin-left: 2em; +} +.config-block-elements li { + list-style: none; +} +.config-input { + clear: left; + zoom: 100%; /* IE hack */ +} + +.config-page-wrapper { + padding: 0.5em; +} + +.config-page-list { + float: right; + width: 12em; + border: 1px solid #aaa; + background: #fff; + padding: 0.5em; + /* 3em left margin to leave space between the list and the page-content */ + margin: 0.5em 0.5em 0.5em 3.5em; +} + +.config-page { + padding: 0.5em 0.5em 0.5em 2em; + margin: 0.5em 0.5em 0.5em 0.5em; + background: #eee; +} + +.config-submit { + clear: left; + text-align: center; + padding: 1em; +} + +.config-submit input { + margin-left: 0.5em; + margin-right: 0.5em; +} + +.config-page-disabled { + color: #aaa; +} + +.config-error-box { + border: 2px solid #f00; + margin: 0.4em; + clear: left; +} + +.config-warning-box { + border: 2px solid #ff7f00; + margin: 0.4em; + clear: left; +} + +.config-info-left { + margin: 7px; + float: left; + width: 35px; +} + +.config-info-right { + margin: 0.5em 0.5em 0.5em 49px; +} + +.config-page-current { + font-weight: bold; +} + +.config-message { + display: list-item; + line-height: 1.5em; + /* @embed */ + list-style-image: url(images/bullet.gif); + list-style-type: square; +} + +.config-input-text { + width: 20em; + margin-right: 1em; +} + +.config-input-check { + margin-left: 10em; +} + +.error { + color: red; + background-color: #fff; + font-weight: bold; + left: 1em; + font-size: 100%; +} + +.config-settings-block { + list-style-type: none; + list-style-image: none; + float: left; + margin: 0; + padding: 0; +} + +.btn-install { + font-weight: bold; + font-size: 110%; + padding: .2em .3em; +} + +.success-message { + font-weight: bold; + font-size: 110%; + color: green; +} +.success-box { + font-size: 130%; +} + +.config-cc-wrapper { + clear: left; + /* If you change this height, also change it in WebInstaller_Options::submitCC() */ + height: 54em; +} + +.config-plainlink a { + background: none !important; + padding: 0 !important; +} + +#config-memcachewrapper { + display: none; +} +.config-download-link { + font-size: 1.8em; + margin-left: 2em; +} + +#config-update-log { + width: 75%; +} diff --git a/skins/common/config.js b/skins/common/config.js new file mode 100644 index 00000000..511966ad --- /dev/null +++ b/skins/common/config.js @@ -0,0 +1,102 @@ +(function( $ ) { + $( document ).ready( function() { + + + // Set up the help system + $( '.mw-help-field-data' ) + .hide() + .closest( '.mw-help-field-container' ) + .find( '.mw-help-field-hint' ) + .show() + .click( function() { + $(this) + .closest( '.mw-help-field-container' ) + .find( '.mw-help-field-data' ) + .slideToggle( 'fast' ); + } ); + + // 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' ) ) { + $( '.dbWrapper' ).hide( 'slow' ); + $wrapper.show( 'slow' ); + } + } ); + + // Scroll to the bottom of upgrade log + $( "#config-update-log" ).each( function() { this.scrollTop = this.scrollHeight; } ); + + // Show/hide Creative Commons thingy + $( '.licenseRadio' ).click( function() { + var $wrapper = $( '#config-cc-wrapper' ); + if ( $( '#config__LicenseCode_cc-choose' ).is( ':checked' ) ) { + $wrapper.show( 'slow' ); + } else { + $wrapper.hide( 'slow' ); + } + } ); + + // Show/hide random stuff (email, upload) + $( '.showHideRadio' ).click( function() { + var $wrapper = $( '#' + $(this).attr( 'rel' ) ); + if ( $(this).is( ':checked' ) ) { + $wrapper.show( 'slow' ); + } else { + $wrapper.hide( 'slow' ); + } + } ); + $( '.hideShowRadio' ).click( function() { + var $wrapper = $( '#' + $(this).attr( 'rel' ) ); + if ( $(this).is( ':checked' ) ) { + $wrapper.hide( 'slow' ); + } else { + $wrapper.show( 'slow' ); + } + } ); + + // Hide "other" textboxes by default + // Should not be done in CSS for javascript disabled compatibility + $( '.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 + $textbox.removeAttr( 'readonly' ).closest( '.config-block' ).slideDown( 'fast' ); + } else { + $textbox.attr( 'readonly', 'readonly' ).closest( '.config-block' ).slideUp( 'fast' ); + } + } ); + + // Synchronize radio button label for sitename with textbox + $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 ) ); + } + + // Show/Hide memcached servers when needed + $("input[name$='config_wgMainCacheType']").change( function() { + var $memc = $( "#config-memcachewrapper" ); + if( $( "input[name$='config_wgMainCacheType']:checked" ).val() == 'memcached' ) { + $memc.show( 'slow' ); + } else { + $memc.hide( 'slow' ); + } + } ); + } ); +})(jQuery); diff --git a/skins/common/diff.css b/skins/common/diff.css index 6afa3734..80286d8e 100644 --- a/skins/common/diff.css +++ b/skins/common/diff.css @@ -11,9 +11,6 @@ td.diff-ntitle { td.diff-marker { text-align: right; } -.rtl td.diff-marker { - text-align: left; -} td.diff-lineno { font-weight: bold; } @@ -41,7 +38,7 @@ table.diff { border: none; width: 98%; border-spacing: 4px; - + /* Fixed layout is required to ensure that cells containing long URLs don't widen in Safari, Internet Explorer, or iCab */ table-layout: fixed; @@ -57,87 +54,22 @@ table.diff col.diff-content { } table.diff td div { /* Force-wrap very long lines such as URLs or page-widening char strings. - CSS 3 draft..., but Gecko doesn't support it yet: - https://bugzilla.mozilla.org/show_bug.cgi?id=99457 */ + CSS 3 only (In Gecko 1.9.1 / Firefox 3.5): + https://bugzilla.mozilla.org/show_bug.cgi?id=99457 + https://developer.mozilla.org/web-tech/2008/08/20/word-wrap-break-word/ + https://developer.mozilla.org/En/CSS/Word-wrap */ word-wrap: break-word; - + /* As fallback, scrollbars will be added for very wide cells instead of text overflowing or widening */ overflow: auto; - + /* The above rule breaks on very old versions of Mozilla due to a bug which collapses the table cells to a single line. - + In Mozilla 1.1 and below with JavaScript enabled, the rule will be overridden with this by diff.js; wide cell contents then spill horizontally without widening the rest of the table: */ /* overflow: visible; */ } - -/* - * Styles for the HTML Diff - */ -div.diff-switchtype{ - text-align: center; - font-weight: bold; - font-size: smaller; -} - -span.diff-html-added { - font-size: 100%; - background-color: #20ff20 -} - -span.diff-html-removed { - font-size: 100%; - text-decoration: line-through; - background-color: #ff2020 -} - -span.diff-html-changed { - background: url(images/diffunderline.gif) bottom repeat-x; - /* Hack for IE5.5, see http://lists.wikimedia.org/pipermail/wikitech-l/2008-November/040273.html */ - *background-color: #c6c6fd; /* light blue */ -} - -span.diff-html-added img{ - border: 5px solid #ccffcc; -} - -span.diff-html-removed img{ - border: 5px solid #fdc6c6; -} - -span.diff-html-changed img{ - border: 5px dotted #000099; - -} - -span.diff-html-changed { - position: relative; /* this is key */ - cursor: help; -} - -span.diff-html-changed span.tip { - display: none; /* so is this */ -} - -/* tooltip will display on :hover event */ - -span.diff-html-changed:hover span.tip { - display: block; - z-index: 95; - position: absolute; - top: 2.5em; - left: 0; - width: auto; - line-height: 1.2em; - padding: 3px 7px 4px 6px; - border: 1px solid #336; - background-color: #f7f7ee; - font-size: 10px; - text-align: left; -} - - diff --git a/skins/common/edit.js b/skins/common/edit.js index 423205f8..f986c854 100644 --- a/skins/common/edit.js +++ b/skins/common/edit.js @@ -1,8 +1,7 @@ -var currentFocused; +window.currentFocused = undefined; -// this function generates the actual toolbar buttons with localized text -// we use it to avoid creating the toolbar where javascript is not enabled -function addButton( imageFile, speedTip, tagOpen, tagClose, sampleText, imageId ) { +// this function adds a toolbar button to the mwEditButtons list +window.addButton = function( imageFile, speedTip, tagOpen, tagClose, sampleText, imageId ) { // Don't generate buttons for browsers which don't fully // support it. mwEditButtons.push({ @@ -13,11 +12,10 @@ function addButton( imageFile, speedTip, tagOpen, tagClose, sampleText, imageId 'tagClose': tagClose, 'sampleText': sampleText }); -} +}; -// this function generates the actual toolbar buttons with localized text -// we use it to avoid creating the toolbar where JavaScript is not enabled -function mwInsertEditButton( parent, item ) { +// this function adds one toolbar button from a mwEditButtons/mwCustomEditButtons item +window.mwInsertEditButton = function( parent, item ) { var image = document.createElement( 'img' ); image.width = 23; image.height = 22; @@ -33,17 +31,19 @@ function mwInsertEditButton( parent, item ) { image.onclick = function() { insertTags( item.tagOpen, item.tagClose, item.sampleText ); // click tracking - if ( ( typeof $j != 'undefined' ) && ( typeof $j.trackAction != 'undefined' ) ) { - $j.trackAction( 'oldedit.' + item.speedTip.replace(/ /g, "-") ); + if ( ( typeof $ != 'undefined' ) && ( typeof $.trackAction != 'undefined' ) ) { + $.trackAction( 'oldedit.' + item.speedTip.replace(/ /g, "-") ); } return false; }; parent.appendChild( image ); return true; -} +}; -function mwSetupToolbar() { +// this function generates the actual toolbar buttons with localized text +// we use it to avoid creating the toolbar where javascript is not enabled +window.mwSetupToolbar = function() { var toolbar = document.getElementById( 'toolbar' ); if ( !toolbar ) { return false; @@ -73,14 +73,14 @@ function mwSetupToolbar() { mwInsertEditButton( toolbar, mwCustomEditButtons[i] ); } return true; -} +}; // apply tagOpen/tagClose to selection in textarea, // use sampleText instead of selection if there is none -function insertTags( tagOpen, tagClose, sampleText ) { - if ( typeof $j != 'undefined' && typeof $j.fn.textSelection != 'undefined' && +window.insertTags = function( tagOpen, tagClose, sampleText ) { + if ( typeof $ != 'undefined' && typeof $.fn.textSelection != 'undefined' && currentFocused && ( currentFocused.nodeName.toLowerCase() == 'iframe' || currentFocused.id == 'wpTextbox1' ) ) { - $j( '#wpTextbox1' ).textSelection( + $( '#wpTextbox1' ).textSelection( 'encapsulateSelection', { 'pre': tagOpen, 'peri': sampleText, 'post': tagClose } ); return; @@ -160,13 +160,13 @@ function insertTags( tagOpen, tagClose, sampleText ) { } } -} +}; /** * Restore the edit box scroll state following a preview operation, * and set up a form submission handler to remember this state */ -function scrollEditBox() { +window.scrollEditBox = function() { var editBox = document.getElementById( 'wpTextbox1' ); var scrollTop = document.getElementById( 'wpScrolltop' ); var editForm = document.getElementById( 'editform' ); @@ -178,7 +178,7 @@ function scrollEditBox() { scrollTop.value = editBox.scrollTop; } ); } -} +}; hookEvent( 'load', scrollEditBox ); hookEvent( 'load', mwSetupToolbar ); hookEvent( 'load', function() { @@ -217,10 +217,10 @@ hookEvent( 'load', function() { // HACK: make currentFocused work with the usability iframe // With proper focus detection support (HTML 5!) this'll be much cleaner - if ( typeof $j != 'undefined' ) { - var iframe = $j( '.wikiEditor-ui-text iframe' ); + if ( typeof $ != 'undefined' ) { + var iframe = $( '.wikiEditor-ui-text iframe' ); if ( iframe.length > 0 ) { - $j( iframe.get( 0 ).contentWindow.document ) + $( iframe.get( 0 ).contentWindow.document ) .add( iframe.get( 0 ).contentWindow.document.body ) // for IE .focus( function() { currentFocused = iframe.get( 0 ); } ); } diff --git a/skins/common/enhancedchanges.js b/skins/common/enhancedchanges.js index b1789c9e..bcc2cc88 100644 --- a/skins/common/enhancedchanges.js +++ b/skins/common/enhancedchanges.js @@ -24,7 +24,7 @@ appendCSS('.mw-changeslist-hidden {'+ * Switch an RC line between hidden/shown * @param int idNumber : the id number of the RC group */ -function toggleVisibility(idNumber) { +window.toggleVisibility = function(idNumber) { var openarrow = document.getElementById("mw-rc-openarrow-"+idNumber); var closearrow = document.getElementById("mw-rc-closearrow-"+idNumber); var subentries = document.getElementById("mw-rc-subentries-"+idNumber); @@ -37,4 +37,4 @@ function toggleVisibility(idNumber) { closearrow.className = 'mw-changeslist-hidden'; subentries.className = 'mw-changeslist-hidden'; } -} +}; diff --git a/skins/common/history.js b/skins/common/history.js index 02651225..33845a75 100644 --- a/skins/common/history.js +++ b/skins/common/history.js @@ -1,4 +1,4 @@ -function historyRadios(parent) { +window.historyRadios = function(parent) { var inputs = parent.getElementsByTagName('input'); var radios = []; for (var i = 0; i < inputs.length; i++) { @@ -7,10 +7,10 @@ function historyRadios(parent) { } } return radios; -} +}; // check selection and tweak visibility/class onclick -function diffcheck() { +window.diffcheck = function() { var dli = false; // the li where the diff radio is checked var oli = false; // the li where the oldid radio is checked var hf = document.getElementById('pagehistory'); @@ -74,21 +74,4 @@ function diffcheck() { } } return true; -} - -// Attach event handlers to the input elements on history page -function histrowinit() { - var hf = document.getElementById('pagehistory'); - if (!hf) return; - var lis = hf.getElementsByTagName('li'); - for (var i = 0; i < lis.length; i++) { - var inputs = historyRadios(lis[i]); - if (inputs[0] && inputs[1]) { - inputs[0].onclick = diffcheck; - inputs[1].onclick = diffcheck; - } - } - diffcheck(); -} - -hookEvent("load", histrowinit); +}; diff --git a/skins/common/htmlform.js b/skins/common/htmlform.js index 2045ab48..900b1660 100644 --- a/skins/common/htmlform.js +++ b/skins/common/htmlform.js @@ -12,7 +12,7 @@ addOnloadHook( function() { } } ); -var htmlforms = { +window.htmlforms = { 'selectOrOtherSelectChanged' : function( e ) { var select; if ( !e ) { @@ -36,5 +36,5 @@ var htmlforms = { textbox.disabled = true; } } -} +}; diff --git a/skins/common/images/Arr_d.png b/skins/common/images/Arr_d.png index 421dd101..58a9fc66 100644 Binary files a/skins/common/images/Arr_d.png and b/skins/common/images/Arr_d.png differ diff --git a/skins/common/images/Arr_l.png b/skins/common/images/Arr_l.png index 9db66232..f49e20a2 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_r.png b/skins/common/images/Arr_r.png index d1b161b0..467a555a 100644 Binary files a/skins/common/images/Arr_r.png and b/skins/common/images/Arr_r.png differ diff --git a/skins/common/images/Arr_u.png b/skins/common/images/Arr_u.png index 75909865..957f8612 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 5b051f64..3418db2c 100644 Binary files a/skins/common/images/add.png and b/skins/common/images/add.png differ diff --git a/skins/common/images/ar/button_bold.png b/skins/common/images/ar/button_bold.png index 93b1783c..619cd21e 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 3cf2a706..f1480a66 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 0421846d..21245978 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 ed66a7f6..a68144f3 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 97d0585a..88ab9a13 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 aaa4bec4..dd55a9c0 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 7882fd8c..fd24cd10 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 e0c30042..a450a5ee 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 bfec3e24..d110ad8f 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 b6351c50..ec47aa9a 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 d416ab39..15e18f95 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 fd05fa6f..ecd33102 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 cf1845c6..64a3c4ee 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_italic.png b/skins/common/images/be-tarask/button_italic.png index d93e9f87..99972127 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 07bc6a19..b87f245b 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 2827dba0..eeb91c30 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 e551e47e..fdc77acd 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 9867c365..29966703 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 7f21402a..55f6001a 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 abd47dde..a3f1ef60 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 f248fa93..7074050c 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 cc72b523..486c1e87 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 56b1b239..00d29766 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 321a2cb4..dcad330d 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 39de3b67..fa2af657 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 ebbca3cf..576874ce 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-by-nc-sa.png b/skins/common/images/cc-by-nc-sa.png new file mode 100644 index 00000000..d15370de Binary files /dev/null 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 new file mode 100644 index 00000000..ee07a661 Binary files /dev/null and b/skins/common/images/cc-by-sa.png differ diff --git a/skins/common/images/closewindow.png b/skins/common/images/closewindow.png new file mode 100644 index 00000000..99ae141f Binary files /dev/null and b/skins/common/images/closewindow.png differ diff --git a/skins/common/images/critical-32.png b/skins/common/images/critical-32.png new file mode 100644 index 00000000..8f65041e Binary files /dev/null and b/skins/common/images/critical-32.png differ diff --git a/skins/common/images/cyrl/button_italic.png b/skins/common/images/cyrl/button_italic.png index f79170fd..46e6737a 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/de/button_bold.png b/skins/common/images/de/button_bold.png index 32a22800..3ce6f38e 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 875eb2a1..af7b6d27 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 new file mode 100644 index 00000000..0087e10d Binary files /dev/null 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 49680152..25fca045 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 9d62767e..831a4bef 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 fc9faf3d..273ab247 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 de56a5c3..345271aa 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 97d0585a..88ab9a13 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 10915329..b599c2fa 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/help-question-hover.gif b/skins/common/images/help-question-hover.gif new file mode 100644 index 00000000..515138db Binary files /dev/null and b/skins/common/images/help-question-hover.gif differ diff --git a/skins/common/images/help-question.gif b/skins/common/images/help-question.gif new file mode 100644 index 00000000..b4fc9c5b Binary files /dev/null and b/skins/common/images/help-question.gif differ diff --git a/skins/common/images/icons/fileicon-c.png b/skins/common/images/icons/fileicon-c.png index f7984fa0..fdd06989 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 0a9b4cbc..d11d827e 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 605bea17..b52a4eba 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 3eaca1f8..b93b3f20 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 790ec41b..ab6a51f2 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 f310ad0d..cc1aae51 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 cf158528..73a547e5 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 1c3a1588..09e31f1a 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 74b06615..2cddf489 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 730ab232..c26b3f2c 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 5254418e..4143e8bb 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-o.png b/skins/common/images/icons/fileicon-o.png index 24ac2cc5..872a6548 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 c50d1ee8..2c935e2a 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 c195c761..a19b16f3 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 342a84ee..ec1145be 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 534dbeb2..b803e055 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 aab3ec39..e1ff985f 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 16a666f3..23b675a2 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 7266b5b5..7c7a910b 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 55187918..6f782647 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 13bd7ced..f5dc07a1 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 bec58b4e..1b611016 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 5675170b..9d8e3222 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 new file mode 100644 index 00000000..ecefa9a6 Binary files /dev/null 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 00000a3c..6ef742a7 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/mediawiki.png b/skins/common/images/mediawiki.png index 0f35886a..915f847d 100644 Binary files a/skins/common/images/mediawiki.png and b/skins/common/images/mediawiki.png differ diff --git a/skins/common/images/poweredby_mediawiki_88x31.png b/skins/common/images/poweredby_mediawiki_88x31.png index 3714414f..835e860b 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 f51f5602..296e66c8 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 bcf5742c..0c731b6c 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 8d99841a..ad0a12d1 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 0cbf7d73..ba2c147d 100644 Binary files a/skins/common/images/remove.png and b/skins/common/images/remove.png differ diff --git a/skins/common/images/tick-32.png b/skins/common/images/tick-32.png new file mode 100644 index 00000000..584cef22 Binary files /dev/null and b/skins/common/images/tick-32.png differ diff --git a/skins/common/images/tipsy-arrow.gif b/skins/common/images/tipsy-arrow.gif new file mode 100644 index 00000000..9f1a15b6 Binary files /dev/null and b/skins/common/images/tipsy-arrow.gif differ diff --git a/skins/common/images/tooltip_icon.png b/skins/common/images/tooltip_icon.png index 6b3160ec..17bc2e14 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 new file mode 100644 index 00000000..aa6b298b Binary files /dev/null and b/skins/common/images/warning-32.png differ diff --git a/skins/common/images/wiki.png b/skins/common/images/wiki.png index 4f1dc263..4ca6efd6 100644 Binary files a/skins/common/images/wiki.png and b/skins/common/images/wiki.png differ diff --git a/skins/common/jquery.js b/skins/common/jquery.js deleted file mode 100644 index c25ee31c..00000000 --- a/skins/common/jquery.js +++ /dev/null @@ -1,4384 +0,0 @@ -/*! - * jQuery JavaScript Library v1.3.2 - * http://jquery.com/ - * - * Copyright (c) 2009 John Resig - * Dual licensed under the MIT and GPL licenses. - * http://docs.jquery.com/License - * - * Date: 2009-02-19 17:34:21 -0500 (Thu, 19 Feb 2009) - * Revision: 6246 - */ -(function(){ - -var - // Will speed up references to window, and allows munging its name. - window = this, - // Will speed up references to undefined, and allows munging its name. - undefined, - // Map over jQuery in case of overwrite - _jQuery = window.jQuery, - // Map over the $ in case of overwrite - _$ = window.$, - - jQuery = window.jQuery = window.$ = function( selector, context ) { - // The jQuery object is actually just the init constructor 'enhanced' - return new jQuery.fn.init( selector, context ); - }, - - // A simple way to check for HTML strings or ID strings - // (both of which we optimize for) - quickExpr = /^[^<]*(<(.|\s)+>)[^>]*$|^#([\w-]+)$/, - // Is it a simple selector - isSimple = /^.[^:#\[\.,]*$/; - -jQuery.fn = jQuery.prototype = { - init: function( selector, context ) { - // Make sure that a selection was provided - selector = selector || document; - - // Handle $(DOMElement) - if ( selector.nodeType ) { - this[0] = selector; - this.length = 1; - this.context = selector; - return this; - } - // Handle HTML strings - if ( typeof selector === "string" ) { - // Are we dealing with HTML string or an ID? - var match = quickExpr.exec( selector ); - - // Verify a match, and that no context was specified for #id - if ( match && (match[1] || !context) ) { - - // HANDLE: $(html) -> $(array) - if ( match[1] ) - selector = jQuery.clean( [ match[1] ], context ); - - // HANDLE: $("#id") - else { - var elem = document.getElementById( match[3] ); - - // Handle the case where IE and Opera return items - // by name instead of ID - if ( elem && elem.id != match[3] ) - return jQuery().find( selector ); - - // Otherwise, we inject the element directly into the jQuery object - var ret = jQuery( elem || [] ); - ret.context = document; - ret.selector = selector; - return ret; - } - - // HANDLE: $(expr, [context]) - // (which is just equivalent to: $(content).find(expr) - } else - return jQuery( context ).find( selector ); - - // HANDLE: $(function) - // Shortcut for document ready - } else if ( jQuery.isFunction( selector ) ) - return jQuery( document ).ready( selector ); - - // Make sure that old selector state is passed along - if ( selector.selector && selector.context ) { - this.selector = selector.selector; - this.context = selector.context; - } - - return this.setArray(jQuery.isArray( selector ) ? - selector : - jQuery.makeArray(selector)); - }, - - // Start with an empty selector - selector: "", - - // The current version of jQuery being used - jquery: "1.3.2", - - // The number of elements contained in the matched element set - size: function() { - return this.length; - }, - - // Get the Nth element in the matched element set OR - // Get the whole matched element set as a clean array - get: function( num ) { - return num === undefined ? - - // Return a 'clean' array - Array.prototype.slice.call( this ) : - - // Return just the object - this[ num ]; - }, - - // Take an array of elements and push it onto the stack - // (returning the new matched element set) - pushStack: function( elems, name, selector ) { - // Build a new jQuery matched element set - var ret = jQuery( elems ); - - // Add the old object onto the stack (as a reference) - ret.prevObject = this; - - ret.context = this.context; - - if ( name === "find" ) - ret.selector = this.selector + (this.selector ? " " : "") + selector; - else if ( name ) - ret.selector = this.selector + "." + name + "(" + selector + ")"; - - // Return the newly-formed element set - return ret; - }, - - // Force the current matched set of elements to become - // the specified array of elements (destroying the stack in the process) - // You should use pushStack() in order to do this, but maintain the stack - setArray: function( elems ) { - // Resetting the length to 0, then using the native Array push - // is a super-fast way to populate an object with array-like properties - this.length = 0; - Array.prototype.push.apply( this, elems ); - - return this; - }, - - // Execute a callback for every element in the matched set. - // (You can seed the arguments with an array of args, but this is - // only used internally.) - each: function( callback, args ) { - return jQuery.each( this, callback, args ); - }, - - // Determine the position of an element within - // the matched set of elements - index: function( elem ) { - // Locate the position of the desired element - return jQuery.inArray( - // If it receives a jQuery object, the first element is used - elem && elem.jquery ? elem[0] : elem - , this ); - }, - - attr: function( name, value, type ) { - var options = name; - - // Look for the case where we're accessing a style value - if ( typeof name === "string" ) - if ( value === undefined ) - return this[0] && jQuery[ type || "attr" ]( this[0], name ); - - else { - options = {}; - options[ name ] = value; - } - - // Check to see if we're setting style values - return this.each(function(i){ - // Set all the styles - for ( name in options ) - jQuery.attr( - type ? - this.style : - this, - name, jQuery.prop( this, options[ name ], type, i, name ) - ); - }); - }, - - css: function( key, value ) { - // ignore negative width and height values - if ( (key == 'width' || key == 'height') && parseFloat(value) < 0 ) - value = undefined; - return this.attr( key, value, "curCSS" ); - }, - - text: function( text ) { - if ( typeof text !== "object" && text != null ) - return this.empty().append( (this[0] && this[0].ownerDocument || document).createTextNode( text ) ); - - var ret = ""; - - jQuery.each( text || this, function(){ - jQuery.each( this.childNodes, function(){ - if ( this.nodeType != 8 ) - ret += this.nodeType != 1 ? - this.nodeValue : - jQuery.fn.text( [ this ] ); - }); - }); - - return ret; - }, - - wrapAll: function( html ) { - if ( this[0] ) { - // The elements to wrap the target around - var wrap = jQuery( html, this[0].ownerDocument ).clone(); - - if ( this[0].parentNode ) - wrap.insertBefore( this[0] ); - - wrap.map(function(){ - var elem = this; - - while ( elem.firstChild ) - elem = elem.firstChild; - - return elem; - }).append(this); - } - - return this; - }, - - wrapInner: function( html ) { - return this.each(function(){ - jQuery( this ).contents().wrapAll( html ); - }); - }, - - wrap: function( html ) { - return this.each(function(){ - jQuery( this ).wrapAll( html ); - }); - }, - - append: function() { - return this.domManip(arguments, true, function(elem){ - if (this.nodeType == 1) - this.appendChild( elem ); - }); - }, - - prepend: function() { - return this.domManip(arguments, true, function(elem){ - if (this.nodeType == 1) - this.insertBefore( elem, this.firstChild ); - }); - }, - - before: function() { - return this.domManip(arguments, false, function(elem){ - this.parentNode.insertBefore( elem, this ); - }); - }, - - after: function() { - return this.domManip(arguments, false, function(elem){ - this.parentNode.insertBefore( elem, this.nextSibling ); - }); - }, - - end: function() { - return this.prevObject || jQuery( [] ); - }, - - // For internal use only. - // Behaves like an Array's method, not like a jQuery method. - push: [].push, - sort: [].sort, - splice: [].splice, - - find: function( selector ) { - if ( this.length === 1 ) { - var ret = this.pushStack( [], "find", selector ); - ret.length = 0; - jQuery.find( selector, this[0], ret ); - return ret; - } else { - return this.pushStack( jQuery.unique(jQuery.map(this, function(elem){ - return jQuery.find( selector, elem ); - })), "find", selector ); - } - }, - - clone: function( events ) { - // Do the clone - var ret = this.map(function(){ - if ( !jQuery.support.noCloneEvent && !jQuery.isXMLDoc(this) ) { - // IE copies events bound via attachEvent when - // using cloneNode. Calling detachEvent on the - // clone will also remove the events from the orignal - // In order to get around this, we use innerHTML. - // Unfortunately, this means some modifications to - // attributes in IE that are actually only stored - // as properties will not be copied (such as the - // the name attribute on an input). - var html = this.outerHTML; - if ( !html ) { - var div = this.ownerDocument.createElement("div"); - div.appendChild( this.cloneNode(true) ); - html = div.innerHTML; - } - - return jQuery.clean([html.replace(/ jQuery\d+="(?:\d+|null)"/g, "").replace(/^\s*/, "")])[0]; - } else - return this.cloneNode(true); - }); - - // Copy the events from the original to the clone - if ( events === true ) { - var orig = this.find("*").andSelf(), i = 0; - - ret.find("*").andSelf().each(function(){ - if ( this.nodeName !== orig[i].nodeName ) - return; - - var events = jQuery.data( orig[i], "events" ); - - for ( var type in events ) { - for ( var handler in events[ type ] ) { - jQuery.event.add( this, type, events[ type ][ handler ], events[ type ][ handler ].data ); - } - } - - i++; - }); - } - - // Return the cloned set - return ret; - }, - - filter: function( selector ) { - return this.pushStack( - jQuery.isFunction( selector ) && - jQuery.grep(this, function(elem, i){ - return selector.call( elem, i ); - }) || - - jQuery.multiFilter( selector, jQuery.grep(this, function(elem){ - return elem.nodeType === 1; - }) ), "filter", selector ); - }, - - closest: function( selector ) { - var pos = jQuery.expr.match.POS.test( selector ) ? jQuery(selector) : null, - closer = 0; - - return this.map(function(){ - var cur = this; - while ( cur && cur.ownerDocument ) { - if ( pos ? pos.index(cur) > -1 : jQuery(cur).is(selector) ) { - jQuery.data(cur, "closest", closer); - return cur; - } - cur = cur.parentNode; - closer++; - } - }); - }, - - not: function( selector ) { - if ( typeof selector === "string" ) - // test special case where just one selector is passed in - if ( isSimple.test( selector ) ) - return this.pushStack( jQuery.multiFilter( selector, this, true ), "not", selector ); - else - selector = jQuery.multiFilter( selector, this ); - - var isArrayLike = selector.length && selector[selector.length - 1] !== undefined && !selector.nodeType; - return this.filter(function() { - return isArrayLike ? jQuery.inArray( this, selector ) < 0 : this != selector; - }); - }, - - add: function( selector ) { - return this.pushStack( jQuery.unique( jQuery.merge( - this.get(), - typeof selector === "string" ? - jQuery( selector ) : - jQuery.makeArray( selector ) - ))); - }, - - is: function( selector ) { - return !!selector && jQuery.multiFilter( selector, this ).length > 0; - }, - - hasClass: function( selector ) { - return !!selector && this.is( "." + selector ); - }, - - val: function( value ) { - if ( value === undefined ) { - var elem = this[0]; - - if ( elem ) { - if( jQuery.nodeName( elem, 'option' ) ) - return (elem.attributes.value || {}).specified ? elem.value : elem.text; - - // We need to handle select boxes special - if ( jQuery.nodeName( elem, "select" ) ) { - var index = elem.selectedIndex, - values = [], - options = elem.options, - one = elem.type == "select-one"; - - // Nothing was selected - if ( index < 0 ) - return null; - - // Loop through all the selected options - for ( var i = one ? index : 0, max = one ? index + 1 : options.length; i < max; i++ ) { - var option = options[ i ]; - - if ( option.selected ) { - // Get the specifc value for the option - value = jQuery(option).val(); - - // We don't need an array for one selects - if ( one ) - return value; - - // Multi-Selects return an array - values.push( value ); - } - } - - return values; - } - - // Everything else, we just grab the value - return (elem.value || "").replace(/\r/g, ""); - - } - - return undefined; - } - - if ( typeof value === "number" ) - value += ''; - - return this.each(function(){ - if ( this.nodeType != 1 ) - return; - - if ( jQuery.isArray(value) && /radio|checkbox/.test( this.type ) ) - this.checked = (jQuery.inArray(this.value, value) >= 0 || - jQuery.inArray(this.name, value) >= 0); - - else if ( jQuery.nodeName( this, "select" ) ) { - var values = jQuery.makeArray(value); - - jQuery( "option", this ).each(function(){ - this.selected = (jQuery.inArray( this.value, values ) >= 0 || - jQuery.inArray( this.text, values ) >= 0); - }); - - if ( !values.length ) - this.selectedIndex = -1; - - } else - this.value = value; - }); - }, - - html: function( value ) { - return value === undefined ? - (this[0] ? - this[0].innerHTML.replace(/ jQuery\d+="(?:\d+|null)"/g, "") : - null) : - this.empty().append( value ); - }, - - replaceWith: function( value ) { - return this.after( value ).remove(); - }, - - eq: function( i ) { - return this.slice( i, +i + 1 ); - }, - - slice: function() { - return this.pushStack( Array.prototype.slice.apply( this, arguments ), - "slice", Array.prototype.slice.call(arguments).join(",") ); - }, - - map: function( callback ) { - return this.pushStack( jQuery.map(this, function(elem, i){ - return callback.call( elem, i, elem ); - })); - }, - - andSelf: function() { - return this.add( this.prevObject ); - }, - - domManip: function( args, table, callback ) { - if ( this[0] ) { - var fragment = (this[0].ownerDocument || this[0]).createDocumentFragment(), - scripts = jQuery.clean( args, (this[0].ownerDocument || this[0]), fragment ), - first = fragment.firstChild; - - if ( first ) - for ( var i = 0, l = this.length; i < l; i++ ) - callback.call( root(this[i], first), this.length > 1 || i > 0 ? - fragment.cloneNode(true) : fragment ); - - if ( scripts ) - jQuery.each( scripts, evalScript ); - } - - return this; - - function root( elem, cur ) { - return table && jQuery.nodeName(elem, "table") && jQuery.nodeName(cur, "tr") ? - (elem.getElementsByTagName("tbody")[0] || - elem.appendChild(elem.ownerDocument.createElement("tbody"))) : - elem; - } - } -}; - -// Give the init function the jQuery prototype for later instantiation -jQuery.fn.init.prototype = jQuery.fn; - -function evalScript( i, elem ) { - if ( elem.src ) - jQuery.ajax({ - url: elem.src, - async: false, - dataType: "script" - }); - - else - jQuery.globalEval( elem.text || elem.textContent || elem.innerHTML || "" ); - - if ( elem.parentNode ) - elem.parentNode.removeChild( elem ); -} - -function now(){ - return +new Date; -} - -jQuery.extend = jQuery.fn.extend = function() { - // copy reference to target object - var target = arguments[0] || {}, i = 1, length = arguments.length, deep = false, options; - - // Handle a deep copy situation - if ( typeof target === "boolean" ) { - deep = target; - target = arguments[1] || {}; - // skip the boolean and the target - i = 2; - } - - // Handle case when target is a string or something (possible in deep copy) - if ( typeof target !== "object" && !jQuery.isFunction(target) ) - target = {}; - - // extend jQuery itself if only one argument is passed - if ( length == i ) { - target = this; - --i; - } - - for ( ; i < length; i++ ) - // Only deal with non-null/undefined values - if ( (options = arguments[ i ]) != null ) - // Extend the base object - for ( var name in options ) { - var src = target[ name ], copy = options[ name ]; - - // Prevent never-ending loop - if ( target === copy ) - continue; - - // Recurse if we're merging object values - if ( deep && copy && typeof copy === "object" && !copy.nodeType ) - target[ name ] = jQuery.extend( deep, - // Never move original objects, clone them - src || ( copy.length != null ? [ ] : { } ) - , copy ); - - // Don't bring in undefined values - else if ( copy !== undefined ) - target[ name ] = copy; - - } - - // Return the modified object - return target; -}; - -// exclude the following css properties to add px -var exclude = /z-?index|font-?weight|opacity|zoom|line-?height/i, - // cache defaultView - defaultView = document.defaultView || {}, - toString = Object.prototype.toString; - -jQuery.extend({ - noConflict: function( deep ) { - window.$ = _$; - - if ( deep ) - window.jQuery = _jQuery; - - return jQuery; - }, - - // See test/unit/core.js for details concerning isFunction. - // Since version 1.3, DOM methods and functions like alert - // aren't supported. They return false on IE (#2968). - isFunction: function( obj ) { - return toString.call(obj) === "[object Function]"; - }, - - isArray: function( obj ) { - return toString.call(obj) === "[object Array]"; - }, - - // check if an element is in a (or is an) XML document - isXMLDoc: function( elem ) { - return elem.nodeType === 9 && elem.documentElement.nodeName !== "HTML" || - !!elem.ownerDocument && jQuery.isXMLDoc( elem.ownerDocument ); - }, - - // Evalulates a script in a global context - globalEval: function( data ) { - if ( data && /\S/.test(data) ) { - // Inspired by code by Andrea Giammarchi - // http://webreflection.blogspot.com/2007/08/global-scope-evaluation-and-dom.html - var head = document.getElementsByTagName("head")[0] || document.documentElement, - script = document.createElement("script"); - - script.type = "text/javascript"; - if ( jQuery.support.scriptEval ) - script.appendChild( document.createTextNode( data ) ); - else - script.text = data; - - // Use insertBefore instead of appendChild to circumvent an IE6 bug. - // This arises when a base node is used (#2709). - head.insertBefore( script, head.firstChild ); - head.removeChild( script ); - } - }, - - nodeName: function( elem, name ) { - return elem.nodeName && elem.nodeName.toUpperCase() == name.toUpperCase(); - }, - - // args is for internal usage only - each: function( object, callback, args ) { - var name, i = 0, length = object.length; - - if ( args ) { - if ( length === undefined ) { - for ( name in object ) - if ( callback.apply( object[ name ], args ) === false ) - break; - } else - for ( ; i < length; ) - if ( callback.apply( object[ i++ ], args ) === false ) - break; - - // A special, fast, case for the most common use of each - } else { - if ( length === undefined ) { - for ( name in object ) - if ( callback.call( object[ name ], name, object[ name ] ) === false ) - break; - } else - for ( var value = object[0]; - i < length && callback.call( value, i, value ) !== false; value = object[++i] ){} - } - - return object; - }, - - prop: function( elem, value, type, i, name ) { - // Handle executable functions - if ( jQuery.isFunction( value ) ) - value = value.call( elem, i ); - - // Handle passing in a number to a CSS property - return typeof value === "number" && type == "curCSS" && !exclude.test( name ) ? - value + "px" : - value; - }, - - className: { - // internal only, use addClass("class") - add: function( elem, classNames ) { - jQuery.each((classNames || "").split(/\s+/), function(i, className){ - if ( elem.nodeType == 1 && !jQuery.className.has( elem.className, className ) ) - elem.className += (elem.className ? " " : "") + className; - }); - }, - - // internal only, use removeClass("class") - remove: function( elem, classNames ) { - if (elem.nodeType == 1) - elem.className = classNames !== undefined ? - jQuery.grep(elem.className.split(/\s+/), function(className){ - return !jQuery.className.has( classNames, className ); - }).join(" ") : - ""; - }, - - // internal only, use hasClass("class") - has: function( elem, className ) { - return elem && jQuery.inArray( className, (elem.className || elem).toString().split(/\s+/) ) > -1; - } - }, - - // A method for quickly swapping in/out CSS properties to get correct calculations - swap: function( elem, options, callback ) { - var old = {}; - // Remember the old values, and insert the new ones - for ( var name in options ) { - old[ name ] = elem.style[ name ]; - elem.style[ name ] = options[ name ]; - } - - callback.call( elem ); - - // Revert the old values - for ( var name in options ) - elem.style[ name ] = old[ name ]; - }, - - css: function( elem, name, force, extra ) { - if ( name == "width" || name == "height" ) { - var val, props = { position: "absolute", visibility: "hidden", display:"block" }, which = name == "width" ? [ "Left", "Right" ] : [ "Top", "Bottom" ]; - - function getWH() { - val = name == "width" ? elem.offsetWidth : elem.offsetHeight; - - if ( extra === "border" ) - return; - - jQuery.each( which, function() { - if ( !extra ) - val -= parseFloat(jQuery.curCSS( elem, "padding" + this, true)) || 0; - if ( extra === "margin" ) - val += parseFloat(jQuery.curCSS( elem, "margin" + this, true)) || 0; - else - val -= parseFloat(jQuery.curCSS( elem, "border" + this + "Width", true)) || 0; - }); - } - - if ( elem.offsetWidth !== 0 ) - getWH(); - else - jQuery.swap( elem, props, getWH ); - - return Math.max(0, Math.round(val)); - } - - return jQuery.curCSS( elem, name, force ); - }, - - curCSS: function( elem, name, force ) { - var ret, style = elem.style; - - // We need to handle opacity special in IE - if ( name == "opacity" && !jQuery.support.opacity ) { - ret = jQuery.attr( style, "opacity" ); - - return ret == "" ? - "1" : - ret; - } - - // Make sure we're using the right name for getting the float value - if ( name.match( /float/i ) ) - name = styleFloat; - - if ( !force && style && style[ name ] ) - ret = style[ name ]; - - else if ( defaultView.getComputedStyle ) { - - // Only "float" is needed here - if ( name.match( /float/i ) ) - name = "float"; - - name = name.replace( /([A-Z])/g, "-$1" ).toLowerCase(); - try{ - var computedStyle = defaultView.getComputedStyle( elem, null ); - }catch(e){ - // Error in getting computedStyle - } - if ( computedStyle ) - ret = computedStyle.getPropertyValue( name ); - - // We should always get a number back from opacity - if ( name == "opacity" && ret == "" ) - ret = "1"; - - } else if ( elem.currentStyle ) { - var camelCase = name.replace(/\-(\w)/g, function(all, letter){ - return letter.toUpperCase(); - }); - - ret = elem.currentStyle[ name ] || elem.currentStyle[ camelCase ]; - - // From the awesome hack by Dean Edwards - // http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102291 - - // If we're not dealing with a regular pixel number - // but a number that has a weird ending, we need to convert it to pixels - if ( !/^\d+(px)?$/i.test( ret ) && /^\d/.test( ret ) ) { - // Remember the original values - var left = style.left, rsLeft = elem.runtimeStyle.left; - - // Put in the new values to get a computed value out - elem.runtimeStyle.left = elem.currentStyle.left; - style.left = ret || 0; - ret = style.pixelLeft + "px"; - - // Revert the changed values - style.left = left; - elem.runtimeStyle.left = rsLeft; - } - } - - return ret; - }, - - clean: function( elems, context, fragment ) { - context = context || document; - - // !context.createElement fails in IE with an error but returns typeof 'object' - if ( typeof context.createElement === "undefined" ) - context = context.ownerDocument || context[0] && context[0].ownerDocument || document; - - // If a single string is passed in and it's a single tag - // just do a createElement and skip the rest - if ( !fragment && elems.length === 1 && typeof elems[0] === "string" ) { - var match = /^<(\w+)\s*\/?>$/.exec(elems[0]); - if ( match ) - return [ context.createElement( match[1] ) ]; - } - - var ret = [], scripts = [], div = context.createElement("div"); - - jQuery.each(elems, function(i, elem){ - if ( typeof elem === "number" ) - elem += ''; - - if ( !elem ) - return; - - // Convert html string into DOM nodes - if ( typeof elem === "string" ) { - // Fix "XHTML"-style tags in all browsers - elem = elem.replace(/(<(\w+)[^>]*?)\/>/g, function(all, front, tag){ - return tag.match(/^(abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i) ? - all : - front + ">"; - }); - - // Trim whitespace, otherwise indexOf won't work as expected - var tags = elem.replace(/^\s+/, "").substring(0, 10).toLowerCase(); - - var wrap = - // option or optgroup - !tags.indexOf("", "" ] || - - !tags.indexOf("", "" ] || - - tags.match(/^<(thead|tbody|tfoot|colg|cap)/) && - [ 1, "", "
" ] || - - !tags.indexOf("", "" ] || - - // matched above - (!tags.indexOf("", "" ] || - - !tags.indexOf("", "" ] || - - // IE can't serialize and