diff options
Diffstat (limited to 'skins')
178 files changed, 919 insertions, 1981 deletions
diff --git a/skins/ArchLinux.deps.php b/skins/ArchLinux.deps.php deleted file mode 100644 index dda24e0e..00000000 --- a/skins/ArchLinux.deps.php +++ /dev/null @@ -1,12 +0,0 @@ -<?php -// This file exists to ensure that base classes are preloaded before -// MonoBook.php is compiled, working around a bug in the APC opcode -// cache on PHP 5, where cached code can break if the include order -// changed on a subsequent page view. -// see http://lists.wikimedia.org/pipermail/wikitech-l/2006-January/021311.html - -if ( ! defined( 'MEDIAWIKI' ) ) - die( 1 ); - -require_once( dirname( dirname( __FILE__ ) ) . '/includes/SkinTemplate.php'); - diff --git a/skins/ArchLinux.php b/skins/ArchLinux.php index 7a30b6e2..a5ce1714 100644 --- a/skins/ArchLinux.php +++ b/skins/ArchLinux.php @@ -2,6 +2,21 @@ /** * ArchLinux skin (based on MonoBook) * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program 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 General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * http://www.gnu.org/copyleft/gpl.html + * * @todo document * @file * @ingroup Skins @@ -88,7 +103,7 @@ class ArchLinuxTemplate extends BaseTemplate { </div><!-- #archnavbar --> <div id="globalWrapper"> -<div id="column-content"><div id="content"> +<div id="column-content"><div id="content" class="mw-body-primary"> <a id="top"></a> <?php if($this->data['sitenotice']) { ?><div id="siteNotice"><?php $this->html('sitenotice') ?></div><?php } ?> @@ -101,7 +116,7 @@ class ArchLinuxTemplate extends BaseTemplate { <?php } ?><?php if($this->data['newtalk'] ) { ?> <div class="usermessage"><?php $this->html('newtalk') ?></div> <?php } ?><?php if($this->data['showjumplinks']) { ?> - <div id="jump-to-nav" class="mw-jump"><?php $this->msg('jumpto') ?> <a href="#column-one"><?php $this->msg('jumptonavigation') ?></a>, <a href="#searchInput"><?php $this->msg('jumptosearch') ?></a></div> + <div id="jump-to-nav" class="mw-jump"><?php $this->msg('jumpto') ?> <a href="#column-one"><?php $this->msg('jumptonavigation') ?></a><?php $this->msg( 'comma-separator' ) ?><a href="#searchInput"><?php $this->msg('jumptosearch') ?></a></div> <?php } ?> <!-- start content --> <?php $this->html('bodytext') ?> @@ -181,6 +196,9 @@ echo $footerEnd; /*************************************************************************************************/ + /** + * @param $sidebar array + */ protected function renderPortals( $sidebar ) { if ( !isset( $sidebar['SEARCH'] ) ) $sidebar['SEARCH'] = true; if ( !isset( $sidebar['TOOLBOX'] ) ) $sidebar['TOOLBOX'] = true; @@ -288,6 +306,10 @@ echo $footerEnd; } /*************************************************************************************************/ + /** + * @param $bar string + * @param $cont array|string + */ function customBox( $bar, $cont ) { $portletAttribs = array( 'class' => 'generated-sidebar portlet', 'id' => Sanitizer::escapeId( "p-$bar" ) ); $tooltip = Linker::titleAttrib( "p-$bar" ); diff --git a/skins/Chick.deps.php b/skins/Chick.deps.php deleted file mode 100644 index a7cb0844..00000000 --- a/skins/Chick.deps.php +++ /dev/null @@ -1,13 +0,0 @@ -<?php -// This file exists to ensure that base classes are preloaded before -// Chick.php is compiled, working around a bug in the APC opcode -// cache on PHP 5, where cached code can break if the include order -// changed on a subsequent page view. -// see http://lists.wikimedia.org/pipermail/wikitech-l/2006-January/021311.html - -if ( ! defined( 'MEDIAWIKI' ) ) - die( 1 ); - -require_once( dirname( dirname( __FILE__ ) ) . '/includes/SkinTemplate.php'); -require_once( dirname(__FILE__) . '/MonoBook.php' ); - diff --git a/skins/Chick.php b/skins/Chick.php index 2362263c..54dada3d 100644 --- a/skins/Chick.php +++ b/skins/Chick.php @@ -3,6 +3,21 @@ * Chick: A lightweight Monobook skin with no sidebar, the sidebar links are * given at the bottom of the page instead, as in the unstyled MySkin. * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program 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 General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * http://www.gnu.org/copyleft/gpl.html + * * @file * @ingroup Skins */ @@ -10,9 +25,6 @@ if( !defined( 'MEDIAWIKI' ) ) die( -1 ); -/** */ -require_once( dirname(__FILE__) . '/MonoBook.php' ); - /** * Inherit main code from SkinTemplate, set the CSS and template filter. * @ingroup Skins diff --git a/skins/CologneBlue.php b/skins/CologneBlue.php index c5b3b11d..1823d882 100644 --- a/skins/CologneBlue.php +++ b/skins/CologneBlue.php @@ -2,6 +2,21 @@ /** * Cologne Blue: A nicer-looking alternative to Standard. * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program 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 General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * http://www.gnu.org/copyleft/gpl.html + * * @todo document * @file * @ingroup Skins @@ -65,18 +80,18 @@ class CologneBlueTemplate extends LegacyTemplate { $mainPageObj = Title::newMainPage(); $s = "\n<div id='content'>\n<div id='topbar'>" . - '<table width="100%" border="0" cellspacing="0" cellpadding="8"><tr>'; + '<table width="100%" cellspacing="0" cellpadding="8"><tr>'; $s .= '<td class="top" nowrap="nowrap">'; $s .= '<a href="' . htmlspecialchars( $mainPageObj->getLocalURL() ) . '">'; - $s .= '<span id="sitetitle">' . wfMsg( 'sitetitle' ) . '</span></a>'; + $s .= '<span id="sitetitle">' . wfMessage( 'sitetitle' )->escaped() . '</span></a>'; $s .= '</td><td class="top" id="top-syslinks" width="100%">'; $s .= $this->sysLinks(); $s .= '</td></tr><tr><td class="top-subheader">'; $s .= '<font size="-1"><span id="sitesub">'; - $s .= htmlspecialchars( wfMsg( 'sitesubtitle' ) ) . '</span></font>'; + $s .= wfMessage( 'sitesubtitle' )->escaped() . '</span></font>'; $s .= '</td><td class="top-linkcollection">'; $s .= '<font size="-1"><span id="langlinks">'; @@ -107,21 +122,17 @@ class CologneBlueTemplate extends LegacyTemplate { $s = "\n</div><br clear='all' />\n"; $s .= "\n<div id='footer'>"; - $s .= '<table width="98%" border="0" cellspacing="0"><tr>'; + $s .= '<table width="98%" cellspacing="0"><tr>'; $s .= '<td class="bottom">'; $s .= $this->bottomLinks(); $s .= $this->getSkin()->getLanguage()->pipeList( array( - "\n<br />" . Linker::link( - Title::newMainPage(), - null, - array(), - array(), - array( 'known', 'noclasses' ) + "\n<br />" . Linker::linkKnown( + Title::newMainPage() ), $this->getSkin()->aboutLink(), - $this->searchForm( wfMsg( 'qbfind' ) ) + $this->searchForm( wfMessage( 'qbfind' )->text() ) ) ); $s .= "\n<br />" . $this->pageStats(); @@ -152,16 +163,16 @@ class CologneBlueTemplate extends LegacyTemplate { $s = array( $this->getSkin()->mainPageLink(), Linker::linkKnown( - Title::newFromText( wfMsgForContent( 'aboutpage' ) ), - wfMsg( 'about' ) + Title::newFromText( wfMessage( 'aboutpage' )->inContentLanguage()->text() ), + wfMessage( 'about' )->text() ), Linker::linkKnown( - Title::newFromText( wfMsgForContent( 'helppage' ) ), - wfMsg( 'help' ) + Title::newFromText( wfMessage( 'helppage' )->inContentLanguage()->text() ), + wfMessage( 'help' )->text() ), Linker::linkKnown( - Title::newFromText( wfMsgForContent( 'faqpage' ) ), - wfMsg( 'faq' ) + Title::newFromText( wfMessage( 'faqpage' )->inContentLanguage()->text() ), + wfMessage( 'faq' )->text() ), Linker::specialLink( 'Specialpages' ) ); @@ -176,14 +187,14 @@ class CologneBlueTemplate extends LegacyTemplate { if ( $this->data['loggedin'] ) { $s[] = Linker::linkKnown( $lo, - wfMsg( 'logout' ), + wfMessage( 'logout' )->text(), array(), $q ); } else { $s[] = Linker::linkKnown( $li, - wfMsg( 'login' ), + wfMessage( 'login' )->text(), array(), $q ); @@ -242,8 +253,8 @@ class CologneBlueTemplate extends LegacyTemplate { $s .= '<strong>' . $this->editThisPage() . '</strong>'; $s .= $sep . Linker::linkKnown( - Title::newFromText( wfMsgForContent( 'edithelppage' ) ), - wfMsg( 'edithelp' ) + Title::newFromText( wfMessage( 'edithelppage' )->inContentLanguage()->text() ), + wfMessage( 'edithelp' )->text() ); if( $this->data['loggedin'] ) { @@ -294,31 +305,22 @@ class CologneBlueTemplate extends LegacyTemplate { $s .= $this->menuHead( 'qbmyoptions' ); if ( $this->data['loggedin'] ) { - $tl = Linker::link( + $tl = Linker::linkKnown( $user->getTalkPage(), - wfMsg( 'mytalk' ), - array(), - array(), - array( 'known', 'noclasses' ) + wfMessage( 'mytalk' )->escaped() ); if ( $user->getNewtalk() ) { $tl .= ' *'; } - $s .= Linker::link( + $s .= Linker::linkKnown( $user->getUserPage(), - wfMsg( 'mypage' ), - array(), - array(), - array( 'known', 'noclasses' ) + wfMessage( 'mypage' )->escaped() ) . $sep . $tl . $sep . Linker::specialLink( 'Watchlist' ) . $sep . - Linker::link( + Linker::linkKnown( SpecialPage::getSafeTitleFor( 'Contributions', $user->getName() ), - wfMsg( 'mycontris' ), - array(), - array(), - array( 'known', 'noclasses' ) + wfMessage( 'mycontris' )->escaped() ) . $sep . Linker::specialLink( 'Preferences' ) . $sep . Linker::specialLink( 'Userlogout' ); } else { @@ -337,15 +339,12 @@ class CologneBlueTemplate extends LegacyTemplate { if( $wgSiteSupportPage ) { $s .= $sep . '<a href="' . htmlspecialchars( $wgSiteSupportPage ) . '" class="internal">' - . wfMsg( 'sitesupport' ) . '</a>'; + . wfMessage( 'sitesupport' )->escaped() . '</a>'; } - $s .= $sep . Linker::link( + $s .= $sep . Linker::linkKnown( SpecialPage::getTitleFor( 'Specialpages' ), - wfMsg( 'moredotdotdot' ), - array(), - array(), - array( 'known', 'noclasses' ) + wfMessage( 'moredotdotdot' )->text() ); $s .= $sep . "\n</div>\n"; @@ -357,7 +356,7 @@ class CologneBlueTemplate extends LegacyTemplate { * @return string */ function menuHead( $key ) { - $s = "\n<h6>" . wfMsg( $key ) . "</h6>"; + $s = "\n<h6>" . wfMessage( $key )->text() . "</h6>"; return $s; } @@ -377,12 +376,12 @@ class CologneBlueTemplate extends LegacyTemplate { $s .= "<input type='text' id=\"searchInput{$this->searchboxes}\" class=\"mw-searchInput\" name=\"search\" size=\"14\" value=\"" . htmlspecialchars( substr( $search, 0, 256 ) ) . "\" /><br />" - . "<input type='submit' id=\"searchGoButton{$this->searchboxes}\" class=\"searchButton\" name=\"go\" value=\"" . htmlspecialchars( wfMsg( 'searcharticle' ) ) . "\" />"; + . "<input type='submit' id=\"searchGoButton{$this->searchboxes}\" class=\"searchButton\" name=\"go\" value=\"" . wfMessage( 'searcharticle' )->escaped() . "\" />"; if( $wgUseTwoButtonsSearchForm ) { - $s .= "<input type='submit' id=\"mw-searchButton{$this->searchboxes}\" class=\"searchButton\" name=\"fulltext\" value=\"" . htmlspecialchars( wfMsg( 'search' ) ) . "\" />\n"; + $s .= "<input type='submit' id=\"mw-searchButton{$this->searchboxes}\" class=\"searchButton\" name=\"fulltext\" value=\"" . wfMessage( 'search' )->escaped() . "\" />\n"; } else { - $s .= '<div><a href="' . $action . '" rel="search">' . wfMsg( 'powersearch-legend' ) . "</a></div>\n"; + $s .= '<div><a href="' . $action . '" rel="search">' . wfMessage( 'powersearch-legend' )->escaped() . "</a></div>\n"; } $s .= '</form>'; diff --git a/skins/Modern.deps.php b/skins/Modern.deps.php deleted file mode 100644 index e76ab997..00000000 --- a/skins/Modern.deps.php +++ /dev/null @@ -1,12 +0,0 @@ -<?php -// This file exists to ensure that base classes are preloaded before -// Modern.php is compiled, working around a bug in the APC opcode -// cache on PHP 5, where cached code can break if the include order -// changed on a subsequent page view. -// see http://lists.wikimedia.org/pipermail/wikitech-l/2006-January/021311.html - -if ( ! defined( 'MEDIAWIKI' ) ) - die( 1 ); - -require_once( dirname( dirname( __FILE__ ) ) . '/includes/SkinTemplate.php' ); - diff --git a/skins/Modern.php b/skins/Modern.php index ebd574f4..4211bb84 100644 --- a/skins/Modern.php +++ b/skins/Modern.php @@ -2,6 +2,21 @@ /** * Modern skin, derived from monobook template. * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program 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 General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * http://www.gnu.org/copyleft/gpl.html + * * @todo document * @file * @ingroup Skins @@ -10,8 +25,6 @@ if( !defined( 'MEDIAWIKI' ) ) die( -1 ); -require( dirname(__FILE__) . '/MonoBook.php' ); - /** * Inherit main code from SkinTemplate, set the CSS and template filter. * @todo document @@ -64,7 +77,7 @@ class ModernTemplate extends MonoBookTemplate { <!-- contentholder does nothing by default, but it allows users to style the text inside the content area without affecting the meaning of 'em' in #mw_content, which is used for the margins --> - <div id="mw_contentholder"> + <div id="mw_contentholder" class="mw-body"> <div class='mw-topboxes'> <div id="mw-js-message" style="display:none;"<?php $this->html('userlangattributes')?>></div> <div class="mw-topbox" id="siteSub"><?php $this->msg('tagline') ?></div> @@ -79,7 +92,7 @@ class ModernTemplate extends MonoBookTemplate { <div id="contentSub"<?php $this->html('userlangattributes') ?>><?php $this->html('subtitle') ?></div> <?php if($this->data['undelete']) { ?><div id="contentSub2"><?php $this->html('undelete') ?></div><?php } ?> - <?php if($this->data['showjumplinks']) { ?><div id="jump-to-nav"><?php $this->msg('jumpto') ?> <a href="#mw_portlets"><?php $this->msg('jumptonavigation') ?></a>, <a href="#searchInput"><?php $this->msg('jumptosearch') ?></a></div><?php } ?> + <?php if($this->data['showjumplinks']) { ?><div id="jump-to-nav"><?php $this->msg('jumpto') ?> <a href="#mw_portlets"><?php $this->msg('jumptonavigation') ?></a><?php $this->msg( 'comma-separator' ) ?><a href="#searchInput"><?php $this->msg('jumptosearch') ?></a></div><?php } ?> <?php $this->html('bodytext') ?> <div class='mw_clear'></div> diff --git a/skins/MonoBook.deps.php b/skins/MonoBook.deps.php deleted file mode 100644 index dda24e0e..00000000 --- a/skins/MonoBook.deps.php +++ /dev/null @@ -1,12 +0,0 @@ -<?php -// This file exists to ensure that base classes are preloaded before -// MonoBook.php is compiled, working around a bug in the APC opcode -// cache on PHP 5, where cached code can break if the include order -// changed on a subsequent page view. -// see http://lists.wikimedia.org/pipermail/wikitech-l/2006-January/021311.html - -if ( ! defined( 'MEDIAWIKI' ) ) - die( 1 ); - -require_once( dirname( dirname( __FILE__ ) ) . '/includes/SkinTemplate.php'); - diff --git a/skins/MonoBook.php b/skins/MonoBook.php index f1fe5090..0bd7134b 100644 --- a/skins/MonoBook.php +++ b/skins/MonoBook.php @@ -1,10 +1,25 @@ <?php /** - * MonoBook nouveau + * MonoBook nouveau. * * Translated from gwicke's previous TAL template version to remove * dependency on PHPTAL. * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program 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 General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * http://www.gnu.org/copyleft/gpl.html + * * @todo document * @file * @ingroup Skins @@ -65,7 +80,7 @@ class MonoBookTemplate extends BaseTemplate { $this->html( 'headelement' ); ?><div id="globalWrapper"> -<div id="column-content"><div id="content"> +<div id="column-content"><div id="content" class="mw-body-primary"> <a id="top"></a> <?php if($this->data['sitenotice']) { ?><div id="siteNotice"><?php $this->html('sitenotice') ?></div><?php } ?> @@ -78,7 +93,7 @@ class MonoBookTemplate extends BaseTemplate { <?php } ?><?php if($this->data['newtalk'] ) { ?> <div class="usermessage"><?php $this->html('newtalk') ?></div> <?php } ?><?php if($this->data['showjumplinks']) { ?> - <div id="jump-to-nav" class="mw-jump"><?php $this->msg('jumpto') ?> <a href="#column-one"><?php $this->msg('jumptonavigation') ?></a>, <a href="#searchInput"><?php $this->msg('jumptosearch') ?></a></div> + <div id="jump-to-nav" class="mw-jump"><?php $this->msg('jumpto') ?> <a href="#column-one"><?php $this->msg('jumptonavigation') ?></a><?php $this->msg( 'comma-separator' ) ?><a href="#searchInput"><?php $this->msg('jumptosearch') ?></a></div> <?php } ?> <!-- start content --> <?php $this->html('bodytext') ?> @@ -158,6 +173,9 @@ echo $footerEnd; /*************************************************************************************************/ + /** + * @param $sidebar array + */ protected function renderPortals( $sidebar ) { if ( !isset( $sidebar['SEARCH'] ) ) $sidebar['SEARCH'] = true; if ( !isset( $sidebar['TOOLBOX'] ) ) $sidebar['TOOLBOX'] = true; @@ -265,6 +283,10 @@ echo $footerEnd; } /*************************************************************************************************/ + /** + * @param $bar string + * @param $cont array|string + */ function customBox( $bar, $cont ) { $portletAttribs = array( 'class' => 'generated-sidebar portlet', 'id' => Sanitizer::escapeId( "p-$bar" ) ); $tooltip = Linker::titleAttrib( "p-$bar" ); diff --git a/skins/MySkin.deps.php b/skins/MySkin.deps.php deleted file mode 100644 index b589cc52..00000000 --- a/skins/MySkin.deps.php +++ /dev/null @@ -1,13 +0,0 @@ -<?php -// This file exists to ensure that base classes are preloaded before -// MySkin.php is compiled, working around a bug in the APC opcode -// cache on PHP 5, where cached code can break if the include order -// changed on a subsequent page view. -// see http://lists.wikimedia.org/pipermail/wikitech-l/2006-January/021311.html - -if ( ! defined( 'MEDIAWIKI' ) ) - die( 1 ); - -require_once( dirname( dirname( __FILE__ ) ) . '/includes/SkinTemplate.php'); -require_once( dirname(__FILE__) . '/MonoBook.php' ); - diff --git a/skins/MySkin.php b/skins/MySkin.php index 8859a71a..fb49b88d 100644 --- a/skins/MySkin.php +++ b/skins/MySkin.php @@ -1,7 +1,22 @@ <?php /** * MySkin: Monobook without the CSS. The idea is that you - * customise it using user or site CSS + * customise it using user or site CSS. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program 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 General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * http://www.gnu.org/copyleft/gpl.html * * @file * @ingroup Skins diff --git a/skins/Nostalgia.php b/skins/Nostalgia.php index 21d3578d..c3f73e5b 100644 --- a/skins/Nostalgia.php +++ b/skins/Nostalgia.php @@ -2,6 +2,21 @@ /** * Nostalgia: A skin which looks like Wikipedia did in its first year (2001). * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program 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 General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * http://www.gnu.org/copyleft/gpl.html + * * @file * @ingroup Skins */ @@ -84,8 +99,8 @@ class NostalgiaTemplate extends LegacyTemplate { } else { /* show user page and user talk links */ $user = $this->getSkin()->getUser(); - $s .= $sep . Linker::link( $user->getUserPage(), wfMsgHtml( 'mypage' ) ); - $s .= $sep . Linker::link( $user->getTalkPage(), wfMsgHtml( 'mytalk' ) ); + $s .= $sep . Linker::link( $user->getUserPage(), wfMessage( 'mypage' )->escaped() ); + $s .= $sep . Linker::link( $user->getTalkPage(), wfMessage( 'mytalk' )->escaped() ); if ( $user->getNewtalk() ) { $s .= ' *'; } @@ -94,7 +109,7 @@ class NostalgiaTemplate extends LegacyTemplate { /* show my contributions link */ $s .= $sep . Linker::link( SpecialPage::getSafeTitleFor( 'Contributions', $this->data['username'] ), - wfMsgHtml( 'mycontris' ) ); + wfMessage( 'mycontris' )->escaped() ); /* show my preferences link */ $s .= $sep . Linker::specialLink( 'Preferences' ); /* show upload file link */ diff --git a/skins/Simple.deps.php b/skins/Simple.deps.php deleted file mode 100644 index 99fadc6d..00000000 --- a/skins/Simple.deps.php +++ /dev/null @@ -1,13 +0,0 @@ -<?php -// This file exists to ensure that base classes are preloaded before -// Simple.php is compiled, working around a bug in the APC opcode -// cache on PHP 5, where cached code can break if the include order -// changed on a subsequent page view. -// see http://lists.wikimedia.org/pipermail/wikitech-l/2006-January/021311.html - -if ( ! defined( 'MEDIAWIKI' ) ) - die( 1 ); - -require_once( dirname( dirname( __FILE__ ) ) . '/includes/SkinTemplate.php'); -require_once( dirname(__FILE__) . '/MonoBook.php' ); - diff --git a/skins/Simple.php b/skins/Simple.php index 54be9f7d..9a3ab946 100644 --- a/skins/Simple.php +++ b/skins/Simple.php @@ -3,6 +3,21 @@ * Simple: A lightweight skin with a simple white-background sidebar and no * top bar. * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program 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 General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * http://www.gnu.org/copyleft/gpl.html + * * @file * @ingroup Skins */ @@ -11,7 +26,7 @@ if( !defined( 'MEDIAWIKI' ) ) die( -1 ); /** */ -require_once( dirname(__FILE__) . '/MonoBook.php' ); +require_once( __DIR__ . '/MonoBook.php' ); /** * Inherit main code from SkinTemplate, set the CSS and template filter. @@ -36,13 +51,6 @@ class SkinSimple extends SkinTemplate { if ( $this->getUser()->getOption( 'underline' ) < 2 ) { $underline = "text-decoration: " . $this->getUser()->getOption( 'underline' ) ? 'underline !important' : 'none' . ";"; } - - /* Also inherits from resourceloader */ - if( !$this->getUser()->getOption( 'highlightbroken' ) ) { - $rules[] = "a.new, a.stub { color: inherit; text-decoration: inherit;}"; - $rules[] = "a.new:after { color: #CC2200; $underline;}"; - $rules[] = "a.stub:after { $underline; }"; - } $style = implode( "\n", $rules ); $out->addInlineStyle( $style, 'flip' ); diff --git a/skins/Standard.php b/skins/Standard.php index bd0c41a5..de116391 100644 --- a/skins/Standard.php +++ b/skins/Standard.php @@ -62,12 +62,12 @@ class StandardTemplate extends LegacyTemplate { $s = "\n</div><br style=\"clear:both\" />\n"; $s .= "\n<div id='footer'>"; - $s .= '<table border="0" cellspacing="0"><tr>'; + $s .= '<table cellspacing="0"><tr>'; wfProfileOut( __METHOD__ . '-1' ); wfProfileIn( __METHOD__ . '-2' ); $l = $this->getSkin()->getLanguage()->alignStart(); - $s .= "<td class='bottom' align='$l' valign='top'>"; + $s .= "<td class='bottom' style='text-align: $l; vertical-align: top;'>"; $s .= $this->bottomLinks(); $s .= "\n<br />" . $this->getSkin()->getLanguage()->pipeList( array( @@ -133,7 +133,7 @@ class StandardTemplate extends LegacyTemplate { $s.= Linker::specialLink( 'Watchlist' ) ; $s .= $sep . Linker::linkKnown( SpecialPage::getTitleFor( 'Contributions' ), - wfMsg( 'mycontris' ), + wfMessage( 'mycontris' )->escaped(), array(), array( 'target' => $this->data['username'] ) ); @@ -143,7 +143,7 @@ class StandardTemplate extends LegacyTemplate { } $s .= "\n<hr class='sep' />"; - $articleExists = $title->getArticleId(); + $articleExists = $title->getArticleID(); if ( $this->data['isarticle'] || $action == 'edit' || $action == 'history' || $wpPreview ) { if( $this->data['isarticle'] ) { $s .= '<strong>' . $this->editThisPage() . '</strong>'; @@ -158,34 +158,34 @@ class StandardTemplate extends LegacyTemplate { case NS_TEMPLATE_TALK: case NS_HELP_TALK: case NS_CATEGORY_TALK: - $text = wfMsg('viewtalkpage'); + $text = wfMessage('viewtalkpage'); break; case NS_MAIN: - $text = wfMsg( 'articlepage' ); + $text = wfMessage( 'articlepage' ); break; case NS_USER: - $text = wfMsg( 'userpage' ); + $text = wfMessage( 'userpage' ); break; case NS_PROJECT: - $text = wfMsg( 'projectpage' ); + $text = wfMessage( 'projectpage' ); break; case NS_FILE: - $text = wfMsg( 'imagepage' ); + $text = wfMessage( 'imagepage' ); break; case NS_MEDIAWIKI: - $text = wfMsg( 'mediawikipage' ); + $text = wfMessage( 'mediawikipage' ); break; case NS_TEMPLATE: - $text = wfMsg( 'templatepage' ); + $text = wfMessage( 'templatepage' ); break; case NS_HELP: - $text = wfMsg( 'viewhelppage' ); + $text = wfMessage( 'viewhelppage' ); break; case NS_CATEGORY: - $text = wfMsg( 'categorypage' ); + $text = wfMessage( 'categorypage' ); break; default: - $text = wfMsg( 'articlepage' ); + $text = wfMessage( 'articlepage' ); } $link = $title->getText(); @@ -194,11 +194,11 @@ class StandardTemplate extends LegacyTemplate { $link = $nstext . ':' . $link; } - $s .= Linker::link( Title::newFromText( $link ), $text ); + $s .= Linker::link( Title::newFromText( $link ), $text->escaped() ); } elseif( $title->getNamespace() != NS_SPECIAL ) { # we just throw in a "New page" text to tell the user that he's in edit mode, # and to avoid messing with the separator that is prepended to the next item - $s .= '<strong>' . wfMsg( 'newpage' ) . '</strong>'; + $s .= '<strong>' . wfMessage( 'newpage' )->escaped() . '</strong>'; } } @@ -206,7 +206,7 @@ class StandardTemplate extends LegacyTemplate { if( ( $title->isTalkPage() || $this->getSkin()->getOutput()->showNewSectionLink() ) && $action != 'edit' && !$wpPreview ) $s .= '<br />' . Linker::link( $title, - wfMsg( 'postcomment' ), + wfMessage( 'postcomment' )->escaped(), array(), array( 'action' => 'edit', @@ -268,12 +268,11 @@ class StandardTemplate extends LegacyTemplate { global $wgSiteSupportPage; if( $wgSiteSupportPage ) { $s .= "\n<br /><a href=\"" . htmlspecialchars( $wgSiteSupportPage ) . - '" class="internal">' . wfMsg( 'sitesupport' ) . '</a>'; + '" class="internal">' . wfMessage( 'sitesupport' )->escaped() . '</a>'; } $s .= "\n<br /></div>\n"; wfProfileOut( __METHOD__ ); return $s; } - } diff --git a/skins/Vector.deps.php b/skins/Vector.deps.php deleted file mode 100644 index 7a8c2881..00000000 --- a/skins/Vector.deps.php +++ /dev/null @@ -1,11 +0,0 @@ -<?php -// This file exists to ensure that base classes are preloaded before -// MonoBook.php is compiled, working around a bug in the APC opcode -// cache on PHP 5, where cached code can break if the include order -// changed on a subsequent page view. -// see http://lists.wikimedia.org/pipermail/wikitech-l/2006-January/021311.html - -if ( ! defined( 'MEDIAWIKI' ) ) - die( 1 ); - -require_once( dirname( dirname( __FILE__ ) ) . '/includes/SkinTemplate.php'); diff --git a/skins/Vector.php b/skins/Vector.php index 4b6433d6..6045ed6e 100644 --- a/skins/Vector.php +++ b/skins/Vector.php @@ -3,6 +3,21 @@ * Vector - Modern version of MonoBook with fresh look and many usability * improvements. * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program 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 General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * http://www.gnu.org/copyleft/gpl.html + * * @todo document * @file * @ingroup Skins @@ -18,6 +33,8 @@ if( !defined( 'MEDIAWIKI' ) ) { */ class SkinVector extends SkinTemplate { + protected static $bodyClasses = array( 'vector-animateLayout' ); + var $skinname = 'vector', $stylename = 'vector', $template = 'VectorTemplate', $useHeadElement = true; @@ -52,6 +69,20 @@ class SkinVector extends SkinTemplate { parent::setupSkinUserCss( $out ); $out->addModuleStyles( 'skins.vector' ); } + + /** + * Adds classes to the body element. + * + * @param $out OutputPage object + * @param &$bodyAttrs Array of attributes that will be set on the body element + */ + function addToBodyAttributes( $out, &$bodyAttrs ) { + if ( isset( $bodyAttrs['class'] ) && strlen( $bodyAttrs['class'] ) > 0 ) { + $bodyAttrs['class'] .= ' ' . implode( ' ', static::$bodyClasses ); + } else { + $bodyAttrs['class'] = implode( ' ', static::$bodyClasses ); + } + } } /** @@ -72,7 +103,7 @@ class VectorTemplate extends BaseTemplate { $nav = $this->data['content_navigation']; if ( $wgVectorUseIconWatch ) { - $mode = $this->getSkin()->getTitle()->userIsWatching() ? 'unwatch' : 'watch'; + $mode = $this->getSkin()->getUser()->isWatched( $this->getSkin()->getRelevantTitle() ) ? 'unwatch' : 'watch'; if ( isset( $nav['actions'][$mode] ) ) { $nav['views'][$mode] = $nav['actions'][$mode]; $nav['views'][$mode]['class'] = rtrim( 'icon ' . $nav['views'][$mode]['class'], ' ' ); @@ -134,9 +165,7 @@ class VectorTemplate extends BaseTemplate { <!-- /sitenotice --> <?php endif; ?> <!-- firstHeading --> - <h1 id="firstHeading" class="firstHeading"> - <span dir="auto"><?php $this->html( 'title' ) ?></span> - </h1> + <h1 id="firstHeading" class="firstHeading"><span dir="auto"><?php $this->html( 'title' ) ?></span></h1> <!-- /firstHeading --> <!-- bodyContent --> <div id="bodyContent"> @@ -161,7 +190,8 @@ class VectorTemplate extends BaseTemplate { <?php if ( $this->data['showjumplinks'] ): ?> <!-- jumpto --> <div id="jump-to-nav" class="mw-jump"> - <?php $this->msg( 'jumpto' ) ?> <a href="#mw-head"><?php $this->msg( 'jumptonavigation' ) ?></a>, + <?php $this->msg( 'jumpto' ) ?> + <a href="#mw-head"><?php $this->msg( 'jumptonavigation' ) ?></a><?php $this->msg( 'comma-separator' ) ?> <a href="#p-search"><?php $this->msg( 'jumptosearch' ) ?></a> </div> <!-- /jumpto --> @@ -250,7 +280,7 @@ class VectorTemplate extends BaseTemplate { * * @param $portals array */ - private function renderPortals( $portals ) { + protected function renderPortals( $portals ) { // Force the rendering of the following portals if ( !isset( $portals['SEARCH'] ) ) { $portals['SEARCH'] = true; @@ -286,7 +316,13 @@ class VectorTemplate extends BaseTemplate { } } - private function renderPortal( $name, $content, $msg = null, $hook = null ) { + /** + * @param $name string + * @param $content array + * @param $msg null|string + * @param $hook null|string|array + */ + protected function renderPortal( $name, $content, $msg = null, $hook = null ) { if ( $msg === null ) { $msg = $name; } @@ -324,7 +360,7 @@ class VectorTemplate extends BaseTemplate { * * @param $elements array */ - private function renderNavigation( $elements ) { + protected function renderNavigation( $elements ) { global $wgVectorUseSimpleSearch; // If only one element was given, wrap it in an array, allowing more @@ -363,9 +399,9 @@ class VectorTemplate extends BaseTemplate { </h4> <h5><span><?php $this->msg( 'variants' ) ?></span><a href="#"></a></h5> <div class="menu"> - <ul<?php $this->html( 'userlangattributes' ) ?>> + <ul> <?php foreach ( $this->data['variant_urls'] as $link ): ?> - <li<?php echo $link['attributes'] ?>><a href="<?php echo htmlspecialchars( $link['href'] ) ?>" <?php echo $link['key'] ?>><?php echo htmlspecialchars( $link['text'] ) ?></a></li> + <li<?php echo $link['attributes'] ?>><a href="<?php echo htmlspecialchars( $link['href'] ) ?>" lang="<?php echo htmlspecialchars( $link['lang'] ) ?>" hreflang="<?php echo htmlspecialchars( $link['hreflang'] ) ?>" <?php echo $link['key'] ?>><?php echo htmlspecialchars( $link['text'] ) ?></a></li> <?php endforeach; ?> </ul> </div> @@ -424,11 +460,11 @@ class VectorTemplate extends BaseTemplate { <?php if ( $wgVectorUseSimpleSearch && $this->getSkin()->getUser()->getOption( 'vector-simplesearch' ) ): ?> <div id="simpleSearch"> <?php if ( $this->data['rtl'] ): ?> - <?php echo $this->makeSearchButton( 'image', array( 'id' => 'searchButton', 'src' => $this->getSkin()->getSkinStylePath( 'images/search-rtl.png' ) ) ); ?> + <?php echo $this->makeSearchButton( 'image', array( 'id' => 'searchButton', 'src' => $this->getSkin()->getSkinStylePath( 'images/search-rtl.png' ), 'width' => '12', 'height' => '13' ) ); ?> <?php endif; ?> <?php echo $this->makeSearchInput( array( 'id' => 'searchInput', 'type' => 'text' ) ); ?> <?php if ( !$this->data['rtl'] ): ?> - <?php echo $this->makeSearchButton( 'image', array( 'id' => 'searchButton', 'src' => $this->getSkin()->getSkinStylePath( 'images/search-ltr.png' ) ) ); ?> + <?php echo $this->makeSearchButton( 'image', array( 'id' => 'searchButton', 'src' => $this->getSkin()->getSkinStylePath( 'images/search-ltr.png' ), 'width' => '12', 'height' => '13' ) ); ?> <?php endif; ?> <?php else: ?> <div> diff --git a/skins/archlinux/audio.png b/skins/archlinux/audio.png Binary files differindex c22c05c3..68c8768c 100644 --- a/skins/archlinux/audio.png +++ b/skins/archlinux/audio.png diff --git a/skins/archlinux/document.png b/skins/archlinux/document.png Binary files differindex b7648b38..ee46a50d 100644 --- a/skins/archlinux/document.png +++ b/skins/archlinux/document.png diff --git a/skins/archlinux/external-rtl.png b/skins/archlinux/external-rtl.png Binary files differindex 9901d8f1..7d5ee375 100644 --- a/skins/archlinux/external-rtl.png +++ b/skins/archlinux/external-rtl.png diff --git a/skins/archlinux/main.css b/skins/archlinux/main.css index 9a8eac1c..5866d97d 100644 --- a/skins/archlinux/main.css +++ b/skins/archlinux/main.css @@ -83,7 +83,7 @@ input.historysubmit { margin-left: 1.6em; } -pre { +pre, .mw-code { line-height: 1.1em; } @@ -759,10 +759,6 @@ div#userloginForm .captcha { margin: 5px; } -.printfooter { - display: none; -} - div.patrollink { clear: both; } @@ -844,7 +840,7 @@ div#searchTargetHide { } #powersearch p { - margin-top:0px; + margin-top: 0; } div.multipageimagenavbox { @@ -917,3 +913,10 @@ div.mw-lag-warn-high { .tipsy { font-size: 127%; } + +/* mediawiki.notification */ +.skin-monobook .mw-notification { + -webkit-box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.125); + -moz-box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.125); + box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.125); +} diff --git a/skins/archlinux/news_icon.png b/skins/archlinux/news_icon.png Binary files differindex b8f5abb5..4d3cb476 100644 --- a/skins/archlinux/news_icon.png +++ b/skins/archlinux/news_icon.png diff --git a/skins/archlinux/video.png b/skins/archlinux/video.png Binary files differindex fadc4c9b..d86dbe01 100644 --- a/skins/archlinux/video.png +++ b/skins/archlinux/video.png diff --git a/skins/archlinux/wiki-indexed.png b/skins/archlinux/wiki-indexed.png Binary files differindex 4b80e3ae..0ec584a3 100644 --- a/skins/archlinux/wiki-indexed.png +++ b/skins/archlinux/wiki-indexed.png diff --git a/skins/archlinux/wiki.png b/skins/archlinux/wiki.png Binary files differindex 70eee796..8c421183 100644 --- a/skins/archlinux/wiki.png +++ b/skins/archlinux/wiki.png diff --git a/skins/chick/main.css b/skins/chick/main.css index 3787d820..5e2a2e7a 100644 --- a/skins/chick/main.css +++ b/skins/chick/main.css @@ -151,7 +151,7 @@ q { font-style: italic; } code { background-color: #f9f9f9; } -pre { +pre, .mw-code { padding: 1em; border: 1px dashed #2f6fab; color: black; @@ -354,10 +354,6 @@ div.gallerybox { .templatesUsed { margin-top: 1.5em; } -.printfooter { - display: none; -} - #footer { background-color: white; border-top: 1px solid #fabd23; diff --git a/skins/cologneblue/screen.css b/skins/cologneblue/screen.css index cf8ca12e..57b5410e 100644 --- a/skins/cologneblue/screen.css +++ b/skins/cologneblue/screen.css @@ -52,7 +52,7 @@ body { margin-bottom: 0; } -p, pre, td, th, li, dd, dt { +p, pre, .mw-code, td, th, li, dd, dt { line-height: 12pt; } diff --git a/skins/common/commonContent.css b/skins/common/commonContent.css index 61799187..0fe8489e 100644 --- a/skins/common/commonContent.css +++ b/skins/common/commonContent.css @@ -86,13 +86,11 @@ html .thumbimage { } html .thumbcaption { border: none; - text-align: left; line-height: 1.4em; padding: 3px !important; font-size: 94%; } div.magnify { - float: right; border: none !important; background: none !important; } diff --git a/skins/common/commonElements.css b/skins/common/commonElements.css index 5590bfa1..02fd29fe 100644 --- a/skins/common/commonElements.css +++ b/skins/common/commonElements.css @@ -1,6 +1,7 @@ -/* -** MediaWiki style sheet for general styles on basic content elements -*/ +/** + * MediaWiki style sheet for general styles on basic content elements + * This style sheet is used by the monobook and vector skins + */ /* Links */ a { @@ -78,7 +79,6 @@ h6 { padding-top: .5em; padding-bottom: .17em; border-bottom: 1px solid #aaa; - width: auto; } h1 { font-size: 188%; @@ -183,7 +183,7 @@ blockquote { font-family: Times, "Times New Roman", serif; font-style: italic; }*/ -pre, code, tt, kbd, samp { +pre, code, tt, kbd, samp, .mw-code { /* * Some browsers will render the monospace text too small, namely Firefox, Chrome and Safari. * Specifying any valid, second value will trigger correct behaviour without forcing a different font. @@ -193,7 +193,7 @@ pre, code, tt, kbd, samp { code { background-color: #f9f9f9; } -pre { +pre, .mw-code { padding: 1em; border: 1px dashed #2f6fab; color: black; diff --git a/skins/common/commonPrint.css b/skins/common/commonPrint.css index 4efabee3..48dd943f 100644 --- a/skins/common/commonPrint.css +++ b/skins/common/commonPrint.css @@ -158,7 +158,7 @@ p { line-height: 1.2em; } -pre { +pre, .mw-code { border: 1pt dashed black; white-space: pre; font-size: 8pt; @@ -246,7 +246,6 @@ span.texhtml { /* Galleries (see shared.css for more info) */ li.gallerybox { vertical-align: top; - border: solid 2px white; display: -moz-inline-box; display: inline-block; } @@ -320,7 +319,7 @@ td.diff-context { */ table.wikitable, table.mw_metadata { - margin: 1em 1em 1em 0; + margin: 1em 0; border: 1px #aaa solid; background: white; border-collapse: collapse; diff --git a/skins/common/config.js b/skins/common/config.js index 23f7302c..b1e28aba 100644 --- a/skins/common/config.js +++ b/skins/common/config.js @@ -1,6 +1,17 @@ -(function( $ ) { - $( document ).ready( function() { +( function ( $ ) { + $( document ).ready( function () { + var $label, labelText; + function syncText() { + var value = $(this).val() + .replace( /[\[\]\{\}|#<>%+? ]/g, '_' ) + .replace( /&/, '&' ) + .replace( /__+/g, '_' ) + .replace( /^_+/, '' ) + .replace( /_+$/, '' ); + value = value.substr( 0, 1 ).toUpperCase() + value.substr( 1 ); + $label.text( labelText.replace( '$1', value ) ); + } // Set up the help system $( '.mw-help-field-data' ) @@ -8,7 +19,7 @@ .closest( '.mw-help-field-container' ) .find( '.mw-help-field-hint' ) .show() - .click( function() { + .click( function () { $(this) .closest( '.mw-help-field-container' ) .find( '.mw-help-field-data' ) @@ -17,22 +28,26 @@ // Show/hide code for DB-specific options // FIXME: Do we want slow, fast, or even non-animated (instantaneous) showing/hiding here? - $( '.dbRadio' ).each( function() { $( '#' + $(this).attr( 'rel' ) ).hide(); } ); - $( '#' + $( '.dbRadio:checked' ).attr( 'rel' ) ).show(); - $( '.dbRadio' ).click( function() { - var $checked = $( '.dbRadio:checked' ); - var $wrapper = $( '#' + $checked.attr( 'rel' ) ); - if ( !$wrapper.is( ':visible' ) ) { + $( '.dbRadio' ).each( function () { + $( document.getElementById( $(this).attr( 'rel' ) ) ).hide(); + } ); + $( document.getElementById( $( '.dbRadio:checked' ).attr( 'rel' ) ) ).show(); + $( '.dbRadio' ).click( function () { + var $checked = $( '.dbRadio:checked' ), + $wrapper = $( document.getElementById( $checked.attr( 'rel' ) ) ); + if ( $wrapper.is( ':hidden' ) ) { $( '.dbWrapper' ).hide( 'slow' ); $wrapper.show( 'slow' ); } } ); // Scroll to the bottom of upgrade log - $( '#config-live-log' ).find( '> textarea' ).each( function() { this.scrollTop = this.scrollHeight; } ); + $( '#config-live-log' ).children( 'textarea' ).each( function () { + this.scrollTop = this.scrollHeight; + } ); // Show/hide Creative Commons thingy - $( '.licenseRadio' ).click( function() { + $( '.licenseRadio' ).click( function () { var $wrapper = $( '#config-cc-wrapper' ); if ( $( '#config__LicenseCode_cc-choose' ).is( ':checked' ) ) { $wrapper.show( 'slow' ); @@ -42,7 +57,7 @@ } ); // Show/hide random stuff (email, upload) - $( '.showHideRadio' ).click( function() { + $( '.showHideRadio' ).click( function () { var $wrapper = $( '#' + $(this).attr( 'rel' ) ); if ( $(this).is( ':checked' ) ) { $wrapper.show( 'slow' ); @@ -50,7 +65,7 @@ $wrapper.hide( 'slow' ); } } ); - $( '.hideShowRadio' ).click( function() { + $( '.hideShowRadio' ).click( function () { var $wrapper = $( '#' + $(this).attr( 'rel' ) ); if ( $(this).is( ':checked' ) ) { $wrapper.hide( 'slow' ); @@ -64,9 +79,10 @@ $( '.enabledByOther' ).closest( '.config-block' ).hide(); // Enable/disable "other" textboxes - $( '.enableForOther' ).click( function() { - var $textbox = $( '#' + $(this).attr( 'rel' ) ); - if ( $(this).val() == 'other' ) { // FIXME: Ugh, this is ugly + $( '.enableForOther' ).click( function () { + var $textbox = $( document.getElementById( $(this).attr( 'rel' ) ) ); + // FIXME: Ugh, this is ugly + if ( $(this).val() === 'other' ) { $textbox.removeProp( 'readonly' ).closest( '.config-block' ).slideDown( 'fast' ); } else { $textbox.prop( 'readonly', true ).closest( '.config-block' ).slideUp( 'fast' ); @@ -77,26 +93,16 @@ $label = $( 'label[for=config__NamespaceType_site-name]' ); labelText = $label.text(); $label.text( labelText.replace( '$1', '' ) ); - $( '#config_wgSitename' ).bind( 'keyup change', syncText ).each( syncText ); - function syncText() { - var value = $(this).val() - .replace( /[\[\]\{\}|#<>%+? ]/g, '_' ) - .replace( /&/, '&' ) - .replace( /__+/g, '_' ) - .replace( /^_+/, '' ) - .replace( /_+$/, '' ); - value = value.substr( 0, 1 ).toUpperCase() + value.substr( 1 ); - $label.text( labelText.replace( '$1', value ) ); - } + $( '#config_wgSitename' ).on( 'keyup change', syncText ).each( syncText ); // Show/Hide memcached servers when needed - $("input[name$='config_wgMainCacheType']").change( function() { + $( 'input[name$="config_wgMainCacheType"]' ).change( function () { var $memc = $( "#config-memcachewrapper" ); - if( $( "input[name$='config_wgMainCacheType']:checked" ).val() == 'memcached' ) { + if( $( 'input[name$="config_wgMainCacheType"]:checked' ).val() === 'memcached' ) { $memc.show( 'slow' ); } else { $memc.hide( 'slow' ); } } ); } ); -})(jQuery); +}( jQuery ) ); diff --git a/skins/common/images/Arr_.png b/skins/common/images/Arr_.png Binary files differindex 8d8d5d9c..bc67a4b6 100644 --- a/skins/common/images/Arr_.png +++ b/skins/common/images/Arr_.png diff --git a/skins/common/images/Arr_l.png b/skins/common/images/Arr_l.png Binary files differindex f49e20a2..2246254f 100644 --- a/skins/common/images/Arr_l.png +++ b/skins/common/images/Arr_l.png diff --git a/skins/common/images/Arr_u.png b/skins/common/images/Arr_u.png Binary files differindex 957f8612..6132836b 100644 --- a/skins/common/images/Arr_u.png +++ b/skins/common/images/Arr_u.png diff --git a/skins/common/images/add.png b/skins/common/images/add.png Binary files differindex f82f45db..3497423c 100644 --- a/skins/common/images/add.png +++ b/skins/common/images/add.png diff --git a/skins/common/images/ajax-loader.gif b/skins/common/images/ajax-loader.gif Binary files differindex 3288d103..72203fdd 100644 --- a/skins/common/images/ajax-loader.gif +++ 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 differindex 619cd21e..e524f6cb 100644 --- a/skins/common/images/ar/button_bold.png +++ 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 differindex f1480a66..04fb8f11 100644 --- a/skins/common/images/ar/button_headline.png +++ 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 differindex 21245978..6ec73e9e 100644 --- a/skins/common/images/ar/button_italic.png +++ 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 differindex a68144f3..c9c63f6c 100644 --- a/skins/common/images/ar/button_link.png +++ 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 differindex 88ab9a13..12b986b4 100644 --- a/skins/common/images/ar/button_nowiki.png +++ 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 differindex dd55a9c0..78a493e6 100644 --- a/skins/common/images/arrow_disabled_first_25.png +++ 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 differindex fd24cd10..2a64fd03 100644 --- a/skins/common/images/arrow_disabled_last_25.png +++ 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 differindex a450a5ee..8f979aab 100644 --- a/skins/common/images/arrow_disabled_left_25.png +++ 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 differindex d110ad8f..11022f62 100644 --- a/skins/common/images/arrow_disabled_right_25.png +++ 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 differindex ec47aa9a..52b32a5a 100644 --- a/skins/common/images/arrow_first_25.png +++ 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 differindex 15e18f95..caf50331 100644 --- a/skins/common/images/arrow_last_25.png +++ 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 differindex ecd33102..f363bf66 100644 --- a/skins/common/images/arrow_left_25.png +++ 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 differindex 64a3c4ee..9e1b550c 100644 --- a/skins/common/images/arrow_right_25.png +++ 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 differindex d02aeeeb..5c10cfe2 100644 --- a/skins/common/images/be-tarask/button_bold.png +++ 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 differindex 99972127..72209d74 100644 --- a/skins/common/images/be-tarask/button_italic.png +++ 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 differindex b87f245b..09c86fb1 100644 --- a/skins/common/images/be-tarask/button_link.png +++ b/skins/common/images/be-tarask/button_link.png diff --git a/skins/common/images/button_bold.png b/skins/common/images/button_bold.png Binary files differindex eeb91c30..75c3f109 100644 --- a/skins/common/images/button_bold.png +++ 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 differindex fdc77acd..458943c1 100644 --- a/skins/common/images/button_extlink.png +++ 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 differindex 29966703..9cf751d9 100644 --- a/skins/common/images/button_headline.png +++ 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 differindex 55f6001a..19e4ad45 100644 --- a/skins/common/images/button_hr.png +++ 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 differindex a3f1ef60..69192965 100644 --- a/skins/common/images/button_image.png +++ 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 differindex 7074050c..527fbd14 100644 --- a/skins/common/images/button_italic.png +++ 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 differindex 486c1e87..eb5634b9 100644 --- a/skins/common/images/button_link.png +++ 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 differindex 00d29766..4194ec18 100644 --- a/skins/common/images/button_media.png +++ 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 differindex dcad330d..c647de2b 100644 --- a/skins/common/images/button_nowiki.png +++ 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 differindex fa2af657..ff7348a9 100644 --- a/skins/common/images/button_sig.png +++ 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 differindex 576874ce..53b6f92f 100644 --- a/skins/common/images/button_template.png +++ 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 differindex 18eb1773..9d3fe5f8 100644 --- a/skins/common/images/cc-0.png +++ 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 differindex d15370de..0d24a713 100644 --- a/skins/common/images/cc-by-nc-sa.png +++ 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 differindex ee07a661..518fb647 100644 --- a/skins/common/images/cc-by-sa.png +++ 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 differindex 2658ee4d..9cca2f92 100644 --- a/skins/common/images/cc-by.png +++ b/skins/common/images/cc-by.png diff --git a/skins/common/images/closewindow.png b/skins/common/images/closewindow.png Binary files differindex 99ae141f..990702e2 100644 --- a/skins/common/images/closewindow.png +++ b/skins/common/images/closewindow.png diff --git a/skins/common/images/closewindow19x19.png b/skins/common/images/closewindow19x19.png Binary files differindex 762fd2a2..c96d9ffb 100644 --- a/skins/common/images/closewindow19x19.png +++ b/skins/common/images/closewindow19x19.png diff --git a/skins/common/images/critical-32.png b/skins/common/images/critical-32.png Binary files differindex 0b238c22..dce5667a 100644 --- a/skins/common/images/critical-32.png +++ b/skins/common/images/critical-32.png diff --git a/skins/common/images/cyrl/button_bold.png b/skins/common/images/cyrl/button_bold.png Binary files differindex 1c932f85..eae30d98 100644 --- a/skins/common/images/cyrl/button_bold.png +++ 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 differindex 46e6737a..b958d220 100644 --- a/skins/common/images/cyrl/button_italic.png +++ 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 differindex aa28e85a..12ad3731 100644 --- a/skins/common/images/cyrl/button_link.png +++ 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 differindex 3ce6f38e..367d5bc1 100644 --- a/skins/common/images/de/button_bold.png +++ 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 differindex af7b6d27..fdd8c9f9 100644 --- a/skins/common/images/de/button_italic.png +++ b/skins/common/images/de/button_italic.png diff --git a/skins/common/images/download-32.png b/skins/common/images/download-32.png Binary files differindex c571ea30..e5b8318e 100644 --- a/skins/common/images/download-32.png +++ 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 differindex 25fca045..c54d094c 100644 --- a/skins/common/images/fa/button_bold.png +++ 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 differindex 831a4bef..9890d155 100644 --- a/skins/common/images/fa/button_headline.png +++ 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 differindex 273ab247..33f91ed6 100644 --- a/skins/common/images/fa/button_italic.png +++ 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 differindex 345271aa..76b939e6 100644 --- a/skins/common/images/fa/button_link.png +++ 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 differindex 88ab9a13..12b986b4 100644 --- a/skins/common/images/fa/button_nowiki.png +++ b/skins/common/images/fa/button_nowiki.png diff --git a/skins/common/images/gnu-fdl.png b/skins/common/images/gnu-fdl.png Binary files differindex b599c2fa..3feaf57f 100644 --- a/skins/common/images/gnu-fdl.png +++ b/skins/common/images/gnu-fdl.png diff --git a/skins/common/images/icons/fileicon-c.png b/skins/common/images/icons/fileicon-c.png Binary files differindex fdd06989..0d603b70 100644 --- a/skins/common/images/icons/fileicon-c.png +++ 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 differindex d11d827e..123688f0 100644 --- a/skins/common/images/icons/fileicon-cpp.png +++ 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 differindex b52a4eba..87ca3fab 100644 --- a/skins/common/images/icons/fileicon-deb.png +++ 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 differindex b93b3f20..1da22761 100644 --- a/skins/common/images/icons/fileicon-djvu.png +++ b/skins/common/images/icons/fileicon-djvu.png diff --git a/skins/common/images/icons/fileicon-dvi.png b/skins/common/images/icons/fileicon-dvi.png Binary files differindex ab6a51f2..f37878d8 100644 --- a/skins/common/images/icons/fileicon-dvi.png +++ 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 differindex cc1aae51..dc020eb8 100644 --- a/skins/common/images/icons/fileicon-exe.png +++ 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 differindex 73a547e5..339bf025 100644 --- a/skins/common/images/icons/fileicon-h.png +++ 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 differindex 09e31f1a..f28f8a26 100644 --- a/skins/common/images/icons/fileicon-html.png +++ 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 differindex 2cddf489..c73d2294 100644 --- a/skins/common/images/icons/fileicon-iso.png +++ 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 differindex c26b3f2c..a1b4f225 100644 --- a/skins/common/images/icons/fileicon-java.png +++ 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 differindex 4143e8bb..ce2bebb2 100644 --- a/skins/common/images/icons/fileicon-mid.png +++ 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 differindex 37e479aa..952de1f2 100644 --- a/skins/common/images/icons/fileicon-mov.png +++ 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 differindex 872a6548..f3523d96 100644 --- a/skins/common/images/icons/fileicon-o.png +++ 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 differindex 2c935e2a..ef4d8016 100644 --- a/skins/common/images/icons/fileicon-ogg.png +++ b/skins/common/images/icons/fileicon-ogg.png diff --git a/skins/common/images/icons/fileicon-pdf.png b/skins/common/images/icons/fileicon-pdf.png Binary files differindex a19b16f3..8c8da92b 100644 --- a/skins/common/images/icons/fileicon-pdf.png +++ 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 differindex ec1145be..e8728331 100644 --- a/skins/common/images/icons/fileicon-ps.png +++ b/skins/common/images/icons/fileicon-ps.png diff --git a/skins/common/images/icons/fileicon-rm.png b/skins/common/images/icons/fileicon-rm.png Binary files differindex b803e055..81dbe0b7 100644 --- a/skins/common/images/icons/fileicon-rm.png +++ 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 differindex e1ff985f..1903aacc 100644 --- a/skins/common/images/icons/fileicon-rpm.png +++ 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 differindex 23b675a2..b782113a 100644 --- a/skins/common/images/icons/fileicon-svg.png +++ 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 differindex 7c7a910b..e5fd1b74 100644 --- a/skins/common/images/icons/fileicon-tar.png +++ 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 differindex 6f782647..a4372841 100644 --- a/skins/common/images/icons/fileicon-tex.png +++ 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 differindex f5dc07a1..1ed4e740 100644 --- a/skins/common/images/icons/fileicon-ttf.png +++ 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 differindex 1b611016..9e988e71 100644 --- a/skins/common/images/icons/fileicon-txt.png +++ 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 differindex 9d8e3222..59696a38 100644 --- a/skins/common/images/icons/fileicon.png +++ 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 differindex 70d7f20a..ab09e1d5 100644 --- a/skins/common/images/info-32.png +++ b/skins/common/images/info-32.png diff --git a/skins/common/images/ksh/button_S_italic.png b/skins/common/images/ksh/button_S_italic.png Binary files differindex 6ef742a7..15496c08 100644 --- a/skins/common/images/ksh/button_S_italic.png +++ b/skins/common/images/ksh/button_S_italic.png diff --git a/skins/common/images/magnify-clip-rtl.png b/skins/common/images/magnify-clip-rtl.png Binary files differindex 8398a82c..cfddc279 100644 --- a/skins/common/images/magnify-clip-rtl.png +++ b/skins/common/images/magnify-clip-rtl.png diff --git a/skins/common/images/mediawiki.png b/skins/common/images/mediawiki.png Binary files differindex 915f847d..8c421183 100644 --- a/skins/common/images/mediawiki.png +++ b/skins/common/images/mediawiki.png diff --git a/skins/common/images/nextredirectltr.png b/skins/common/images/nextredirectltr.png Binary files differindex 7d60cdcf..cd657c33 100644 --- a/skins/common/images/nextredirectltr.png +++ b/skins/common/images/nextredirectltr.png diff --git a/skins/common/images/nextredirectrtl.png b/skins/common/images/nextredirectrtl.png Binary files differindex 3d5b3959..b788f334 100644 --- a/skins/common/images/nextredirectrtl.png +++ 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 differindex 835e860b..30e1d2ea 100644 --- a/skins/common/images/poweredby_mediawiki_88x31.png +++ 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 differindex 296e66c8..ebf01072 100644 --- a/skins/common/images/public-domain.png +++ b/skins/common/images/public-domain.png diff --git a/skins/common/images/redirectltr.png b/skins/common/images/redirectltr.png Binary files differindex 0c731b6c..695f2a13 100644 --- a/skins/common/images/redirectltr.png +++ b/skins/common/images/redirectltr.png diff --git a/skins/common/images/redirectrtl.png b/skins/common/images/redirectrtl.png Binary files differindex ad0a12d1..c954a2ad 100644 --- a/skins/common/images/redirectrtl.png +++ b/skins/common/images/redirectrtl.png diff --git a/skins/common/images/remove.png b/skins/common/images/remove.png Binary files differindex ba2c147d..cd03d6da 100644 --- a/skins/common/images/remove.png +++ b/skins/common/images/remove.png diff --git a/skins/common/images/spinner.gif b/skins/common/images/spinner.gif Binary files differindex 37d3a43d..6146be4e 100644 --- a/skins/common/images/spinner.gif +++ b/skins/common/images/spinner.gif diff --git a/skins/common/images/tooltip_icon.png b/skins/common/images/tooltip_icon.png Binary files differindex 17bc2e14..ba5718ab 100644 --- a/skins/common/images/tooltip_icon.png +++ 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 differindex 6267cbc9..b14a8315 100644 --- a/skins/common/images/warning-32.png +++ b/skins/common/images/warning-32.png diff --git a/skins/common/images/wiki.png b/skins/common/images/wiki.png Binary files differindex 4ca6efd6..48595b00 100644 --- a/skins/common/images/wiki.png +++ b/skins/common/images/wiki.png diff --git a/skins/common/mwsuggest.js b/skins/common/mwsuggest.js deleted file mode 100644 index dac59546..00000000 --- a/skins/common/mwsuggest.js +++ /dev/null @@ -1,1063 +0,0 @@ -/* - * OpenSearch ajax suggestion engine for MediaWiki - * - * uses core MediaWiki open search support to fetch suggestions - * and show them below search boxes and other inputs - * - * by Robert Stojnic (April 2008) - */ - -// Make sure wgMWSuggestTemplate is defined -if ( !mw.config.exists( 'wgMWSuggestTemplate' ) ) { - mw.config.set( 'wgMWSuggestTemplate', mw.config.get( 'wgServer' ) + mw.config.get( 'wgScriptPath' ) - + "/api.php?action=opensearch\x26search={searchTerms}\x26namespace={namespaces}\x26suggest" ); -} - -// search_box_id -> Results object -window.os_map = {}; -// cached data, url -> json_text -window.os_cache = {}; -// global variables for suggest_keypress -window.os_cur_keypressed = 0; -window.os_keypressed_count = 0; -// type: Timer -window.os_timer = null; -// tie mousedown/up events -window.os_mouse_pressed = false; -window.os_mouse_num = -1; -// if true, the last change was made by mouse (and not keyboard) -window.os_mouse_moved = false; -// delay between keypress and suggestion (in ms) -window.os_search_timeout = 250; -// these pairs of inputs/forms will be autoloaded at startup -window.os_autoload_inputs = ['searchInput', 'searchInput2', 'powerSearchText', 'searchText']; -window.os_autoload_forms = ['searchform', 'searchform2', 'powersearch', 'search']; -// if we stopped the service -window.os_is_stopped = false; -// max lines to show in suggest table -window.os_max_lines_per_suggest = 7; -// number of steps to animate expansion/contraction of container width -window.os_animation_steps = 6; -// num of pixels of smallest step -window.os_animation_min_step = 2; -// delay between steps (in ms) -window.os_animation_delay = 30; -// max width of container in percent of normal size (1 == 100%) -window.os_container_max_width = 2; -// currently active animation timer -window.os_animation_timer = null; -// whether MWSuggest is enabled. Set to false when os_MWSuggestDisable() is called -window.os_enabled = true; - -/** - * <datalist> is a new HTML5 element that allows you to manually - * supply suggestion lists and have them rendered according to the - * right platform conventions. Opera as of version 11 has a fatal - * problem: the suggestion lags behind what the user types by one - * keypress. (Reported as DSK-276870 to Opera's secret bug tracker.) - * There are also problems with other browsers, including Firefox and - * Safari: See bug 31602 for details. - */ -window.os_use_datalist = false; - -/** Timeout timer class that will fetch the results */ -window.os_Timer = function( id, r, query ) { - this.id = id; - this.r = r; - this.query = query; -}; - -/** Property class for single search box */ -window.os_Results = function( name, formname ) { - this.searchform = formname; // id of the searchform - this.searchbox = name; // id of the searchbox - this.container = name + 'Suggest'; // div that holds results - this.resultTable = name + 'Result'; // id base for the result table (+num = table row) - this.resultText = name + 'ResultText'; // id base for the spans within result tables (+num) - this.toggle = name + 'Toggle'; // div that has the toggle (enable/disable) link - this.query = null; // last processed query - this.results = null; // parsed titles - this.resultCount = 0; // number of results - this.original = null; // query that user entered - this.selected = -1; // which result is selected - this.containerCount = 0; // number of results visible in container - this.containerRow = 0; // height of result field in the container - this.containerTotal = 0; // total height of the container will all results - this.visible = false; // if container is visible - this.stayHidden = false; // don't try to show if lost focus -}; - -/** Timer user to animate expansion/contraction of container width */ -window.os_AnimationTimer = function( r, target ) { - this.r = r; - var current = document.getElementById(r.container).offsetWidth; - this.inc = Math.round( ( target - current ) / os_animation_steps ); - if( this.inc < os_animation_min_step && this.inc >=0 ) { - this.inc = os_animation_min_step; // minimal animation step - } - if( this.inc > -os_animation_min_step && this.inc < 0 ) { - this.inc = -os_animation_min_step; - } - this.target = target; -}; - -/****************** - * Initialization - ******************/ - -/** Initialization, call upon page onload */ -window.os_MWSuggestInit = function() { - if ( !window.os_enabled ) { - return; - } - - for( var i = 0; i < os_autoload_inputs.length; i++ ) { - var id = os_autoload_inputs[i]; - var form = os_autoload_forms[i]; - element = document.getElementById( id ); - if( element != null ) { - os_initHandlers( id, form, element ); - } - } -}; - -/* Teardown, called when things like SimpleSearch need to disable MWSuggest */ -window.os_MWSuggestTeardown = function() { - for( var i = 0; i < os_autoload_inputs.length; i++ ) { - var id = os_autoload_inputs[i]; - var form = os_autoload_forms[i]; - element = document.getElementById( id ); - if( element != null ) { - os_teardownHandlers( id, form, element ); - } - } -}; - -/* Call this to disable MWSuggest. Works regardless of whether MWSuggest has been initialized already. */ -window.os_MWSuggestDisable = function() { - window.os_MWSuggestTeardown(); - window.os_enabled = false; -} - - -/** Init Result objects and event handlers */ -window.os_initHandlers = function( name, formname, element ) { - var r = new os_Results( name, formname ); - var formElement = document.getElementById( formname ); - if( !formElement ) { - // Older browsers (Opera 8) cannot get form elements - return; - } - // event handler - os_hookEvent( element, 'keyup', os_eventKeyup ); - os_hookEvent( element, 'keydown', os_eventKeydown ); - os_hookEvent( element, 'keypress', os_eventKeypress ); - if ( !os_use_datalist ) { - // These are needed for the div hack to hide it if the user blurs. - os_hookEvent( element, 'blur', os_eventBlur ); - os_hookEvent( element, 'focus', os_eventFocus ); - // We don't want browser auto-suggestions interfering with our div, but - // autocomplete must be on for datalist to work (at least in Opera - // 10.10). - element.setAttribute( 'autocomplete', 'off' ); - } - // stopping handler - os_hookEvent( formElement, 'submit', os_eventOnsubmit ); - os_map[name] = r; - // toggle link - if( document.getElementById( r.toggle ) == null ) { - // TODO: disable this while we figure out a way for this to work in all browsers - /* if( name == 'searchInput' ) { - // special case: place above the main search box - var t = os_createToggle( r, 'os-suggest-toggle' ); - var searchBody = document.getElementById( 'searchBody' ); - var first = searchBody.parentNode.firstChild.nextSibling.appendChild(t); - } else { - // default: place below search box to the right - var t = os_createToggle( r, 'os-suggest-toggle-def' ); - var top = element.offsetTop + element.offsetHeight; - var left = element.offsetLeft + element.offsetWidth; - t.style.position = 'absolute'; - t.style.top = top + 'px'; - t.style.left = left + 'px'; - element.parentNode.appendChild( t ); - // only now width gets calculated, shift right - left -= t.offsetWidth; - t.style.left = left + 'px'; - t.style.visibility = 'visible'; - } */ - } - -}; - -window.os_teardownHandlers = function( name, formname, element ) { - var formElement = document.getElementById( formname ); - if( !formElement ) { - // Older browsers (Opera 8) cannot get form elements - return; - } - - os_unhookEvent( element, 'keyup', os_eventKeyup ); - os_unhookEvent( element, 'keydown', os_eventKeydown ); - os_unhookEvent( element, 'keypress', os_eventKeypress ); - if ( !os_use_datalist ) { - // These are needed for the div hack to hide it if the user blurs. - os_unhookEvent( element, 'blur', os_eventBlur ); - os_unhookEvent( element, 'focus', os_eventFocus ); - // We don't want browser auto-suggestions interfering with our div, but - // autocomplete must be on for datalist to work (at least in Opera - // 10.10). - element.removeAttribute( 'autocomplete' ); - } - // stopping handler - os_unhookEvent( formElement, 'submit', os_eventOnsubmit ); -}; - - -window.os_hookEvent = function( element, hookName, hookFunct ) { - if ( element.addEventListener ) { - element.addEventListener( hookName, hookFunct, false ); - } else if ( window.attachEvent ) { - element.attachEvent( 'on' + hookName, hookFunct ); - } -}; - -window.os_unhookEvent = function( element, hookName, hookFunct ) { - if ( element.removeEventListener ) { - element.removeEventListener( hookName, hookFunct, false ); - } else if ( element.detachEvent ) { - element.detachEvent( 'on' + hookName, hookFunct ); - } -} - -/******************** - * Keyboard events - ********************/ - -/** Event handler that will fetch results on keyup */ -window.os_eventKeyup = function( e ) { - var targ = os_getTarget( e ); - var r = os_map[targ.id]; - if( r == null ) { - return; // not our event - } - - // some browsers won't generate keypressed for arrow keys, catch it - if( os_keypressed_count == 0 ) { - os_processKey( r, os_cur_keypressed, targ ); - } - var query = targ.value; - os_fetchResults( r, query, os_search_timeout ); -}; - -/** catch arrows up/down and escape to hide the suggestions */ -window.os_processKey = function( r, keypressed, targ ) { - if ( keypressed == 40 && !r.visible && os_timer == null ) { - // If the user hits the down arrow, fetch results immediately if none - // are already displayed. - r.query = ''; - os_fetchResults( r, targ.value, 0 ); - } - // Otherwise, if we're not using datalist, we need to handle scrolling and - // so on. - if ( os_use_datalist ) { - return; - } - if ( keypressed == 40 ) { // Arrow Down - if ( r.visible ) { - os_changeHighlight( r, r.selected, r.selected + 1, true ); - } - } else if ( keypressed == 38 ) { // Arrow Up - if ( r.visible ) { - os_changeHighlight( r, r.selected, r.selected - 1, true ); - } - } else if( keypressed == 27 ) { // Escape - document.getElementById( r.searchbox ).value = r.original; - r.query = r.original; - os_hideResults( r ); - } else if( r.query != document.getElementById( r.searchbox ).value ) { - // os_hideResults( r ); // don't show old suggestions - } -}; - -/** When keys is held down use a timer to output regular events */ -window.os_eventKeypress = function( e ) { - var targ = os_getTarget( e ); - var r = os_map[targ.id]; - if( r == null ) { - return; // not our event - } - - var keypressed = os_cur_keypressed; - - os_keypressed_count++; - os_processKey( r, keypressed, targ ); -}; - -/** Catch the key code (Firefox bug) */ -window.os_eventKeydown = function( e ) { - if ( !e ) { - e = window.event; - } - var targ = os_getTarget( e ); - var r = os_map[targ.id]; - if( r == null ) { - return; // not our event - } - - os_mouse_moved = false; - - os_cur_keypressed = ( e.keyCode == undefined ) ? e.which : e.keyCode; - os_keypressed_count = 0; -}; - - -/** When the form is submitted hide everything, cancel updates... */ -window.os_eventOnsubmit = function( e ) { - var targ = os_getTarget( e ); - - os_is_stopped = true; - // kill timed requests - if( os_timer != null && os_timer.id != null ) { - clearTimeout( os_timer.id ); - os_timer = null; - } - // Hide all suggestions - for( i = 0; i < os_autoload_inputs.length; i++ ) { - var r = os_map[os_autoload_inputs[i]]; - if( r != null ) { - var b = document.getElementById( r.searchform ); - if( b != null && b == targ ) { - // set query value so the handler won't try to fetch additional results - r.query = document.getElementById( r.searchbox ).value; - } - os_hideResults( r ); - } - } - return true; -}; - - - -/** Hide results from the user, either making the div visibility=hidden or - * detaching the datalist from the input. */ -window.os_hideResults = function( r ) { - if ( os_use_datalist ) { - document.getElementById( r.searchbox ).setAttribute( 'list', '' ); - } else { - var c = document.getElementById( r.container ); - if ( c != null ) { - c.style.visibility = 'hidden'; - } - } - r.visible = false; - r.selected = -1; -}; - -window.os_decodeValue = function( value ) { - if ( decodeURIComponent ) { - return decodeURIComponent( value ); - } - if( unescape ) { - return unescape( value ); - } - return null; -}; - -window.os_encodeQuery = function( value ) { - if ( encodeURIComponent ) { - return encodeURIComponent( value ); - } - if( escape ) { - return escape( value ); - } - return null; -}; - -/** Handles data from XMLHttpRequest, and updates the suggest results */ -window.os_updateResults = function( r, query, text, cacheKey ) { - os_cache[cacheKey] = text; - r.query = query; - r.original = query; - if( text == '' ) { - r.results = null; - r.resultCount = 0; - os_hideResults( r ); - } else { - try { - var p = eval( '(' + text + ')' ); // simple json parse, could do a safer one - if( p.length < 2 || p[1].length == 0 ) { - r.results = null; - r.resultCount = 0; - os_hideResults( r ); - return; - } - if ( os_use_datalist ) { - os_setupDatalist( r, p[1] ); - } else { - os_setupDiv( r, p[1] ); - } - } catch( e ) { - // bad response from server or such - os_hideResults( r ); - os_cache[cacheKey] = null; - } - } -}; - -/** - * Create and populate a <datalist>. - * - * @param r os_Result object - * @param results Array of the new results to replace existing ones - */ -window.os_setupDatalist = function( r, results ) { - var s = document.getElementById( r.searchbox ); - var c = document.getElementById( r.container ); - if ( c == null ) { - c = document.createElement( 'datalist' ); - c.setAttribute( 'id', r.container ); - document.body.appendChild( c ); - } else { - c.innerHTML = ''; - } - s.setAttribute( 'list', r.container ); - - r.results = []; - r.resultCount = results.length; - r.visible = true; - for ( i = 0; i < results.length; i++ ) { - var title = os_decodeValue( results[i] ); - var opt = document.createElement( 'option' ); - opt.value = title; - r.results[i] = title; - c.appendChild( opt ); - } -}; - -/** Fetch namespaces from checkboxes or hidden fields in the search form, - if none defined use wgSearchNamespaces */ -window.os_getNamespaces = function( r ) { - var namespaces = ''; - var elements = document.forms[r.searchform].elements; - for( i = 0; i < elements.length; i++ ) { - var name = elements[i].name; - if( typeof name != 'undefined' && name.length > 2 && name[0] == 'n' && - name[1] == 's' && ( - ( elements[i].type == 'checkbox' && elements[i].checked ) || - ( elements[i].type == 'hidden' && elements[i].value == '1' ) - ) - ) { - if( namespaces != '' ) { - namespaces += '|'; - } - namespaces += name.substring( 2 ); - } - } - if( namespaces == '' ) { - namespaces = mw.config.get( 'wgSearchNamespaces' ).join('|'); - } - return namespaces; -}; - -/** Update results if user hasn't already typed something else */ -window.os_updateIfRelevant = function( r, query, text, cacheKey ) { - var t = document.getElementById( r.searchbox ); - if( t != null && t.value == query ) { // check if response is still relevant - os_updateResults( r, query, text, cacheKey ); - } - r.query = query; -}; - -/** Fetch results after some timeout */ -window.os_delayedFetch = function() { - if( os_timer == null ) { - return; - } - var r = os_timer.r; - var query = os_timer.query; - os_timer = null; - var path = mw.config.get( 'wgMWSuggestTemplate' ).replace( "{namespaces}", os_getNamespaces( r ) ) - .replace( "{dbname}", mw.config.get( 'wgDBname' ) ) - .replace( "{searchTerms}", os_encodeQuery( query ) ); - - // try to get from cache, if not fetch using ajax - var cached = os_cache[path]; - if( cached != null && cached != undefined ) { - os_updateIfRelevant( r, query, cached, path ); - } else { - var xmlhttp = sajax_init_object(); - if( xmlhttp ) { - try { - xmlhttp.open( 'GET', path, true ); - xmlhttp.onreadystatechange = function() { - if ( xmlhttp.readyState == 4 && typeof os_updateIfRelevant == 'function' ) { - os_updateIfRelevant( r, query, xmlhttp.responseText, path ); - } - }; - xmlhttp.send( null ); - } catch ( e ) { - if ( window.location.hostname == 'localhost' ) { - alert( "Your browser blocks XMLHttpRequest to 'localhost', try using a real hostname for development/testing." ); - } - throw e; - } - } - } -}; - -/** Init timed update via os_delayedUpdate() */ -window.os_fetchResults = function( r, query, timeout ) { - if( query == '' ) { - r.query = ''; - os_hideResults( r ); - return; - } else if( query == r.query ) { - return; // no change - } - - os_is_stopped = false; // make sure we're running - - // cancel any pending fetches - if( os_timer != null && os_timer.id != null ) { - clearTimeout( os_timer.id ); - } - // schedule delayed fetching of results - if( timeout != 0 ) { - os_timer = new os_Timer( setTimeout( "os_delayedFetch()", timeout ), r, query ); - } else { - os_timer = new os_Timer( null, r, query ); - os_delayedFetch(); // do it now! - } -}; - -/** Find event target */ -window.os_getTarget = function( e ) { - if ( !e ) { - e = window.event; - } - if ( e.target ) { - return e.target; - } else if ( e.srcElement ) { - return e.srcElement; - } else { - return null; - } -}; - -/** Check if x is a valid integer */ -window.os_isNumber = function( x ) { - if( x == '' || isNaN( x ) ) { - return false; - } - for( var i = 0; i < x.length; i++ ) { - var c = x.charAt( i ); - if( !( c >= '0' && c <= '9' ) ) { - return false; - } - } - return true; -}; - -/** Call this to enable suggestions on input (id=inputId), on a form (name=formName) */ -window.os_enableSuggestionsOn = function( inputId, formName ) { - os_initHandlers( inputId, formName, document.getElementById( inputId ) ); -}; - -/** Call this to disable suggestios on input box (id=inputId) */ -window.os_disableSuggestionsOn = function( inputId ) { - r = os_map[inputId]; - if( r != null ) { - // cancel/hide results - os_timer = null; - os_hideResults( r ); - // turn autocomplete on ! - document.getElementById( inputId ).setAttribute( 'autocomplete', 'on' ); - // remove descriptor - os_map[inputId] = null; - } - - // Remove the element from the os_autoload_* arrays - var index = os_autoload_inputs.indexOf( inputId ); - if ( index >= 0 ) { - os_autoload_inputs[index] = os_autoload_forms[index] = ''; - } -}; - -/************************************************ - * Div-only functions (irrelevant for datalist) - ************************************************/ - -/** Event: loss of focus of input box */ -window.os_eventBlur = function( e ) { - var targ = os_getTarget( e ); - var r = os_map[targ.id]; - if( r == null ) { - return; // not our event - } - if( !os_mouse_pressed ) { - os_hideResults( r ); - // force canvas to stay hidden - r.stayHidden = true; - // cancel any pending fetches - if( os_timer != null && os_timer.id != null ) { - clearTimeout( os_timer.id ); - } - os_timer = null; - } -}; - -/** Event: focus (catch only when stopped) */ -window.os_eventFocus = function( e ) { - var targ = os_getTarget( e ); - var r = os_map[targ.id]; - if( r == null ) { - return; // not our event - } - r.stayHidden = false; -}; - -/** - * Create and populate a <div>, for non-<datalist>-supporting browsers. - * - * @param r os_Result object - * @param results Array of the new results to replace existing ones - */ -window.os_setupDiv = function( r, results ) { - var c = document.getElementById( r.container ); - if ( c == null ) { - c = os_createContainer( r ); - } - c.innerHTML = os_createResultTable( r, results ); - // init container table sizes - var t = document.getElementById( r.resultTable ); - r.containerTotal = t.offsetHeight; - r.containerRow = t.offsetHeight / r.resultCount; - os_fitContainer( r ); - os_trimResultText( r ); - os_showResults( r ); -}; - -/** Create the result table to be placed in the container div */ -window.os_createResultTable = function( r, results ) { - var c = document.getElementById( r.container ); - var width = c.offsetWidth - os_operaWidthFix( c.offsetWidth ); - var html = '<table class="os-suggest-results" id="' + r.resultTable + '" style="width: ' + width + 'px;">'; - r.results = []; - r.resultCount = results.length; - for( i = 0; i < results.length; i++ ) { - var title = os_decodeValue( results[i] ); - r.results[i] = title; - html += '<tr><td class="os-suggest-result" id="' + r.resultTable + i + '"><span id="' + r.resultText + i + '">' + title + '</span></td></tr>'; - } - html += '</table>'; - return html; -}; - -/** Show results div */ -window.os_showResults = function( r ) { - if( os_is_stopped ) { - return; - } - if( r.stayHidden ) { - return; - } - os_fitContainer( r ); - var c = document.getElementById( r.container ); - r.selected = -1; - if( c != null ) { - c.scrollTop = 0; - c.style.visibility = 'visible'; - r.visible = true; - } -}; - -window.os_operaWidthFix = function( x ) { - // For browsers that don't understand overflow-x, estimate scrollbar width - if( typeof document.body.style.overflowX != 'string' ) { - return 30; - } - return 0; -}; - -/** Brower-dependent functions to find window inner size, and scroll status */ -window.f_clientWidth = function() { - return f_filterResults( - window.innerWidth ? window.innerWidth : 0, - document.documentElement ? document.documentElement.clientWidth : 0, - document.body ? document.body.clientWidth : 0 - ); -}; - -window.f_clientHeight = function() { - return f_filterResults( - window.innerHeight ? window.innerHeight : 0, - document.documentElement ? document.documentElement.clientHeight : 0, - document.body ? document.body.clientHeight : 0 - ); -}; - -window.f_scrollLeft = function() { - return f_filterResults( - window.pageXOffset ? window.pageXOffset : 0, - document.documentElement ? document.documentElement.scrollLeft : 0, - document.body ? document.body.scrollLeft : 0 - ); -}; - -window.f_scrollTop = function() { - return f_filterResults( - window.pageYOffset ? window.pageYOffset : 0, - document.documentElement ? document.documentElement.scrollTop : 0, - document.body ? document.body.scrollTop : 0 - ); -}; - -window.f_filterResults = function( n_win, n_docel, n_body ) { - var n_result = n_win ? n_win : 0; - if ( n_docel && ( !n_result || ( n_result > n_docel ) ) ) { - n_result = n_docel; - } - return n_body && ( !n_result || ( n_result > n_body ) ) ? n_body : n_result; -}; - -/** Get the height available for the results container */ -window.os_availableHeight = function( r ) { - var absTop = document.getElementById( r.container ).style.top; - var px = absTop.lastIndexOf( 'px' ); - if( px > 0 ) { - absTop = absTop.substring( 0, px ); - } - return f_clientHeight() - ( absTop - f_scrollTop() ); -}; - -/** Get element absolute position {left,top} */ -window.os_getElementPosition = function( elemID ) { - var offsetTrail = document.getElementById( elemID ); - var offsetLeft = 0; - var offsetTop = 0; - while ( offsetTrail ) { - offsetLeft += offsetTrail.offsetLeft; - offsetTop += offsetTrail.offsetTop; - offsetTrail = offsetTrail.offsetParent; - } - if ( navigator.userAgent.indexOf('Mac') != -1 && typeof document.body.leftMargin != 'undefined' ) { - offsetLeft += document.body.leftMargin; - offsetTop += document.body.topMargin; - } - return { left:offsetLeft, top:offsetTop }; -}; - -/** Create the container div that will hold the suggested titles */ -window.os_createContainer = function( r ) { - var c = document.createElement( 'div' ); - var s = document.getElementById( r.searchbox ); - var pos = os_getElementPosition( r.searchbox ); - var left = pos.left; - var top = pos.top + s.offsetHeight; - c.className = 'os-suggest'; - c.setAttribute( 'id', r.container ); - document.body.appendChild( c ); - - // dynamically generated style params - // IE workaround, cannot explicitely set "style" attribute - c = document.getElementById( r.container ); - c.style.top = top + 'px'; - c.style.left = left + 'px'; - c.style.width = s.offsetWidth + 'px'; - - // mouse event handlers - c.onmouseover = function( event ) { os_eventMouseover( r.searchbox, event ); }; - c.onmousemove = function( event ) { os_eventMousemove( r.searchbox, event ); }; - c.onmousedown = function( event ) { return os_eventMousedown( r.searchbox, event ); }; - c.onmouseup = function( event ) { os_eventMouseup( r.searchbox, event ); }; - return c; -}; - -/** change container height to fit to screen */ -window.os_fitContainer = function( r ) { - var c = document.getElementById( r.container ); - var h = os_availableHeight( r ) - 20; - var inc = r.containerRow; - h = parseInt( h / inc ) * inc; - if( h < ( 2 * inc ) && r.resultCount > 1 ) { // min: two results - h = 2 * inc; - } - if( ( h / inc ) > os_max_lines_per_suggest ) { - h = inc * os_max_lines_per_suggest; - } - if( h < r.containerTotal ) { - c.style.height = h + 'px'; - r.containerCount = parseInt( Math.round( h / inc ) ); - } else { - c.style.height = r.containerTotal + 'px'; - r.containerCount = r.resultCount; - } -}; - -/** If some entries are longer than the box, replace text with "..." */ -window.os_trimResultText = function( r ) { - // find max width, first see if we could expand the container to fit it - var maxW = 0; - for( var i = 0; i < r.resultCount; i++ ) { - var e = document.getElementById( r.resultText + i ); - if( e.offsetWidth > maxW ) { - maxW = e.offsetWidth; - } - } - var w = document.getElementById( r.container ).offsetWidth; - var fix = 0; - if( r.containerCount < r.resultCount ) { - fix = 20; // give 20px for scrollbar - } else { - fix = os_operaWidthFix( w ); - } - if( fix < 4 ) { - fix = 4; // basic padding - } - maxW += fix; - - // resize container to fit more data if permitted - var normW = document.getElementById( r.searchbox ).offsetWidth; - var prop = maxW / normW; - if( prop > os_container_max_width ) { - prop = os_container_max_width; - } else if( prop < 1 ) { - prop = 1; - } - var newW = Math.round( normW * prop ); - if( w != newW ) { - w = newW; - if( os_animation_timer != null ) { - clearInterval( os_animation_timer.id ); - } - os_animation_timer = new os_AnimationTimer( r, w ); - os_animation_timer.id = setInterval( "os_animateChangeWidth()", os_animation_delay ); - w -= fix; // this much is reserved - } - - // trim results - if( w < 10 ) { - return; - } - for( var i = 0; i < r.resultCount; i++ ) { - var e = document.getElementById( r.resultText + i ); - var replace = 1; - var lastW = e.offsetWidth + 1; - var iteration = 0; - var changedText = false; - while( e.offsetWidth > w && ( e.offsetWidth < lastW || iteration < 2 ) ) { - changedText = true; - lastW = e.offsetWidth; - var l = e.innerHTML; - e.innerHTML = l.substring( 0, l.length - replace ) + '...'; - iteration++; - replace = 4; // how many chars to replace - } - if( changedText ) { - // show hint for trimmed titles - document.getElementById( r.resultTable + i ).setAttribute( 'title', r.results[i] ); - } - } -}; - -/** Invoked on timer to animate change in container width */ -window.os_animateChangeWidth = function() { - var r = os_animation_timer.r; - var c = document.getElementById( r.container ); - var w = c.offsetWidth; - var normW = document.getElementById( r.searchbox ).offsetWidth; - var normL = os_getElementPosition( r.searchbox ).left; - var inc = os_animation_timer.inc; - var target = os_animation_timer.target; - var nw = w + inc; - if( ( inc > 0 && nw >= target ) || ( inc <= 0 && nw <= target ) ) { - // finished ! - c.style.width = target + 'px'; - clearInterval( os_animation_timer.id ); - os_animation_timer = null; - } else { - // in-progress - c.style.width = nw + 'px'; - if( document.documentElement.dir == 'rtl' ) { - c.style.left = ( normL + normW + ( target - nw ) - os_animation_timer.target - 1 ) + 'px'; - } - } -}; - -/** Change the highlighted row (i.e. suggestion), from position cur to next */ -window.os_changeHighlight = function( r, cur, next, updateSearchBox ) { - if ( next >= r.resultCount ) { - next = r.resultCount - 1; - } - if ( next < -1 ) { - next = -1; - } - r.selected = next; - if ( cur == next ) { - return; // nothing to do. - } - - if( cur >= 0 ) { - var curRow = document.getElementById( r.resultTable + cur ); - if( curRow != null ) { - curRow.className = 'os-suggest-result'; - } - } - var newText; - if( next >= 0 ) { - var nextRow = document.getElementById( r.resultTable + next ); - if( nextRow != null ) { - nextRow.className = os_HighlightClass(); - } - newText = r.results[next]; - } else { - newText = r.original; - } - - // adjust the scrollbar if any - if( r.containerCount < r.resultCount ) { - var c = document.getElementById( r.container ); - var vStart = c.scrollTop / r.containerRow; - var vEnd = vStart + r.containerCount; - if( next < vStart ) { - c.scrollTop = next * r.containerRow; - } else if( next >= vEnd ) { - c.scrollTop = ( next - r.containerCount + 1 ) * r.containerRow; - } - } - - // update the contents of the search box - if( updateSearchBox ) { - os_updateSearchQuery( r, newText ); - } -}; - -window.os_HighlightClass = function() { - var match = navigator.userAgent.match(/AppleWebKit\/(\d+)/); - if ( match ) { - var webKitVersion = parseInt( match[1] ); - if ( webKitVersion < 523 ) { - // CSS system highlight colors broken on old Safari - // https://bugs.webkit.org/show_bug.cgi?id=6129 - // Safari 3.0.4, 3.1 known ok - return 'os-suggest-result-hl-webkit'; - } - } - return 'os-suggest-result-hl'; -}; - -window.os_updateSearchQuery = function( r, newText ) { - document.getElementById( r.searchbox ).value = newText; - r.query = newText; -}; - - -/******************** - * Mouse events - ********************/ - -/** Mouse over the container */ -window.os_eventMouseover = function( srcId, e ) { - var targ = os_getTarget( e ); - var r = os_map[srcId]; - if( r == null || !os_mouse_moved ) { - return; // not our event - } - var num = os_getNumberSuffix( targ.id ); - if( num >= 0 ) { - os_changeHighlight( r, r.selected, num, false ); - } -}; - -/* Get row where the event occured (from its id) */ -window.os_getNumberSuffix = function( id ) { - var num = id.substring( id.length - 2 ); - if( !( num.charAt( 0 ) >= '0' && num.charAt( 0 ) <= '9' ) ) { - num = num.substring( 1 ); - } - if( os_isNumber( num ) ) { - return parseInt( num ); - } else { - return -1; - } -}; - -/** Save mouse move as last action */ -window.os_eventMousemove = function( srcId, e ) { - os_mouse_moved = true; -}; - -/** Mouse button held down, register possible click */ -window.os_eventMousedown = function( srcId, e ) { - var targ = os_getTarget( e ); - var r = os_map[srcId]; - if( r == null ) { - return; // not our event - } - var num = os_getNumberSuffix( targ.id ); - - os_mouse_pressed = true; - if( num >= 0 ) { - os_mouse_num = num; - // os_updateSearchQuery( r, r.results[num] ); - } - // keep the focus on the search field - document.getElementById( r.searchbox ).focus(); - - return false; // prevents selection -}; - -/** Mouse button released, check for click on some row */ -window.os_eventMouseup = function( srcId, e ) { - var targ = os_getTarget( e ); - var r = os_map[srcId]; - if( r == null ) { - return; // not our event - } - var num = os_getNumberSuffix( targ.id ); - - if( num >= 0 && os_mouse_num == num ) { - os_updateSearchQuery( r, r.results[num] ); - os_hideResults( r ); - document.getElementById( r.searchform ).submit(); - } - os_mouse_pressed = false; - // keep the focus on the search field - document.getElementById( r.searchbox ).focus(); -}; - -/** Toggle stuff seems to be dead code? */ - -/** Return the span element that contains the toggle link */ -window.os_createToggle = function( r, className ) { - var t = document.createElement( 'span' ); - t.className = className; - t.setAttribute( 'id', r.toggle ); - var link = document.createElement( 'a' ); - link.setAttribute( 'href', 'javascript:void(0);' ); - link.onclick = function() { os_toggle( r.searchbox, r.searchform ); }; - var msg = document.createTextNode( wgMWSuggestMessages[0] ); - link.appendChild( msg ); - t.appendChild( link ); - return t; -}; - -/** Call when user clicks on some of the toggle links */ -window.os_toggle = function( inputId, formName ) { - r = os_map[inputId]; - var msg = ''; - if( r == null ) { - os_enableSuggestionsOn( inputId, formName ); - r = os_map[inputId]; - msg = wgMWSuggestMessages[0]; - } else{ - os_disableSuggestionsOn( inputId, formName ); - msg = wgMWSuggestMessages[1]; - } - // change message - var link = document.getElementById( r.toggle ).firstChild; - link.replaceChild( document.createTextNode( msg ), link.firstChild ); -}; - -hookEvent( 'load', os_MWSuggestInit ); diff --git a/skins/common/oldshared.css b/skins/common/oldshared.css index 84d42c9f..6dcdf6f1 100644 --- a/skins/common/oldshared.css +++ b/skins/common/oldshared.css @@ -55,12 +55,6 @@ div.floatleft p { font-style: italic; } - -/* Print-specific things to hide */ -.printfooter { - display: none; -} - /* table standards */ table.rimage { float: right; diff --git a/skins/common/preview.js b/skins/common/preview.js deleted file mode 100644 index 9e76ca09..00000000 --- a/skins/common/preview.js +++ /dev/null @@ -1,128 +0,0 @@ -/** - * Live preview script for MediaWiki - */ -(function( $ ) { - window.doLivePreview = function( e ) { - e.preventDefault(); - - $( mw ).trigger( 'LivePreviewPrepare' ); - - var postData = $('#editform').formToArray(); - postData.push( { 'name' : 'wpPreview', 'value' : '1' } ); - - // Hide active diff, used templates, old preview if shown - var copyElements = ['#wikiPreview', '.templatesUsed', '.hiddencats', - '#catlinks']; - var copySelector = copyElements.join(','); - - $.each( copyElements, function(k,v) { $(v).fadeOut('fast'); } ); - - // Display a loading graphic - var loadSpinner = $('<div class="mw-ajax-loader"/>'); - $('#wikiPreview').before( loadSpinner ); - - var page = $('<div/>'); - var target = $('#editform').attr('action'); - - if ( !target ) { - target = window.location.href; - } - - page.load( target + ' ' + copySelector, postData, - function() { - - for( var i=0; i<copyElements.length; ++i) { - // For all the specified elements, find the elements in the loaded page - // and the real page, empty the element in the real page, and fill it - // with the content of the loaded page - var copyContent = page.find( copyElements[i] ).contents(); - $(copyElements[i]).empty().append( copyContent ); - var newClasses = page.find( copyElements[i] ).prop('class'); - $(copyElements[i]).prop( 'class', newClasses ); - } - - $.each( copyElements, function(k,v) { - // Don't belligerently show elements that are supposed to be hidden - $(v).fadeIn( 'fast', function() { $(this).css('display', ''); } ); - } ); - - loadSpinner.remove(); - - $( mw ).trigger( 'LivePreviewDone', [copyElements] ); - } ); - }; - - // Shamelessly stolen from the jQuery form plugin, which is licensed under the GPL. - // http://jquery.malsup.com/form/#download - $.fn.formToArray = function() { - var a = []; - if (this.length == 0) return a; - - var form = this[0]; - var els = form.elements; - if (!els) return a; - for(var i=0, max=els.length; i < max; i++) { - var el = els[i]; - var n = el.name; - if (!n) continue; - - var v = $.fieldValue(el, true); - if (v && v.constructor == Array) { - for(var j=0, jmax=v.length; j < jmax; j++) - a.push({name: n, value: v[j]}); - } - else if (v !== null && typeof v != 'undefined') - a.push({name: n, value: v}); - } - - if (form.clk) { - // input type=='image' are not found in elements array! handle it here - var $input = $(form.clk), input = $input[0], n = input.name; - if (n && !input.disabled && input.type == 'image') { - a.push({name: n, value: $input.val()}); - a.push({name: n+'.x', value: form.clk_x}, {name: n+'.y', value: form.clk_y}); - } - } - return a; - }; - - /** - * Returns the value of the field element. - */ - $.fieldValue = function(el, successful) { - var n = el.name, t = el.type, tag = el.tagName.toLowerCase(); - if (typeof successful == 'undefined') successful = true; - - if (successful && (!n || el.disabled || t == 'reset' || t == 'button' || - (t == 'checkbox' || t == 'radio') && !el.checked || - (t == 'submit' || t == 'image') && el.form && el.form.clk != el || - tag == 'select' && el.selectedIndex == -1)) - return null; - - if (tag == 'select') { - var index = el.selectedIndex; - if (index < 0) return null; - var a = [], ops = el.options; - var one = (t == 'select-one'); - var max = (one ? index+1 : ops.length); - for(var i=(one ? index : 0); i < max; i++) { - var op = ops[i]; - if (op.selected) { - var v = op.value; - if (!v) // extra pain for IE... - v = (op.attributes && op.attributes['value'] && - !(op.attributes['value'].specified)) - ? op.text : op.value; - if (one) return v; - a.push(v); - } - } - return a; - } - return el.value; - }; - - $(document).ready( function() { - $('#wpPreview').click( doLivePreview ); - } ); -}) ( jQuery ); diff --git a/skins/common/shared.css b/skins/common/shared.css index 824e3687..8f771e9a 100644 --- a/skins/common/shared.css +++ b/skins/common/shared.css @@ -116,31 +116,24 @@ span.texhtml { #wpTextbox1 { clear: both; } + #toolbar img { cursor: pointer; } -div#mw-js-message { - margin: 1em 5%; - padding: 0.5em 2.5%; - border: solid 1px #ddd; - background-color: #fcfcfc; -} /* Edit section links */ -.editsection { - float: right; - margin-left: 5px; -} /* Correct directionality when page dir is different from site/user dir */ +/* @noflip */ .mw-content-ltr .editsection, .mw-content-rtl .mw-content-ltr .editsection { - /* @noflip */ float: right; + margin-left: 5px; } +/* @noflip */ .mw-content-rtl .editsection, .mw-content-ltr .mw-content-rtl .editsection { - /* @noflip */ float: left; + margin-right: 5px; } /** @@ -257,17 +250,28 @@ tr.mw-htmlform-vertical-label td.mw-label { input#wpSummary { width: 80%; + margin-bottom: 1em; } /** * Image captions */ -.thumbcaption { +/* @noflip */ +.mw-content-ltr .thumbcaption { text-align: left; } -.magnify { +/* @noflip */ +.mw-content-rtl .thumbcaption { + text-align: right; +} +/* @noflip */ +.mw-content-ltr .magnify { float: right; } +/* @noflip */ +.mw-content-rtl .magnify { + float: left; +} /** * Categories @@ -469,7 +473,7 @@ a.feedlink { * keep in sync with commonPrint.css */ table.wikitable { - margin: 1em 1em 1em 0; + margin: 1em 0; background-color: #f9f9f9; border: 1px #aaa solid; border-collapse: collapse; @@ -748,7 +752,6 @@ table.mw_metadata ul.metadata-langlist { /* Don't forget to update commonPrint.css */ li.gallerybox { vertical-align: top; - border: solid 2px white; display: -moz-inline-box; display: inline-block; } @@ -813,26 +816,32 @@ div.gallerytext { /* 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(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(ml), h1:lang(mr), +h1:lang(my), h1:lang(or), h1:lang(pa), h1:lang(sa), h1:lang(ta), h1:lang(te) { - line-height: 1.5em !important; + line-height: 1.6em !important; } 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(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(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(sa), h3:lang(sa), h4:lang(sa), h5:lang(sa), h6:lang(sa), @@ -857,6 +866,12 @@ ol:lang(ckb) li { 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; @@ -1030,8 +1045,20 @@ table.floatleft { zoom: 1; /* http://webaim.org/techniques/skipnav/#iequirk */ } +/* Print footer should be hidden by default in screen. */ +.printfooter { + display: none; +} + /* For developpers */ .xdebug-error { position: absolute; z-index: 99; } + +.editsection, .toctoggle { + -moz-user-select: none; + -webkit-user-select: none; + -ms-user-select: none; + user-select: none; +} diff --git a/skins/common/upload.js b/skins/common/upload.js index 8e08af31..df819e19 100644 --- a/skins/common/upload.js +++ b/skins/common/upload.js @@ -1,4 +1,4 @@ -( function () { +( function ( mw, $ ) { var ajaxUploadDestCheck = mw.config.get( 'wgAjaxUploadDestCheck' ), fileExtensions = mw.config.get( 'wgFileExtensions' ); @@ -241,10 +241,17 @@ window.fillDestFilename = function(id) { } // Output result - var destFile = document.getElementById('wpDestFile'); - if (destFile) { - destFile.value = fname; - wgUploadWarningObj.checkNow(fname) ; + var 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 ( e ) { + destFile.value = fname; + } + wgUploadWarningObj.checkNow( fname ); } }; @@ -302,4 +309,4 @@ window.wgUploadLicenseObj = { $( document ).ready( uploadSetup ); -}() ); +}( mediaWiki, jQuery ) ); diff --git a/skins/common/wikibits.js b/skins/common/wikibits.js index 8f47499c..cae08af9 100644 --- a/skins/common/wikibits.js +++ b/skins/common/wikibits.js @@ -1,7 +1,7 @@ /** * MediaWiki legacy wikibits */ -(function(){ +( function ( mw ) { window.clientPC = navigator.userAgent.toLowerCase(); // Get client info window.is_gecko = /gecko/.test( clientPC ) && @@ -515,55 +515,11 @@ window.redirectToFragment = function( fragment ) { * Add a cute little box at the top of the screen to inform the user of * something, replacing any preexisting message. * - * @param message String -or- Dom Object HTML to be put inside the right div - * @param className String Used in adding a class; should be different for each - * call to allow CSS/JS to hide different boxes. null = no class used. - * @return Boolean True on success, false on failure + * @deprecated since 1.17 Use the 'mediawiki.notify' module instead. + * @param {String|HTMLElement} message To be put inside the message box. */ -window.jsMsg = function( message, className ) { - if ( !document.getElementById ) { - return false; - } - // We special-case skin structures provided by the software. Skins that - // choose to abandon or significantly modify our formatting can just define - // an mw-js-message div to start with. - var messageDiv = document.getElementById( 'mw-js-message' ); - if ( !messageDiv ) { - messageDiv = document.createElement( 'div' ); - if ( document.getElementById( 'column-content' ) - && document.getElementById( 'content' ) ) { - // MonoBook, presumably - document.getElementById( 'content' ).insertBefore( - messageDiv, - document.getElementById( 'content' ).firstChild - ); - } else if ( document.getElementById( 'content' ) - && document.getElementById( 'article' ) ) { - // Non-Monobook but still recognizable (old-style) - document.getElementById( 'article').insertBefore( - messageDiv, - document.getElementById( 'article' ).firstChild - ); - } else { - return false; - } - } - - messageDiv.setAttribute( 'id', 'mw-js-message' ); - messageDiv.style.display = 'block'; - if( className ) { - messageDiv.setAttribute( 'class', 'mw-js-message-' + className ); - } - - if ( typeof message === 'object' ) { - while ( messageDiv.hasChildNodes() ) { // Remove old content - messageDiv.removeChild( messageDiv.firstChild ); - } - messageDiv.appendChild( message ); // Append new content - } else { - messageDiv.innerHTML = message; - } - return true; +window.jsMsg = function () { + return mw.util.jsMessage.apply( mw.util, arguments ); }; /** @@ -663,4 +619,4 @@ if ( ie6_bugs ) { importScriptURI( mw.config.get( 'stylepath' ) + '/common/IEFixes.js' ); } -})(); +}( mediaWiki ) ); diff --git a/skins/modern/audio.png b/skins/modern/audio.png Binary files differindex c22c05c3..68c8768c 100644 --- a/skins/modern/audio.png +++ b/skins/modern/audio.png diff --git a/skins/modern/document.png b/skins/modern/document.png Binary files differindex b7648b38..ee46a50d 100644 --- a/skins/modern/document.png +++ b/skins/modern/document.png diff --git a/skins/modern/footer-grad.png b/skins/modern/footer-grad.png Binary files differindex 783a4725..72b87247 100644 --- a/skins/modern/footer-grad.png +++ b/skins/modern/footer-grad.png diff --git a/skins/modern/main.css b/skins/modern/main.css index 17481562..7149551f 100644 --- a/skins/modern/main.css +++ b/skins/modern/main.css @@ -278,10 +278,6 @@ img { margin: 0 0 0 0; } -div.printfooter { - display: none; -} - p { margin: 1em 0 1em 0; } @@ -815,7 +811,7 @@ span.subpages { display: block; } -pre { +pre, .mw-code { border: solid 1px #3c78b5; padding: 0.4em; background-color: #f0f0f0; diff --git a/skins/modern/news_icon.png b/skins/modern/news_icon.png Binary files differindex b8f5abb5..4d3cb476 100644 --- a/skins/modern/news_icon.png +++ b/skins/modern/news_icon.png diff --git a/skins/modern/video.png b/skins/modern/video.png Binary files differindex 8e81d681..e535c0c4 100644 --- a/skins/modern/video.png +++ b/skins/modern/video.png diff --git a/skins/monobook/audio.png b/skins/monobook/audio.png Binary files differindex c22c05c3..68c8768c 100644 --- a/skins/monobook/audio.png +++ b/skins/monobook/audio.png diff --git a/skins/monobook/document.png b/skins/monobook/document.png Binary files differindex b7648b38..ee46a50d 100644 --- a/skins/monobook/document.png +++ b/skins/monobook/document.png diff --git a/skins/monobook/external-rtl.png b/skins/monobook/external-rtl.png Binary files differindex 9901d8f1..7d5ee375 100644 --- a/skins/monobook/external-rtl.png +++ b/skins/monobook/external-rtl.png diff --git a/skins/monobook/main.css b/skins/monobook/main.css index 9a8eac1c..5866d97d 100644 --- a/skins/monobook/main.css +++ b/skins/monobook/main.css @@ -83,7 +83,7 @@ input.historysubmit { margin-left: 1.6em; } -pre { +pre, .mw-code { line-height: 1.1em; } @@ -759,10 +759,6 @@ div#userloginForm .captcha { margin: 5px; } -.printfooter { - display: none; -} - div.patrollink { clear: both; } @@ -844,7 +840,7 @@ div#searchTargetHide { } #powersearch p { - margin-top:0px; + margin-top: 0; } div.multipageimagenavbox { @@ -917,3 +913,10 @@ div.mw-lag-warn-high { .tipsy { font-size: 127%; } + +/* mediawiki.notification */ +.skin-monobook .mw-notification { + -webkit-box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.125); + -moz-box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.125); + box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.125); +} diff --git a/skins/monobook/news_icon.png b/skins/monobook/news_icon.png Binary files differindex b8f5abb5..4d3cb476 100644 --- a/skins/monobook/news_icon.png +++ b/skins/monobook/news_icon.png diff --git a/skins/monobook/video.png b/skins/monobook/video.png Binary files differindex fadc4c9b..d86dbe01 100644 --- a/skins/monobook/video.png +++ b/skins/monobook/video.png diff --git a/skins/monobook/wiki-indexed.png b/skins/monobook/wiki-indexed.png Binary files differindex 4b80e3ae..0ec584a3 100644 --- a/skins/monobook/wiki-indexed.png +++ b/skins/monobook/wiki-indexed.png diff --git a/skins/monobook/wiki.png b/skins/monobook/wiki.png Binary files differindex 70eee796..8c421183 100644 --- a/skins/monobook/wiki.png +++ b/skins/monobook/wiki.png diff --git a/skins/nostalgia/screen.css b/skins/nostalgia/screen.css index d6183623..aed5715b 100644 --- a/skins/nostalgia/screen.css +++ b/skins/nostalgia/screen.css @@ -14,6 +14,10 @@ body { padding: 2px; } +a.new { + color: #ba0000; +} + a.interwiki, a.external { color: #3366BB; diff --git a/skins/simple/main.css b/skins/simple/main.css index 3e086586..7b4f2ae5 100644 --- a/skins/simple/main.css +++ b/skins/simple/main.css @@ -215,7 +215,7 @@ textarea { margin-left: 0.5em; } -pre { +pre, .mw-code { margin: 2em; border: solid 1px black; } @@ -345,6 +345,7 @@ a.stub { } a.new, #p-personal a.new { + color: #BA0000; text-decoration: line-through; } li.new { @@ -371,9 +372,6 @@ li.new { #p-cactions { background-color: inherit; } -div.printfooter { - display: none; -} #footer { padding-left: 11.8em; diff --git a/skins/common/wikistandard.css b/skins/standard/main.css index e47dc42d..a4b03a87 100644 --- a/skins/common/wikistandard.css +++ b/skins/standard/main.css @@ -1,3 +1,7 @@ +/** + * This style sheet is used by the classic (aka standard) skin + */ + #article { padding: 4px; } @@ -67,6 +71,10 @@ a.printable { text-decoration: underline; } +a.new { + color: #ba0000; +} + a.stub { color: #772233; text-decoration: none; diff --git a/skins/vector/images/arrow-down-focus-icon.png b/skins/vector/images/arrow-down-focus-icon.png Binary files differindex e20dc4b6..7640bd1e 100644 --- a/skins/vector/images/arrow-down-focus-icon.png +++ b/skins/vector/images/arrow-down-focus-icon.png diff --git a/skins/vector/images/arrow-down-icon.png b/skins/vector/images/arrow-down-icon.png Binary files differindex 437b9518..12e3b932 100644 --- a/skins/vector/images/arrow-down-icon.png +++ b/skins/vector/images/arrow-down-icon.png diff --git a/skins/vector/images/audio-icon.png b/skins/vector/images/audio-icon.png Binary files differindex ffd0b1c2..5a1d2f43 100644 --- a/skins/vector/images/audio-icon.png +++ b/skins/vector/images/audio-icon.png diff --git a/skins/vector/images/border.png b/skins/vector/images/border.png Binary files differindex 6e3330ff..f9ca8cc3 100644 --- a/skins/vector/images/border.png +++ b/skins/vector/images/border.png diff --git a/skins/vector/images/bullet-icon.png b/skins/vector/images/bullet-icon.png Binary files differindex e304b267..7bae98f6 100644 --- a/skins/vector/images/bullet-icon.png +++ b/skins/vector/images/bullet-icon.png diff --git a/skins/vector/images/document-icon.png b/skins/vector/images/document-icon.png Binary files differindex 7b68120a..4d56572b 100644 --- a/skins/vector/images/document-icon.png +++ b/skins/vector/images/document-icon.png diff --git a/skins/vector/images/edit-icon.png b/skins/vector/images/edit-icon.png Binary files differindex 92153e8e..462ca643 100644 --- a/skins/vector/images/edit-icon.png +++ b/skins/vector/images/edit-icon.png diff --git a/skins/vector/images/external-link-ltr-icon.png b/skins/vector/images/external-link-ltr-icon.png Binary files differindex fe642b5c..acf260fc 100644 --- a/skins/vector/images/external-link-ltr-icon.png +++ b/skins/vector/images/external-link-ltr-icon.png diff --git a/skins/vector/images/external-link-rtl-icon.png b/skins/vector/images/external-link-rtl-icon.png Binary files differindex 01e0d798..7d5ee375 100644 --- a/skins/vector/images/external-link-rtl-icon.png +++ b/skins/vector/images/external-link-rtl-icon.png diff --git a/skins/vector/images/file-icon.png b/skins/vector/images/file-icon.png Binary files differindex 8a4baf2c..ed246698 100644 --- a/skins/vector/images/file-icon.png +++ b/skins/vector/images/file-icon.png diff --git a/skins/vector/images/link-icon.png b/skins/vector/images/link-icon.png Binary files differindex 469fd2b4..b70efaaa 100644 --- a/skins/vector/images/link-icon.png +++ b/skins/vector/images/link-icon.png diff --git a/skins/vector/images/lock-icon.png b/skins/vector/images/lock-icon.png Binary files differindex 46b72f52..a9ba8a72 100644 --- a/skins/vector/images/lock-icon.png +++ b/skins/vector/images/lock-icon.png diff --git a/skins/vector/images/mail-icon.png b/skins/vector/images/mail-icon.png Binary files differindex a8ad2fd7..9823d72c 100644 --- a/skins/vector/images/mail-icon.png +++ b/skins/vector/images/mail-icon.png diff --git a/skins/vector/images/news-icon.png b/skins/vector/images/news-icon.png Binary files differindex bb03a892..ade1a376 100644 --- a/skins/vector/images/news-icon.png +++ b/skins/vector/images/news-icon.png diff --git a/skins/vector/images/page-base.png b/skins/vector/images/page-base.png Binary files differindex be760917..b3ecd30d 100644 --- a/skins/vector/images/page-base.png +++ b/skins/vector/images/page-base.png diff --git a/skins/vector/images/page-fade.png b/skins/vector/images/page-fade.png Binary files differindex 2b08cfe2..1436cda0 100644 --- a/skins/vector/images/page-fade.png +++ b/skins/vector/images/page-fade.png diff --git a/skins/vector/images/portal-break-ltr.png b/skins/vector/images/portal-break-ltr.png Binary files differindex 76ca4915..cec17ea1 100644 --- a/skins/vector/images/portal-break-ltr.png +++ b/skins/vector/images/portal-break-ltr.png diff --git a/skins/vector/images/portal-break-rtl.png b/skins/vector/images/portal-break-rtl.png Binary files differindex 773792aa..e5f6223e 100644 --- a/skins/vector/images/portal-break-rtl.png +++ b/skins/vector/images/portal-break-rtl.png diff --git a/skins/vector/images/portal-break.png b/skins/vector/images/portal-break.png Binary files differindex 5feaa459..90c39182 100644 --- a/skins/vector/images/portal-break.png +++ b/skins/vector/images/portal-break.png diff --git a/skins/vector/images/preferences-base.png b/skins/vector/images/preferences-base.png Binary files differindex 947895f1..8e0082b1 100644 --- a/skins/vector/images/preferences-base.png +++ b/skins/vector/images/preferences-base.png diff --git a/skins/vector/images/preferences-break.png b/skins/vector/images/preferences-break.png Binary files differindex 6c5c68c4..e59f5783 100644 --- a/skins/vector/images/preferences-break.png +++ b/skins/vector/images/preferences-break.png diff --git a/skins/vector/images/preferences-edge.png b/skins/vector/images/preferences-edge.png Binary files differindex e6a9a480..411a1aaa 100644 --- a/skins/vector/images/preferences-edge.png +++ b/skins/vector/images/preferences-edge.png diff --git a/skins/vector/images/preferences-fade.png b/skins/vector/images/preferences-fade.png Binary files differindex 3aa30bb9..638084dc 100644 --- a/skins/vector/images/preferences-fade.png +++ b/skins/vector/images/preferences-fade.png diff --git a/skins/vector/images/search-fade.png b/skins/vector/images/search-fade.png Binary files differindex e96f6678..6cb7d286 100644 --- a/skins/vector/images/search-fade.png +++ b/skins/vector/images/search-fade.png diff --git a/skins/vector/images/tab-break.png b/skins/vector/images/tab-break.png Binary files differindex 95be27b5..c03c72e4 100644 --- a/skins/vector/images/tab-break.png +++ b/skins/vector/images/tab-break.png diff --git a/skins/vector/images/tab-current-fade.png b/skins/vector/images/tab-current-fade.png Binary files differindex fb3a2cb6..b8f772fa 100644 --- a/skins/vector/images/tab-current-fade.png +++ b/skins/vector/images/tab-current-fade.png diff --git a/skins/vector/images/tab-normal-fade.png b/skins/vector/images/tab-normal-fade.png Binary files differindex fcee0dfb..f719a88d 100644 --- a/skins/vector/images/tab-normal-fade.png +++ b/skins/vector/images/tab-normal-fade.png diff --git a/skins/vector/images/talk-icon.png b/skins/vector/images/talk-icon.png Binary files differindex 12862a09..c4434351 100644 --- a/skins/vector/images/talk-icon.png +++ b/skins/vector/images/talk-icon.png diff --git a/skins/vector/images/user-icon.png b/skins/vector/images/user-icon.png Binary files differindex a3b38b3a..57f9f8db 100644 --- a/skins/vector/images/user-icon.png +++ b/skins/vector/images/user-icon.png diff --git a/skins/vector/images/video-icon.png b/skins/vector/images/video-icon.png Binary files differindex 06bc9b64..e934a0ff 100644 --- a/skins/vector/images/video-icon.png +++ b/skins/vector/images/video-icon.png diff --git a/skins/vector/images/watch-icons.png b/skins/vector/images/watch-icons.png Binary files differindex a2871626..03aa7d54 100644 --- a/skins/vector/images/watch-icons.png +++ b/skins/vector/images/watch-icons.png diff --git a/skins/vector/screen-hd.css b/skins/vector/screen-hd.css new file mode 100644 index 00000000..b90fd63b --- /dev/null +++ b/skins/vector/screen-hd.css @@ -0,0 +1,28 @@ +/* Vector screen styles for high definition displays */ + +div#content { + margin-left: 11em; + padding: 1.25em 1.5em 1.5em 1.5em; +} +#p-logo { + left: 0.5em; +} +div#footer { + margin-left: 11em; + padding: 1.25em; +} +#mw-panel { + padding-left: 0.5em; +} +#p-search { + margin-right: 1em; +} +#left-navigation { + left: 11em; +} +#p-personal { + right: 1em; +} +#mw-head-base { + margin-left: 11em; +} diff --git a/skins/vector/screen.css b/skins/vector/screen.css index ded0a005..4069d9e4 100644 --- a/skins/vector/screen.css +++ b/skins/vector/screen.css @@ -65,386 +65,386 @@ div#mw-head h5 { margin: 0; padding: 0; } - /* Hide empty portlets */ - div.emptyPortlet { +/* Hide empty portlets */ +div.emptyPortlet { display: none; - } - /* Personal */ - #p-personal { - position: absolute; - top: 0; - right: 0.75em; - } - #p-personal h5 { - display: none; - } - #p-personal ul { - list-style: none; - margin: 0; - padding-left: 10em; /* Keep from overlapping logo */ - } - /* @noflip */ - #p-personal li { - line-height: 1.125em; - float: left; - } - /* This one flips! */ - #p-personal li { - margin-left: 0.75em; - margin-top: 0.5em; - font-size: 0.75em; - white-space: nowrap; - } - /* Navigation Containers */ - #left-navigation { - position: absolute; - left: 10em; - top: 2.5em; - } - #right-navigation { - float: right; - margin-top: 2.5em; - } - /* Navigation Labels */ - div.vectorTabs h5, - div.vectorMenu h5 span { - display: none; - } - /* Namespaces and Views */ - /* @noflip */ - div.vectorTabs { - float: left; - height: 2.5em; - } - div.vectorTabs { - /* @embed */ - background-image: url(images/tab-break.png); - background-position: bottom left; - background-repeat: no-repeat; - padding-left: 1px; - } - /* @noflip */ - div.vectorTabs ul { - float: left; - } - div.vectorTabs ul { - height: 100%; - list-style: none; - margin: 0; - padding: 0; - } - /* @noflip */ - div.vectorTabs ul li { - float: left; - } - /* OVERRIDDEN BY COMPLIANT BROWSERS */ - div.vectorTabs ul li { - line-height: 1.125em; - display: inline-block; - height: 100%; - margin: 0; - padding: 0; - background-color: #f3f3f3; - /* @embed */ - background-image: url(images/tab-normal-fade.png); - background-position: bottom left; - background-repeat: repeat-x; - white-space:nowrap; - } - /* IGNORED BY IE6 */ - div.vectorTabs ul > li { - display: block; - } - div.vectorTabs li.selected { - /* @embed */ - background-image: url(images/tab-current-fade.png); - } - /* OVERRIDDEN BY COMPLIANT BROWSERS */ - div.vectorTabs li a { - display: inline-block; - height: 1.9em; - padding-left: 0.5em; - padding-right: 0.5em; - color: #0645ad; - cursor: pointer; - font-size: 0.8em; - } - /* IGNORED BY IE6 */ - div.vectorTabs li > a { - display: block; - } - div.vectorTabs li.icon a { - background-position: bottom right; - background-repeat: no-repeat; - } - /* OVERRIDDEN BY COMPLIANT BROWSERS */ - div.vectorTabs span a { - display: inline-block; - padding-top: 1.25em; - } - /* IGNORED BY IE6 */ - /* @noflip */ - div.vectorTabs span > a { - float: left; - display: block; - } - div.vectorTabs span { - display: inline-block; - /* @embed */ - background-image: url(images/tab-break.png); - background-position: bottom right; - background-repeat: no-repeat; - } - div.vectorTabs li.selected a, - div.vectorTabs li.selected a:visited{ - color: #333333; - text-decoration: none; - } - div.vectorTabs li.new a, - div.vectorTabs li.new a:visited{ - color: #a55858; - } - /* Variants and Actions */ - /* @noflip */ - div.vectorMenu { - direction: ltr; - float: left; - /* @embed */ - background-image: url(images/arrow-down-icon.png); - background-position: 100% 60%; - background-repeat: no-repeat; - cursor: pointer; - } - div.vectorMenuFocus { - /* @embed */ - background-image: url(images/arrow-down-focus-icon.png); - background-position: 100% 60%; - } - /* @noflip */ - body.rtl div.vectorMenu { - direction: rtl; - } - /* OVERRIDDEN BY COMPLIANT BROWSERS */ - /* @noflip */ - div#mw-head div.vectorMenu h5 { - float: left; - /* @embed */ - background-image: url(images/tab-break.png); - background-repeat: no-repeat; - } - /* This will be flipped - unlike the one above it */ - div#mw-head div.vectorMenu h5 { - background-position: bottom left; - margin-left: -1px; - } - /* IGNORED BY IE6 */ - div#mw-head div.vectorMenu > h5 { - background-image: none; - } - div#mw-head div.vectorMenu h4 { - display: inline-block; - float: left; - font-size: 0.8em; - padding-left: 0.5em; - padding-top: 1.375em; - font-weight: normal; - border: none; - } - /* OVERRIDDEN BY COMPLIANT BROWSERS */ - /* @noflip */ - div.vectorMenu h5 a { - display: inline-block; - width: 24px; - height: 2.5em; - text-decoration: none; - /* @embed */ - background-image: url(images/tab-break.png); - background-repeat: no-repeat; - } - /* This will be flipped - unlike the one above it */ - div.vectorMenu h5 a { - background-position: bottom right; - } - /* IGNORED BY IE6 */ - div.vectorMenu h5 > a { - display: block; - } - div.vectorMenu div.menu { - position: relative; - display: none; - clear: both; - text-align: left; - } - /* OVERRIDDEN BY COMPLIANT BROWSERS */ - /* @noflip */ - body.rtl div.vectorMenu div.menu { - margin-left: 24px; - } - /* IGNORED BY IE6 */ - /* @noflip */ - body.rtl div.vectorMenu > div.menu { - margin-left: auto; - } - /* IGNORED BY IE6 */ - /* Also fixes old versions of FireFox */ - /* @noflip */ - body.rtl div.vectorMenu > div.menu, - x:-moz-any-link { - margin-left: 23px; - } - /* Enable forcing showing of the menu for accessibility */ - div.vectorMenu:hover div.menu, - div.vectorMenu div.menuForceShow { - display: block; - } - div.vectorMenu ul { - position: absolute; - background-color: white; - border: solid 1px silver; - border-top-width: 0; - list-style: none; - list-style-image: none; - list-style-type: none; - padding: 0; - margin: 0; - margin-left: -1px; - text-align: left; - } - /* Fixes old versions of FireFox */ - div.vectorMenu ul, - x:-moz-any-link { - min-width: 5em; - } - /* Returns things back to normal in modern versions of FireFox */ - div.vectorMenu ul, - x:-moz-any-link, - x:default { - min-width: 0; - } - div.vectorMenu li { - padding: 0; - margin: 0; - text-align: left; - line-height: 1em; - } - /* OVERRIDDEN BY COMPLIANT BROWSERS */ - div.vectorMenu li a { - display: inline-block; - padding: 0.5em; - white-space: nowrap; - color: #0645ad; - cursor: pointer; - font-size: 0.8em; - } - /* IGNORED BY IE6 */ - div.vectorMenu li > a { - display: block; - } - div.vectorMenu li.selected a, - div.vectorMenu li.selected a:visited { - color: #333333; - text-decoration: none; - } - /* Search */ - #p-search h5 { - display: none; - } - /* @noflip */ - #p-search { - float: left; - } - #p-search { - margin-right: 0.5em; - margin-left: 0.5em; - } - #p-search form, - #p-search input { - margin: 0; - margin-top: 0.4em; - } - div#simpleSearch { - display: block; - width: 14em; - height: 1.4em; - margin-top: 0.65em; - position: relative; - min-height: 1px; /* Gotta trigger hasLayout for IE7 */ - border: solid 1px #AAAAAA; - color: black; - background-color: white; - /* @embed */ - background-image: url(images/search-fade.png); - background-position: top left; - background-repeat: repeat-x; - } - div#simpleSearch label { - /* - * DON'T PANIC! Browsers that won't scale this properly are the same browsers that have JS issues that prevent - * this from ever being shown anyways. - */ - font-size: 13px; - top: 0.25em; - direction: ltr; - } - div#simpleSearch input { - color: black; - direction: ltr; - } - div#simpleSearch input:focus { - outline: none; - } - div#simpleSearch input.placeholder { - color: #999999; - } - div#simpleSearch input::-webkit-input-placeholder { - color: #999999; - } - div#simpleSearch input#searchInput { - position: absolute; - top: 0; - left: 0; - width: 90%; - margin: 0; - padding: 0; - padding-left: 0.2em; - padding-top: 0.2em; - padding-bottom: 0.2em; - outline: none; - border: none; - /* - * DON'T PANIC! Browsers that won't scale this properly are the same browsers that have JS issues that prevent - * this from ever being shown anyways. - */ - font-size: 13px; - background-color: transparent; - direction: ltr; - } - div#simpleSearch button#searchButton { - position: absolute; - width: 10%; - right: 0; - top: 0; - padding: 0; - padding-top: 0.3em; - padding-bottom: 0.2em; - padding-right: 0.4em; - margin: 0; - border: none; - cursor: pointer; - background-color: transparent; - background-image: none; - } - /* OVERRIDDEN BY COMPLIANT BROWSERS */ - div#simpleSearch button#searchButton img { - border: none; - margin: 0; - margin-top: -3px; - padding: 0; - } - /* IGNORED BY IE6 */ - div#simpleSearch button#searchButton > img { - margin: 0; - } +} +/* Personal */ +#p-personal { + position: absolute; + top: 0.33em; + right: 0.75em; +} +#p-personal h5 { + display: none; +} +#p-personal ul { + list-style: none; + margin: 0; + padding-left: 10em; /* Keep from overlapping logo */ +} +/* @noflip */ +#p-personal li { + line-height: 1.125em; + float: left; +} +/* This one flips! */ +#p-personal li { + margin-left: 0.75em; + margin-top: 0.5em; + font-size: 0.75em; + white-space: nowrap; +} +/* Navigation Containers */ +#left-navigation { + position: absolute; + left: 10em; + top: 2.5em; +} +#right-navigation { + float: right; + margin-top: 2.5em; +} +/* Navigation Labels */ +div.vectorTabs h5, +div.vectorMenu h5 span { + display: none; +} +/* Namespaces and Views */ +/* @noflip */ +div.vectorTabs { + float: left; + height: 2.5em; +} +div.vectorTabs { + /* @embed */ + background-image: url(images/tab-break.png); + background-position: bottom left; + background-repeat: no-repeat; + padding-left: 1px; +} +/* @noflip */ +div.vectorTabs ul { + float: left; +} +div.vectorTabs ul { + height: 100%; + list-style: none; + margin: 0; + padding: 0; +} +/* @noflip */ +div.vectorTabs ul li { + float: left; +} +/* OVERRIDDEN BY COMPLIANT BROWSERS */ +div.vectorTabs ul li { + line-height: 1.125em; + display: inline-block; + height: 100%; + margin: 0; + padding: 0; + background-color: #f3f3f3; + /* @embed */ + background-image: url(images/tab-normal-fade.png); + background-position: bottom left; + background-repeat: repeat-x; + white-space: nowrap; +} +/* IGNORED BY IE6 */ +div.vectorTabs ul > li { + display: block; +} +div.vectorTabs li.selected { + /* @embed */ + background-image: url(images/tab-current-fade.png); +} +/* OVERRIDDEN BY COMPLIANT BROWSERS */ +div.vectorTabs li a { + display: inline-block; + height: 1.9em; + padding-left: 0.5em; + padding-right: 0.5em; + color: #0645ad; + cursor: pointer; + font-size: 0.8em; +} +/* IGNORED BY IE6 */ +div.vectorTabs li > a { + display: block; +} +div.vectorTabs li.icon a { + background-position: bottom right; + background-repeat: no-repeat; +} +/* OVERRIDDEN BY COMPLIANT BROWSERS */ +div.vectorTabs span a { + display: inline-block; + padding-top: 1.25em; +} +/* IGNORED BY IE6 */ +/* @noflip */ +div.vectorTabs span > a { + float: left; + display: block; +} +div.vectorTabs span { + display: inline-block; + /* @embed */ + background-image: url(images/tab-break.png); + background-position: bottom right; + background-repeat: no-repeat; +} +div.vectorTabs li.selected a, +div.vectorTabs li.selected a:visited{ + color: #333; + text-decoration: none; +} +div.vectorTabs li.new a, +div.vectorTabs li.new a:visited{ + color: #a55858; +} +/* Variants and Actions */ +/* @noflip */ +div.vectorMenu { + direction: ltr; + float: left; + /* @embed */ + background-image: url(images/arrow-down-icon.png); + background-position: 100% 60%; + background-repeat: no-repeat; + cursor: pointer; +} +div.vectorMenuFocus { + /* @embed */ + background-image: url(images/arrow-down-focus-icon.png); + background-position: 100% 60%; +} +/* @noflip */ +body.rtl div.vectorMenu { + direction: rtl; +} +/* OVERRIDDEN BY COMPLIANT BROWSERS */ +/* @noflip */ +div#mw-head div.vectorMenu h5 { + float: left; + /* @embed */ + background-image: url(images/tab-break.png); + background-repeat: no-repeat; +} +/* This will be flipped - unlike the one above it */ +div#mw-head div.vectorMenu h5 { + background-position: bottom left; + margin-left: -1px; +} +/* IGNORED BY IE6 */ +div#mw-head div.vectorMenu > h5 { + background-image: none; +} +div#mw-head div.vectorMenu h4 { + display: inline-block; + float: left; + font-size: 0.8em; + padding-left: 0.5em; + padding-top: 1.375em; + font-weight: normal; + border: none; +} +/* OVERRIDDEN BY COMPLIANT BROWSERS */ +/* @noflip */ +div.vectorMenu h5 a { + display: inline-block; + width: 24px; + height: 2.5em; + text-decoration: none; + /* @embed */ + background-image: url(images/tab-break.png); + background-repeat: no-repeat; +} +/* This will be flipped - unlike the one above it */ +div.vectorMenu h5 a { + background-position: bottom right; +} +/* IGNORED BY IE6 */ +div.vectorMenu h5 > a { + display: block; +} +div.vectorMenu div.menu { + position: relative; + display: none; + clear: both; + text-align: left; +} +/* OVERRIDDEN BY COMPLIANT BROWSERS */ +/* @noflip */ +body.rtl div.vectorMenu div.menu { + margin-left: 24px; +} +/* IGNORED BY IE6 */ +/* @noflip */ +body.rtl div.vectorMenu > div.menu { + margin-left: auto; +} +/* IGNORED BY IE6 */ +/* Also fixes old versions of FireFox */ +/* @noflip */ +body.rtl div.vectorMenu > div.menu, +x:-moz-any-link { + margin-left: 23px; +} +/* Enable forcing showing of the menu for accessibility */ +div.vectorMenu:hover div.menu, +div.vectorMenu div.menuForceShow { + display: block; +} +div.vectorMenu ul { + position: absolute; + background-color: white; + border: solid 1px silver; + border-top-width: 0; + list-style: none; + list-style-image: none; + list-style-type: none; + padding: 0; + margin: 0; + margin-left: -1px; + text-align: left; +} +/* Fixes old versions of FireFox */ +div.vectorMenu ul, +x:-moz-any-link { + min-width: 5em; +} +/* Returns things back to normal in modern versions of FireFox */ +div.vectorMenu ul, +x:-moz-any-link, +x:default { + min-width: 0; +} +div.vectorMenu li { + padding: 0; + margin: 0; + text-align: left; + line-height: 1em; +} +/* OVERRIDDEN BY COMPLIANT BROWSERS */ +div.vectorMenu li a { + display: inline-block; + padding: 0.5em; + white-space: nowrap; + color: #0645ad; + cursor: pointer; + font-size: 0.8em; +} +/* IGNORED BY IE6 */ +div.vectorMenu li > a { + display: block; +} +div.vectorMenu li.selected a, +div.vectorMenu li.selected a:visited { + color: #333; + text-decoration: none; +} +/* Search */ +#p-search h5 { + display: none; +} +/* @noflip */ +#p-search { + float: left; +} +#p-search { + margin-right: 0.5em; + margin-left: 0.5em; +} +#p-search form, +#p-search input { + margin: 0; + margin-top: 0.4em; +} +div#simpleSearch { + display: block; + width: 14em; + height: 1.4em; + margin-top: 0.65em; + position: relative; + min-height: 1px; /* Gotta trigger hasLayout for IE7 */ + border: solid 1px #aaa; + color: black; + background-color: white; + /* @embed */ + background-image: url(images/search-fade.png); + background-position: top left; + background-repeat: repeat-x; +} +div#simpleSearch label { + /* + * DON'T PANIC! Browsers that won't scale this properly are the same browsers that have JS issues that prevent + * this from ever being shown anyways. + */ + font-size: 13px; + top: 0.25em; + direction: ltr; +} +div#simpleSearch input { + color: black; + direction: ltr; +} +div#simpleSearch input:focus { + outline: none; +} +div#simpleSearch input.placeholder { + color: #999; +} +div#simpleSearch input::-webkit-input-placeholder { + color: #999; +} +div#simpleSearch input#searchInput { + position: absolute; + top: 0; + left: 0; + width: 90%; + margin: 0; + padding: 0; + padding-left: 0.2em; + padding-top: 0.2em; + padding-bottom: 0.2em; + outline: none; + border: none; + /* + * DON'T PANIC! Browsers that won't scale this properly are the same browsers that have JS issues that prevent + * this from ever being shown anyways. + */ + font-size: 13px; + background-color: transparent; + direction: ltr; +} +div#simpleSearch button#searchButton { + position: absolute; + width: 10%; + right: 0; + top: 0; + padding: 0; + padding-top: 0.3em; + padding-bottom: 0.2em; + padding-right: 0.4em; + margin: 0; + border: none; + cursor: pointer; + background-color: transparent; + background-image: none; +} +/* OVERRIDDEN BY COMPLIANT BROWSERS */ +div#simpleSearch button#searchButton img { + border: none; + margin: 0; + margin-top: -3px; + padding: 0; +} +/* IGNORED BY IE6 */ +div#simpleSearch button#searchButton > img { + margin: 0; +} /* Panel */ div#mw-panel { position: absolute; @@ -453,50 +453,50 @@ div#mw-panel { width: 10em; left: 0; } - div#mw-panel div.portal { - padding-bottom: 1.5em; - direction: ltr; - } - div#mw-panel div.portal h5 { - font-weight: normal; - color: #444444; - padding: 0.25em; - padding-top: 0; - padding-left: 1.75em; - cursor: default; - border: none; - font-size: 0.75em; - } - div#mw-panel div.portal div.body { - margin: 0; - padding-top: 0.5em; - margin-left: 1.25em; - /* @embed */ - background-image: url(images/portal-break.png); - background-repeat: no-repeat; - background-position: top left; - } - div#mw-panel div.portal div.body ul { - list-style: none; - list-style-image: none; - list-style-type: none; - padding: 0; - margin: 0; - } - div#mw-panel div.portal div.body ul li { - line-height: 1.125em; - padding: 0; - padding-bottom: 0.5em; - margin: 0; - overflow: hidden; - font-size: 0.75em; - } - div#mw-panel div.portal div.body ul li a { - color: #0645ad; - } - div#mw-panel div.portal div.body ul li a:visited { - color: #0b0080; - } +div#mw-panel div.portal { + padding-bottom: 1.5em; + direction: ltr; +} +div#mw-panel div.portal h5 { + font-weight: normal; + color: #444; + padding: 0.25em; + padding-top: 0; + padding-left: 1.75em; + cursor: default; + border: none; + font-size: 0.75em; +} +div#mw-panel div.portal div.body { + margin: 0; + padding-top: 0.5em; + margin-left: 1.25em; + /* @embed */ + background-image: url(images/portal-break.png); + background-repeat: no-repeat; + background-position: top left; +} +div#mw-panel div.portal div.body ul { + list-style: none; + list-style-image: none; + list-style-type: none; + padding: 0; + margin: 0; +} +div#mw-panel div.portal div.body ul li { + line-height: 1.125em; + padding: 0; + padding-bottom: 0.5em; + margin: 0; + font-size: 0.75em; + word-wrap: break-word; +} +div#mw-panel div.portal div.body ul li a { + color: #0645ad; +} +div#mw-panel div.portal div.body ul li a:visited { + color: #0b0080; +} /* Footer */ div#footer { margin-left: 10em; @@ -520,7 +520,7 @@ div#footer ul li { padding: 0; padding-top: 0.5em; padding-bottom: 0.5em; - color: #333333; + color: #333; font-size: 0.7em; } div#footer #footer-icons { @@ -619,7 +619,7 @@ div#footer #footer-places li { background-image: url(images/preferences-fade.png); background-position: bottom; background-repeat: repeat-x; - color: #333333; + color: #333; text-decoration: none; } #preferences { @@ -628,14 +628,14 @@ div#footer #footer-places li { margin: 0; margin-top: -2px; clear: both; - border: solid 1px #cccccc; + border: solid 1px #ccc; background-color: #f9f9f9; /* @embed */ background-image: url(images/preferences-base.png); } #preferences fieldset { border: none; - border-top: solid 1px #cccccc; + border-top: solid 1px #ccc; } #preferences fieldset.prefsection { border: none; @@ -643,7 +643,7 @@ div#footer #footer-places li { margin: 1em; } #preferences legend { - color: #666666; + color: #666; } #preferences fieldset.prefsection legend.mainLegend { display: none; @@ -652,10 +652,10 @@ div#footer #footer-places li { padding-left: 0.5em; padding-right: 0.5em; } -#preferences td.htmlform-tip { +.htmlform-tip { font-size: x-small; padding: .2em 2em; - color: #666666; + color: #666; } #preferences div.mw-prefs-buttons { padding: 1em; @@ -683,7 +683,7 @@ ul { list-style-image: url(images/bullet-icon.png); } -pre { +pre, .mw-code { line-height: 1.3em; } @@ -762,9 +762,6 @@ div#content a.external[href *=".pdf?"], div#content a.external[href *=".PDF?"], padding-right: 13px; } -div#content .printfooter { - display: none; -} /* Icon for Usernames */ #pt-userpage, #pt-anonuserpage, @@ -787,13 +784,26 @@ div#content .printfooter { position: relative; width: 100%; } -#mw-js-message { - font-size: 0.8em; -} div#bodyContent { line-height: 1.5em; } +/* mediawiki.notification */ +.skin-vector #mw-notification-area { + top: 7em; + font-size: 0.8em; +} +.skin-vector .mw-notification { + background-color: #fff; + background-color: rgba(255, 255, 255, 0.93); + padding: 0.75em 1.5em; + border: solid 1px #a7d7f9; + border-radius: 0.75em; + -webkit-box-shadow: 0 2px 10px 0 rgba(0, 0, 0, 0.125); + -moz-box-shadow: 0 2px 10px 0 rgba(0, 0, 0, 0.125); + box-shadow: 0 2px 10px 0 rgba(0, 0, 0, 0.125); +} + /* Watch/Unwatch Icon Styling */ #ca-unwatch.icon a, #ca-watch.icon a { @@ -838,12 +848,53 @@ div#bodyContent { } div.vectorTabs ul { /* @embed */ - background-image:url(images/tab-break.png); - background-position:right bottom; - background-repeat:no-repeat; + background-image: url(images/tab-break.png); + background-position: right bottom; + background-repeat: no-repeat; } /* Tooltips are outside of the normal body code, so this helps make the size of the text sensible */ .tipsy { font-size: 0.8em; } + +/* Animate between standard and high definition layouts */ + +body.vector-animateLayout div#content, +body.vector-animateLayout div#footer { + -moz-transition: margin-left 250ms, padding 250ms; + -webkit-transition: margin-left 250ms, padding 250ms; + -o-transition: margin-left 250ms, padding 250ms; + transition: margin-left 250ms, padding 250ms; +} +body.vector-animateLayout #p-logo, +body.vector-animateLayout #left-navigation { + -moz-transition: left 250ms; + -webkit-transition: left 250ms; + -o-transition: left 250ms; + transition: left 250ms; +} +body.vector-animateLayout #mw-panel { + -moz-transition: padding-left 250ms; + -webkit-transition: padding-left 250ms; + -o-transition: padding-left 250ms; + transition: padding-left 250ms; +} +body.vector-animateLayout #p-search { + -moz-transition: margin-right 250ms; + -webkit-transition: margin-right 250ms; + -o-transition: margin-right 250ms; + transition: margin-right 250ms; +} +body.vector-animateLayout #p-personal { + -moz-transition: right 250ms; + -webkit-transition: right 250ms; + -o-transition: right 250ms; + transition: right 250ms; +} +body.vector-animateLayout #mw-head-base { + -moz-transition: margin-left 250ms; + -webkit-transition: margin-left 250ms; + -o-transition: margin-left 250ms; + transition: margin-left 250ms; +} diff --git a/skins/vector/vector.js b/skins/vector/vector.js index cc76b328..8b719e5b 100644 --- a/skins/vector/vector.js +++ b/skins/vector/vector.js @@ -1,21 +1,21 @@ -/* +/** * Vector-specific scripts */ -jQuery( function( $ ) { - $( 'div.vectorMenu' ).each( function() { - var self = this; - $( 'h5:first a:first', this ) +jQuery( function ( $ ) { + $( 'div.vectorMenu' ).each( function () { + var $el = $( this ); + $el.find( 'h5:first a:first' ) // For accessibility, show the menu when the hidden link in the menu is clicked (bug 24298) - .click( function( e ) { - $( '.menu:first', self ).toggleClass( 'menuForceShow' ); + .click( function ( e ) { + $el.find( '.menu:first' ).toggleClass( 'menuForceShow' ); e.preventDefault(); - }) + } ) // When the hidden link has focus, also set a class that will change the arrow icon - .focus( function() { - $( self ).addClass( 'vectorMenuFocus' ); - }) - .blur( function() { - $( self ).removeClass( 'vectorMenuFocus' ); - }); - }); -}); + .focus( function () { + $el.addClass( 'vectorMenuFocus' ); + } ) + .blur( function () { + $el.removeClass( 'vectorMenuFocus' ); + } ); + } ); +} ); |