From 14ffe3143e36d79ef7054b293e51f3fb4b658224 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20L=C3=A9cureuil?= Date: Wed, 19 Apr 2017 00:16:28 +0200 Subject: Remove all to rebase on new mw --- skins/common/IE80Fixes.css | 15 - skins/common/IEFixes.js | 128 - skins/common/Makefile | 2 - skins/common/ajax.js | 167 - skins/common/ajaxwatch.js | 180 - skins/common/block.js | 57 - skins/common/changepassword.js | 16 - skins/common/cologneblue.css | 101 - skins/common/commonPrint.css | 249 -- skins/common/common_rtl.css | 59 - skins/common/diff.css | 143 - skins/common/diff.js | 20 - skins/common/edit.js | 231 -- skins/common/enhancedchanges.js | 40 - skins/common/feed.css | 95 - skins/common/history.js | 94 - skins/common/htmlform.js | 40 - skins/common/images/Arr_.png | Bin 246 -> 0 bytes skins/common/images/Arr_d.png | Bin 215 -> 0 bytes skins/common/images/Arr_l.png | Bin 263 -> 0 bytes skins/common/images/Arr_r.png | Bin 210 -> 0 bytes skins/common/images/Arr_u.png | Bin 425 -> 0 bytes skins/common/images/Checker-16x16.png | Bin 81 -> 0 bytes skins/common/images/Zoom_sans.gif | Bin 901 -> 0 bytes skins/common/images/add.png | Bin 3329 -> 0 bytes skins/common/images/ajax-loader.gif | Bin 3208 -> 0 bytes skins/common/images/ar/button_bold.png | Bin 741 -> 0 bytes skins/common/images/ar/button_headline.png | Bin 629 -> 0 bytes skins/common/images/ar/button_italic.png | Bin 692 -> 0 bytes skins/common/images/ar/button_link.png | Bin 741 -> 0 bytes skins/common/images/ar/button_nowiki.png | Bin 1185 -> 0 bytes skins/common/images/arrow_disabled_first_25.png | Bin 481 -> 0 bytes skins/common/images/arrow_disabled_last_25.png | Bin 480 -> 0 bytes skins/common/images/arrow_disabled_left_25.png | Bin 460 -> 0 bytes skins/common/images/arrow_disabled_right_25.png | Bin 447 -> 0 bytes skins/common/images/arrow_first_25.png | Bin 482 -> 0 bytes skins/common/images/arrow_last_25.png | Bin 484 -> 0 bytes skins/common/images/arrow_left_25.png | Bin 462 -> 0 bytes skins/common/images/arrow_right_25.png | Bin 449 -> 0 bytes skins/common/images/be-tarask/button_bold.png | Bin 554 -> 0 bytes skins/common/images/be-tarask/button_italic.png | Bin 592 -> 0 bytes skins/common/images/be-tarask/button_link.png | Bin 466 -> 0 bytes skins/common/images/bullet.gif | Bin 50 -> 0 bytes skins/common/images/button_bold.png | Bin 288 -> 0 bytes skins/common/images/button_extlink.png | Bin 494 -> 0 bytes skins/common/images/button_headline.png | Bin 465 -> 0 bytes skins/common/images/button_hr.png | Bin 251 -> 0 bytes skins/common/images/button_image.png | Bin 584 -> 0 bytes skins/common/images/button_italic.png | Bin 292 -> 0 bytes skins/common/images/button_link.png | Bin 337 -> 0 bytes skins/common/images/button_math.png | Bin 617 -> 0 bytes skins/common/images/button_media.png | Bin 780 -> 0 bytes skins/common/images/button_nowiki.png | Bin 352 -> 0 bytes skins/common/images/button_sig.png | Bin 953 -> 0 bytes skins/common/images/button_template.png | Bin 233 -> 0 bytes skins/common/images/cyrl/LICENSE | 17 - skins/common/images/cyrl/button_bold.png | Bin 275 -> 0 bytes skins/common/images/cyrl/button_italic.png | Bin 460 -> 0 bytes skins/common/images/cyrl/button_link.png | Bin 347 -> 0 bytes skins/common/images/de/button_bold.png | Bin 328 -> 0 bytes skins/common/images/de/button_italic.png | Bin 351 -> 0 bytes skins/common/images/diffunderline.gif | Bin 52 -> 0 bytes skins/common/images/fa/button_bold.png | Bin 500 -> 0 bytes skins/common/images/fa/button_headline.png | Bin 434 -> 0 bytes skins/common/images/fa/button_italic.png | Bin 573 -> 0 bytes skins/common/images/fa/button_link.png | Bin 535 -> 0 bytes skins/common/images/fa/button_nowiki.png | Bin 1185 -> 0 bytes skins/common/images/feed-icon.png | Bin 557 -> 0 bytes skins/common/images/gnu-fdl.png | Bin 1730 -> 0 bytes skins/common/images/icons/COPYING | 43 - skins/common/images/icons/fileicon-c.png | Bin 2211 -> 0 bytes skins/common/images/icons/fileicon-cpp.png | Bin 1882 -> 0 bytes skins/common/images/icons/fileicon-deb.png | Bin 4801 -> 0 bytes skins/common/images/icons/fileicon-djvu.png | Bin 10752 -> 0 bytes skins/common/images/icons/fileicon-djvu.xcf | Bin 83394 -> 0 bytes skins/common/images/icons/fileicon-dvi.png | Bin 12778 -> 0 bytes skins/common/images/icons/fileicon-exe.png | Bin 5680 -> 0 bytes skins/common/images/icons/fileicon-h.png | Bin 1191 -> 0 bytes skins/common/images/icons/fileicon-html.png | Bin 7422 -> 0 bytes skins/common/images/icons/fileicon-iso.png | Bin 6450 -> 0 bytes skins/common/images/icons/fileicon-java.png | Bin 5989 -> 0 bytes skins/common/images/icons/fileicon-mid.png | Bin 6657 -> 0 bytes skins/common/images/icons/fileicon-mov.png | Bin 7716 -> 0 bytes skins/common/images/icons/fileicon-o.png | Bin 2204 -> 0 bytes skins/common/images/icons/fileicon-ogg.png | Bin 3750 -> 0 bytes skins/common/images/icons/fileicon-ogg.xcf | Bin 40236 -> 0 bytes skins/common/images/icons/fileicon-pdf.png | Bin 4976 -> 0 bytes skins/common/images/icons/fileicon-ps.png | Bin 3012 -> 0 bytes skins/common/images/icons/fileicon-rm.png | Bin 2851 -> 0 bytes skins/common/images/icons/fileicon-rpm.png | Bin 4103 -> 0 bytes skins/common/images/icons/fileicon-svg.png | Bin 5094 -> 0 bytes skins/common/images/icons/fileicon-tar.png | Bin 6347 -> 0 bytes skins/common/images/icons/fileicon-tex.png | Bin 3997 -> 0 bytes skins/common/images/icons/fileicon-ttf.png | Bin 3469 -> 0 bytes skins/common/images/icons/fileicon-txt.png | Bin 3638 -> 0 bytes skins/common/images/icons/fileicon.png | Bin 1121 -> 0 bytes skins/common/images/ksh/LICENSE | 7 - skins/common/images/ksh/button_S_italic.png | Bin 3206 -> 0 bytes skins/common/images/link_icon.gif | Bin 342 -> 0 bytes skins/common/images/magnify-clip.png | Bin 204 -> 0 bytes skins/common/images/mediawiki.png | Bin 22987 -> 0 bytes skins/common/images/nextredirectltr.png | Bin 187 -> 0 bytes skins/common/images/nextredirectrtl.png | Bin 187 -> 0 bytes skins/common/images/poweredby_mediawiki_88x31.png | Bin 1927 -> 0 bytes skins/common/images/public-domain.png | Bin 2251 -> 0 bytes skins/common/images/redirectltr.png | Bin 381 -> 0 bytes skins/common/images/redirectrtl.png | Bin 381 -> 0 bytes skins/common/images/remove.png | Bin 3346 -> 0 bytes skins/common/images/sort_down.gif | Bin 464 -> 0 bytes skins/common/images/sort_none.gif | Bin 462 -> 0 bytes skins/common/images/sort_up.gif | Bin 466 -> 0 bytes skins/common/images/spinner.gif | Bin 4648 -> 0 bytes skins/common/images/tooltip_icon.png | Bin 430 -> 0 bytes skins/common/images/wiki.png | Bin 24801 -> 0 bytes skins/common/jquery.js | 4384 --------------------- skins/common/jquery.min.js | 433 -- skins/common/metadata.js | 49 - skins/common/mwsuggest.js | 995 ----- skins/common/nostalgia.css | 17 - skins/common/oldshared.css | 383 -- skins/common/prefs.js | 217 - skins/common/preview.js | 53 - skins/common/protect.js | 351 -- skins/common/quickbar-right.css | 1 - skins/common/quickbar.css | 1 - skins/common/rightclickedit.js | 48 - skins/common/search.js | 50 - skins/common/shared.css | 831 ---- skins/common/upload.js | 343 -- skins/common/wikibits.js | 1042 ----- skins/common/wikiprintable.css | 46 - skins/common/wikistandard.css | 48 - 132 files changed, 10996 deletions(-) delete mode 100644 skins/common/IE80Fixes.css delete mode 100644 skins/common/IEFixes.js delete mode 100644 skins/common/Makefile delete mode 100644 skins/common/ajax.js delete mode 100644 skins/common/ajaxwatch.js delete mode 100644 skins/common/block.js delete mode 100644 skins/common/changepassword.js delete mode 100644 skins/common/cologneblue.css delete mode 100644 skins/common/commonPrint.css delete mode 100644 skins/common/common_rtl.css delete mode 100644 skins/common/diff.css delete mode 100644 skins/common/diff.js delete mode 100644 skins/common/edit.js delete mode 100644 skins/common/enhancedchanges.js delete mode 100644 skins/common/feed.css delete mode 100644 skins/common/history.js delete mode 100644 skins/common/htmlform.js delete mode 100644 skins/common/images/Arr_.png delete mode 100644 skins/common/images/Arr_d.png delete mode 100644 skins/common/images/Arr_l.png delete mode 100644 skins/common/images/Arr_r.png delete mode 100644 skins/common/images/Arr_u.png delete mode 100644 skins/common/images/Checker-16x16.png delete mode 100644 skins/common/images/Zoom_sans.gif delete mode 100644 skins/common/images/add.png delete mode 100644 skins/common/images/ajax-loader.gif delete mode 100644 skins/common/images/ar/button_bold.png delete mode 100644 skins/common/images/ar/button_headline.png delete mode 100644 skins/common/images/ar/button_italic.png delete mode 100644 skins/common/images/ar/button_link.png delete mode 100644 skins/common/images/ar/button_nowiki.png delete mode 100644 skins/common/images/arrow_disabled_first_25.png delete mode 100644 skins/common/images/arrow_disabled_last_25.png delete mode 100644 skins/common/images/arrow_disabled_left_25.png delete mode 100644 skins/common/images/arrow_disabled_right_25.png delete mode 100644 skins/common/images/arrow_first_25.png delete mode 100644 skins/common/images/arrow_last_25.png delete mode 100644 skins/common/images/arrow_left_25.png delete mode 100644 skins/common/images/arrow_right_25.png delete mode 100644 skins/common/images/be-tarask/button_bold.png delete mode 100644 skins/common/images/be-tarask/button_italic.png delete mode 100644 skins/common/images/be-tarask/button_link.png delete mode 100644 skins/common/images/bullet.gif delete mode 100644 skins/common/images/button_bold.png delete mode 100644 skins/common/images/button_extlink.png delete mode 100644 skins/common/images/button_headline.png delete mode 100644 skins/common/images/button_hr.png delete mode 100644 skins/common/images/button_image.png delete mode 100644 skins/common/images/button_italic.png delete mode 100644 skins/common/images/button_link.png delete mode 100644 skins/common/images/button_math.png delete mode 100644 skins/common/images/button_media.png delete mode 100644 skins/common/images/button_nowiki.png delete mode 100644 skins/common/images/button_sig.png delete mode 100644 skins/common/images/button_template.png delete mode 100644 skins/common/images/cyrl/LICENSE delete mode 100644 skins/common/images/cyrl/button_bold.png delete mode 100644 skins/common/images/cyrl/button_italic.png delete mode 100644 skins/common/images/cyrl/button_link.png delete mode 100644 skins/common/images/de/button_bold.png delete mode 100644 skins/common/images/de/button_italic.png delete mode 100644 skins/common/images/diffunderline.gif delete mode 100644 skins/common/images/fa/button_bold.png delete mode 100644 skins/common/images/fa/button_headline.png delete mode 100644 skins/common/images/fa/button_italic.png delete mode 100644 skins/common/images/fa/button_link.png delete mode 100644 skins/common/images/fa/button_nowiki.png delete mode 100644 skins/common/images/feed-icon.png delete mode 100644 skins/common/images/gnu-fdl.png delete mode 100644 skins/common/images/icons/COPYING delete mode 100644 skins/common/images/icons/fileicon-c.png delete mode 100644 skins/common/images/icons/fileicon-cpp.png delete mode 100644 skins/common/images/icons/fileicon-deb.png delete mode 100644 skins/common/images/icons/fileicon-djvu.png delete mode 100644 skins/common/images/icons/fileicon-djvu.xcf delete mode 100644 skins/common/images/icons/fileicon-dvi.png delete mode 100644 skins/common/images/icons/fileicon-exe.png delete mode 100644 skins/common/images/icons/fileicon-h.png delete mode 100644 skins/common/images/icons/fileicon-html.png delete mode 100644 skins/common/images/icons/fileicon-iso.png delete mode 100644 skins/common/images/icons/fileicon-java.png delete mode 100644 skins/common/images/icons/fileicon-mid.png delete mode 100644 skins/common/images/icons/fileicon-mov.png delete mode 100644 skins/common/images/icons/fileicon-o.png delete mode 100644 skins/common/images/icons/fileicon-ogg.png delete mode 100644 skins/common/images/icons/fileicon-ogg.xcf delete mode 100644 skins/common/images/icons/fileicon-pdf.png delete mode 100644 skins/common/images/icons/fileicon-ps.png delete mode 100644 skins/common/images/icons/fileicon-rm.png delete mode 100644 skins/common/images/icons/fileicon-rpm.png delete mode 100644 skins/common/images/icons/fileicon-svg.png delete mode 100644 skins/common/images/icons/fileicon-tar.png delete mode 100644 skins/common/images/icons/fileicon-tex.png delete mode 100644 skins/common/images/icons/fileicon-ttf.png delete mode 100644 skins/common/images/icons/fileicon-txt.png delete mode 100644 skins/common/images/icons/fileicon.png delete mode 100644 skins/common/images/ksh/LICENSE delete mode 100644 skins/common/images/ksh/button_S_italic.png delete mode 100644 skins/common/images/link_icon.gif delete mode 100644 skins/common/images/magnify-clip.png delete mode 100644 skins/common/images/mediawiki.png delete mode 100644 skins/common/images/nextredirectltr.png delete mode 100644 skins/common/images/nextredirectrtl.png delete mode 100644 skins/common/images/poweredby_mediawiki_88x31.png delete mode 100644 skins/common/images/public-domain.png delete mode 100644 skins/common/images/redirectltr.png delete mode 100644 skins/common/images/redirectrtl.png delete mode 100644 skins/common/images/remove.png delete mode 100644 skins/common/images/sort_down.gif delete mode 100644 skins/common/images/sort_none.gif delete mode 100644 skins/common/images/sort_up.gif delete mode 100644 skins/common/images/spinner.gif delete mode 100644 skins/common/images/tooltip_icon.png delete mode 100644 skins/common/images/wiki.png delete mode 100644 skins/common/jquery.js delete mode 100644 skins/common/jquery.min.js delete mode 100644 skins/common/metadata.js delete mode 100644 skins/common/mwsuggest.js delete mode 100644 skins/common/nostalgia.css delete mode 100644 skins/common/oldshared.css delete mode 100644 skins/common/prefs.js delete mode 100644 skins/common/preview.js delete mode 100644 skins/common/protect.js delete mode 100644 skins/common/quickbar-right.css delete mode 100644 skins/common/quickbar.css delete mode 100644 skins/common/rightclickedit.js delete mode 100644 skins/common/search.js delete mode 100644 skins/common/shared.css delete mode 100644 skins/common/upload.js delete mode 100644 skins/common/wikibits.js delete mode 100644 skins/common/wikiprintable.css delete mode 100644 skins/common/wikistandard.css (limited to 'skins/common') diff --git a/skins/common/IE80Fixes.css b/skins/common/IE80Fixes.css deleted file mode 100644 index b6360f6..0000000 --- a/skins/common/IE80Fixes.css +++ /dev/null @@ -1,15 +0,0 @@ -/** - * Fixes textarea scrolling bug (bug #19334). The bug only occurs when a - * percentage width is given, so instead of width: 100%, use min-width: 100%; - * max-width: 100%. We also need to give a fixed width for the actual width - * property for the hack to work, although the actual value (500px here) ends - * up being ignored; min/max-width take precedence. - * - * More info: http://grantovich.net/posts/2009/06/that-weird-ie8-textarea-bug/ - */ -#wpTextbox1 { - height: 390px; - width: 500px; - min-width: 100%; - max-width: 100%; -} diff --git a/skins/common/IEFixes.js b/skins/common/IEFixes.js deleted file mode 100644 index 762d7a7..0000000 --- a/skins/common/IEFixes.js +++ /dev/null @@ -1,128 +0,0 @@ -// IE fixes javascript - -var isMSIE55 = ( window.showModalDialog && window.clipboardData && window.createPopup ); -var doneIETransform; -var doneIEAlphaFix; - -if ( document.attachEvent ) { - document.attachEvent( 'onreadystatechange', hookit ); -} - -function hookit() { - if ( !doneIETransform && document.getElementById && document.getElementById( 'bodyContent' ) ) { - doneIETransform = true; - relativeforfloats(); - fixalpha(); - } -} - -// png alpha transparency fixes -function fixalpha( logoId ) { - // bg - if ( isMSIE55 && !doneIEAlphaFix ) { - var plogo = document.getElementById( logoId || 'p-logo' ); - if ( !plogo ) { - return; - } - - var logoa = plogo.getElementsByTagName('a')[0]; - if ( !logoa ) { - return; - } - - var bg = logoa.currentStyle.backgroundImage; - var imageUrl = bg.substring( 5, bg.length - 2 ); - - doneIEAlphaFix = true; - - if ( imageUrl.substr( imageUrl.length - 4 ).toLowerCase() == '.png' ) { - var logospan = logoa.appendChild( document.createElement( 'span' ) ); - - logoa.style.backgroundImage = 'none'; - logospan.style.filter = 'progid:DXImageTransform.Microsoft.AlphaImageLoader(src=' + imageUrl + ')'; - logospan.style.height = '100%'; - logospan.style.position = 'absolute'; - logospan.style.width = logoa.currentStyle.width; - logospan.style.cursor = 'hand'; - // Center image with hack for IE5.5 - if ( document.documentElement.dir == 'rtl' ) { - logospan.style.right = '50%'; - logospan.style.setExpression( 'marginRight', '"-" + (this.offsetWidth / 2) + "px"' ); - } else { - logospan.style.left = '50%'; - logospan.style.setExpression( 'marginLeft', '"-" + (this.offsetWidth / 2) + "px"' ); - } - logospan.style.top = '50%'; - logospan.style.setExpression( 'marginTop', '"-" + (this.offsetHeight / 2) + "px"' ); - - var linkFix = logoa.appendChild( logoa.cloneNode() ); - linkFix.style.position = 'absolute'; - linkFix.style.height = '100%'; - linkFix.style.width = '100%'; - } - } -} - -// fix ie6 disappering float bug -function relativeforfloats() { - var bc = document.getElementById( 'bodyContent' ); - if ( bc ) { - var tables = bc.getElementsByTagName( 'table' ); - var divs = bc.getElementsByTagName( 'div' ); - } - setrelative( tables ); - setrelative( divs ); -} -function setrelative( nodes ) { - var i = 0; - while ( i < nodes.length ) { - if( ( ( nodes[i].style.float && nodes[i].style.float != ( 'none' ) || - ( nodes[i].align && nodes[i].align != ( 'none' ) ) ) && - ( !nodes[i].style.position || nodes[i].style.position != 'relative' ) ) ) - { - nodes[i].style.position = 'relative'; - } - i++; - } -} - -// Expand links for printing -String.prototype.hasClass = function( classWanted ) { - var classArr = this.split(/\s/); - for ( var i = 0; i < classArr.length; i++ ) { - if ( classArr[i].toLowerCase() == classWanted.toLowerCase() ) { - return true; - } - } - return false; -} - -var expandedURLs; - -onbeforeprint = function() { - expandedURLs = []; - - var contentEl = document.getElementById( 'content' ); - - if ( contentEl ) { - var allLinks = contentEl.getElementsByTagName( 'a' ); - - for ( var i = 0; i < allLinks.length; i++ ) { - if ( allLinks[i].className.hasClass( 'external' ) && !allLinks[i].className.hasClass( 'free' ) ) { - var expandedLink = document.createElement( 'span' ); - var expandedText = document.createTextNode( ' (' + allLinks[i].href + ')' ); - expandedLink.appendChild( expandedText ); - allLinks[i].parentNode.insertBefore( expandedLink, allLinks[i].nextSibling ); - expandedURLs[i] = expandedLink; - } - } - } -} - -onafterprint = function() { - for ( var i = 0; i < expandedURLs.length; i++ ) { - if ( expandedURLs[i] ) { - expandedURLs[i].removeNode( true ); - } - } -} diff --git a/skins/common/Makefile b/skins/common/Makefile deleted file mode 100644 index 56e60bd..0000000 --- a/skins/common/Makefile +++ /dev/null @@ -1,2 +0,0 @@ -jquery.min.js: jquery.js - php ../../maintenance/minify.php $< --outfile $@ diff --git a/skins/common/ajax.js b/skins/common/ajax.js deleted file mode 100644 index afcfa70..0000000 --- a/skins/common/ajax.js +++ /dev/null @@ -1,167 +0,0 @@ -// remote scripting library -// (c) copyright 2005 modernmethod, inc -var sajax_debug_mode = false; -var 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) return false; - - var e= document.getElementById('sajax_debug'); - - if (!e) { - e= document.createElement("p"); - e.className= 'sajax_debug'; - e.id= 'sajax_debug'; - - var b= document.getElementsByTagName("body")[0]; - - if (b.firstChild) b.insertBefore(e, b.firstChild); - else b.appendChild(e); - } - - 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..") - 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) { - try { - A=new ActiveXObject("Msxml2.XMLHTTP"); - } catch (e) { - try { - A=new ActiveXObject("Microsoft.XMLHTTP"); - } catch (oc) { - A=null; - } - } - } - 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) { - 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(); - 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]); - } - x = sajax_init_object(); - 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."); - } - throw e; - } - 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.onreadystatechange = function() { - if (x.readyState != 4) - return; - - sajax_debug("received (" + 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' ) { - 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 + ")
"; - } - } - 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.."); - delete x; - - return true; -} - -/** - * @return boolean whether the browser supports XMLHttpRequest - */ -function wfSupportsAjax() { - 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 deleted file mode 100644 index 7f54601..0000000 --- a/skins/common/ajaxwatch.js +++ /dev/null @@ -1,180 +0,0 @@ -// dependencies: -// * ajax.js: - /*extern sajax_init_object, sajax_do_call */ -// * wikibits.js: - /*extern changeText, hookEvent, jsMsg */ - -// 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" - }; -} - -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; - } - } - } else { - for ( i = 0; i < wgAjaxWatch.watchLinks.length; i++ ) { - changeText( wgAjaxWatch.watchLinks[i], newText ); - } - } -}; - -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.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; -}; - -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' ); - } else { - // Either we got a error code or it just plain broke. - window.location.href = wgAjaxWatch.watchLinks[0].href; - return; - } - 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; - } - } - - // 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 ); - } - - // 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; -}; - -hookEvent("load", wgAjaxWatch.onLoad); diff --git a/skins/common/block.js b/skins/common/block.js deleted file mode 100644 index ad04f81..0000000 --- a/skins/common/block.js +++ /dev/null @@ -1,57 +0,0 @@ -addOnloadHook( considerChangingExpiryFocus ); - -function considerChangingExpiryFocus() { - if ( !document.getElementById ) { - return; - } - var drop = document.getElementById( 'wpBlockExpiry' ); - if ( !drop ) { - return; - } - var field = document.getElementById( 'wpBlockOther' ); - if ( !field ) { - return; - } - var opt = drop.value; - if ( opt == 'other' ) { - field.style.display = ''; - } else { - field.style.display = 'none'; - } -} - -function updateBlockOptions() { - if ( !document.getElementById ) { - return; - } - - var target = document.getElementById( 'mw-bi-target' ); - if ( !target ) { - 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 isIpRange = isIp && addy.match(/\/\d+$/); - - var anonymousRow = document.getElementById( 'wpAnonOnlyRow' ); - if( anonymousRow ) { - anonymousRow.style.display = ( !isIp && !isEmpty ) ? 'none' : ''; - } - - var autoblockRow = document.getElementById( 'wpEnableAutoblockRow' ); - if( autoblockRow ) { - autoblockRow.style.display = isIp && !isEmpty ? 'none' : ''; - } - - var hideuserRow = document.getElementById( 'wpEnableHideUser' ); - if( hideuserRow ) { - hideuserRow.style.display = isIp && !isEmpty ? 'none' : ''; - } - - var watchuserRow = document.getElementById( 'wpEnableWatchUser' ); - if( watchuserRow ) { - watchuserRow.style.display = isIpRange && !isEmpty ? 'none' : ''; - } -} diff --git a/skins/common/changepassword.js b/skins/common/changepassword.js deleted file mode 100644 index 1e3e206..0000000 --- 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 deleted file mode 100644 index 2329d23..0000000 --- a/skins/common/cologneblue.css +++ /dev/null @@ -1,101 +0,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; -} -#topbar { padding: 0px; } -#powersearch { - background: #DDEEFF; border-style: solid; border-width: 1px; padding: 2px; -} -#quickbar { - 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; -} -#article p { - 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; } -#sitetitle { - 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; -} -td.top a { - 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; -} -#pagestats { - 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; -} -#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; -} -#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; -} -#quickbar form { padding: 0; margin-top: 0; } - -h1 { - 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; } -#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; } diff --git a/skins/common/commonPrint.css b/skins/common/commonPrint.css deleted file mode 100644 index 0932fce..0000000 --- a/skins/common/commonPrint.css +++ /dev/null @@ -1,249 +0,0 @@ -/* -** MediaWiki Print style sheet for CSS2-capable browsers. -** Copyright Gabriel Wicke, http://www.aulinx.de/ -** -** Derived from the plone (http://plone.org/) styles -** Copyright Alexander Limi -*/ - -/* Thanks to A List Apart (http://alistapart.com/) for useful extras */ -a.stub, -a.new{ color:#ba0000; text-decoration:none; } - -#toc { - /*border:1px solid #2f6fab;*/ - border:1px solid #aaaaaa; - background-color:#f9f9f9; - padding:5px; -} -.tocindent { - margin-left: 2em; -} -.tocline { - margin-bottom: 0px; -} - -/* 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; } -/* thumbnails */ -div.thumb { - margin-bottom: 0.5em; - border-style: solid; border-color: White; - width: auto; - overflow: hidden; -} -div.thumbinner { - border:1px solid #cccccc; - padding: 3px !important; - background-color:#f9f9f9; - font-size: 94%; - text-align: center; -} -html .thumbimage { - border:1px solid #cccccc; -} -html .thumbcaption { - border: none; - padding: 0.3em 0 0.1em 0; -} -div.magnify { display: none; } -div.tright { - float: right; - clear: right; - border-width: 0.5em 0 0.8em 1.4em; -} -div.tleft { - float: left; - margin-right:0.5em; - border-width: 0.5em 1.4em 0.8em 0; -} -img.thumbborder { - border: 1px solid #dddddd; -} - -/* table standards */ -table.rimage { - 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; -} - -.noprint, -div#jump-to-nav, -div.top, -div#column-one, -#colophon, -.editsection, -.toctoggle, -.tochidden, -div#f-poweredbyico, -div#f-copyrightico, -li#viewcount, -li#about, -li#disclaimer, -li#privacy, -#mw-hidden-catlinks { - /* Hides all the elements irrelevant for printing */ - display: none; -} - -ul { - list-style-type: square; -} - -#content { - background: none; - border: none ! important; - padding: 0 ! important; - margin: 0 ! important; -} -#footer { - background : white; - color : black; - border-top: 1px solid black; -} - -h1, h2, h3, h4, h5, h6 { - font-weight: bold; -} - -p, .documentDescription { - margin: 1em 0 ! important; - line-height: 1.2em; -} - -.tocindent p { - margin: 0 0 0 0 ! important; -} - -pre { - 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; -} - -a { - color: Black !important; - background: none !important; - padding: 0 !important; -} - -a:link, a:visited { - color: #520; - background: transparent; - text-decoration: underline; -} - -#content a.external.text:after, #content a.external.autonumber:after { - /* Expand URLs for printing */ - content: " (" attr(href) ") "; -} - -#globalWrapper { - width: 100% !important; - min-width: 0 !important; -} - -#content { - background : white; - color : black; -} - -#column-content { - margin: 0 !important; -} - -#column-content #content { - padding: 1em; - margin: 0 !important; -} -/* MSIE/Win doesn't understand 'inherit' */ -a, a.external, a.new, a.stub { - color: black ! important; - text-decoration: none ! important; -} - -/* Continue ... */ -a, a.external, a.new, a.stub { - color: inherit ! important; - text-decoration: inherit ! important; -} - -img { border: none; } -img.tex { vertical-align: middle; } -span.texhtml { font-family: serif; } - -#siteNotice { display: none; } - -div.gallerybox { - border: 1px solid #cccccc; - background-color:#f9f9f9; - width: 150px; -} - -div.gallerytext { - overflow: visible; -} - -/* -** Diff rendering -*/ -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; -} -td.diff-deletedline { - background:#ffffaa; - font-size: smaller; - border: dotted 2px black; -} -td.diff-context { - background:#eeeeee; - font-size: smaller; -} -.diffchange { - color: silver; - font-weight: bold; - text-decoration: underline; -} diff --git a/skins/common/common_rtl.css b/skins/common/common_rtl.css deleted file mode 100644 index 2e8bb98..0000000 --- a/skins/common/common_rtl.css +++ /dev/null @@ -1,59 +0,0 @@ -/* - * This file contains CSS settings common to RTL wikis use the old - * pre-Monobook skins Wikistandard, Nostalgia and CologneBlue - * NOTE: This file is not used in Monobook! - */ - -/* js pref toc */ -#preftoc { float: right; } -/* workaround for moz bug, displayed bullets on left side */ -#preftoc li { list-style: none; } -#prefcontrol { float: right; } -fieldset.prefsection, -fieldset.operaprefsection { - margin-left: 0; - margin-right: 18em; -} -/* page history */ -#pagehistory .history-user { - margin-right: 1.4em; - margin-left: 0.4em; -} -.editsection { - float: left; - margin-right: 5px; -} -div.tright, div.floatright { - clear: none; -} -div.tleft, div.floatleft { - clear: left; -} -/* Convenience links to edit block, delete and protect reasons */ -p.mw-ipb-conveniencelinks, p.mw-protect-editreasons, -p.mw-filedelete-editreasons, p.mw-delete-editreasons, -p.mw-revdel-editreasons { - float: left; -} -table.filehistory th { - text-align: right; -} - -/** - * Lists: - * The following lines don't have a visible effect on non-Gecko browsers - * They fix a problem ith Gecko browsers rendering lists to the right of - * left-floated objects in an RTL layout. - */ -html > body div#article ul { - display: table; -} -html > body div#bodyContent ul#filetoc { - display: block; -} - -/* feed links */ -a.feedlink { - background: none !important; - padding-left: 0 !important; -} diff --git a/skins/common/diff.css b/skins/common/diff.css deleted file mode 100644 index 6afa373..0000000 --- a/skins/common/diff.css +++ /dev/null @@ -1,143 +0,0 @@ -/* -** Diff rendering -*/ -table.diff, td.diff-otitle, td.diff-ntitle { - background-color: white; -} -td.diff-otitle, -td.diff-ntitle { - text-align: center; -} -td.diff-marker { - text-align: right; -} -.rtl td.diff-marker { - text-align: left; -} -td.diff-lineno { - font-weight: bold; -} -td.diff-addedline { - background: #cfc; - font-size: smaller; -} -td.diff-deletedline { - background: #ffa; - font-size: smaller; -} -td.diff-context { - background: #eee; - font-size: smaller; -} -.diffchange { - color: red; - font-weight: bold; - text-decoration: none; - white-space: pre-wrap; - white-space: -moz-pre-wrap; -} - -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; -} -table.diff td { - padding: 0; -} -table.diff col.diff-marker { - width: 2%; -} -table.diff col.diff-content { - width: 48%; -} -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 */ - 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/diff.js b/skins/common/diff.js deleted file mode 100644 index 5fd151f..0000000 --- a/skins/common/diff.js +++ /dev/null @@ -1,20 +0,0 @@ -/* -Workaround for overflow bug in Mozilla 1.1 and earlier, where scrolling -
s in cells collapse their height to a single line. - -Known to be fixed in 1.2.1 (Gecko 20021130), but the CSS hacks I've tried -with overflow-x disable the scrolling all the way until Mozilla 1.8 / FF 1.5 -and break Opera as well. - -So... we check for reaaaally old Gecko and hack in an alternate rule to let -the wide cells spill instead of scrolling them. Not ideal as it won't work -if JS is disabled, of course. -*/ - -if (navigator && navigator.product == "Gecko" && navigator.productSub < "20021130") { - var sheets = document.styleSheets; - var lastSheet = sheets[sheets.length-1]; - lastSheet.insertRule( - "table.diff td div { overflow: visible; }", - lastSheet.cssRules.length); -} diff --git a/skins/common/edit.js b/skins/common/edit.js deleted file mode 100644 index 423205f..0000000 --- a/skins/common/edit.js +++ /dev/null @@ -1,231 +0,0 @@ -var currentFocused; - -// 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 ) { - // Don't generate buttons for browsers which don't fully - // support it. - mwEditButtons.push({ - 'imageId': imageId, - 'imageFile': imageFile, - 'speedTip': speedTip, - 'tagOpen': tagOpen, - '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 ) { - var image = document.createElement( 'img' ); - image.width = 23; - image.height = 22; - image.className = 'mw-toolbar-editbutton'; - if ( item.imageId ) { - image.id = item.imageId; - } - image.src = item.imageFile; - image.border = 0; - image.alt = item.speedTip; - image.title = item.speedTip; - image.style.cursor = 'pointer'; - 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, "-") ); - } - return false; - }; - - parent.appendChild( image ); - return true; -} - -function mwSetupToolbar() { - var toolbar = document.getElementById( 'toolbar' ); - if ( !toolbar ) { - return false; - } - - // Don't generate buttons for browsers which don't fully - // support it. - // but don't assume wpTextbox1 is always here - var textboxes = document.getElementsByTagName( 'textarea' ); - if ( !textboxes.length ) { - // No toolbar if we can't find any textarea - return false; - } - // Only check for selection capability if the textarea is visible - errors will occur otherwise - just because - // the textarea is not visible, doesn't mean we shouldn't build out the toolbar though - it might have been replaced - // with some other kind of control - if ( textboxes[0].style.display != 'none' ) { - if ( !( document.selection && document.selection.createRange ) - && textboxes[0].selectionStart === null ) { - return false; - } - } - for ( var i = 0; i < mwEditButtons.length; i++ ) { - mwInsertEditButton( toolbar, mwEditButtons[i] ); - } - for ( var i = 0; i < mwCustomEditButtons.length; i++ ) { - 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' && - ( currentFocused.nodeName.toLowerCase() == 'iframe' || currentFocused.id == 'wpTextbox1' ) ) { - $j( '#wpTextbox1' ).textSelection( - 'encapsulateSelection', { 'pre': tagOpen, 'peri': sampleText, 'post': tagClose } - ); - return; - } - var txtarea; - if ( document.editform ) { - txtarea = currentFocused; - } else { - // some alternate form? take the first one we can find - var areas = document.getElementsByTagName( 'textarea' ); - txtarea = areas[0]; - } - var selText, isSample = false; - - if ( document.selection && document.selection.createRange ) { // IE/Opera - // save window scroll position - if ( document.documentElement && document.documentElement.scrollTop ) { - var winScroll = document.documentElement.scrollTop - } else if ( document.body ) { - var winScroll = document.body.scrollTop; - } - // get current selection - txtarea.focus(); - var range = document.selection.createRange(); - selText = range.text; - // insert tags - checkSelectedText(); - range.text = tagOpen + selText + tagClose; - // mark sample text as selected - if ( isSample && range.moveStart ) { - if ( window.opera ) { - tagClose = tagClose.replace(/\n/g,''); - } - range.moveStart('character', - tagClose.length - selText.length); - range.moveEnd('character', - tagClose.length); - } - range.select(); - // restore window scroll position - if ( document.documentElement && document.documentElement.scrollTop ) { - document.documentElement.scrollTop = winScroll; - } else if ( document.body ) { - document.body.scrollTop = winScroll; - } - - } else if ( txtarea.selectionStart || txtarea.selectionStart == '0' ) { // Mozilla - // save textarea scroll position - var textScroll = txtarea.scrollTop; - // get current selection - txtarea.focus(); - var startPos = txtarea.selectionStart; - var endPos = txtarea.selectionEnd; - selText = txtarea.value.substring( startPos, endPos ); - // insert tags - checkSelectedText(); - txtarea.value = txtarea.value.substring(0, startPos) - + tagOpen + selText + tagClose - + txtarea.value.substring(endPos, txtarea.value.length); - // set new selection - if ( isSample ) { - txtarea.selectionStart = startPos + tagOpen.length; - txtarea.selectionEnd = startPos + tagOpen.length + selText.length; - } else { - txtarea.selectionStart = startPos + tagOpen.length + selText.length + tagClose.length; - txtarea.selectionEnd = txtarea.selectionStart; - } - // restore textarea scroll position - txtarea.scrollTop = textScroll; - } - - function checkSelectedText() { - if ( !selText ) { - selText = sampleText; - isSample = true; - } else if ( selText.charAt(selText.length - 1) == ' ' ) { // exclude ending space char - selText = selText.substring(0, selText.length - 1); - tagClose += ' '; - } - } - -} - -/** - * Restore the edit box scroll state following a preview operation, - * and set up a form submission handler to remember this state - */ -function scrollEditBox() { - var editBox = document.getElementById( 'wpTextbox1' ); - var scrollTop = document.getElementById( 'wpScrolltop' ); - var editForm = document.getElementById( 'editform' ); - if( editForm && editBox && scrollTop ) { - if( scrollTop.value ) { - editBox.scrollTop = scrollTop.value; - } - addHandler( editForm, 'submit', function() { - scrollTop.value = editBox.scrollTop; - } ); - } -} -hookEvent( 'load', scrollEditBox ); -hookEvent( 'load', mwSetupToolbar ); -hookEvent( 'load', function() { - currentFocused = document.getElementById( 'wpTextbox1' ); - // http://www.quirksmode.org/blog/archives/2008/04/delegating_the.html - // focus does not bubble normally, but using a trick we can do event delegation - // on the focus event on all text inputs to make the toolbox usable on all of them - var editForm = document.getElementById( 'editform' ); - if ( !editForm ) { - return; - } - function onfocus( e ) { - var elm = e.target || e.srcElement; - if ( !elm ) { - return; - } - var tagName = elm.tagName.toLowerCase(); - var type = elm.type || ''; - if ( tagName !== 'textarea' && tagName !== 'input' ) { - return; - } - if ( tagName === 'input' && type.toLowerCase() !== 'text' ) { - return; - } - - currentFocused = elm; - } - - if ( editForm.addEventListener ) { - // Gecko, WebKit, Opera, etc... (all standards compliant browsers) - editForm.addEventListener( 'focus', onfocus, true ); // This MUST be true to work - } else if ( editForm.attachEvent ) { - // IE needs a specific trick here since it doesn't support the standard - editForm.attachEvent( 'onfocusin', function() { onfocus( event ); } ); - } - - // 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 ( iframe.length > 0 ) { - $j( iframe.get( 0 ).contentWindow.document ) - .add( iframe.get( 0 ).contentWindow.document.body ) // for IE - .focus( function() { currentFocused = iframe.get( 0 ); } ); - } - } - - editForm -} ); - diff --git a/skins/common/enhancedchanges.js b/skins/common/enhancedchanges.js deleted file mode 100644 index b1789c9..0000000 --- a/skins/common/enhancedchanges.js +++ /dev/null @@ -1,40 +0,0 @@ -/* - JavaScript file for enhanced recentchanges - */ - -/* - * Add the CSS to hide parts that should be collapsed - * - * We do this with JS so everything will be expanded by default - * if JS is disabled - */ -appendCSS('.mw-changeslist-hidden {'+ - ' display:none;'+ - '}'+ - 'div.mw-changeslist-expanded {'+ - ' display:block;'+ - '}'+ - 'span.mw-changeslist-expanded {'+ - ' display:inline !important;'+ - ' visibility:visible !important;'+ - '}' -); - -/* - * Switch an RC line between hidden/shown - * @param int idNumber : the id number of the RC group -*/ -function toggleVisibility(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); - if (openarrow.className == 'mw-changeslist-expanded') { - openarrow.className = 'mw-changeslist-hidden'; - closearrow.className = 'mw-changeslist-expanded'; - subentries.className = 'mw-changeslist-expanded'; - } else { - openarrow.className = 'mw-changeslist-expanded'; - closearrow.className = 'mw-changeslist-hidden'; - subentries.className = 'mw-changeslist-hidden'; - } -} diff --git a/skins/common/feed.css b/skins/common/feed.css deleted file mode 100644 index 9439663..0000000 --- a/skins/common/feed.css +++ /dev/null @@ -1,95 +0,0 @@ -/* -Make RSS and Atom feeds at least semi-legible to folk who accidentally -load them in a browser... - -Compatibility: -* Mozilla is fine. -* Safari 1.2: the RSS text isn't shown -* Opera 7.5 uses the style sheet instead of its native RSS mode. -* IE/Mac 5.2: none of the :before content works; doesn't get the charset right and displays garbage for non-ASCII. -* IE/Win 6.0: No background color, borders, font size, font weight, or :before content. - -*/ - -/* RSS: */ rss, channel, title, link, description, language, generator, lastBuildDate, item, pubDate, author, comments, creator, -/* Atom: */ feed, id, modified, tagline, entry, issued, created, updated, summary, comment { - display: block; -} - -rss, feed { - background: white; - color: black; - margin: 1em; - font-family: "Verdana", "Tahoma", "Arial", "Helvetica", sans-serif; - line-height: 1.5em; - font-size: 76%; -} - -rss:before { - content: "This RSS feed is meant to be read in a syndicated news reader, and isn't ideal for a web browser."; -} - -feed:before { - content: "This Atom feed is meant to be read in a syndicated news reader, and isn't ideal for a web browser."; -} -rss:before, feed:before { - color: red; - text-align: center; - line-height: 2em; -} - -channel>title, -item>title, -feed>title, -entry>title { - font-weight: bold; - border-bottom: solid 1px #aaa; - margin-left: -0.5em; -} -channel>title, feed>title { - font-size: larger; -} -item>title, entry>title { - font-size: large; -} -item, entry { - margin-top: 1em; - margin-left: 2em; -} - -item>description, entry>summary { - white-space: pre; - overflow: auto; - background: #f8f8ff; -} - -pubDate:before { content: "Date: " } -link:before { content: "Link: " } -author:before, creator:before { content: "Author: " } -description:before { content: "Description: " } -id:before { content: "Id: " } - -generator:before { content: "Generator: " } -language:before { content: "Language: " } -lastBuildDate:before { content: "Updated: " } -comments:before { content: "Comments page: " } - -tagline:before { content: "Tagline: " } -issued:before { content: "Issued: " } -created:before { content: "Created: " } -modified:before { content: "Modified: " } -updated:before { content: "Updated: " } -summary:before { content: "Summary: " } -comment:before { content: "Comment: " } - -pubDate:before, link:before, author:before, description:before, -language:before, generator:before, lastBuildDate:before, comments:before, -tagline:before, issued:before, created:before, modified:before, -summary:before, comment:before, creator:before, id:before, updated:before { - color: #224; - font-weight: bold; -} - -feed link:after { - content: attr(href); -} diff --git a/skins/common/history.js b/skins/common/history.js deleted file mode 100644 index 0265122..0000000 --- a/skins/common/history.js +++ /dev/null @@ -1,94 +0,0 @@ -function historyRadios(parent) { - var inputs = parent.getElementsByTagName('input'); - var radios = []; - for (var i = 0; i < inputs.length; i++) { - if (inputs[i].name == "diff" || inputs[i].name == "oldid") { - radios[radios.length] = inputs[i]; - } - } - return radios; -} - -// check selection and tweak visibility/class onclick -function diffcheck() { - 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'); - if (!hf) { - return true; - } - var lis = hf.getElementsByTagName('li'); - for (var i=0;i)[^>]*$|^#([\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