diff options
author | Nicolas Lécureuil <neoclust@mageia.org> | 2017-04-19 00:31:39 +0200 |
---|---|---|
committer | Nicolas Lécureuil <neoclust@mageia.org> | 2017-04-19 00:31:39 +0200 |
commit | 77ba80f434366c75ae0b73d561b843ff367ebd84 (patch) | |
tree | 471fe12e439809a412b90cf8adc1b4b0d89a9568 /skins/common | |
parent | 3c17e63c47e55f5070e3c7049d300f3e6164f190 (diff) | |
download | mediawiki-77ba80f434366c75ae0b73d561b843ff367ebd84.tar mediawiki-77ba80f434366c75ae0b73d561b843ff367ebd84.tar.gz mediawiki-77ba80f434366c75ae0b73d561b843ff367ebd84.tar.bz2 mediawiki-77ba80f434366c75ae0b73d561b843ff367ebd84.tar.xz mediawiki-77ba80f434366c75ae0b73d561b843ff367ebd84.zip |
Fix layout
Diffstat (limited to 'skins/common')
127 files changed, 4311 insertions, 0 deletions
diff --git a/skins/common/IEFixes.js b/skins/common/IEFixes.js new file mode 100644 index 0000000..545acad --- /dev/null +++ b/skins/common/IEFixes.js @@ -0,0 +1,121 @@ +/** + * IE fixes javascript loaded by wikibits.js for IE <= 6.0 + */ +/*global isMSIE55:true, doneIETransform:true, doneIEAlphaFix:true */ +/*global hookit:true, fixalpha:true */ +( function ( mw, $ ) { + +var expandedURLs, hasClass; + +// Also returns true for IE6, 7, 8, 9 and 10. createPopup is removed in IE11. +// Good thing this is only loaded for IE <= 6 by wikibits. +// Might as well set it to true. +isMSIE55 = ( window.showModalDialog && window.clipboardData && window.createPopup ); +doneIETransform = false; +doneIEAlphaFix = false; + +hookit = function () { + if ( !doneIETransform && document.getElementById && document.getElementById( 'bodyContent' ) ) { + doneIETransform = true; + fixalpha(); + } +}; + +if ( document.attachEvent ) { + document.attachEvent( 'onreadystatechange', hookit ); +} + +// png alpha transparency fixes +fixalpha = function ( logoId ) { + // bg + if ( isMSIE55 && !doneIEAlphaFix ) { + var bg, imageUrl, linkFix, logoa, logospan, plogo; + plogo = document.getElementById( logoId || 'p-logo' ); + if ( !plogo ) { + return; + } + + logoa = plogo.getElementsByTagName('a')[0]; + if ( !logoa ) { + return; + } + + bg = logoa.currentStyle.backgroundImage; + imageUrl = bg.substring( 5, bg.length - 2 ); + + doneIEAlphaFix = true; + + if ( imageUrl.substr( imageUrl.length - 4 ).toLowerCase() === '.png' ) { + 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"' ); + + linkFix = logoa.appendChild( logoa.cloneNode() ); + linkFix.style.position = 'absolute'; + linkFix.style.height = '100%'; + linkFix.style.width = '100%'; + } + } +}; + +if ( isMSIE55 ) { + // ondomready + $( fixalpha ); +} + +// Expand links for printing +hasClass = function ( classText, classWanted ) { + var i = 0, classArr = classText.split(/\s/); + for ( i = 0; i < classArr.length; i++ ) { + if ( classArr[i].toLowerCase() === classWanted.toLowerCase() ) { + return true; + } + } + return false; +}; + +window.onbeforeprint = function () { + var allLinks, contentEl, expandedLink, expandedText, i; + + expandedURLs = []; + contentEl = document.getElementById( 'content' ); + + if ( contentEl ) { + allLinks = contentEl.getElementsByTagName( 'a' ); + + for ( i = 0; i < allLinks.length; i++ ) { + if ( hasClass( allLinks[i].className, 'external' ) && !hasClass( allLinks[i].className, 'free' ) ) { + expandedLink = document.createElement( 'span' ); + expandedText = document.createTextNode( ' (' + allLinks[i].href + ')' ); + expandedLink.appendChild( expandedText ); + allLinks[i].parentNode.insertBefore( expandedLink, allLinks[i].nextSibling ); + expandedURLs[i] = expandedLink; + } + } + } +}; + +window.onafterprint = function () { + for ( var i = 0; i < expandedURLs.length; i++ ) { + if ( expandedURLs[i] ) { + expandedURLs[i].removeNode( true ); + } + } +}; + +}( mediaWiki, jQuery ) ); diff --git a/skins/common/ajax.js b/skins/common/ajax.js new file mode 100644 index 0000000..ab0c793 --- /dev/null +++ b/skins/common/ajax.js @@ -0,0 +1,193 @@ +/** + * Remote Scripting Library + * Copyright 2005 modernmethod, inc + * Under the 3-clause BSD license + * http://www.modernmethod.com/sajax/ + */ + +/*jshint camelcase:false */ +/*global alert */ +( function ( mw ) { + +/** + * 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 debug( text ) { + if ( !window.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 createXhr() { + 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 ( xhrE ) { + try { + a = new window.ActiveXObject( 'Msxml2.XMLHTTP' ); + } catch ( msXmlE ) { + try { + a = new window.ActiveXObject( 'Microsoft.XMLHTTP' ); + } catch ( msXhrE ) { + a = null; + } + } + } + if ( !a ) { + debug( 'Could not create connection object.' ); + } + + return a; +} + +/** + * 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 + */ +function doAjaxRequest( func_name, args, target ) { + var i, x, uri, post_data; + uri = mw.util.wikiScript() + '?action=ajax'; + if ( window.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 = createXhr(); + if ( !x ) { + alert( 'AJAX not supported' ); + return false; + } + + try { + x.open( window.sajax_request_type, uri, true ); + } catch ( e ) { + if ( location.hostname === 'localhost' ) { + alert( 'Your browser blocks XMLHttpRequest to "localhost", try using a real hostname for development/testing.' ); + } + throw e; + } + if ( window.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; + } + + 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 = '<div class="error">Error: ' + x.status + + ' ' + x.statusText + ' (' + x.responseText + ')</div>'; + } + } + } else { + alert( 'Bad target for sajax_do_call: not a function or object: ' + target ); + } + }; + + debug( func_name + ' uri = ' + uri + ' / post = ' + post_data ); + x.send( post_data ); + debug( func_name + ' waiting..' ); + + return true; +} + +/** + * @return {boolean} Whether the browser supports AJAX + */ +function wfSupportsAjax() { + var request = createXhr(), + supportsAjax = request ? true : false; + + request = undefined; + return supportsAjax; +} + +// Expose + Mark as deprecated +var deprecationNotice = 'Sajax is deprecated, use jQuery.ajax or mediawiki.api instead.'; + +// Variables +mw.log.deprecate( window, 'sajax_debug_mode', false, deprecationNotice ); +mw.log.deprecate( window, 'sajax_request_type', 'GET', deprecationNotice ); +// Methods +mw.log.deprecate( window, 'sajax_debug', debug, deprecationNotice ); +mw.log.deprecate( window, 'sajax_init_object', createXhr, deprecationNotice ); +mw.log.deprecate( window, 'sajax_do_call', doAjaxRequest, deprecationNotice ); +mw.log.deprecate( window, 'wfSupportsAjax', wfSupportsAjax, deprecationNotice ); + +}( mediaWiki ) ); diff --git a/skins/common/commonContent.css b/skins/common/commonContent.css new file mode 100644 index 0000000..41d20fb --- /dev/null +++ b/skins/common/commonContent.css @@ -0,0 +1,151 @@ +/** + * MediaWiki style sheet for general styles on complex content + * + * Styles for complex things which are a standard part of page content + * (ie: the CSS classing built into the system), like the TOC. + */ + +/* Table of Contents */ +#toc, +.toc, +.mw-warning { + border: 1px solid #aaa; + background-color: #f9f9f9; + padding: 5px; + font-size: 95%; +} + +/** + * We want to display the ToC element with intrinsic width in block mode. The fit-content + * value for width is however not supported by large groups of browsers. + * + * We use display:table. Even though it should only contain other table-* display + * elements, there are no known problems with using this. + * + * Because IE < 8, FF 2 and other older browsers don't support display:table, we fallback to + * using inline-block mode, which features at least intrinsic width, but won't clear preceding + * inline elements. In practice inline elements surrounding the TOC are uncommon enough that + * this is an acceptable sacrifice. + */ +#toc, +.toc { + display: -moz-inline-block; + display: inline-block; + display: table; + + /* IE7 and earlier */ + zoom: 1; + *display: inline; + + padding: 7px; +} + +/* CSS for backwards-compatibility with cached page renders and creative uses in wikitext */ +table#toc, +table.toc { + border-collapse: collapse; +} +/* Remove additional paddings inside table-cells that are not present in <div>s */ +table#toc td, +table.toc td { + padding: 0; +} + +#toc h2, +.toc h2 { + display: inline; + border: none; + padding: 0; + font-size: 100%; + font-weight: bold; +} +#toc #toctitle, +.toc #toctitle, +#toc .toctitle, +.toc .toctitle { + text-align: center; +} +#toc ul, +.toc ul { + list-style-type: none; + list-style-image: none; + margin-left: 0; + padding: 0; + text-align: left; +} +#toc ul ul, +.toc ul ul { + margin: 0 0 0 2em; +} +#toc .toctoggle, +.toc .toctoggle { + font-size: 94%; +} + +.toccolours { + border: 1px solid #aaa; + background-color: #f9f9f9; + padding: 5px; + font-size: 95%; +} + +/* Warning */ +.mw-warning { + margin-left: 50px; + margin-right: 50px; + text-align: center; +} + +/* Images */ +/* @noflip */div.floatright, table.floatright { + margin: 0 0 .5em .5em; + border: 0; +} +div.floatright p { font-style: italic; } +/* @noflip */div.floatleft, table.floatleft { + margin: 0 .5em .5em 0; + border: 0; +} +div.floatleft p { font-style: italic; } +/* Thumbnails */ +div.thumb { + margin-bottom: .5em; + width: auto; + background-color: transparent; +} +div.thumbinner { + border: 1px solid #ccc; + padding: 3px !important; + background-color: #f9f9f9; + font-size: 94%; + text-align: center; + overflow: hidden; +} +html .thumbimage { + border: 1px solid #ccc; +} +html .thumbcaption { + border: none; + line-height: 1.4em; + padding: 3px !important; + font-size: 94%; +} +div.magnify { + border: none !important; + background: none !important; + margin-left: 3px; +} +div.magnify a, div.magnify img { + display: block; + border: none !important; + background: none !important; +} +/* @noflip */div.tright { + margin: .5em 0 1.3em 1.4em; +} +/* @noflip */div.tleft { + margin: .5em 1.4em 1.3em 0; +} +img.thumbborder { + border: 1px solid #dddddd; +} diff --git a/skins/common/commonElements.css b/skins/common/commonElements.css new file mode 100644 index 0000000..ad7942a --- /dev/null +++ b/skins/common/commonElements.css @@ -0,0 +1,235 @@ +/** + * MediaWiki style sheet for general styles on basic content elements + * + * Styles for basic elements: links, lists, etc... + * + * This style sheet is used by the Monobook and Vector skins. + */ + +/* Links */ +a { + text-decoration: none; + color: #0645ad; + background: none; +} +a:visited { + color: #0b0080; +} +a:active { + color: #faa700; +} +a:hover, a:focus { + text-decoration: underline; +} +a.stub { + color: #772233; +} +a.new, #p-personal a.new { + color: #ba0000; +} +a.new:visited, #p-personal a.new:visited { + color: #a55858; +} + +/* Interwiki Styling */ +.mw-body a.extiw, +.mw-body a.extiw:active { + color: #36b; +} +.mw-body a.extiw:visited { + color: #636; +} +.mw-body a.extiw:active { + color: #b63; +} + +/* External links */ +.mw-body a.external { + color: #36b; +} +.mw-body a.external:visited { + color: #636; /* bug 3112 */ +} +.mw-body a.external:active { + color: #b63; +} + +/* Inline Elements */ +img { + border: none; + vertical-align: middle; +} +hr { + height: 1px; + color: #aaa; + background-color: #aaa; + border: 0; + margin: .2em 0; +} + +/* Structural Elements */ +h1, +h2, +h3, +h4, +h5, +h6 { + color: black; + background: none; + font-weight: normal; + margin: 0; + overflow: hidden; + padding-top: .5em; + padding-bottom: .17em; + border-bottom: 1px solid #aaa; +} +h1 { + font-size: 188%; +} +h2 { + font-size: 150%; +} +h3, +h4, +h5, +h6 { + border-bottom: none; + font-weight: bold; +} +h3 { + font-size: 132%; +} +h4 { + font-size: 116%; +} +h5 { + font-size: 108%; +} +h6 { + font-size: 100%; +} + +/* Some space under the headers in the content area */ +h1, +h2 { + margin-bottom: .6em; +} +h3, +h4, +h5 { + margin-bottom: .3em; +} + +p { + margin: .4em 0 .5em 0; + line-height: 1.5em; +} +p img { + margin: 0; +} + +ul { + line-height: 1.5em; + list-style-type: square; + margin: .3em 0 0 1.6em; + padding: 0; +} +ol { + line-height: 1.5em; + margin: .3em 0 0 3.2em; + padding: 0; + list-style-image: none; +} +li { + margin-bottom: .1em; +} +dt { + font-weight: bold; + margin-bottom: .1em; +} +dl { + margin-top: .2em; + margin-bottom: .5em; +} +dd { + line-height: 1.5em; + margin-left: 1.6em; + margin-bottom: .1em; +} + +/* IE 6 and 7 lack support for quotes aroud the <q> element ('::before' and '::after' + pseudoelements, 'quotes' property). Let's italicize it instead (using the star hack). */ +q { + *font-style: italic; +} + +pre, code, tt, kbd, samp, .mw-code { + /* + * Some browsers will render the monospace text too small, namely Firefox, Chrome and Safari. + * Specifying any valid, second value will trigger correct behavior without forcing a different font. + */ + font-family: monospace, Courier; +} +code { + background-color: #f9f9f9; +} +pre, .mw-code { + padding: 1em; + border: 1px solid #ddd; + color: black; + background-color: #f9f9f9; +} + +/* Tables */ +table { + font-size: 100%; +} + +/* Forms */ +fieldset { + border: 1px solid #2f6fab; + margin: 1em 0 1em 0; + padding: 0 1em 1em; + line-height: 1.5em; +} +fieldset.nested { + margin: 0 0 0.5em 0; + padding: 0 0.5em 0.5em; +} +legend { + padding: .5em; + font-size: 95%; +} +form { + border: none; + margin: 0; +} +textarea { + width: 100%; + padding: .1em; + display: block; + -moz-box-sizing: border-box; + -webkit-box-sizing: border-box; + box-sizing: border-box; +} +select { + vertical-align: top; +} + +/* Emulate Center */ +.center { + width: 100%; + text-align: center; +} +*.center * { + margin-left: auto; + margin-right: auto; +} +/* Small for tables and similar */ +.small { + font-size: 94%; +} +table.small { + font-size: 100%; +} + diff --git a/skins/common/commonInterface.css b/skins/common/commonInterface.css new file mode 100644 index 0000000..7eca070 --- /dev/null +++ b/skins/common/commonInterface.css @@ -0,0 +1,68 @@ +/** + * MediaWiki style sheet for common core styles on interfaces + * + * Styles for the Monobook/Vector pattern of laying out common interfaces. + * These ids/classes are not built into the system, + * they are outputted by the actual MonoBook/Vector code by convention. + */ + +/* Categories */ +.catlinks { + border: 1px solid #aaa; + background-color: #f9f9f9; + padding: 5px; + margin-top: 1em; + clear: both; +} + +/* User Message */ +.usermessage { + background-color: #ffce7b; + border: 1px solid #ffa500; + color: black; + font-weight: bold; + margin: 2em 0 1em; + padding: .5em 1em; + vertical-align: middle; +} + +/* Site Notice (includes notices from CentralNotice extension) */ +#siteNotice { + position: relative; + text-align: center; + margin: 0; +} +#localNotice { + margin-bottom: 0.9em; +} + +/* First h1 */ +.firstHeading, +#firstHeading { + margin-bottom: .1em; + /* These two rules hack around bug 2013 (fix for more limited bug 11325). + * When bug 2013 is fixed properly, they should be removed. */ + line-height: 1.2em; + padding-bottom: 0; +} + +/* Sub-navigation */ +#siteSub { + display: none; +} +#jump-to-nav { + /* Negate #contentSub's margin and replicate it so that the jump to links don't affect the spacing */ + margin-top: -1.4em; + margin-bottom: 1.4em +} +#contentSub, #contentSub2 { + font-size: 84%; + line-height: 1.2em; + margin: 0 0 1.4em 1em; + color: #545454; + width: auto; +} +span.subpages { + display: block; +} + diff --git a/skins/common/commonPrint.css b/skins/common/commonPrint.css new file mode 100644 index 0000000..65f3fbe --- /dev/null +++ b/skins/common/commonPrint.css @@ -0,0 +1,401 @@ +/** + * 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 #aaaaaa; + background-color: #f9f9f9; + padding: 5px; + display: -moz-inline-block; + display: inline-block; + display: table; + /* IE7 and earlier */ + zoom: 1; + *display: inline; +} + +/* images */ +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 { + 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: White; + font-size: 94%; + text-align: center; + overflow: hidden; +} +html .thumbimage { + border: 1px solid #cccccc; +} +html .thumbcaption { + border: none; + text-align: left; + line-height: 1.4em; + padding: 3px !important; + font-size: 94%; +} + +div.magnify { + display: none; +} +/* @noflip */ +div.tright { + float: right; + clear: right; + margin: 0.5em 0 0.8em 1.4em; +} +/* @noflip */ +div.tleft { + float: left; + clear: left; + margin: 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; + color: black; + margin: 0; + padding: 0; +} + +.noprint, +div#jump-to-nav, +.mw-jump, +div.top, +div#column-one, +#colophon, +.mw-editsection, +.mw-editsection-like, +.toctoggle, +.tochidden, +div#f-poweredbyico, +div#f-copyrightico, +li#viewcount, +li#about, +li#disclaimer, +li#mobileview, +li#privacy, +#footer-places, +.mw-hidden-catlinks, +tr.mw-metadata-show-hide-extended, +span.mw-filepage-other-resolutions, +#filetoc, +.usermessage, +.patrollink, +#mw-navigation { + /* 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; + direction: ltr; +} +#footer { + background : white; + color : black; + margin-top: 1em; + border-top: 1px solid #AAA; + direction: ltr; +} + +h1, h2, h3, h4, h5, h6 { + font-weight: bold; +} + +dt { + font-weight: bold; +} + +p { + margin: 1em 0; + line-height: 1.2em; +} + +pre, .mw-code { + 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; + vertical-align: middle; +} + +/* math */ +span.texhtml { + font-family: serif; +} + +#siteNotice { + display: none; +} + +/* Galleries (see shared.css for more info) */ +li.gallerybox { + vertical-align: top; + display: -moz-inline-box; + display: inline-block; +} + +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; +} +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; +} + +/** + * Table rendering + * As on shared.css but with white background. + */ +table.wikitable, +table.mw_metadata { + margin: 1em 0; + border: 1px #aaa solid; + background: white; + border-collapse: collapse; +} +table.wikitable > tr > th, table.wikitable > tr > td, +table.wikitable > * > tr > th, table.wikitable > * > tr > td, +.mw_metadata th, .mw_metadata td { + border: 1px #aaa solid; + padding: 0.2em; +} +table.wikitable > tr > th, +table.wikitable > * > tr > th, +.mw_metadata th { + text-align: center; + background: white; + font-weight: bold; +} +table.wikitable > caption, +.mw_metadata caption { + font-weight: bold; +} + +a.sortheader { + margin: 0 0.3em; +} + +/* Some pagination options */ +.wikitable, .thumb, img { + page-break-inside: avoid; +} +h2, h3, h4, h5, h6 { + page-break-after: avoid; +} +p { + widows: 3; + orphans: 3; +} + +/** + * Categories + */ +.catlinks ul { + display: inline; + margin: 0; + padding: 0; + list-style: none; + list-style-type: none; + list-style-image: none; + vertical-align: middle !ie; +} + +.catlinks li { + display: inline-block; + line-height: 1.15em; + padding: 0 .4em; + border-left: 1px solid #AAA; + margin: 0.1em 0; + zoom: 1; + display: inline !ie; +} + +.catlinks li:first-child { + padding-left: .2em; + border-left: none; +} diff --git a/skins/common/config-cc.css b/skins/common/config-cc.css new file mode 100644 index 0000000..d81218e --- /dev/null +++ b/skins/common/config-cc.css @@ -0,0 +1,57 @@ +/** + * Copy of CC standard stylesheet, plus tweaks for iframe usage + */ + +body { + margin: 0; + 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; + float: right; + width: 230px; + background: white; + margin: 0 0 10px 10px; +} + +td, h3, p, h1, pre { + margin: 0 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 0000000..d646273 --- /dev/null +++ b/skins/common/config.css @@ -0,0 +1,143 @@ +.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; +} + +.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; + 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-download-link { + font-size: 1.8em; + margin-left: 2em; +} + +#config-live-log { + overflow: hidden; + min-width: 20em; +} diff --git a/skins/common/config.js b/skins/common/config.js new file mode 100644 index 0000000..2886e08 --- /dev/null +++ b/skins/common/config.js @@ -0,0 +1,108 @@ +( function ( $ ) { + $( function () { + var $label, labelText; + + function syncText() { + var value = $(this).val() + .replace( /[\[\]\{\}|#<>%+? ]/g, '_' ) + .replace( /&/, '&' ) + .replace( /__+/g, '_' ) + .replace( /^_+/, '' ) + .replace( /_+$/, '' ); + value = value.substr( 0, 1 ).toUpperCase() + value.substr( 1 ); + $label.text( labelText.replace( '$1', value ) ); + } + + // Set up the help system + $( '.mw-help-field-data' ) + .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 () { + $( document.getElementById( $(this).attr( 'rel' ) ) ).hide(); + } ); + $( document.getElementById( $( '.dbRadio:checked' ).attr( 'rel' ) ) ).show(); + $( '.dbRadio' ).click( function () { + var $checked = $( '.dbRadio:checked' ), + $wrapper = $( document.getElementById( $checked.attr( 'rel' ) ) ); + if ( $wrapper.is( ':hidden' ) ) { + $( '.dbWrapper' ).hide( 'slow' ); + $wrapper.show( 'slow' ); + } + } ); + + // Scroll to the bottom of upgrade log + $( '#config-live-log' ).children( 'textarea' ).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 = $( document.getElementById( $(this).attr( 'rel' ) ) ); + // FIXME: Ugh, this is ugly + if ( $(this).val() === 'other' ) { + $textbox.removeProp( 'readonly' ).closest( '.config-block' ).slideDown( 'fast' ); + } else { + $textbox.prop( 'readonly', true ).closest( '.config-block' ).slideUp( 'fast' ); + } + } ); + + // 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' ).on( 'keyup change', syncText ).each( syncText ); + + // 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/feed.css b/skins/common/feed.css new file mode 100644 index 0000000..9439663 --- /dev/null +++ b/skins/common/feed.css @@ -0,0 +1,95 @@ +/* +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 <link> 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/images/Arr_.png b/skins/common/images/Arr_.png Binary files differnew file mode 100644 index 0000000..bc67a4b --- /dev/null +++ b/skins/common/images/Arr_.png diff --git a/skins/common/images/Arr_d.png b/skins/common/images/Arr_d.png Binary files differnew file mode 100644 index 0000000..58a9fc6 --- /dev/null +++ b/skins/common/images/Arr_d.png diff --git a/skins/common/images/Arr_l.png b/skins/common/images/Arr_l.png Binary files differnew file mode 100644 index 0000000..2246254 --- /dev/null +++ b/skins/common/images/Arr_l.png diff --git a/skins/common/images/Arr_r.png b/skins/common/images/Arr_r.png Binary files differnew file mode 100644 index 0000000..467a555 --- /dev/null +++ b/skins/common/images/Arr_r.png diff --git a/skins/common/images/Arr_u.png b/skins/common/images/Arr_u.png Binary files differnew file mode 100644 index 0000000..1aa543a --- /dev/null +++ b/skins/common/images/Arr_u.png diff --git a/skins/common/images/Checker-16x16.png b/skins/common/images/Checker-16x16.png Binary files differnew file mode 100644 index 0000000..3e9e3d0 --- /dev/null +++ b/skins/common/images/Checker-16x16.png diff --git a/skins/common/images/Zoom_sans.gif b/skins/common/images/Zoom_sans.gif Binary files differnew file mode 100644 index 0000000..56a49de --- /dev/null +++ b/skins/common/images/Zoom_sans.gif diff --git a/skins/common/images/add.png b/skins/common/images/add.png Binary files differnew file mode 100644 index 0000000..3497423 --- /dev/null +++ b/skins/common/images/add.png diff --git a/skins/common/images/ajax-loader.gif b/skins/common/images/ajax-loader.gif Binary files differnew file mode 100644 index 0000000..72203fd --- /dev/null +++ b/skins/common/images/ajax-loader.gif diff --git a/skins/common/images/ar/button_bold.png b/skins/common/images/ar/button_bold.png Binary files differnew file mode 100644 index 0000000..e524f6c --- /dev/null +++ b/skins/common/images/ar/button_bold.png diff --git a/skins/common/images/ar/button_headline.png b/skins/common/images/ar/button_headline.png Binary files differnew file mode 100644 index 0000000..398e561 --- /dev/null +++ b/skins/common/images/ar/button_headline.png diff --git a/skins/common/images/ar/button_italic.png b/skins/common/images/ar/button_italic.png Binary files differnew file mode 100644 index 0000000..6ec73e9 --- /dev/null +++ b/skins/common/images/ar/button_italic.png diff --git a/skins/common/images/ar/button_link.png b/skins/common/images/ar/button_link.png Binary files differnew file mode 100644 index 0000000..c9c63f6 --- /dev/null +++ b/skins/common/images/ar/button_link.png diff --git a/skins/common/images/ar/button_nowiki.png b/skins/common/images/ar/button_nowiki.png Binary files differnew file mode 100644 index 0000000..743ea61 --- /dev/null +++ b/skins/common/images/ar/button_nowiki.png diff --git a/skins/common/images/arrow_disabled_first_25.png b/skins/common/images/arrow_disabled_first_25.png Binary files differnew file mode 100644 index 0000000..78a493e --- /dev/null +++ b/skins/common/images/arrow_disabled_first_25.png diff --git a/skins/common/images/arrow_disabled_last_25.png b/skins/common/images/arrow_disabled_last_25.png Binary files differnew file mode 100644 index 0000000..2a64fd0 --- /dev/null +++ b/skins/common/images/arrow_disabled_last_25.png diff --git a/skins/common/images/arrow_disabled_left_25.png b/skins/common/images/arrow_disabled_left_25.png Binary files differnew file mode 100644 index 0000000..83df068 --- /dev/null +++ b/skins/common/images/arrow_disabled_left_25.png diff --git a/skins/common/images/arrow_disabled_right_25.png b/skins/common/images/arrow_disabled_right_25.png Binary files differnew file mode 100644 index 0000000..aa4fbf8 --- /dev/null +++ b/skins/common/images/arrow_disabled_right_25.png diff --git a/skins/common/images/arrow_first_25.png b/skins/common/images/arrow_first_25.png Binary files differnew file mode 100644 index 0000000..52b32a5 --- /dev/null +++ b/skins/common/images/arrow_first_25.png diff --git a/skins/common/images/arrow_last_25.png b/skins/common/images/arrow_last_25.png Binary files differnew file mode 100644 index 0000000..caf5033 --- /dev/null +++ b/skins/common/images/arrow_last_25.png diff --git a/skins/common/images/arrow_left_25.png b/skins/common/images/arrow_left_25.png Binary files differnew file mode 100644 index 0000000..f363bf6 --- /dev/null +++ b/skins/common/images/arrow_left_25.png diff --git a/skins/common/images/arrow_right_25.png b/skins/common/images/arrow_right_25.png Binary files differnew file mode 100644 index 0000000..3f8fee3 --- /dev/null +++ b/skins/common/images/arrow_right_25.png diff --git a/skins/common/images/be-tarask/button_bold.png b/skins/common/images/be-tarask/button_bold.png Binary files differnew file mode 100644 index 0000000..5c10cfe --- /dev/null +++ b/skins/common/images/be-tarask/button_bold.png diff --git a/skins/common/images/be-tarask/button_italic.png b/skins/common/images/be-tarask/button_italic.png Binary files differnew file mode 100644 index 0000000..72209d7 --- /dev/null +++ b/skins/common/images/be-tarask/button_italic.png diff --git a/skins/common/images/be-tarask/button_link.png b/skins/common/images/be-tarask/button_link.png Binary files differnew file mode 100644 index 0000000..09c86fb --- /dev/null +++ b/skins/common/images/be-tarask/button_link.png diff --git a/skins/common/images/bullet.gif b/skins/common/images/bullet.gif Binary files differnew file mode 100644 index 0000000..b43de48 --- /dev/null +++ b/skins/common/images/bullet.gif diff --git a/skins/common/images/button_bold.png b/skins/common/images/button_bold.png Binary files differnew file mode 100644 index 0000000..75c3f10 --- /dev/null +++ b/skins/common/images/button_bold.png diff --git a/skins/common/images/button_extlink.png b/skins/common/images/button_extlink.png Binary files differnew file mode 100644 index 0000000..458943c --- /dev/null +++ b/skins/common/images/button_extlink.png diff --git a/skins/common/images/button_headline.png b/skins/common/images/button_headline.png Binary files differnew file mode 100644 index 0000000..9cf751d --- /dev/null +++ b/skins/common/images/button_headline.png diff --git a/skins/common/images/button_hr.png b/skins/common/images/button_hr.png Binary files differnew file mode 100644 index 0000000..47e1ca4 --- /dev/null +++ b/skins/common/images/button_hr.png diff --git a/skins/common/images/button_image.png b/skins/common/images/button_image.png Binary files differnew file mode 100644 index 0000000..6919296 --- /dev/null +++ b/skins/common/images/button_image.png diff --git a/skins/common/images/button_italic.png b/skins/common/images/button_italic.png Binary files differnew file mode 100644 index 0000000..527fbd1 --- /dev/null +++ b/skins/common/images/button_italic.png diff --git a/skins/common/images/button_link.png b/skins/common/images/button_link.png Binary files differnew file mode 100644 index 0000000..eb5634b --- /dev/null +++ b/skins/common/images/button_link.png diff --git a/skins/common/images/button_media.png b/skins/common/images/button_media.png Binary files differnew file mode 100644 index 0000000..4194ec1 --- /dev/null +++ b/skins/common/images/button_media.png diff --git a/skins/common/images/button_nowiki.png b/skins/common/images/button_nowiki.png Binary files differnew file mode 100644 index 0000000..2ba818d --- /dev/null +++ b/skins/common/images/button_nowiki.png diff --git a/skins/common/images/button_sig.png b/skins/common/images/button_sig.png Binary files differnew file mode 100644 index 0000000..fe34b3f --- /dev/null +++ b/skins/common/images/button_sig.png diff --git a/skins/common/images/button_template.png b/skins/common/images/button_template.png Binary files differnew file mode 100644 index 0000000..94d9d0b --- /dev/null +++ b/skins/common/images/button_template.png diff --git a/skins/common/images/cc-0.png b/skins/common/images/cc-0.png Binary files differnew file mode 100644 index 0000000..9d3fe5f --- /dev/null +++ b/skins/common/images/cc-0.png diff --git a/skins/common/images/cc-by-nc-sa.png b/skins/common/images/cc-by-nc-sa.png Binary files differnew file mode 100644 index 0000000..0d24a71 --- /dev/null +++ b/skins/common/images/cc-by-nc-sa.png diff --git a/skins/common/images/cc-by-sa.png b/skins/common/images/cc-by-sa.png Binary files differnew file mode 100644 index 0000000..518fb64 --- /dev/null +++ b/skins/common/images/cc-by-sa.png diff --git a/skins/common/images/cc-by.png b/skins/common/images/cc-by.png Binary files differnew file mode 100644 index 0000000..9cca2f9 --- /dev/null +++ b/skins/common/images/cc-by.png diff --git a/skins/common/images/closewindow.png b/skins/common/images/closewindow.png Binary files differnew file mode 100644 index 0000000..990702e --- /dev/null +++ b/skins/common/images/closewindow.png diff --git a/skins/common/images/closewindow19x19.png b/skins/common/images/closewindow19x19.png Binary files differnew file mode 100644 index 0000000..c96d9ff --- /dev/null +++ b/skins/common/images/closewindow19x19.png diff --git a/skins/common/images/critical-32.png b/skins/common/images/critical-32.png Binary files differnew file mode 100644 index 0000000..9b38e6a --- /dev/null +++ b/skins/common/images/critical-32.png diff --git a/skins/common/images/cyrl/LICENSE b/skins/common/images/cyrl/LICENSE new file mode 100644 index 0000000..bedcec6 --- /dev/null +++ b/skins/common/images/cyrl/LICENSE @@ -0,0 +1,17 @@ +button_bold.png +--------------- +Source : http://commons.wikimedia.org/wiki/Image:Button_bold_ukr.png +License: Public domain +Author : Alexey Belomoev + +button_italic.png +------------------------ +Source : http://commons.wikimedia.org/wiki/Image:Button_italic_ukr.png +License: Public domain +Author : Alexey Belomoev + +button_link.png +----------------- +Source : http://commons.wikimedia.org/wiki/Image:Button_internal_link_ukr.png +License: GPL +Author : Saproj, Erik Möller diff --git a/skins/common/images/cyrl/button_bold.png b/skins/common/images/cyrl/button_bold.png Binary files differnew file mode 100644 index 0000000..eae30d9 --- /dev/null +++ b/skins/common/images/cyrl/button_bold.png diff --git a/skins/common/images/cyrl/button_italic.png b/skins/common/images/cyrl/button_italic.png Binary files differnew file mode 100644 index 0000000..b958d22 --- /dev/null +++ b/skins/common/images/cyrl/button_italic.png diff --git a/skins/common/images/cyrl/button_link.png b/skins/common/images/cyrl/button_link.png Binary files differnew file mode 100644 index 0000000..12ad373 --- /dev/null +++ b/skins/common/images/cyrl/button_link.png diff --git a/skins/common/images/de/button_bold.png b/skins/common/images/de/button_bold.png Binary files differnew file mode 100644 index 0000000..367d5bc --- /dev/null +++ b/skins/common/images/de/button_bold.png diff --git a/skins/common/images/de/button_italic.png b/skins/common/images/de/button_italic.png Binary files differnew file mode 100644 index 0000000..fdd8c9f --- /dev/null +++ b/skins/common/images/de/button_italic.png diff --git a/skins/common/images/diffunderline.gif b/skins/common/images/diffunderline.gif Binary files differnew file mode 100644 index 0000000..e062c56 --- /dev/null +++ b/skins/common/images/diffunderline.gif diff --git a/skins/common/images/download-32.png b/skins/common/images/download-32.png Binary files differnew file mode 100644 index 0000000..e5b8318 --- /dev/null +++ b/skins/common/images/download-32.png diff --git a/skins/common/images/fa/button_bold.png b/skins/common/images/fa/button_bold.png Binary files differnew file mode 100644 index 0000000..c54d094 --- /dev/null +++ b/skins/common/images/fa/button_bold.png diff --git a/skins/common/images/fa/button_headline.png b/skins/common/images/fa/button_headline.png Binary files differnew file mode 100644 index 0000000..9890d15 --- /dev/null +++ b/skins/common/images/fa/button_headline.png diff --git a/skins/common/images/fa/button_italic.png b/skins/common/images/fa/button_italic.png Binary files differnew file mode 100644 index 0000000..33f91ed --- /dev/null +++ b/skins/common/images/fa/button_italic.png diff --git a/skins/common/images/fa/button_link.png b/skins/common/images/fa/button_link.png Binary files differnew file mode 100644 index 0000000..76b939e --- /dev/null +++ b/skins/common/images/fa/button_link.png diff --git a/skins/common/images/fa/button_nowiki.png b/skins/common/images/fa/button_nowiki.png Binary files differnew file mode 100644 index 0000000..743ea61 --- /dev/null +++ b/skins/common/images/fa/button_nowiki.png diff --git a/skins/common/images/feed-icon.png b/skins/common/images/feed-icon.png Binary files differnew file mode 100644 index 0000000..00f49f6 --- /dev/null +++ b/skins/common/images/feed-icon.png diff --git a/skins/common/images/feed-icon.svg b/skins/common/images/feed-icon.svg new file mode 100644 index 0000000..6e5f570 --- /dev/null +++ b/skins/common/images/feed-icon.svg @@ -0,0 +1 @@ +<?xml version="1.0" encoding="UTF-8"?><svg xmlns="http://www.w3.org/2000/svg" width="128" height="128" viewBox="0 0 256 256"><defs><linearGradient x1=".085" y1=".085" x2=".915" y2=".915" id="a"><stop offset="0" stop-color="#E3702D"/><stop offset=".107" stop-color="#EA7D31"/><stop offset=".35" stop-color="#F69537"/><stop offset=".5" stop-color="#FB9E3A"/><stop offset=".702" stop-color="#EA7C31"/><stop offset=".887" stop-color="#DE642B"/><stop offset="1" stop-color="#D95B29"/></linearGradient></defs><rect width="256" height="256" rx="55" ry="55" fill="#CC5D15"/><rect width="246" height="246" rx="50" ry="50" x="5" y="5" fill="#F49C52"/><rect width="236" height="236" rx="47" ry="47" x="10" y="10" fill="url(#a)"/><circle cx="68" cy="189" r="24" fill="#FFF"/><path d="M160 213h-34a82 82 0 0 0-82-82v-34a116 116 0 0 1 116 116zM184 213a140 140 0 0 0-140-140v-35a175 175 0 0 1 175 175z" fill="#FFF"/></svg>
\ No newline at end of file diff --git a/skins/common/images/gnu-fdl.png b/skins/common/images/gnu-fdl.png Binary files differnew file mode 100644 index 0000000..3feaf57 --- /dev/null +++ b/skins/common/images/gnu-fdl.png diff --git a/skins/common/images/help-question-hover.gif b/skins/common/images/help-question-hover.gif Binary files differnew file mode 100644 index 0000000..515138d --- /dev/null +++ b/skins/common/images/help-question-hover.gif diff --git a/skins/common/images/help-question.gif b/skins/common/images/help-question.gif Binary files differnew file mode 100644 index 0000000..b4fc9c5 --- /dev/null +++ b/skins/common/images/help-question.gif diff --git a/skins/common/images/icons/COPYING b/skins/common/images/icons/COPYING new file mode 100644 index 0000000..136530a --- /dev/null +++ b/skins/common/images/icons/COPYING @@ -0,0 +1,43 @@ +The icons used here are derived from the crystalsvg icons in the the +pics/crystalsvg/ directory of kdelibs-3.4.0 they were modified on 2005-05-15 +by Ævar Arnfjörð Bjarmason for use in MediaWiki. + +What follows is the contents of the LICENSE.crystalsvg file found in the pics/ +subdirectory of kdelibs-3.4.0: + +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +This copyright and license notice covers all CrystalSVG images. +Note the license notice contains an add-on. +******************************************************************************** +KDE Crystal theme icons. +Copyright (C) 2002 and following years KDE Artists +This library is free software; you can redistribute it and/or +modify it under the terms of the GNU Lesser General Public +License as published by the Free Software Foundation, +version 2.1 of the License. +This library is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Lesser General Public License for more details. +You should have received a copy of the GNU Lesser General Public +License along with this library; if not, write to the Free Software +Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + **** NOTE THIS ADD-ON **** +The GNU Lesser General Public License or LGPL is written for software libraries +in the first place. We expressly want the LGPL to be valid for this artwork +library too. +KDE Crystal theme icons is a special kind of software library, it is an +artwork library, it's elements can be used in a Graphical User Interface, or +GUI. +Source code, for this library means: + - for vectors svg; + - for pixels, if applicable, the multi-layered formats xcf or psd, or +otherwise png. +The LGPL in some sections obliges you to make the files carry +notices. With images this is in some cases impossible or hardly useful. +With this library a notice is placed at a prominent place in the directory +containing the elements. You may follow this practice. +The exception in section 6 of the GNU Lesser General Public License covers +the use of elements of this art library in a GUI. +kde-artists [at] kde.org +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ diff --git a/skins/common/images/icons/fileicon-c.png b/skins/common/images/icons/fileicon-c.png Binary files differnew file mode 100644 index 0000000..0d603b7 --- /dev/null +++ b/skins/common/images/icons/fileicon-c.png diff --git a/skins/common/images/icons/fileicon-cpp.png b/skins/common/images/icons/fileicon-cpp.png Binary files differnew file mode 100644 index 0000000..123688f --- /dev/null +++ b/skins/common/images/icons/fileicon-cpp.png diff --git a/skins/common/images/icons/fileicon-deb.png b/skins/common/images/icons/fileicon-deb.png Binary files differnew file mode 100644 index 0000000..87ca3fa --- /dev/null +++ b/skins/common/images/icons/fileicon-deb.png diff --git a/skins/common/images/icons/fileicon-djvu.png b/skins/common/images/icons/fileicon-djvu.png Binary files differnew file mode 100644 index 0000000..1da2276 --- /dev/null +++ b/skins/common/images/icons/fileicon-djvu.png diff --git a/skins/common/images/icons/fileicon-djvu.xcf b/skins/common/images/icons/fileicon-djvu.xcf Binary files differnew file mode 100644 index 0000000..8043dcd --- /dev/null +++ b/skins/common/images/icons/fileicon-djvu.xcf diff --git a/skins/common/images/icons/fileicon-dvi.png b/skins/common/images/icons/fileicon-dvi.png Binary files differnew file mode 100644 index 0000000..f37878d --- /dev/null +++ b/skins/common/images/icons/fileicon-dvi.png diff --git a/skins/common/images/icons/fileicon-exe.png b/skins/common/images/icons/fileicon-exe.png Binary files differnew file mode 100644 index 0000000..dc020eb --- /dev/null +++ b/skins/common/images/icons/fileicon-exe.png diff --git a/skins/common/images/icons/fileicon-h.png b/skins/common/images/icons/fileicon-h.png Binary files differnew file mode 100644 index 0000000..339bf02 --- /dev/null +++ b/skins/common/images/icons/fileicon-h.png diff --git a/skins/common/images/icons/fileicon-html.png b/skins/common/images/icons/fileicon-html.png Binary files differnew file mode 100644 index 0000000..f28f8a2 --- /dev/null +++ b/skins/common/images/icons/fileicon-html.png diff --git a/skins/common/images/icons/fileicon-iso.png b/skins/common/images/icons/fileicon-iso.png Binary files differnew file mode 100644 index 0000000..c73d229 --- /dev/null +++ b/skins/common/images/icons/fileicon-iso.png diff --git a/skins/common/images/icons/fileicon-java.png b/skins/common/images/icons/fileicon-java.png Binary files differnew file mode 100644 index 0000000..a1b4f22 --- /dev/null +++ b/skins/common/images/icons/fileicon-java.png diff --git a/skins/common/images/icons/fileicon-mid.png b/skins/common/images/icons/fileicon-mid.png Binary files differnew file mode 100644 index 0000000..ce2bebb --- /dev/null +++ b/skins/common/images/icons/fileicon-mid.png diff --git a/skins/common/images/icons/fileicon-mov.png b/skins/common/images/icons/fileicon-mov.png Binary files differnew file mode 100644 index 0000000..952de1f --- /dev/null +++ b/skins/common/images/icons/fileicon-mov.png diff --git a/skins/common/images/icons/fileicon-o.png b/skins/common/images/icons/fileicon-o.png Binary files differnew file mode 100644 index 0000000..f3523d9 --- /dev/null +++ b/skins/common/images/icons/fileicon-o.png diff --git a/skins/common/images/icons/fileicon-ogg.png b/skins/common/images/icons/fileicon-ogg.png Binary files differnew file mode 100644 index 0000000..ef4d801 --- /dev/null +++ b/skins/common/images/icons/fileicon-ogg.png diff --git a/skins/common/images/icons/fileicon-ogg.xcf b/skins/common/images/icons/fileicon-ogg.xcf Binary files differnew file mode 100644 index 0000000..a91024b --- /dev/null +++ b/skins/common/images/icons/fileicon-ogg.xcf diff --git a/skins/common/images/icons/fileicon-pdf.png b/skins/common/images/icons/fileicon-pdf.png Binary files differnew file mode 100644 index 0000000..8c8da92 --- /dev/null +++ b/skins/common/images/icons/fileicon-pdf.png diff --git a/skins/common/images/icons/fileicon-ps.png b/skins/common/images/icons/fileicon-ps.png Binary files differnew file mode 100644 index 0000000..e872833 --- /dev/null +++ b/skins/common/images/icons/fileicon-ps.png diff --git a/skins/common/images/icons/fileicon-psd.png b/skins/common/images/icons/fileicon-psd.png Binary files differnew file mode 100644 index 0000000..598f190 --- /dev/null +++ b/skins/common/images/icons/fileicon-psd.png diff --git a/skins/common/images/icons/fileicon-rm.png b/skins/common/images/icons/fileicon-rm.png Binary files differnew file mode 100644 index 0000000..81dbe0b --- /dev/null +++ b/skins/common/images/icons/fileicon-rm.png diff --git a/skins/common/images/icons/fileicon-rpm.png b/skins/common/images/icons/fileicon-rpm.png Binary files differnew file mode 100644 index 0000000..1903aac --- /dev/null +++ b/skins/common/images/icons/fileicon-rpm.png diff --git a/skins/common/images/icons/fileicon-svg.png b/skins/common/images/icons/fileicon-svg.png Binary files differnew file mode 100644 index 0000000..b782113 --- /dev/null +++ b/skins/common/images/icons/fileicon-svg.png diff --git a/skins/common/images/icons/fileicon-tar.png b/skins/common/images/icons/fileicon-tar.png Binary files differnew file mode 100644 index 0000000..e5fd1b7 --- /dev/null +++ b/skins/common/images/icons/fileicon-tar.png diff --git a/skins/common/images/icons/fileicon-tex.png b/skins/common/images/icons/fileicon-tex.png Binary files differnew file mode 100644 index 0000000..a437284 --- /dev/null +++ b/skins/common/images/icons/fileicon-tex.png diff --git a/skins/common/images/icons/fileicon-ttf.png b/skins/common/images/icons/fileicon-ttf.png Binary files differnew file mode 100644 index 0000000..1ed4e74 --- /dev/null +++ b/skins/common/images/icons/fileicon-ttf.png diff --git a/skins/common/images/icons/fileicon-txt.png b/skins/common/images/icons/fileicon-txt.png Binary files differnew file mode 100644 index 0000000..9e988e7 --- /dev/null +++ b/skins/common/images/icons/fileicon-txt.png diff --git a/skins/common/images/icons/fileicon.png b/skins/common/images/icons/fileicon.png Binary files differnew file mode 100644 index 0000000..59696a3 --- /dev/null +++ b/skins/common/images/icons/fileicon.png diff --git a/skins/common/images/info-32.png b/skins/common/images/info-32.png Binary files differnew file mode 100644 index 0000000..ab09e1d --- /dev/null +++ b/skins/common/images/info-32.png diff --git a/skins/common/images/ksh/LICENSE b/skins/common/images/ksh/LICENSE new file mode 100644 index 0000000..ba56f97 --- /dev/null +++ b/skins/common/images/ksh/LICENSE @@ -0,0 +1,7 @@ + +button_S_italic.png +------------------- +Source : http://commons.wikimedia.org/wiki/Image:Button_S_italic.png +License: Public domain +Author : Purodha Blissenbach, http://ksh.wikipedia.org/wiki/User:Purodha + diff --git a/skins/common/images/ksh/button_S_italic.png b/skins/common/images/ksh/button_S_italic.png Binary files differnew file mode 100644 index 0000000..15496c0 --- /dev/null +++ b/skins/common/images/ksh/button_S_italic.png diff --git a/skins/common/images/link_icon.gif b/skins/common/images/link_icon.gif Binary files differnew file mode 100644 index 0000000..168c1a2 --- /dev/null +++ b/skins/common/images/link_icon.gif diff --git a/skins/common/images/magnify-clip-rtl.png b/skins/common/images/magnify-clip-rtl.png Binary files differnew file mode 100644 index 0000000..ff85c07 --- /dev/null +++ b/skins/common/images/magnify-clip-rtl.png diff --git a/skins/common/images/magnify-clip.png b/skins/common/images/magnify-clip.png Binary files differnew file mode 100644 index 0000000..00a9cee --- /dev/null +++ b/skins/common/images/magnify-clip.png diff --git a/skins/common/images/mediawiki.png b/skins/common/images/mediawiki.png Binary files differnew file mode 100644 index 0000000..8c42118 --- /dev/null +++ b/skins/common/images/mediawiki.png diff --git a/skins/common/images/nextredirectltr.png b/skins/common/images/nextredirectltr.png Binary files differnew file mode 100644 index 0000000..cd657c3 --- /dev/null +++ b/skins/common/images/nextredirectltr.png diff --git a/skins/common/images/nextredirectrtl.png b/skins/common/images/nextredirectrtl.png Binary files differnew file mode 100644 index 0000000..b788f33 --- /dev/null +++ b/skins/common/images/nextredirectrtl.png diff --git a/skins/common/images/poweredby_mediawiki_88x31.png b/skins/common/images/poweredby_mediawiki_88x31.png Binary files differnew file mode 100644 index 0000000..30e1d2e --- /dev/null +++ b/skins/common/images/poweredby_mediawiki_88x31.png diff --git a/skins/common/images/public-domain.png b/skins/common/images/public-domain.png Binary files differnew file mode 100644 index 0000000..ebf0107 --- /dev/null +++ b/skins/common/images/public-domain.png diff --git a/skins/common/images/question-small.png b/skins/common/images/question-small.png Binary files differnew file mode 100644 index 0000000..f7405d2 --- /dev/null +++ b/skins/common/images/question-small.png diff --git a/skins/common/images/question.svg b/skins/common/images/question.svg new file mode 100644 index 0000000..98fbe8d --- /dev/null +++ b/skins/common/images/question.svg @@ -0,0 +1 @@ +<?xml version="1.0" encoding="UTF-8"?><svg xmlns="http://www.w3.org/2000/svg" width="21.059" height="21.06"><path fill="#575757" d="M10.529 0c-5.814 0-10.529 4.714-10.529 10.529s4.715 10.53 10.529 10.53c5.816 0 10.529-4.715 10.529-10.53s-4.712-10.529-10.529-10.529zm-.002 16.767c-.861 0-1.498-.688-1.498-1.516 0-.862.637-1.534 1.498-1.534.828 0 1.5.672 1.5 1.534 0 .827-.672 1.516-1.5 1.516zm2.137-6.512c-.723.568-1 .931-1 1.739v.5h-2.205v-.603c0-1.517.449-2.136 1.154-2.688.707-.552 1.139-.845 1.139-1.637 0-.672-.414-1.051-1.24-1.051-.707 0-1.328.189-1.982.638l-1.051-1.807c.861-.604 1.93-1.034 3.342-1.034 1.912 0 3.516 1.051 3.516 3.066-.001 1.43-.794 2.188-1.673 2.877z"/></svg>
\ No newline at end of file diff --git a/skins/common/images/redirectltr.png b/skins/common/images/redirectltr.png Binary files differnew file mode 100644 index 0000000..695f2a1 --- /dev/null +++ b/skins/common/images/redirectltr.png diff --git a/skins/common/images/redirectrtl.png b/skins/common/images/redirectrtl.png Binary files differnew file mode 100644 index 0000000..c954a2a --- /dev/null +++ b/skins/common/images/redirectrtl.png diff --git a/skins/common/images/remove.png b/skins/common/images/remove.png Binary files differnew file mode 100644 index 0000000..cd03d6d --- /dev/null +++ b/skins/common/images/remove.png diff --git a/skins/common/images/spinner.gif b/skins/common/images/spinner.gif Binary files differnew file mode 100644 index 0000000..6146be4 --- /dev/null +++ b/skins/common/images/spinner.gif diff --git a/skins/common/images/tick-32.png b/skins/common/images/tick-32.png Binary files differnew file mode 100644 index 0000000..34cfa9c --- /dev/null +++ b/skins/common/images/tick-32.png diff --git a/skins/common/images/tipsy-arrow.gif b/skins/common/images/tipsy-arrow.gif Binary files differnew file mode 100644 index 0000000..9f1a15b --- /dev/null +++ b/skins/common/images/tipsy-arrow.gif diff --git a/skins/common/images/tooltip_icon.png b/skins/common/images/tooltip_icon.png Binary files differnew file mode 100644 index 0000000..ba5718a --- /dev/null +++ b/skins/common/images/tooltip_icon.png diff --git a/skins/common/images/warning-32.png b/skins/common/images/warning-32.png Binary files differnew file mode 100644 index 0000000..0400734 --- /dev/null +++ b/skins/common/images/warning-32.png diff --git a/skins/common/images/wiki.png b/skins/common/images/wiki.png Binary files differnew file mode 100644 index 0000000..48595b0 --- /dev/null +++ b/skins/common/images/wiki.png diff --git a/skins/common/oldshared.css b/skins/common/oldshared.css new file mode 100644 index 0000000..eea8b8e --- /dev/null +++ b/skins/common/oldshared.css @@ -0,0 +1,469 @@ +/** + * oldshared.css + * This file contains CSS settings common to Wikistandard, Nostalgia and + * CologneBlue, the old pre-Monobook skins + */ + +/* For clarity, explicitly state some recommendations from + * http://www.w3.org/TR/CSS21/sample.html to make sure the editsection links scale right + */ + +h1 { font-size: 2em; } +h2 { font-size: 1.5em; } +h3 { font-size: 1.17em; } +h4 { font-size: 1.11em; } +h5 { font-size: 1.05em; } +h6 { font-size: 1em; } +h1, h2, h3, h4, h5, h6 { + font-weight: bolder; +} + +/* Now the custom parts */ + +#footer { clear: both } +/* images */ +/* @noflip */ +div.floatright { + float: right; + clear: right; + margin: 0 0 1em 1em; +} + +/* @noflip */ +div.floatright p { + font-style: italic; +} + +/* @noflip */ +div.floatleft { + float: left; + clear: left; + margin: 0.3em 0.5em 0.5em 0; +} + +/* @noflip */ +div.floatleft p { + font-style: italic; +} + +/* table standards */ +table.rimage { + float: right; + margin-left: 1em; + margin-bottom: 1em; + text-align: center; + font-size: smaller; +} + +/* thumbnails */ +div.thumb { + margin-bottom: .5em; + border-style: solid; + border-color: white; + width: auto; +} +div.thumbinner { + border: 1px solid #ccc; + padding: 3px !important; + background-color: #f9f9f9; + font-size: 94%; + text-align: center; + overflow: hidden; +} +html .thumbimage { + border: 1px solid #ccc; +} +html .thumbcaption { + border: none; + text-align: left; + line-height: 1.4em; + padding: 3px !important; + font-size: 94%; +} +div.magnify { + float: right; + border: none !important; + background: none !important; + margin-left: 3px; +} +div.magnify a, +div.magnify img { + display: block; + border: none !important; + background: none !important; +} +/* @noflip */ +div.tright { + clear: right; + float: right; + border-width: .5em 0 .8em 1.4em; +} +/* @noflip */ +div.tleft { + float: left; + clear: left; + margin-right: .5em; + border-width: .5em 1.4em .8em 0; +} +img.thumbborder { + border: 1px solid #dddddd; +} + +/* Page history styling */ +/* the auto-generated edit comments */ +.autocomment { color: #4b4b4b; } + +img { border: none; } + +#toc, +.toc { + border: 1px solid #bba; + background-color: #f7f8ff; + padding: 5px; + font-size: 95%; + text-align: center; + display: -moz-inline-block; + display: inline-block; + display: table; + + /* IE7 and earlier */ + zoom: 1; + *display: inline; + + padding: 7px; +} +/* CSS for backwards-compatibility with cached page renders and creative uses in wikitext */ +table#toc, +table.toc { + border-collapse: collapse; +} +/* Remove additional paddings inside table-cells that are not present in <div>s */ +table#toc td, +table.toc td { + padding: 0; +} +#toc h2, +.toc h2 { + display: inline; + border: none; + padding: 0; + font-size: 100%; + font-weight: bold; +} +#toc ul, +.toc ul { + list-style-type: none; + list-style-image: none; + padding: 0; + text-align: left; +} +#toc ul ul, +.toc ul ul { + margin: 0 0 0 2em; +} +#toc .toctoggle, +.toc .toctoggle { + font-size: 94%; +} + +.error { + color: red; + font-size: larger; +} + +/* preference page with js-genrated toc */ +#preftoc { + float: left; + margin: 1em 1em 1em 1em; + width: 13em; +} +#preftoc li { + border: 1px solid White; +} +#preftoc li.selected { + background-color:#f9f9f9; + border:1px dashed #aaaaaa; +} +#preftoc a, +#preftoc a:active { + display: block; + color: #005189; +} +.mw-prefs-buttons { + clear: left; + float: left; + margin-top: 1em; +} +div.htmlform-tip { + font-size: 94%; + margin-top: 0.4em; + color: #666; +} +fieldset.prefsection { + margin-top: 1em; +} +fieldset.operaprefsection { + margin-left: 15em; +} + +/* emulate center */ +.center { + width: 100%; + text-align: center; +} +*.center * { + margin-left: auto; + margin-right: auto; +} + +/* small for tables and similar */ +.small { + font-size: 94%; +} +table.small { + font-size: 100%; +} + +/* use this instead of #toc for page content */ +.toccolours { + border: 1px solid #aaaaaa; + background-color: #f9f9f9; + padding: 5px; + font-size: 95%; +} +#siteNotice { + border: 1px solid #aaaaaa; + padding-left: 0.5em; + padding-right: 0.5em; +} +.redirectText { + font-size: 150%; + margin: 5px; +} +.sharedUploadNotice { + font-style: italic; +} +span.unpatrolled { + font-weight: bold; + color: red; +} + +span.updatedmarker { + color: black; + background-color: #00FF00; +} + +div.gallerybox { + width: 150px; +} + +span.comment { + font-style: italic; +} + +span.changedby { + font-size: 95%; +} + +.previewnote { + text-align: center; + color: #cc0000; +} +.editExternally { + border-style: solid; + border-width: 1px; + border-color: gray; + background: #ffffff; + padding: 3px; + margin-top: 0.5em; + float: left; + font-size: small; + text-align: center; +} +.editExternallyHelp { + font-style: italic; + color: gray; +} + +li span.deleted { + text-decoration: line-through; + color: #888; + font-style: italic; +} + +/* Classes for Exif data display */ +table.mw_metadata { + margin-left: 0.5em; +} + +table.mw_metadata caption { + font-weight: bold; +} +table.mw_metadata th { + font-weight: normal; +} +table.mw_metadata td { + padding: 0.1em; +} + +table.mw_metadata { + border: none; + border-collapse: collapse; +} +table.mw_metadata td, +table.mw_metadata th { + border: 1px solid #aaaaaa; + padding-left: 4px; + padding-right: 4px; +} +table.mw_metadata th { + background-color: #f9f9f9; +} +table.mw_metadata td { + background-color: #fcfcfc; +} +table.mw_metadata td.spacer { + background: inherit; + border-top: none; + border-bottom: none; +} +table.collapsed tr.collapsable { + display: none; +} + +.visualClear { + clear: both; +} + +/* Allmessages table */ +#allmessagestable th { + background-color: #b2b2ff; +} + +#allmessagestable tr.orig { + background-color: #ffe2e2; +} + +#allmessagestable tr.new { + background-color: #e2ffe2; +} + +#allmessagestable tr.def { + background-color: #f0f0ff; +} + +#jump-to-nav { + display: none; +} + +div.multipageimagenavbox { + border: solid 1px silver; + padding: 4px; + margin: 1em; + background: #f0f0f0; +} + +div.multipageimagenavbox div.thumb { + border: none; + margin-left: 2em; + margin-right: 2em; +} + +div.multipageimagenavbox hr { + margin: 6px; +} + +table.multipageimage td { + text-align: center; +} + +/* + Table pager (e.g. Special:Imagelist) + - remove underlines from the navigation link + - collapse borders + - set the borders to outsets (similar to Special:Allmessages) + - remove line wrapping for all td and th, set background color + - restore line wrapping for the last two table cells (description and size) +*/ +.TablePager_nav a { + text-decoration: none; +} +.TablePager { + border-collapse: collapse; +} +.TablePager, +.TablePager td, +.TablePager th { + border: 0.15em solid #777777; + padding: 0 0.15em 0 0.15em; +} +.TablePager th { + background-color: #eeeeff; +} +.TablePager td { + background-color: #ffffff; +} +.TablePager tr:hover td { + background-color: #eeeeff; +} + +.imagelist td, +.imagelist th { + white-space: nowrap; +} +.imagelist .TablePager_col_links { + background-color: #eeeeff; +} +.imagelist .TablePager_col_img_description { + white-space: normal; +} +.imagelist th.TablePager_sort { + background-color: #ccccff; +} + +.templatesUsed { + margin-top: 1em; +} + +.MediaTransformError { + border: thin solid #777; + background-color: #ccc; + padding: 0.1em; +} +.MediaTransformError td { + text-align: center; + vertical-align: middle; + font-size: 90%; +} + +form#specialpages { + display: inline; +} + +body { + direction: ltr; + unicode-bidi: embed; + background-color: #ffffec; +} +body.ns-0 { + background-color: white; +} + +/** RTL specific CSS starts here **/ + +/** + * Lists: + * The following lines don't have a visible effect on non-Gecko browsers + * They fix a problem with Gecko browsers rendering lists to the right of + * left-floated objects in an RTL layout. + */ +/* @noflip */ +html > body.rtl div#article ul { + display: table; +} +/* @noflip */ +html > body.rtl div#bodyContent ul#filetoc { + display: block; +} + +/* RTL specific CSS ends here **/ diff --git a/skins/common/protect.js b/skins/common/protect.js new file mode 100644 index 0000000..dc142ca --- /dev/null +++ b/skins/common/protect.js @@ -0,0 +1,387 @@ +( function ( mw, $ ) { + +var ProtectionForm = window.ProtectionForm = { + existingMatch: false, + + /** + * Set up the protection chaining interface (i.e. "unlock move permissions" checkbox) + * on the protection form + * + * @param opts Object : parameters with members: + * tableId Identifier of the table containing UI bits + * labelText Text to use for the checkbox label + * numTypes The number of protection types + * existingMatch True if all the existing expiry times match + */ + init: function ( opts ) { + var box, boxbody, row, cell, check, label; + + if ( !( document.createTextNode && document.getElementById && document.getElementsByTagName ) ) { + return false; + } + + box = document.getElementById( opts.tableId ); + if ( !box ) { + return false; + } + + boxbody = box.getElementsByTagName( 'tbody' )[0]; + row = document.createElement( 'tr' ); + boxbody.insertBefore( row, boxbody.firstChild.nextSibling ); + + this.existingMatch = opts.existingMatch; + + cell = document.createElement( 'td' ); + row.appendChild( cell ); + // If there is only one protection type, there is nothing to chain + if ( opts.numTypes > 1 ) { + check = document.createElement( 'input' ); + check.id = 'mwProtectUnchained'; + check.type = 'checkbox'; + $( check ).click( function () { + ProtectionForm.onChainClick(); + } ); + + label = document.createElement( 'label' ); + label.htmlFor = 'mwProtectUnchained'; + label.appendChild( document.createTextNode( opts.labelText ) ); + + cell.appendChild( check ); + cell.appendChild( document.createTextNode( ' ' ) ); + cell.appendChild( label ); + + check.checked = !this.areAllTypesMatching(); + this.enableUnchainedInputs( check.checked ); + } + + $( '#mwProtect-reason' ).byteLimit( 180 ); + + this.updateCascadeCheckbox(); + + return true; + }, + + /** + * Sets the disabled attribute on the cascade checkbox depending on the current selected levels + */ + updateCascadeCheckbox: function () { + var i, lists, items, selected; + + // For non-existent titles, there is no cascade option + if ( !document.getElementById( 'mwProtect-cascade' ) ) { + return; + } + lists = this.getLevelSelectors(); + for ( i = 0; i < lists.length; i++ ) { + if ( lists[i].selectedIndex > -1 ) { + items = lists[i].getElementsByTagName( 'option' ); + selected = items[ lists[i].selectedIndex ].value; + if ( !this.isCascadeableLevel( selected ) ) { + document.getElementById( 'mwProtect-cascade' ).checked = false; + document.getElementById( 'mwProtect-cascade' ).disabled = true; + return; + } + } + } + document.getElementById( 'mwProtect-cascade' ).disabled = false; + }, + + /** + * Checks if a cerain protection level is cascadeable. + * @param level {String} + * @return {Boolean} + */ + isCascadeableLevel: function ( level ) { + var cascadeLevels, len, i; + + cascadeLevels = mw.config.get( 'wgCascadeableLevels' ); + // cascadeLevels isn't defined on all pages + if ( cascadeLevels ) { + for ( i = 0, len = cascadeLevels.length; i < len; i += 1 ) { + if ( cascadeLevels[i] === level ) { + return true; + } + } + } + return false; + }, + + /** + * When protection levels are locked together, update the rest + * when one action's level changes + * + * @param source Element Level selector that changed + */ + updateLevels: function ( source ) { + if ( !this.isUnchained() ) { + this.setAllSelectors( source.selectedIndex ); + } + this.updateCascadeCheckbox(); + }, + + /** + * When protection levels are locked together, update the + * expiries when one changes + * + * @param source Element expiry input that changed + */ + + updateExpiry: function ( source ) { + var expiry, listId, list; + + if ( !this.isUnchained() ) { + expiry = source.value; + this.forEachExpiryInput( function ( element ) { + element.value = expiry; + } ); + } + listId = source.id.replace( /^mwProtect-(\w+)-expires$/, 'mwProtectExpirySelection-$1' ); + list = document.getElementById( listId ); + if ( list && list.value !== 'othertime' ) { + if ( this.isUnchained() ) { + list.value = 'othertime'; + } else { + this.forEachExpirySelector( function ( element ) { + element.value = 'othertime'; + } ); + } + } + }, + + /** + * When protection levels are locked together, update the + * expiry lists when one changes and clear the custom inputs + * + * @param source Element expiry selector that changed + */ + updateExpiryList: function ( source ) { + var expiry; + if ( !this.isUnchained() ) { + expiry = source.value; + this.forEachExpirySelector( function ( element ) { + element.value = expiry; + } ); + this.forEachExpiryInput( function ( element ) { + element.value = ''; + } ); + } + }, + + /** + * Update chain status and enable/disable various bits of the UI + * when the user changes the "unlock move permissions" checkbox + */ + onChainClick: function () { + if ( this.isUnchained() ) { + this.enableUnchainedInputs( true ); + } else { + this.setAllSelectors( this.getMaxLevel() ); + this.enableUnchainedInputs( false ); + } + this.updateCascadeCheckbox(); + }, + + /** + * Returns true if the named attribute in all objects in the given array are matching + */ + matchAttribute: function ( objects, attrName ) { + var i, element, value; + + // Check levels + value = null; + for ( i = 0; i < objects.length; i++ ) { + element = objects[i]; + if ( value === null ) { + value = element[attrName]; + } else { + if ( value !== element[attrName] ) { + return false; + } + } + } + return true; + }, + + /** + * Are all actions protected at the same level, with the same expiry time? + * + * @return boolean + */ + areAllTypesMatching: function () { + return this.existingMatch + && this.matchAttribute( this.getLevelSelectors(), 'selectedIndex' ) + && this.matchAttribute( this.getExpirySelectors(), 'selectedIndex' ) + && this.matchAttribute( this.getExpiryInputs(), 'value' ); + }, + + /** + * Is protection chaining off? + * + * @return bool + */ + isUnchained: function () { + var element = document.getElementById( 'mwProtectUnchained' ); + return element + ? element.checked + : true; // No control, so we need to let the user set both levels + }, + + /** + * Find the highest protection level in any selector + */ + getMaxLevel: function () { + var maxIndex = -1; + this.forEachLevelSelector( function ( element ) { + if ( element.selectedIndex > maxIndex ) { + maxIndex = element.selectedIndex; + } + } ); + return maxIndex; + }, + + /** + * Protect all actions at the specified level + * + * @param index int Protection level + */ + setAllSelectors: function ( index ) { + this.forEachLevelSelector( function ( element ) { + if ( element.selectedIndex !== index ) { + element.selectedIndex = index; + } + } ); + }, + + /** + * Apply a callback to each protection selector + * + * @param func callable Callback function + */ + forEachLevelSelector: function ( func ) { + var i, selectors; + + selectors = this.getLevelSelectors(); + for ( i = 0; i < selectors.length; i++ ) { + func( selectors[i] ); + } + }, + + /** + * Get a list of all protection selectors on the page + * + * @return Array + */ + getLevelSelectors: function () { + var i, ours, all, element; + + all = document.getElementsByTagName( 'select' ); + ours = []; + for ( i = 0; i < all.length; i++ ) { + element = all[i]; + if ( element.id.match( /^mwProtect-level-/ ) ) { + ours[ours.length] = element; + } + } + return ours; + }, + + /** + * Apply a callback to each expiry input + * + * @param func callable Callback function + */ + forEachExpiryInput: function ( func ) { + var i, inputs; + + inputs = this.getExpiryInputs(); + for ( i = 0; i < inputs.length; i++ ) { + func( inputs[i] ); + } + }, + + /** + * Get a list of all expiry inputs on the page + * + * @return Array + */ + getExpiryInputs: function () { + var i, all, element, ours; + + all = document.getElementsByTagName( 'input' ); + ours = []; + for ( i = 0; i < all.length; i++ ) { + element = all[i]; + if ( element.name.match( /^mwProtect-expiry-/ ) ) { + ours[ours.length] = element; + } + } + return ours; + }, + + /** + * Apply a callback to each expiry selector list + * @param func callable Callback function + */ + forEachExpirySelector: function ( func ) { + var i, inputs; + + inputs = this.getExpirySelectors(); + for ( i = 0; i < inputs.length; i++ ) { + func( inputs[i] ); + } + }, + + /** + * Get a list of all expiry selector lists on the page + * + * @return Array + */ + getExpirySelectors: function () { + var i, all, ours, element; + + all = document.getElementsByTagName( 'select' ); + ours = []; + for ( i = 0; i < all.length; i++ ) { + element = all[i]; + if ( element.id.match( /^mwProtectExpirySelection-/ ) ) { + ours[ours.length] = element; + } + } + return ours; + }, + + /** + * Enable/disable protection selectors and expiry inputs + * + * @param val boolean Enable? + */ + enableUnchainedInputs: function ( val ) { + var first = true; + + this.forEachLevelSelector( function ( element ) { + if ( first ) { + first = false; + } else { + element.disabled = !val; + } + } ); + first = true; + this.forEachExpiryInput( function ( element ) { + if ( first ) { + first = false; + } else { + element.disabled = !val; + } + } ); + first = true; + this.forEachExpirySelector( function ( element ) { + if ( first ) { + first = false; + } else { + element.disabled = !val; + } + } ); + } +}; + +}( mediaWiki, jQuery ) ); diff --git a/skins/common/shared.css b/skins/common/shared.css new file mode 100644 index 0000000..6b052b3 --- /dev/null +++ b/skins/common/shared.css @@ -0,0 +1,1216 @@ +/** + * CSS in this file is used by *all* skins (that have any CSS at all). Be + * careful what you put in here, since what looks good in one skin may not in + * another, but don't ignore the poor pre-Monobook users either. + */ + +/* GENERAL CLASSES FOR DIRECTIONALITY SUPPORT */ + +/** + * These classes should be used for text depending on the content direction. + * Content stuff like editsection, ul/ol and TOC depend on this. + */ +.mw-content-ltr { + /* @noflip */ + direction: ltr; +} +.mw-content-rtl { + /* @noflip */ + direction: rtl; +} + +/* Most input fields should be in site direction */ +.sitedir-ltr textarea, +.sitedir-ltr input { + /* @noflip */ + direction: ltr; +} +.sitedir-rtl textarea, +.sitedir-rtl input { + /* @noflip */ + direction: rtl; +} + +/* User-Agent styles for new HTML5 elements */ +mark { + background-color: yellow; + color: black; +} + +/* Input types that should follow user direction, like buttons */ +/* TODO: What about buttons in wikipage content ? */ +input[type="submit"], +input[type="button"], +input[type="reset"], +input[type="file"] { + direction: ltr; +} + +/* Override default values */ +textarea[dir="ltr"], +input[dir="ltr"] { + /* @noflip */ + direction: ltr; +} +textarea[dir="rtl"], +input[dir="rtl"] { + /* @noflip */ + direction: rtl; +} + +/* Default style for semantic tags */ +abbr[title], +.explain[title] { + border-bottom: 1px dotted; + cursor: help; +} + +/* Colored watchlist and recent changes numbers */ +.mw-plusminus-pos { + color: #006400; /* dark green */ +} +.mw-plusminus-neg { + color: #8b0000; /* dark red */ +} +.mw-plusminus-null { + color: #aaa; /* gray */ +} + +/** + * Links to redirects appear italicized on [[Special:AllPages]], [[Special:PrefixIndex]], + * [[Special:Watchlist/edit]] and in category listings. + */ +.allpagesredirect, +.redirect-in-category, +.watchlistredir { + font-style: italic; +} + +/* Comment and username portions of RC entries */ +span.comment { + font-style: italic; +} + +span.changedby { + font-size: 95%; +} + +/* Math */ +.texvc { + direction: ltr; + unicode-bidi: embed; +} +img.tex { + vertical-align: middle; +} +span.texhtml { + font-family: serif; +} + +/** + * Add a bit of margin space between the preview and the toolbar. + * This replaces the ugly <p><br /></p> we used to insert into the page source + */ +#wikiPreview.ontop { + margin-bottom: 1em; +} + +/* Stop floats from intruding into edit area in previews */ +#editform, +#toolbar, +#wpTextbox1 { + clear: both; +} + +#toolbar img { + cursor: pointer; +} + +/** + * File description page + */ + +div.mw-filepage-resolutioninfo { + font-size: smaller; +} + +/** + * File histories + */ +h2#filehistory { + clear: both; +} + +table.filehistory th, +table.filehistory td { + vertical-align: top; +} +table.filehistory th { + text-align: left; +} +table.filehistory td.mw-imagepage-filesize, +table.filehistory th.mw-imagepage-filesize { + white-space: nowrap; +} + +table.filehistory td.filehistory-selected { + font-weight: bold; +} + +/** + * Add a checkered background image on hover for file + * description pages. (bug 26470) + */ +.filehistory a img, +#file img:hover { + /* @embed */ + background: white url(images/Checker-16x16.png) repeat; +} + +/** + * rev_deleted stuff + */ +li span.deleted, +span.history-deleted { + text-decoration: line-through; + color: #888; + font-style: italic; +} + +/** + * Patrol stuff + */ +.not-patrolled { + background-color: #ffa; +} + +.unpatrolled { + font-weight: bold; + color: red; +} + +div.patrollink { + font-size: 75%; + text-align: right; +} + +/** + * Forms + */ +td.mw-label { + text-align: right; +} +td.mw-input { + text-align: left; +} +td.mw-submit { + text-align: left; +} + +td.mw-label { + vertical-align: top; +} +.prefsection td.mw-label { + width: 20%; +} +.prefsection table { + width: 100%; +} +.prefsection table.mw-htmlform-matrix { + width: auto; +} + +.mw-icon-question { + /* SVG support using a transparent gradient to guarantee cross-browser + * compatibility (browsers able to understand gradient syntax support also SVG). + * http://pauginer.tumblr.com/post/36614680636/invisible-gradient-technique */ + background-image: url(images/question-small.png); + /* @embed */ + background-image: -webkit-linear-gradient(transparent, transparent), url(images/question.svg); + /* @embed */ + background-image: linear-gradient(transparent, transparent), url(images/question.svg); + background-repeat: no-repeat; + background-size: 13px 13px; + display: inline-block; + height: 13px; + width: 13px; + margin-left: 4px; +} + +.mw-icon-question:lang(ar), +.mw-icon-question:lang(fa), +.mw-icon-question:lang(ur) { + -webkit-transform: scaleX(-1); + -ms-transform: scaleX(-1); + transform: scaleX(-1); +} + +td.mw-submit { + white-space: nowrap; +} + +table.mw-htmlform-nolabel td.mw-label { + width: 1px; +} + +tr.mw-htmlform-vertical-label td.mw-label { + text-align: left !important; +} + +.mw-htmlform-invalid-input td.mw-input input { + border-color: red; +} + +.mw-htmlform-flatlist div.mw-htmlform-flatlist-item { + display: inline; + margin-right: 1em; + white-space: nowrap; +} + +.mw-htmlform-matrix td { + padding-left: 0.5em; + padding-right: 0.5em; +} + +input#wpSummary { + width: 80%; + margin-bottom: 1em; +} + +/** + * Image captions + */ +/* @noflip */ +.mw-content-ltr .thumbcaption { + text-align: left; +} +/* @noflip */ +.mw-content-rtl .thumbcaption { + text-align: right; +} +/* @noflip */ +.mw-content-ltr .magnify { + float: right; +} +/* @noflip */ +.mw-content-rtl .magnify { + float: left; +} + +/** + * Categories + */ +#catlinks { + /** + * Overrides text justification (user preference) + * See bug 31990 + */ + text-align: left; +} +.catlinks ul { + display: inline; + margin: 0; + padding: 0; + list-style: none; + list-style-type: none; + list-style-image: none; + vertical-align: middle !ie; +} + +.catlinks li { + display: inline-block; + line-height: 1.25em; + border-left: 1px solid #AAA; + margin: 0.125em 0; + padding: 0 0.5em; + zoom: 1; + display: inline !ie; +} + +.catlinks li:first-child { + padding-left: 0.25em; + border-left: none; +} + +/* (bug 5346) make category redirects italic */ +.catlinks li a.mw-redirect { + font-style: italic; +} +/** + * Hidden categories + */ +.mw-hidden-cats-hidden { + display: none; +} +.catlinks-allhidden { + display: none; +} + +/* 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 { + font-size: 90%; + text-align: right; +} + +/** + * OpenSearch ajax suggestions + */ +.os-suggest { + overflow: auto; + overflow-x: hidden; + position: absolute; + top: 0; + left: 0; + width: 0; + background-color: white; + border-style: solid; + border-color: #AAAAAA; + border-width: 1px; + z-index:99; + font-size:95%; +} + +table.os-suggest-results { + font-size: 95%; + cursor: pointer; + border: 0; + border-collapse: collapse; + width: 100%; +} + +.os-suggest-result, +.os-suggest-result-hl { + white-space: nowrap; + background-color: white; + color: black; + padding: 2px; +} +.os-suggest-result-hl, +.os-suggest-result-hl-webkit { + background-color: #4C59A6; + color: white; +} + +.os-suggest-toggle { + position: relative; + left: 1ex; + font-size: 65%; +} +.os-suggest-toggle-def { + position: absolute; + top: 0; + left: 0; + font-size: 65%; + visibility: hidden; +} + +/* Page history styling */ + +/* The auto-generated edit comments */ +.autocomment { + color: gray; +} +#pagehistory .history-user { + margin-left: 0.4em; + margin-right: 0.2em; +} +#pagehistory span.minor { + font-weight: bold; +} +#pagehistory li { + border: 1px solid white; +} +#pagehistory li.selected { + background-color: #f9f9f9; + border: 1px dashed #aaa; +} + +.mw-history-revisiondelete-button, #mw-fileduplicatesearch-icon { + float: right; +} + +/** Generic minor/bot/newpage styling (recent changes) */ +.newpage, +.minoredit, +.botedit { + font-weight: bold; +} + +#shared-image-dup, +#shared-image-conflict { + font-style: italic; +} + +/** + * Recreating deleted page warning + * Reupload file warning + * Page protection warning + * incl. log entries for these warnings + */ +div.mw-warning-with-logexcerpt { + padding: 3px; + margin-bottom: 3px; + border: 2px solid #2F6FAB; + clear: both; +} +div.mw-warning-with-logexcerpt ul li { + font-size: 90%; +} + +/* (show/hide) revision deletion links */ +span.mw-revdelundel-link, +strong.mw-revdelundel-link { + font-size: 90%; +} +span.mw-revdelundel-hidden, +input.mw-revdelundel-hidden { + visibility: hidden; +} + +td.mw-revdel-checkbox, +th.mw-revdel-checkbox { + padding-right: 10px; + text-align: center; +} + +/* red links; see bug 36276 */ +a.new { + color: #BA0000; +} + +/* feed links */ +a.feedlink { + /* SVG support using a transparent gradient to guarantee cross-browser + * compatibility (browsers able to understand gradient syntax support also SVG). + * http://pauginer.tumblr.com/post/36614680636/invisible-gradient-technique */ + background-image: url(images/feed-icon.png); + /* @embed */ + background-image: -webkit-linear-gradient(transparent, transparent), url(images/feed-icon.svg); + /* @embed */ + background-image: linear-gradient(transparent, transparent), url(images/feed-icon.svg); + background-position: center left; + background-repeat: no-repeat; + background-size: 12px 12px; + padding-left: 16px; +} + +/* Plainlinks - this can be used to switch + * off special external link styling */ +.plainlinks a { + background: none !important; + padding: 0 !important; +} +/* External URLs should always be treated as LTR (bug 4330) */ +/* @noflip */ .rtl a.external.free, +.rtl a.external.autonumber { + direction: ltr; + unicode-bidi: embed; +} + +/** + * wikitable class for skinning normal tables + * keep in sync with commonPrint.css + */ +table.wikitable { + margin: 1em 0; + background-color: #f9f9f9; + border: 1px #aaa solid; + border-collapse: collapse; + color: black; +} +table.wikitable > tr > th, +table.wikitable > tr > td, +table.wikitable > * > tr > th, +table.wikitable > * > tr > td { + border: 1px #aaa solid; + padding: 0.2em; +} +table.wikitable > tr > th, +table.wikitable > * > tr > th { + background-color: #f2f2f2; + text-align: center; +} +table.wikitable > caption { + font-weight: bold; +} + +/** + * Hide collapsable rows in a collapsed table. + * + * Used by ImagePage and the mediawiki.action.view.metadata module. + */ +table.collapsed tr.collapsable { + display: none; +} + +/* success and error messages */ +.error, +.warning, +.success { + font-size: larger; +} +.error { + color: #cc0000; +} +.warning { + color: #705000; +} +.success { + color: #009000; +} + +.errorbox, +.warningbox, +.successbox { + border: 1px solid; + padding: .5em 1em; + margin-bottom: 1em; + display: -moz-inline-block; + display: inline-block; + zoom: 1; + *display: inline; +} +.errorbox h2, +.warningbox h2, +.successbox h2 { + font-size: 1em; + color: inherit; + font-weight: bold; + display: inline; + margin: 0 .5em 0 0; + border: none; +} +.errorbox { + color: #cc0000; + border-color: #fac5c5; + background-color: #fae3e3; +} +.warningbox { + color: #705000; + border-color: #fde29b; + background-color: #fdf1d1; +} +.successbox { + color: #009000; + border-color: #b7fdb5; + background-color: #e1fddf; +} + +/* general info/warning box for SP */ +.mw-infobox { + border: 2px solid #ff7f00; + margin: 0.5em; + clear: left; + overflow: hidden; +} + +.mw-infobox-left { + margin: 7px; + float: left; + width: 35px; +} + +.mw-infobox-right { + margin: 0.5em 0.5em 0.5em 49px; +} + +/* Note on preview page */ +.previewnote { + color: #c00; + margin-bottom: 1em; +} + +.previewnote p { + text-indent: 3em; + margin: 0.8em 0; +} + +.visualClear { + clear: both; +} + +/** + * Data table style + * + * Transparent table with suddle borders + * and blue row-highlighting. + */ +.mw-datatable { + border-collapse: collapse; +} +.mw-datatable, +.mw-datatable td, +.mw-datatable th { + border: 1px solid #aaaaaa; + padding: 0 0.15em 0 0.15em; +} +.mw-datatable th { + background-color: #ddddff; +} +.mw-datatable td { + background-color: #ffffff; +} +.mw-datatable tr:hover td { + background-color: #eeeeff; +} + + +/** + * TablePager tables generated by the TablePager PHP class + * in MediaWiki (e.g. Special:ListFiles). + */ +.TablePager { + min-width: 80%; +} +.TablePager_nav { + margin: 0 auto; +} +.TablePager_nav td { + padding: 3px; + text-align: center; +} +.TablePager_nav a { + text-decoration: none; +} + +.imagelist td, +.imagelist th { + white-space: nowrap; +} +.imagelist .TablePager_col_links { + background-color: #eeeeff; +} +.imagelist .TablePager_col_img_description { + white-space: normal; +} +.imagelist th.TablePager_sort { + background-color: #ccccff; +} + +/* filetoc */ +ul#filetoc { + text-align: center; + border: 1px solid #aaaaaa; + background-color: #f9f9f9; + padding: 5px; + font-size: 95%; + margin-bottom: 0.5em; + margin-left: 0; + margin-right: 0; +} + +#filetoc li { + display: inline; + list-style-type: none; + padding-right: 2em; +} + +/* Classes for Exif data display */ +table.mw_metadata { + font-size: 0.8em; + margin-left: 0.5em; + margin-bottom: 0.5em; + width: 400px; +} + +table.mw_metadata caption { + font-weight: bold; +} + +table.mw_metadata th { + font-weight: normal; +} + +table.mw_metadata td { + padding: 0.1em; +} + +table.mw_metadata { + border: none; + border-collapse: collapse; +} + +table.mw_metadata td, +table.mw_metadata th { + text-align: center; + border: 1px solid #aaaaaa; + padding-left: 5px; + padding-right: 5px; +} + +table.mw_metadata th { + background-color: #f9f9f9; +} + +table.mw_metadata td { + background-color: #fcfcfc; +} + +table.mw_metadata ul.metadata-langlist { + list-style-type: none; + list-style-image: none; + padding-right: 5px; + padding-left: 5px; + margin: 0; +} + +/* Correct directionality when page dir is different from site/user dir */ +.mw-content-ltr ul, +.mw-content-rtl .mw-content-ltr ul { + /* @noflip */ + margin: 0.3em 0 0 1.6em; + padding: 0; +} +.mw-content-rtl ul, +.mw-content-ltr .mw-content-rtl ul { + /* @noflip */ + margin: 0.3em 1.6em 0 0; + padding: 0; +} +.mw-content-ltr ol, +.mw-content-rtl .mw-content-ltr ol { + /* @noflip */ + margin: 0.3em 0 0 3.2em; + padding: 0; +} +.mw-content-rtl ol, +.mw-content-ltr .mw-content-rtl ol { + /* @noflip */ + margin: 0.3em 3.2em 0 0; + padding: 0; +} +/* @noflip */ +.mw-content-ltr dd, +.mw-content-rtl .mw-content-ltr dd { + margin-left: 1.6em; + margin-right: 0; +} +/* @noflip */ +.mw-content-rtl dd, +.mw-content-ltr .mw-content-rtl dd { + margin-right: 1.6em; + margin-left: 0; +} + +/* Galleries */ +/* These display attributes look nonsensical, but are needed to support IE and FF2 */ +/* Don't forget to update commonPrint.css */ +li.gallerybox { + vertical-align: top; + display: -moz-inline-box; + display: inline-block; +} + +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; + background-color: #f9f9f9; + margin: 2px; +} + +li.gallerybox div.thumb img { + display: block; + margin: 0 auto; +} + +div.gallerytext { + overflow: hidden; + font-size: 94%; + padding: 2px 4px; + word-wrap: break-word; +} + +/* new gallery stuff */ +ul.mw-gallery-nolines li.gallerybox div.thumb { + background-color: transparent; + border: none; +} + +ul.mw-gallery-nolines li.gallerybox div.gallerytext { + text-align: center; +} + +/* height constrained gallery */ + +ul.mw-gallery-packed li.gallerybox div.thumb, +ul.mw-gallery-packed-overlay li.gallerybox div.thumb, +ul.mw-gallery-packed-hover li.gallerybox div.thumb { + background-color: transparent; + border: none; +} +ul.mw-gallery-packed li.gallerybox div.thumb img, +ul.mw-gallery-packed-overlay li.gallerybox div.thumb img, +ul.mw-gallery-packed-hover li.gallerybox div.thumb img { + margin: 0 auto; +} + +ul.mw-gallery-packed-hover li.gallerybox, +ul.mw-gallery-packed-overlay li.gallerybox { + position:relative; +} + +ul.mw-gallery-packed-hover div.gallerytextwrapper { + overflow: hidden; + height: 0; +} + +ul.mw-gallery-packed-hover li.gallerybox:hover div.gallerytextwrapper, +ul.mw-gallery-packed-overlay li.gallerybox div.gallerytextwrapper, +ul.mw-gallery-packed-hover li.gallerybox.mw-gallery-focused div.gallerytextwrapper { + position:absolute; + background: white; + background: rgba(255, 255, 255, 0.8); + padding: 5px 10px; + bottom: 0; + left: 0; /* Needed for IE */ + height: auto; + font-weight: bold; + margin: 2px; /* correspond to style on div.thumb */ +} + +ul.mw-gallery-packed-hover, +ul.mw-gallery-packed-overlay, +ul.mw-gallery-packed { + text-align: center; +} + +.mw-ajax-loader { + /* @embed */ + background-image: url(images/ajax-loader.gif); + background-position: center center; + background-repeat: no-repeat; + padding: 16px; + position: relative; + top: -16px; +} + +.mw-small-spinner { + padding: 10px !important; + margin-right: 0.6em; + /* @embed */ + background-image: url(images/spinner.gif); + background-position: center center; + background-repeat: no-repeat; +} + +/* Language specific height correction for titles. Ref Bug 29405 and Bug 30809 */ +/* Languages like hi or ml require slightly more vertical space to show diacritics properly */ +h1:lang(anp), +h1:lang(as), +h1:lang(bh), /* Macrolanguage, used on bh.wikipedia.org, should be removed one day */ +h1:lang(bho), +h1:lang(bn), +h1:lang(gu), +h1:lang(hi), +h1:lang(kn), +h1:lang(ks), +h1:lang(ml), +h1:lang(mr), +h1:lang(my), +h1:lang(mai), +h1:lang(ne), +h1:lang(new), +h1:lang(or), +h1:lang(pa), +h1:lang(pi), +h1:lang(sa), +h1:lang(ta), +h1:lang(te) { + line-height: 1.6em !important; +} +h2:lang(anp), h3:lang(anp), h4:lang(anp), h5:lang(anp), h6:lang(anp), +h2:lang(as), h3:lang(as), h4:lang(as), h5:lang(as), h6:lang(as), +h2:lang(bho), h3:lang(bho), h4:lang(bho), h5:lang(bho), h6:lang(bho), +h2:lang(bh), h3:lang(bh), h4:lang(bh), h5:lang(bh), h6:lang(bh), +h2:lang(bn), h3:lang(bn), h4:lang(bn), h5:lang(bn), h6:lang(bn), +h2:lang(gu), h3:lang(gu), h4:lang(gu), h5:lang(gu), h6:lang(gu), +h2:lang(hi), h3:lang(hi), h4:lang(hi), h5:lang(hi), h6:lang(hi), +h2:lang(kn), h3:lang(kn), h4:lang(kn), h5:lang(kn), h6:lang(kn), +h2:lang(ks), h3:lang(ks), h4:lang(ks), h5:lang(ks), h6:lang(ks), +h2:lang(ml), h3:lang(ml), h4:lang(ml), h5:lang(ml), h6:lang(ml), +h2:lang(mr), h3:lang(mr), h4:lang(mr), h5:lang(mr), h6:lang(mr), +h2:lang(my), h3:lang(my), h4:lang(my), h5:lang(my), h6:lang(my), +h2:lang(mai), h3:lang(mai), h4:lang(mai), h5:lang(mai), h6:lang(mai), +h2:lang(ne), h3:lang(ne), h4:lang(ne), h5:lang(ne), h6:lang(ne), +h2:lang(new), h3:lang(new), h4:lang(new), h5:lang(new), h6:lang(new), +h2:lang(or), h3:lang(or), h4:lang(or), h5:lang(or), h6:lang(or), +h2:lang(pa), h3:lang(pa), h4:lang(pa), h5:lang(pa), h6:lang(pa), +h2:lang(pi), h3:lang(pi), h4:lang(pi), h5:lang(pi), h6:lang(pi), +h2:lang(sa), h3:lang(sa), h4:lang(sa), h5:lang(sa), h6:lang(sa), +h2:lang(ta), h3:lang(ta), h4:lang(ta), h5:lang(ta), h6:lang(ta), +h2:lang(te), h3:lang(te), h4:lang(te), h5:lang(te), h6:lang(te) { + line-height: 1.2em; +} + +/* Localised ordered list numbering for some languages */ +ol:lang(bcc) li, +ol:lang(bqi) li, +ol:lang(fa) li, +ol:lang(glk) li, +ol:lang(kk-arab) li, +ol:lang(mzn) li { + list-style-type: -moz-persian; + list-style-type: persian; +} + +ol:lang(ckb) li { + list-style-type: -moz-arabic-indic; + list-style-type: arabic-indic; +} + +ol:lang(hi) li, +ol:lang(mr) li { + list-style-type: -moz-devanagari; + list-style-type: devanagari; +} + +ol:lang(as) li, +ol:lang(bn) li { + list-style-type: -moz-bengali; + list-style-type: bengali; +} + +ol:lang(or) li { + list-style-type: -moz-oriya; + list-style-type: oriya; +} + +#toc ul, .toc ul { + margin: .3em 0; +} + +/* Correct directionality when page dir is different from site/user dir */ +/* @noflip */ .mw-content-ltr .toc ul, +.mw-content-ltr #toc ul, +.mw-content-rtl .mw-content-ltr .toc ul, +.mw-content-rtl .mw-content-ltr #toc ul { + text-align: left; +} +/* @noflip */ .mw-content-rtl .toc ul, +.mw-content-rtl #toc ul, +.mw-content-ltr .mw-content-rtl .toc ul, +.mw-content-ltr .mw-content-rtl #toc ul { + text-align: right; +} +/* @noflip */ .mw-content-ltr .toc ul ul, +.mw-content-ltr #toc ul ul, +.mw-content-rtl .mw-content-ltr .toc ul ul, +.mw-content-rtl .mw-content-ltr #toc ul ul { + margin: 0 0 0 2em; +} +/* @noflip */ .mw-content-rtl .toc ul ul, +.mw-content-rtl #toc ul ul, +.mw-content-ltr .mw-content-rtl .toc ul ul, +.mw-content-ltr .mw-content-rtl #toc ul ul { + margin: 0 2em 0 0; +} + +#toc #toctitle, +.toc #toctitle, +#toc .toctitle, +.toc .toctitle { + direction: ltr; +} + +/* tooltip styles */ +.mw-help-field-hint { + display: none; + margin-left: 2px; + margin-bottom: -8px; + padding: 0 0 0 15px; + /* @embed */ + background-image: url(images/help-question.gif); + background-position: left center; + background-repeat: no-repeat; + cursor: pointer; + font-size: .8em; + text-decoration: underline; + color: #0645ad; +} +.mw-help-field-hint:hover { + /* @embed */ + background-image: url(images/help-question-hover.gif); +} +.mw-help-field-data { + display: block; + background-color: #d6f3ff; + padding:5px 8px 4px 8px; + border: 1px solid #5dc9f4; + margin-left: 20px; +} +.tipsy { + padding: 5px 5px 10px; + font-size: 12px; + position: absolute; + z-index: 100000; + overflow: visible; +} +.tipsy-inner { + padding: 5px 8px 4px 8px; + background-color: #d6f3ff; + color: black; + border: 1px solid #5dc9f4; + max-width: 300px; + text-align: left; +} +.tipsy-arrow { + position: absolute; + /* @embed */ + background: url(images/tipsy-arrow.gif) no-repeat top left; + width: 13px; + height: 13px; +} +.tipsy-se .tipsy-arrow { + bottom: -2px; + right: 10px; + background-position: 0% 100%; +} + +#mw-clearyourcache, +#mw-sitecsspreview, +#mw-sitejspreview, +#mw-usercsspreview, +#mw-userjspreview { + direction: ltr; + unicode-bidi: embed; +} + +/* Correct user & content directionality when viewing a diff */ +.diff-currentversion-title, +.diff { + direction: ltr; + unicode-bidi: embed; +} +/* @noflip */ .diff-contentalign-right td { + direction: rtl; + unicode-bidi: embed; +} +/* @noflip */ .diff-contentalign-left td { + direction: ltr; + unicode-bidi: embed; +} +.diff-multi, +.diff-otitle, +.diff-ntitle, +.diff-lineno { + direction: ltr !important; + unicode-bidi: embed; +} + +#mw-revision-info, +#mw-revision-info-current, +#mw-revision-nav { + direction: ltr; + display: inline; +} + +/* Images */ + +/* @noflip */ div.tright, +div.floatright, +table.floatright { + clear: right; + float: right; +} +/* @noflip */ div.tleft, +div.floatleft, +table.floatleft { + float: left; + clear: left; +} +div.floatright, +table.floatright, +div.floatleft, +table.floatleft { + position: relative; +} + +/* bug 12205 */ +#mw-credits a { + unicode-bidi: embed; +} + +/* Accessibility */ +.mw-jump, +#jump-to-nav { + overflow: hidden; + height: 0; + zoom: 1; /* http://webaim.org/techniques/skipnav/#iequirk */ +} + +/* Print footer should be hidden by default in screen. */ +.printfooter { + display: none; +} + +/* For developers */ +.xdebug-error { + position: absolute; + z-index: 99; +} + +.mw-editsection, +.toctoggle, +#jump-to-nav { + -moz-user-select: none; + -webkit-user-select: none; + -ms-user-select: none; + user-select: none; +} + +/* Display editsection links smaller and next to headings */ +.mw-editsection, +.mw-editsection-like { + font-size: small; + font-weight: normal; + margin-left: 1em; + vertical-align: baseline; + /* Reset line-height; headings tend to have it set to larger values */ + line-height: 1em; + /* As .mw-editsection is a <span> (inline element), it is treated as part */ + /* of the heading content when selecting text by multiple clicks and thus */ + /* selected together with heading content, despite the user-select: none; */ + /* rule set above. This enforces non-selection without changing the look. */ + display: inline-block; +} + +/* Correct directionality when page dir is different from site/user dir */ +/* @noflip */ +.mw-content-ltr .mw-editsection, +.mw-content-rtl .mw-content-ltr .mw-editsection { + margin-left: 1em; +} +/* @noflip */ +.mw-content-rtl .mw-editsection, +.mw-content-ltr .mw-content-rtl .mw-editsection { + margin-right: 1em; +} + +/* Prevent citations and subscripts from interfering with the line-height */ +sup, +sub { + line-height: 1; +} diff --git a/skins/common/upload.js b/skins/common/upload.js new file mode 100644 index 0000000..7933caf --- /dev/null +++ b/skins/common/upload.js @@ -0,0 +1,355 @@ +/*jshint camelcase:false */ +( function ( mw, $ ) { +var licenseSelectorCheck, wgUploadWarningObj, wgUploadLicenseObj, fillDestFilename, + ajaxUploadDestCheck = mw.config.get( 'wgAjaxUploadDestCheck' ), + fileExtensions = mw.config.get( 'wgFileExtensions' ), + $spinnerDestCheck, $spinnerLicense; + +licenseSelectorCheck = window.licenseSelectorCheck = function () { + var selector = document.getElementById( 'wpLicense' ), + selection = selector.options[selector.selectedIndex].value; + if ( selector.selectedIndex > 0 ) { + if ( !selection ) { + // Option disabled, but browser is broken and doesn't respect this + selector.selectedIndex = 0; + } + } + // We might show a preview + wgUploadLicenseObj.fetchPreview( selection ); +}; + +function uploadSetup() { + // Disable URL box if the URL copy upload source type is not selected + var ein, + selector, ua, isMacIe, i, + optionsTable, row, td, + wpLicense, wpLicenseRow, wpLicenseTbody, + uploadSourceIds, len, onchange, + e = document.getElementById( 'wpSourceTypeurl' ); + if ( e ) { + if ( !e.checked ) { + ein = document.getElementById( 'wpUploadFileURL' ); + if ( ein ) { + ein.disabled = true; + } + } + } + + // For MSIE/Mac: non-breaking spaces cause the <option> not to render. + // But for some reason, setting the text to itself works + selector = document.getElementById( 'wpLicense' ); + if ( selector ) { + ua = navigator.userAgent; + isMacIe = ua.indexOf( 'MSIE' ) !== -1 && ua.indexOf( 'Mac' ) !== -1; + if ( isMacIe ) { + for ( i = 0; i < selector.options.length; i++ ) { + selector.options[i].text = selector.options[i].text; + } + } + } + + // AJAX wpDestFile warnings + if ( ajaxUploadDestCheck ) { + // Insert an event handler that fetches upload warnings when wpDestFile + // has been changed + document.getElementById( 'wpDestFile' ).onchange = function () { + wgUploadWarningObj.checkNow( this.value ); + }; + // Insert a row where the warnings will be displayed just below the + // wpDestFile row + optionsTable = document.getElementById( 'mw-htmlform-description' ).tBodies[0]; + row = optionsTable.insertRow( 1 ); + td = document.createElement( 'td' ); + td.id = 'wpDestFile-warning'; + td.colSpan = 2; + + row.appendChild( td ); + } + + wpLicense = document.getElementById( 'wpLicense' ); + if ( mw.config.get( 'wgAjaxLicensePreview' ) && wpLicense ) { + // License selector check + wpLicense.onchange = licenseSelectorCheck; + + // License selector table row + wpLicenseRow = wpLicense.parentNode.parentNode; + wpLicenseTbody = wpLicenseRow.parentNode; + + row = document.createElement( 'tr' ); + td = document.createElement( 'td' ); + row.appendChild( td ); + td = document.createElement( 'td' ); + td.id = 'mw-license-preview'; + row.appendChild( td ); + + wpLicenseTbody.insertBefore( row, wpLicenseRow.nextSibling ); + } + + // fillDestFile setup + uploadSourceIds = mw.config.get( 'wgUploadSourceIds' ); + len = uploadSourceIds.length; + onchange = function () { + fillDestFilename( this.id ); + }; + for ( i = 0; i < len; i += 1 ) { + document.getElementById( uploadSourceIds[i] ).onchange = onchange; + } +} + +wgUploadWarningObj = window.wgUploadWarningObj = { + responseCache: { '': ' ' }, + nameToCheck: '', + typing: false, + delay: 500, // ms + timeoutID: false, + + keypress: function () { + var cached, destFile, warningElt; + + if ( !ajaxUploadDestCheck ) { + return; + } + + // Find file to upload + destFile = document.getElementById( 'wpDestFile' ); + warningElt = document.getElementById( 'wpDestFile-warning' ); + if ( !destFile || !warningElt ) { + return; + } + + this.nameToCheck = destFile.value; + + // Clear timer + if ( this.timeoutID ) { + clearTimeout( this.timeoutID ); + } + // Check response cache + for ( cached in this.responseCache ) { + if ( this.nameToCheck === cached ) { + this.setWarning(this.responseCache[this.nameToCheck]); + return; + } + } + + this.timeoutID = setTimeout( function () { + wgUploadWarningObj.timeout(); + }, this.delay ); + }, + + checkNow: function ( fname ) { + if ( !ajaxUploadDestCheck ) { + return; + } + if ( this.timeoutID ) { + clearTimeout( this.timeoutID ); + } + this.nameToCheck = fname; + this.timeout(); + }, + + timeout: function () { + if ( !ajaxUploadDestCheck || this.nameToCheck === '' ) { + return; + } + $spinnerDestCheck = $.createSpinner().insertAfter( '#wpDestFile' ); + + var uploadWarningObj = this; + ( new mw.Api() ).get( { + action: 'query', + titles: ( new mw.Title( this.nameToCheck, mw.config.get( 'wgNamespaceIds' ).file ) ).getPrefixedText(), + prop: 'imageinfo', + iiprop: 'uploadwarning', + indexpageids: '' + } ).done( function ( result ) { + var resultOut = ''; + if ( result.query ) { + resultOut = result.query.pages[result.query.pageids[0]].imageinfo[0]; + } + uploadWarningObj.processResult( resultOut, uploadWarningObj.nameToCheck ); + } ); + }, + + processResult: function ( result, fileName ) { + $spinnerDestCheck.remove(); + $spinnerDestCheck = undefined; + this.setWarning( result.html ); + this.responseCache[fileName] = result.html; + }, + + setWarning: function ( warning ) { + var warningElt = document.getElementById( 'wpDestFile-warning' ), + ackElt = document.getElementsByName( 'wpDestFileWarningAck' ); + + this.setInnerHTML( warningElt, warning ); + + // Set a value in the form indicating that the warning is acknowledged and + // doesn't need to be redisplayed post-upload + if ( !warning ) { + ackElt[0].value = ''; + } else { + ackElt[0].value = '1'; + } + + }, + setInnerHTML: function ( element, text ) { + // Check for no change to avoid flicker in IE 7 + if ( element.innerHTML !== text ) { + element.innerHTML = text; + } + } +}; + +fillDestFilename = window.fillDestFilename = function ( id ) { + var e, path, slash, backslash, fname, + found, ext, i, + destFile; + if ( !mw.config.get( 'wgUploadAutoFill' ) ) { + return; + } + if ( !document.getElementById ) { + return; + } + // Remove any previously flagged errors + e = document.getElementById( 'mw-upload-permitted' ); + if ( e ) { + e.className = ''; + } + + e = document.getElementById( 'mw-upload-prohibited' ); + if ( e ) { + e.className = ''; + } + + path = document.getElementById( id ).value; + // Find trailing part + slash = path.lastIndexOf( '/' ); + backslash = path.lastIndexOf( '\\' ); + if ( slash === -1 && backslash === -1 ) { + fname = path; + } else if ( slash > backslash ) { + fname = path.substring( slash + 1, 10000 ); + } else { + fname = path.substring( backslash + 1, 10000 ); + } + + // Clear the filename if it does not have a valid extension. + // URLs are less likely to have a useful extension, so don't include them in the + // extension check. + if ( mw.config.get( 'wgStrictFileExtensions' ) && fileExtensions && id !== 'wpUploadFileURL' ) { + found = false; + if ( fname.lastIndexOf( '.' ) !== -1 ) { + ext = fname.substr( fname.lastIndexOf( '.' ) + 1 ); + for ( i = 0; i < fileExtensions.length; i += 1 ) { + if ( fileExtensions[i].toLowerCase() === ext.toLowerCase() ) { + found = true; + break; + } + } + } + if ( !found ) { + // Not a valid extension + // Clear the upload and set mw-upload-permitted to error + document.getElementById( id ).value = ''; + e = document.getElementById( 'mw-upload-permitted' ); + if ( e ) { + e.className = 'error'; + } + + e = document.getElementById( 'mw-upload-prohibited' ); + if ( e ) { + e.className = 'error'; + } + + // Clear wpDestFile as well + e = document.getElementById( 'wpDestFile' ); + if ( e ) { + e.value = ''; + } + + return false; + } + } + + // Replace spaces by underscores + fname = fname.replace( / /g, '_' ); + // Capitalise first letter if needed + if ( mw.config.get( 'wgCapitalizeUploads' ) ) { + fname = fname.charAt( 0 ).toUpperCase().concat( fname.substring( 1, 10000 ) ); + } + + // Output result + destFile = document.getElementById( 'wpDestFile' ); + if ( destFile ) { + // Call decodeURIComponent function to remove possible URL-encoded characters + // from the file name (bug 30390). Especially likely with upload-form-url. + // decodeURIComponent can throw an exception in input is invalid utf-8 + try { + destFile.value = decodeURIComponent( fname ); + } catch ( err ) { + destFile.value = fname; + } + wgUploadWarningObj.checkNow( fname ); + } +}; + +window.toggleFilenameFiller = function () { + if ( !document.getElementById ) { + return; + } + var destName = document.getElementById( 'wpDestFile' ).value; + mw.config.set( 'wgUploadAutoFill', !destName ); +}; + +wgUploadLicenseObj = window.wgUploadLicenseObj = { + + responseCache: { '': '' }, + + fetchPreview: function ( license ) { + var cached, title; + if ( !mw.config.get( 'wgAjaxLicensePreview' ) ) { + return; + } + for ( cached in this.responseCache ) { + if ( cached === license ) { + this.showPreview( this.responseCache[license] ); + return; + } + } + + $spinnerLicense = $.createSpinner().insertAfter( '#wpLicense' ); + + title = document.getElementById( 'wpDestFile' ).value; + if ( !title ) { + title = 'File:Sample.jpg'; + } + + ( new mw.Api() ).get( { + action: 'parse', + text: '{{' + license + '}}', + title: title, + prop: 'text', + pst: '' + } ).done( function ( result ) { + wgUploadLicenseObj.processResult( result, license ); + } ); + }, + + processResult: function ( result, license ) { + $spinnerLicense.remove(); + $spinnerLicense = undefined; + this.responseCache[license] = result.parse.text['*']; + this.showPreview( this.responseCache[license] ); + }, + + showPreview: function ( preview ) { + var previewPanel = document.getElementById( 'mw-license-preview' ); + if ( previewPanel.innerHTML !== preview ) { + previewPanel.innerHTML = preview; + } + } + +}; + +$( uploadSetup ); + +}( mediaWiki, jQuery ) ); diff --git a/skins/common/wikibits.js b/skins/common/wikibits.js new file mode 100644 index 0000000..516035e --- /dev/null +++ b/skins/common/wikibits.js @@ -0,0 +1,243 @@ +/** + * MediaWiki legacy wikibits + */ +( function ( mw, $ ) { + var msg, + win = window, + ua = navigator.userAgent.toLowerCase(), + isIE6 = ( /msie ([0-9]{1,}[\.0-9]{0,})/.exec( ua ) && parseFloat( RegExp.$1 ) <= 6.0 ), + isGecko = /gecko/.test( ua ) && !/khtml|spoofer|netscape\/7\.0/.test( ua ), + onloadFuncts = []; + +if ( mw.config.get( 'wgBreakFrames' ) ) { + // Note: In IE < 9 strict comparison to window is non-standard (the standard didn't exist yet) + // it works only comparing to window.self or window.window (http://stackoverflow.com/q/4850978/319266) + if ( win.top !== win.self ) { + // Un-trap us from framesets + win.top.location = win.location; + } +} + +/** + * Legacy function to scroll to an id while viewing the page over a redirect. + * Superseeded by module 'mediawiki.action.view.redirectToFragment' in version 1.23. + * Kepted because cache can contain still inline script calls to this function. + * Should be removed in version 1.24. + * @deprecated since 1.23 Use mediawiki.action.view.redirectToFragment instead + */ +mw.log.deprecate( win, 'redirectToFragment', function ( fragment ) { + var webKitVersion, + match = navigator.userAgent.match( /AppleWebKit\/(\d+)/ ); + if ( match ) { + webKitVersion = parseInt( match[1], 10 ); + if ( webKitVersion < 420 ) { + // Released Safari w/ WebKit 418.9.1 messes up horribly + // Nightlies of 420+ are ok + return; + } + } + if ( !win.location.hash ) { + win.location.hash = fragment; + + // Mozilla needs to wait until after load, otherwise the window doesn't + // scroll. See <https://bugzilla.mozilla.org/show_bug.cgi?id=516293>. + // There's no obvious way to detect this programmatically, so we use + // version-testing. If Firefox fixes the bug, they'll jump twice, but + // better twice than not at all, so make the fix hit future versions as + // well. + if ( isGecko ) { + $( function () { + if ( win.location.hash === fragment ) { + win.location.hash = fragment; + } + } ); + } + } +}, 'Use the module mediawiki.action.view.redirectToFragment instead.' ); + +/** + * User-agent sniffing. + * + * @deprecated since 1.17 Use jquery.client instead + */ + +msg = 'Use feature detection or module jquery.client instead.'; + +mw.log.deprecate( win, 'clientPC', ua, msg ); + +// Ignored dummy values +mw.log.deprecate( win, 'is_gecko', false, msg ); +mw.log.deprecate( win, 'is_chrome_mac', false, msg ); +mw.log.deprecate( win, 'is_chrome', false, msg ); +mw.log.deprecate( win, 'webkit_version', false, msg ); +mw.log.deprecate( win, 'is_safari_win', false, msg ); +mw.log.deprecate( win, 'is_safari', false, msg ); +mw.log.deprecate( win, 'webkit_match', false, msg ); +mw.log.deprecate( win, 'is_ff2', false, msg ); +mw.log.deprecate( win, 'ff2_bugs', false, msg ); +mw.log.deprecate( win, 'is_ff2_win', false, msg ); +mw.log.deprecate( win, 'is_ff2_x11', false, msg ); +mw.log.deprecate( win, 'opera95_bugs', false, msg ); +mw.log.deprecate( win, 'opera7_bugs', false, msg ); +mw.log.deprecate( win, 'opera6_bugs', false, msg ); +mw.log.deprecate( win, 'is_opera_95', false, msg ); +mw.log.deprecate( win, 'is_opera_preseven', false, msg ); +mw.log.deprecate( win, 'is_opera', false, msg ); +mw.log.deprecate( win, 'ie6_bugs', false, msg ); + +/** + * DOM utilities for handling of events, text nodes and selecting elements + * + * @deprecated since 1.17 Use jQuery instead + */ +msg = 'Use jQuery instead.'; + +// Ignored dummy values +mw.log.deprecate( win, 'doneOnloadHook', undefined, msg ); +mw.log.deprecate( win, 'onloadFuncts', [], msg ); +mw.log.deprecate( win, 'runOnloadHook', $.noop, msg ); +mw.log.deprecate( win, 'changeText', $.noop, msg ); +mw.log.deprecate( win, 'killEvt', $.noop, msg ); +mw.log.deprecate( win, 'addHandler', $.noop, msg ); +mw.log.deprecate( win, 'hookEvent', $.noop, msg ); +mw.log.deprecate( win, 'addClickHandler', $.noop, msg ); +mw.log.deprecate( win, 'removeHandler', $.noop, msg ); +mw.log.deprecate( win, 'getElementsByClassName', function () { return []; }, msg ); +mw.log.deprecate( win, 'getInnerText', function () { return ''; }, msg ); + +// Run a function after the window onload event is fired +mw.log.deprecate( win, 'addOnloadHook', function ( hookFunct ) { + if ( onloadFuncts ) { + onloadFuncts.push(hookFunct); + } else { + // If func queue is gone the event has happened already, + // run immediately instead of queueing. + hookFunct(); + } +}, msg ); + +$( win ).on( 'load', function () { + var i, functs; + + // Don't run twice + if ( !onloadFuncts ) { + return; + } + + // Deference and clear onloadFuncts before running any + // hooks to make sure we don't miss any addOnloadHook + // calls. + functs = onloadFuncts.slice(); + onloadFuncts = undefined; + + // Execute the queued functions + for ( i = 0; i < functs.length; i++ ) { + functs[i](); + } +} ); + +/** + * Toggle checkboxes with shift selection + * + * @deprecated since 1.17 Use jquery.checkboxShiftClick instead + */ +msg = 'Use jquery.checkboxShiftClick instead.'; +mw.log.deprecate( win, 'checkboxes', [], msg ); +mw.log.deprecate( win, 'lastCheckbox', null, msg ); +mw.log.deprecate( win, 'setupCheckboxShiftClick', $.noop, msg ); +mw.log.deprecate( win, 'addCheckboxClickHandlers', $.noop, msg ); +mw.log.deprecate( win, 'checkboxClickHandler', $.noop, msg ); + +/** + * Add a button to the default editor toolbar + * + * @deprecated since 1.17 Use mw.toolbar instead + */ +mw.log.deprecate( win, 'mwEditButtons', [], 'Use mw.toolbar instead.' ); +mw.log.deprecate( win, 'mwCustomEditButtons', [], 'Use mw.toolbar instead.' ); + +/** + * Spinner creation, injection and removal + * + * @deprecated since 1.18 Use jquery.spinner instead + */ +mw.log.deprecate( win, 'injectSpinner', $.noop, 'Use jquery.spinner instead.' ); +mw.log.deprecate( win, 'removeSpinner', $.noop, 'Use jquery.spinner instead.' ); + +/** + * Escape utilities + * + * @deprecated since 1.18 Use mw.html instead + */ +mw.log.deprecate( win, 'escapeQuotes', $.noop, 'Use mw.html instead.' ); +mw.log.deprecate( win, 'escapeQuotesHTML', $.noop, 'Use mw.html instead.' ); + +/** + * Display a message to the user + * + * @deprecated since 1.17 Use mediawiki.notify instead + * @param {string|HTMLElement} message To be put inside the message box + */ +mw.log.deprecate( win, 'jsMsg', mw.util.jsMessage, 'Use mediawiki.notify instead.' ); + +/** + * Misc. utilities + * + * @deprecated since 1.17 Use mediawiki.util instead + */ +msg = 'Use mediawiki.util instead.'; +mw.log.deprecate( win, 'tooltipAccessKeyPrefix', 'alt-', msg ); +mw.log.deprecate( win, 'tooltipAccessKeyRegexp', /\[(alt-)?(.)\]$/, msg ); +mw.log.deprecate( win, 'updateTooltipAccessKeys', mw.util.updateTooltipAccessKeys, msg ); +mw.log.deprecate( win, 'addPortletLink', mw.util.addPortletLink, msg ); +mw.log.deprecate( win, 'appendCSS', mw.util.addCSS, msg ); + +/** + * Wikipage import methods + */ + +// included-scripts tracker +win.loadedScripts = {}; + +win.importScript = function ( page ) { + var uri = mw.config.get( 'wgScript' ) + '?title=' + + mw.util.wikiUrlencode( page ) + + '&action=raw&ctype=text/javascript'; + return win.importScriptURI( uri ); +}; + +win.importScriptURI = function ( url ) { + if ( win.loadedScripts[url] ) { + return null; + } + win.loadedScripts[url] = true; + var s = document.createElement( 'script' ); + s.setAttribute( 'src', url ); + s.setAttribute( 'type', 'text/javascript' ); + document.getElementsByTagName( 'head' )[0].appendChild( s ); + return s; +}; + +win.importStylesheet = function ( page ) { + var uri = mw.config.get( 'wgScript' ) + '?title=' + + mw.util.wikiUrlencode( page ) + + '&action=raw&ctype=text/css'; + return win.importStylesheetURI( uri ); +}; + +win.importStylesheetURI = function ( url, media ) { + var l = document.createElement( 'link' ); + l.rel = 'stylesheet'; + l.href = url; + if ( media ) { + l.media = media; + } + document.getElementsByTagName('head')[0].appendChild( l ); + return l; +}; + +if ( isIE6 ) { + win.importScriptURI( mw.config.get( 'stylepath' ) + '/common/IEFixes.js' ); +} + +}( mediaWiki, jQuery ) ); |