summaryrefslogtreecommitdiff
path: root/skins
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2013-12-08 09:55:49 +0100
committerPierre Schmitz <pierre@archlinux.de>2013-12-08 09:55:49 +0100
commit4ac9fa081a7c045f6a9f1cfc529d82423f485b2e (patch)
treeaf68743f2f4a47d13f2b0eb05f5c4aaf86d8ea37 /skins
parentaf4da56f1ad4d3ef7b06557bae365da2ea27a897 (diff)
Update to MediaWiki 1.22.0
Diffstat (limited to 'skins')
-rw-r--r--skins/ArchLinux.php120
-rw-r--r--skins/Chick.php47
-rw-r--r--skins/CologneBlue.php47
-rw-r--r--skins/Modern.php55
-rw-r--r--skins/MonoBook.php120
-rw-r--r--skins/MySkin.php35
-rw-r--r--skins/Nostalgia.php147
-rw-r--r--skins/Simple.php58
-rw-r--r--skins/Standard.php294
-rw-r--r--skins/Vector.php194
-rw-r--r--skins/archlinux/IE60Fixes.css9
-rw-r--r--skins/archlinux/Opera6Fixes.css20
-rw-r--r--skins/archlinux/Opera7Fixes.css21
-rw-r--r--skins/archlinux/Opera9Fixes.css11
-rw-r--r--skins/archlinux/external-ltr.pngbin143 -> 141 bytes
-rw-r--r--skins/archlinux/external-rtl.pngbin141 -> 141 bytes
-rw-r--r--skins/archlinux/main.css26
-rw-r--r--skins/archlinux/wiki-indexed.pngbin8008 -> 8007 bytes
-rw-r--r--skins/chick/IE60Fixes.css79
-rw-r--r--skins/chick/main.css368
-rw-r--r--skins/cologneblue/print.css6
-rw-r--r--skins/cologneblue/screen.css19
-rw-r--r--skins/common/IEFixes.js82
-rw-r--r--skins/common/ajax.js121
-rw-r--r--skins/common/commonContent.css49
-rw-r--r--skins/common/commonElements.css26
-rw-r--r--skins/common/commonPrint.css7
-rw-r--r--skins/common/config.css8
-rw-r--r--skins/common/config.js14
-rw-r--r--skins/common/images/Arr_u.pngbin207 -> 207 bytes
-rw-r--r--skins/common/images/ar/button_headline.pngbin487 -> 484 bytes
-rw-r--r--skins/common/images/ar/button_nowiki.pngbin875 -> 874 bytes
-rw-r--r--skins/common/images/arrow_disabled_left_25.pngbin301 -> 301 bytes
-rw-r--r--skins/common/images/arrow_disabled_right_25.pngbin307 -> 307 bytes
-rw-r--r--skins/common/images/arrow_right_25.pngbin341 -> 337 bytes
-rw-r--r--skins/common/images/button_hr.pngbin222 -> 200 bytes
-rw-r--r--skins/common/images/button_nowiki.pngbin322 -> 322 bytes
-rw-r--r--skins/common/images/button_sig.pngbin926 -> 920 bytes
-rw-r--r--skins/common/images/button_template.pngbin188 -> 178 bytes
-rw-r--r--skins/common/images/critical-32.pngbin1763 -> 1758 bytes
-rw-r--r--skins/common/images/fa/button_nowiki.pngbin875 -> 874 bytes
-rw-r--r--skins/common/images/feed-icon.pngbin557 -> 542 bytes
-rw-r--r--skins/common/images/icons/fileicon-psd.pngbin10376 -> 7756 bytes
-rw-r--r--skins/common/images/magnify-clip-rtl.pngbin208 -> 149 bytes
-rw-r--r--skins/common/images/question-small.pngbin0 -> 316 bytes
-rw-r--r--skins/common/images/question.svg12
-rw-r--r--skins/common/images/tick-32.pngbin1137 -> 1103 bytes
-rw-r--r--skins/common/images/warning-32.pngbin1301 -> 1299 bytes
-rw-r--r--skins/common/oldshared.css42
-rw-r--r--skins/common/protect.js236
-rw-r--r--skins/common/shared.css196
-rw-r--r--skins/common/upload.js322
-rw-r--r--skins/common/wikibits.js745
-rw-r--r--skins/common/wikiprintable.css59
-rw-r--r--skins/modern/external.pngbin143 -> 141 bytes
-rw-r--r--skins/modern/main.css43
-rw-r--r--skins/modern/print.css2
-rw-r--r--skins/monobook/IE60Fixes.css9
-rw-r--r--skins/monobook/Opera6Fixes.css20
-rw-r--r--skins/monobook/Opera7Fixes.css21
-rw-r--r--skins/monobook/Opera9Fixes.css11
-rw-r--r--skins/monobook/external-ltr.pngbin143 -> 141 bytes
-rw-r--r--skins/monobook/external-rtl.pngbin141 -> 141 bytes
-rw-r--r--skins/monobook/main.css26
-rw-r--r--skins/monobook/wiki-indexed.pngbin8008 -> 8007 bytes
-rw-r--r--skins/myskin/main.css1
-rw-r--r--skins/nostalgia/screen.css56
-rw-r--r--skins/simple/discussionitem_icon.gifbin549 -> 0 bytes
-rw-r--r--skins/simple/external.pngbin143 -> 0 bytes
-rw-r--r--skins/simple/file_icon.gifbin323 -> 0 bytes
-rw-r--r--skins/simple/link_icon.gifbin342 -> 0 bytes
-rw-r--r--skins/simple/lock_icon.gifbin321 -> 0 bytes
-rw-r--r--skins/simple/mail_icon.gifbin321 -> 0 bytes
-rw-r--r--skins/simple/main.css427
-rw-r--r--skins/standard/main.css188
-rw-r--r--skins/vector/beta/screen.less75
-rw-r--r--skins/vector/beta/variables.less37
-rw-r--r--skins/vector/collapsibleNav.js121
-rw-r--r--skins/vector/collapsibleNav.less91
-rw-r--r--skins/vector/collapsibleTabs.js210
-rw-r--r--skins/vector/externalLinks.less75
-rw-r--r--skins/vector/images/arrow-collapsed-ltr.pngbin0 -> 143 bytes
-rw-r--r--skins/vector/images/arrow-collapsed-ltr.svg37
-rw-r--r--skins/vector/images/arrow-collapsed-rtl.pngbin0 -> 145 bytes
-rw-r--r--skins/vector/images/arrow-collapsed-rtl.svg37
-rw-r--r--skins/vector/images/arrow-down-focus-icon.svg37
-rw-r--r--skins/vector/images/arrow-down-icon.svg37
-rw-r--r--skins/vector/images/arrow-expanded.pngbin0 -> 145 bytes
-rw-r--r--skins/vector/images/arrow-expanded.svg37
-rw-r--r--skins/vector/images/edit-icon.pngbin277 -> 276 bytes
-rw-r--r--skins/vector/images/external-link-ltr-icon.pngbin143 -> 141 bytes
-rw-r--r--skins/vector/images/external-link-rtl-icon.pngbin141 -> 141 bytes
-rw-r--r--skins/vector/images/mail-icon.pngbin197 -> 197 bytes
-rw-r--r--skins/vector/images/news-icon.pngbin180 -> 180 bytes
-rw-r--r--skins/vector/images/page-fade.pngbin115 -> 115 bytes
-rw-r--r--skins/vector/images/portal-break-ltr.pngbin169 -> 168 bytes
-rw-r--r--skins/vector/images/preferences-break.pngbin205 -> 103 bytes
-rw-r--r--skins/vector/images/tab-break.pngbin125 -> 125 bytes
-rw-r--r--skins/vector/images/talk-icon.pngbin173 -> 173 bytes
-rw-r--r--skins/vector/images/user-icon.svg424
-rw-r--r--skins/vector/images/video-icon.pngbin162 -> 162 bytes
-rw-r--r--skins/vector/screen-hd.less (renamed from skins/vector/screen-hd.css)4
-rw-r--r--skins/vector/screen.less (renamed from skins/vector/screen.css)376
-rw-r--r--skins/vector/styles-beta.less13
-rw-r--r--skins/vector/styles.less11
-rw-r--r--skins/vector/variables.less37
-rw-r--r--skins/vector/vector.js52
107 files changed, 2657 insertions, 3453 deletions
diff --git a/skins/ArchLinux.php b/skins/ArchLinux.php
index d7a79616..b25d8cd8 100644
--- a/skins/ArchLinux.php
+++ b/skins/ArchLinux.php
@@ -22,8 +22,9 @@
* @ingroup Skins
*/
-if( !defined( 'MEDIAWIKI' ) )
+if ( !defined( 'MEDIAWIKI' ) ) {
die( -1 );
+}
/**
* Inherit main code from SkinTemplate, set the CSS and template filter.
@@ -39,17 +40,10 @@ class SkinArchLinux extends SkinTemplate {
* @param $out OutputPage
*/
function setupSkinUserCss( OutputPage $out ) {
- global $wgHandheldStyle;
parent::setupSkinUserCss( $out );
$out->addModuleStyles( 'skins.archlinux' );
- // Ugh. Can't do this properly because $wgHandheldStyle may be a URL
- if( $wgHandheldStyle ) {
- // Currently in testing... try 'chick/main.css'
- $out->addStyle( $wgHandheldStyle, 'handheld' );
- }
-
// TODO: Migrate all of these
$out->addStyle( 'archlinux/IE60Fixes.css', 'screen', 'IE 6' );
$out->addStyle( 'archlinux/IE70Fixes.css', 'screen', 'IE 7' );
@@ -105,39 +99,39 @@ class ArchLinuxTemplate extends BaseTemplate {
<div id="globalWrapper">
<div id="column-content"><div id="content" class="mw-body-primary" role="main">
<a id="top"></a>
- <?php if($this->data['sitenotice']) { ?><div id="siteNotice"><?php $this->html('sitenotice') ?></div><?php } ?>
+ <?php if ( $this->data['sitenotice'] ) { ?><div id="siteNotice"><?php $this->html( 'sitenotice' ) ?></div><?php } ?>
<h1 id="firstHeading" class="firstHeading" lang="<?php
- $this->data['pageLanguage'] = $this->getSkin()->getTitle()->getPageViewLanguage()->getCode();
- $this->html( 'pageLanguage' );
- ?>"><span dir="auto"><?php $this->html('title') ?></span></h1>
+ $this->data['pageLanguage'] = $this->getSkin()->getTitle()->getPageViewLanguage()->getHtmlCode();
+ $this->text( 'pageLanguage' );
+ ?>"><span dir="auto"><?php $this->html( 'title' ) ?></span></h1>
<div id="bodyContent" class="mw-body">
- <div id="siteSub"><?php $this->msg('tagline') ?></div>
- <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['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><?php $this->msg( 'comma-separator' ) ?><a href="#searchInput"><?php $this->msg('jumptosearch') ?></a></div>
+ <div id="siteSub"><?php $this->msg( 'tagline' ) ?></div>
+ <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['newtalk'] ) { ?>
+ <div class="usermessage"><?php $this->html( 'newtalk' ) ?></div>
<?php } ?>
+ <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>
+
<!-- start content -->
-<?php $this->html('bodytext') ?>
- <?php if($this->data['catlinks']) { $this->html('catlinks'); } ?>
+<?php $this->html( 'bodytext' ) ?>
+ <?php if ( $this->data['catlinks'] ) { $this->html( 'catlinks' ); } ?>
<!-- end content -->
- <?php if($this->data['dataAfterContent']) { $this->html ('dataAfterContent'); } ?>
+ <?php if ( $this->data['dataAfterContent'] ) { $this->html( 'dataAfterContent' ); } ?>
<div class="visualClear"></div>
</div>
</div></div>
-<div id="column-one"<?php $this->html('userlangattributes') ?>>
+<div id="column-one"<?php $this->html( 'userlangattributes' ) ?>>
<h2><?php $this->msg( 'navigation-heading' ) ?></h2>
<?php $this->cactions(); ?>
<div class="portlet" id="p-personal" role="navigation">
- <h3><?php $this->msg('personaltools') ?></h3>
+ <h3><?php $this->msg( 'personaltools' ) ?></h3>
<div class="pBody">
- <ul<?php $this->html('userlangattributes') ?>>
-<?php foreach($this->getPersonalTools() as $key => $item) { ?>
- <?php echo $this->makeListItem($key, $item); ?>
+ <ul<?php $this->html( 'userlangattributes' ) ?>>
+<?php foreach ( $this->getPersonalTools() as $key => $item ) { ?>
+ <?php echo $this->makeListItem( $key, $item ); ?>
<?php } ?>
</ul>
@@ -148,7 +142,7 @@ class ArchLinuxTemplate extends BaseTemplate {
echo Html::element( 'a', array(
'href' => $this->data['nav_urls']['mainpage']['href'],
'style' => "background-image: url({$this->data['logopath']});" )
- + Linker::tooltipAndAccesskeyAttribs('p-logo') ); ?>
+ + Linker::tooltipAndAccesskeyAttribs( 'p-logo' ) ); ?>
</div>
<?php
@@ -161,14 +155,14 @@ class ArchLinuxTemplate extends BaseTemplate {
$validFooterLinks = $this->getFooterLinks( "flat" ); // Additional footer links
if ( count( $validFooterIcons ) + count( $validFooterLinks ) > 0 ) { ?>
-<div id="footer" role="contentinfo"<?php $this->html('userlangattributes') ?>>
+<div id="footer" role="contentinfo"<?php $this->html( 'userlangattributes' ) ?>>
<?php
$footerEnd = '</div>';
} else {
$footerEnd = '';
}
foreach ( $validFooterIcons as $blockName => $footerIcons ) { ?>
- <div id="f-<?php echo htmlspecialchars($blockName); ?>ico">
+ <div id="f-<?php echo htmlspecialchars( $blockName ); ?>ico">
<?php foreach ( $footerIcons as $icon ) { ?>
<?php echo $this->getSkin()->makeFooterIcon( $icon ); ?>
@@ -180,8 +174,8 @@ class ArchLinuxTemplate extends BaseTemplate {
if ( count( $validFooterLinks ) > 0 ) {
?> <ul id="f-list">
<?php
- foreach( $validFooterLinks as $aLink ) { ?>
- <li id="<?php echo $aLink ?>"><?php $this->html($aLink) ?></li>
+ foreach ( $validFooterLinks as $aLink ) { ?>
+ <li id="<?php echo $aLink ?>"><?php $this->html( $aLink ) ?></li>
<?php
}
?>
@@ -204,13 +198,20 @@ echo $footerEnd;
* @param $sidebar array
*/
protected function renderPortals( $sidebar ) {
- if ( !isset( $sidebar['SEARCH'] ) ) $sidebar['SEARCH'] = true;
- if ( !isset( $sidebar['TOOLBOX'] ) ) $sidebar['TOOLBOX'] = true;
- if ( !isset( $sidebar['LANGUAGES'] ) ) $sidebar['LANGUAGES'] = true;
+ if ( !isset( $sidebar['SEARCH'] ) ) {
+ $sidebar['SEARCH'] = true;
+ }
+ if ( !isset( $sidebar['TOOLBOX'] ) ) {
+ $sidebar['TOOLBOX'] = true;
+ }
+ if ( !isset( $sidebar['LANGUAGES'] ) ) {
+ $sidebar['LANGUAGES'] = true;
+ }
- foreach( $sidebar as $boxName => $content ) {
- if ( $content === false )
+ foreach ( $sidebar as $boxName => $content ) {
+ if ( $content === false ) {
continue;
+ }
if ( $boxName == 'SEARCH' ) {
$this->searchBox();
@@ -228,19 +229,19 @@ echo $footerEnd;
global $wgUseTwoButtonsSearchForm;
?>
<div id="p-search" class="portlet" role="search">
- <h3><label for="searchInput"><?php $this->msg('search') ?></label></h3>
+ <h3><label for="searchInput"><?php $this->msg( 'search' ) ?></label></h3>
<div id="searchBody" class="pBody">
- <form action="<?php $this->text('wgScript') ?>" id="searchform">
- <input type='hidden' name="title" value="<?php $this->text('searchtitle') ?>"/>
- <?php echo $this->makeSearchInput(array( "id" => "searchInput" )); ?>
+ <form action="<?php $this->text( 'wgScript' ) ?>" id="searchform">
+ <input type='hidden' name="title" value="<?php $this->text( 'searchtitle' ) ?>"/>
+ <?php echo $this->makeSearchInput( array( "id" => "searchInput" ) ); ?>
- <?php echo $this->makeSearchButton("go", array( "id" => "searchGoButton", "class" => "searchButton" ));
- if ($wgUseTwoButtonsSearchForm): ?>&#160;
- <?php echo $this->makeSearchButton("fulltext", array( "id" => "mw-searchButton", "class" => "searchButton" ));
- else: ?>
+ <?php echo $this->makeSearchButton( "go", array( "id" => "searchGoButton", "class" => "searchButton" ) );
+ if ( $wgUseTwoButtonsSearchForm ) { ?>&#160;
+ <?php echo $this->makeSearchButton( "fulltext", array( "id" => "mw-searchButton", "class" => "searchButton" ) );
+ } else { ?>
- <div><a href="<?php $this->text('searchaction') ?>" rel="search"><?php $this->msg('powersearch-legend') ?></a></div><?php
- endif; ?>
+ <div><a href="<?php $this->text( 'searchaction' ) ?>" rel="search"><?php $this->msg( 'powersearch-legend' ) ?></a></div><?php
+ } ?>
</form>
</div>
@@ -255,10 +256,10 @@ echo $footerEnd;
function cactions() {
?>
<div id="p-cactions" class="portlet" role="navigation">
- <h3><?php $this->msg('views') ?></h3>
+ <h3><?php $this->msg( 'views' ) ?></h3>
<div class="pBody">
<ul><?php
- foreach($this->data['content_actions'] as $key => $tab) {
+ foreach ( $this->data['content_actions'] as $key => $tab ) {
echo '
' . $this->makeListItem( $key, $tab );
} ?>
@@ -272,12 +273,12 @@ echo $footerEnd;
function toolbox() {
?>
<div class="portlet" id="p-tb" role="navigation">
- <h3><?php $this->msg('toolbox') ?></h3>
+ <h3><?php $this->msg( 'toolbox' ) ?></h3>
<div class="pBody">
<ul>
<?php
foreach ( $this->getToolbox() as $key => $tbitem ) { ?>
- <?php echo $this->makeListItem($key, $tbitem); ?>
+ <?php echo $this->makeListItem( $key, $tbitem ); ?>
<?php
}
@@ -292,14 +293,14 @@ echo $footerEnd;
/*************************************************************************************************/
function languageBox() {
- if( $this->data['language_urls'] ) {
+ if ( $this->data['language_urls'] ) {
?>
<div id="p-lang" class="portlet" role="navigation">
- <h3<?php $this->html('userlangattributes') ?>><?php $this->msg('otherlanguages') ?></h3>
+ <h3<?php $this->html( 'userlangattributes' ) ?>><?php $this->msg( 'otherlanguages' ) ?></h3>
<div class="pBody">
<ul>
-<?php foreach($this->data['language_urls'] as $key => $langlink) { ?>
- <?php echo $this->makeListItem($key, $langlink); ?>
+<?php foreach ( $this->data['language_urls'] as $key => $langlink ) { ?>
+ <?php echo $this->makeListItem( $key, $langlink ); ?>
<?php } ?>
</ul>
@@ -321,14 +322,15 @@ echo $footerEnd;
$portletAttribs['title'] = $tooltip;
}
echo ' ' . Html::openElement( 'div', $portletAttribs );
+ $msgObj = wfMessage( $bar );
?>
- <h3><?php $msg = wfMessage( $bar ); echo htmlspecialchars( $msg->exists() ? $msg->text() : $bar ); ?></h3>
+ <h3><?php echo htmlspecialchars( $msgObj->exists() ? $msgObj->text() : $bar ); ?></h3>
<div class='pBody'>
<?php if ( is_array( $cont ) ) { ?>
<ul>
-<?php foreach($cont as $key => $val) { ?>
- <?php echo $this->makeListItem($key, $val); ?>
+<?php foreach ( $cont as $key => $val ) { ?>
+ <?php echo $this->makeListItem( $key, $val ); ?>
<?php } ?>
</ul>
diff --git a/skins/Chick.php b/skins/Chick.php
deleted file mode 100644
index 75b807ad..00000000
--- a/skins/Chick.php
+++ /dev/null
@@ -1,47 +0,0 @@
-<?php
-/**
- * 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
- */
-
-if( !defined( 'MEDIAWIKI' ) )
- die( -1 );
-
-/**
- * Inherit main code from SkinTemplate, set the CSS and template filter.
- * @ingroup Skins
- */
-class SkinChick extends SkinTemplate {
- var $skinname = 'chick', $stylename = 'chick',
- $template = 'MonoBookTemplate', $useHeadElement = true;
-
- /**
- * @param $out OutputPage
- */
- function setupSkinUserCss( OutputPage $out ) {
- parent::setupSkinUserCss( $out );
-
- $out->addModuleStyles( 'skins.chick' );
-
- // TODO: Migrate all of these to RL
- $out->addStyle( 'chick/IE60Fixes.css', 'screen,handheld', 'IE 6' );
- }
-}
diff --git a/skins/CologneBlue.php b/skins/CologneBlue.php
index 21b07f7d..0370e05b 100644
--- a/skins/CologneBlue.php
+++ b/skins/CologneBlue.php
@@ -22,7 +22,7 @@
* @ingroup Skins
*/
-if( !defined( 'MEDIAWIKI' ) ) {
+if ( !defined( 'MEDIAWIKI' ) ) {
die( -1 );
}
@@ -39,7 +39,7 @@ class SkinCologneBlue extends SkinTemplate {
* @param $out OutputPage
*/
function setupSkinUserCss( OutputPage $out ) {
- $out->addModuleStyles( 'mediawiki.legacy.shared' );
+ parent::setupSkinUserCss( $out );
$out->addModuleStyles( 'mediawiki.legacy.oldshared' );
$out->addModuleStyles( 'skins.cologneblue' );
}
@@ -127,7 +127,7 @@ class CologneBlueTemplate extends BaseTemplate {
*
* @return string
*/
- function processBottomLink( $key, $navlink, $message=null ) {
+ function processBottomLink( $key, $navlink, $message = null ) {
if ( !$navlink ) {
// Empty navlinks might be passed.
return null;
@@ -202,7 +202,7 @@ class CologneBlueTemplate extends BaseTemplate {
$companionTitle = $title->isTalkPage() ? $title->getSubjectPage() : $title->getTalkPage();
$companionNamespace = $companionTitle->getNamespace();
- // TODO these messages appear to only be used by CologneBlue and legacy skins,
+ // TODO these messages are only be used by CologneBlue,
// kill and replace with something more sensibly named?
$nsToMessage = array(
NS_MAIN => 'articlepage',
@@ -234,7 +234,7 @@ class CologneBlueTemplate extends BaseTemplate {
// Use the regular navigational link, but replace its text. Everything else stays unmodified.
$namespacesLinks = $this->data['content_navigation']['namespaces'];
- return $this->processBottomLink( $message, $namespacesLinks[$key], $message );
+ return $this->processBottomLink( $message, $namespacesLinks[$key], $message );
}
/**
@@ -246,7 +246,7 @@ class CologneBlueTemplate extends BaseTemplate {
* @param $navlink array Navigational link generated by SkinTemplate
* @param $idPrefix mixed Prefix to add to id of this navlink. If false, id is removed entirely. Default is 'cb-'.
*/
- function processNavlinkForDocument( $navlink, $idPrefix='cb-' ) {
+ function processNavlinkForDocument( $navlink, $idPrefix = 'cb-' ) {
if ( $navlink['id'] ) {
$navlink['single-id'] = $navlink['id']; // to allow for tooltip generation
$navlink['tooltiponly'] = true; // but no accesskeys
@@ -255,7 +255,7 @@ class CologneBlueTemplate extends BaseTemplate {
if ( $idPrefix === false ) {
unset( $navlink['id'] );
} else {
- $navlink['id'] = $idPrefix . $navlink['id'];
+ $navlink['id'] = $idPrefix . $navlink['id'];
}
}
@@ -290,8 +290,8 @@ class CologneBlueTemplate extends BaseTemplate {
<div id="siteNotice"><?php echo $this->getSkin()->getSiteNotice() ?></div>
<?php } ?>
<h1 id="firstHeading" lang="<?php
- $this->data['pageLanguage'] = $this->getSkin()->getTitle()->getPageViewLanguage()->getCode();
- $this->html( 'pageLanguage' );
+ $this->data['pageLanguage'] = $this->getSkin()->getTitle()->getPageViewLanguage()->getHtmlCode();
+ $this->text( 'pageLanguage' );
?>"><span dir="auto"><?php echo $this->data['title'] ?></span></h1>
<?php if ( $this->translator->translate( 'tagline' ) ) { ?>
<p class="tagline"><?php echo htmlspecialchars( $this->translator->translate( 'tagline' ) ) ?></p>
@@ -316,7 +316,8 @@ class CologneBlueTemplate extends BaseTemplate {
ob_start();
?>
</div>
- <div id="footer" role="contentinfo">
+ <div id="footer">
+ <div id="footer-navigation" role="navigation">
<?php
// Page-related links
echo $this->bottomLinks();
@@ -328,8 +329,10 @@ class CologneBlueTemplate extends BaseTemplate {
$this->getSkin()->aboutLink(),
$this->searchForm( 'footer' )
) );
- echo "\n<br />";
-
+?>
+ </div>
+ <div id="footer-info" role="contentinfo">
+<?php
// Standard footer info
$footlinks = $this->getFooterLinks();
if ( $footlinks['info'] ) {
@@ -338,6 +341,7 @@ class CologneBlueTemplate extends BaseTemplate {
}
}
?>
+ </div>
</div>
</div>
<div id="mw-navigation">
@@ -376,7 +380,7 @@ class CologneBlueTemplate extends BaseTemplate {
);
$personalUrls = $this->getPersonalTools();
- foreach ( array ( 'logout', 'createaccount', 'login', 'anonlogin' ) as $key ) {
+ foreach ( array( 'logout', 'createaccount', 'login', 'anonlogin' ) as $key ) {
if ( $personalUrls[$key] ) {
$s[] = $this->makeListItem( $key, $personalUrls[$key], array( 'tag' => 'span' ) );
}
@@ -417,7 +421,7 @@ class CologneBlueTemplate extends BaseTemplate {
// Personal tools ("My pages")
$qbmyoptions = $this->getPersonalTools();
- foreach ( array ( 'logout', 'createaccount', 'login', 'anonlogin' ) as $key ) {
+ foreach ( array( 'logout', 'createaccount', 'login', 'anonlogin' ) as $key ) {
$qbmyoptions[$key] = null;
}
@@ -532,18 +536,17 @@ class CologneBlueTemplate extends BaseTemplate {
$search = $this->getSkin()->getRequest()->getText( 'search' );
$action = $this->data['searchaction'];
- $s = "<form id=\"searchform-" . htmlspecialchars($which) . "\" method=\"get\" class=\"inline\" action=\"$action\">";
- if( $which == 'footer' ) {
+ $s = "<form id=\"searchform-" . htmlspecialchars( $which ) . "\" method=\"get\" class=\"inline\" action=\"$action\">";
+ if ( $which == 'footer' ) {
$s .= wfMessage( 'qbfind' )->text() . ": ";
}
- $s .= "<input type='text' class=\"mw-searchInput\" name=\"search\" size=\"14\" value=\""
- . htmlspecialchars( substr( $search, 0, 256 ) ) . "\" />"
- . ($which == 'footer' ? " " : "<br />")
- . "<input type='submit' class=\"searchButton\" name=\"go\" value=\"" . wfMessage( 'searcharticle' )->escaped() . "\" />";
+ $s .= $this->makeSearchInput( array( 'class' => 'mw-searchInput', 'type' => 'text', 'size' => '14' ) );
+ $s .= ( $which == 'footer' ? " " : "<br />" );
+ $s .= $this->makeSearchButton( 'go', array( 'class' => 'searchButton' ) );
- if( $wgUseTwoButtonsSearchForm ) {
- $s .= " <input type='submit' class=\"searchButton\" name=\"fulltext\" value=\"" . wfMessage( 'searchbutton' )->escaped() . "\" />\n";
+ if ( $wgUseTwoButtonsSearchForm ) {
+ $s .= $this->makeSearchButton( 'fulltext', array( 'class' => 'searchButton' ) );
} else {
$s .= '<div><a href="' . $action . '" rel="search">' . wfMessage( 'powersearch-legend' )->escaped() . "</a></div>\n";
}
diff --git a/skins/Modern.php b/skins/Modern.php
index 9dbefb11..8d778cf6 100644
--- a/skins/Modern.php
+++ b/skins/Modern.php
@@ -22,8 +22,9 @@
* @ingroup Skins
*/
-if( !defined( 'MEDIAWIKI' ) )
+if ( !defined( 'MEDIAWIKI' ) ) {
die( -1 );
+}
/**
* Inherit main code from SkinTemplate, set the CSS and template filter.
@@ -39,7 +40,7 @@ class SkinModern extends SkinTemplate {
*/
function setupSkinUserCss( OutputPage $out ) {
parent::setupSkinUserCss( $out );
- $out->addModuleStyles ('skins.modern');
+ $out->addModuleStyles( 'skins.modern' );
}
}
@@ -66,9 +67,9 @@ class ModernTemplate extends MonoBookTemplate {
<!-- heading -->
<div id="mw_header"><h1 id="firstHeading" lang="<?php
- $this->data['pageLanguage'] = $this->getSkin()->getTitle()->getPageViewLanguage()->getCode();
- $this->html( 'pageLanguage' );
- ?>"><span dir="auto"><?php $this->html('title') ?></span></h1></div>
+ $this->data['pageLanguage'] = $this->getSkin()->getTitle()->getPageViewLanguage()->getHtmlCode();
+ $this->text( 'pageLanguage' );
+ ?>"><span dir="auto"><?php $this->html( 'title' ) ?></span></h1></div>
<div id="mw_main">
<div id="mw_contentwrapper">
@@ -82,30 +83,30 @@ class ModernTemplate extends MonoBookTemplate {
for the margins -->
<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>
- <?php if($this->data['newtalk'] ) {
- ?><div class="usermessage mw-topbox"><?php $this->html('newtalk') ?></div>
+ <div id="mw-js-message" style="display:none;"<?php $this->html( 'userlangattributes' ) ?>></div>
+ <div class="mw-topbox" id="siteSub"><?php $this->msg( 'tagline' ) ?></div>
+ <?php if ( $this->data['newtalk'] ) {
+ ?><div class="usermessage mw-topbox"><?php $this->html( 'newtalk' ) ?></div>
<?php } ?>
- <?php if($this->data['sitenotice']) {
- ?><div class="mw-topbox" id="siteNotice"><?php $this->html('sitenotice') ?></div>
+ <?php if ( $this->data['sitenotice'] ) {
+ ?><div class="mw-topbox" id="siteNotice"><?php $this->html( 'sitenotice' ) ?></div>
<?php } ?>
</div>
- <div id="contentSub"<?php $this->html('userlangattributes') ?>><?php $this->html('subtitle') ?></div>
+ <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><?php $this->msg( 'comma-separator' ) ?><a href="#searchInput"><?php $this->msg('jumptosearch') ?></a></div><?php } ?>
+ <?php if ( $this->data['undelete'] ) { ?><div id="contentSub2"><?php $this->html( 'undelete' ) ?></div><?php } ?>
+ <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 $this->html('bodytext') ?>
+ <?php $this->html( 'bodytext' ) ?>
<div class='mw_clear'></div>
- <?php if($this->data['catlinks']) { $this->html('catlinks'); } ?>
- <?php $this->html ('dataAfterContent') ?>
+ <?php if ( $this->data['catlinks'] ) { $this->html( 'catlinks' ); } ?>
+ <?php $this->html( 'dataAfterContent' ) ?>
</div><!-- mw_contentholder -->
</div><!-- mw_content -->
</div><!-- mw_contentwrapper -->
- <div id="mw_portlets"<?php $this->html("userlangattributes") ?>>
+ <div id="mw_portlets"<?php $this->html( "userlangattributes" ) ?>>
<h2><?php $this->msg( 'navigation-heading' ) ?></h2>
<!-- portlets -->
@@ -120,11 +121,11 @@ class ModernTemplate extends MonoBookTemplate {
<!-- personal portlet -->
<div class="portlet" id="p-personal" role="navigation">
- <h3><?php $this->msg('personaltools') ?></h3>
+ <h3><?php $this->msg( 'personaltools' ) ?></h3>
<div class="pBody">
<ul>
-<?php foreach($this->getPersonalTools() as $key => $item) { ?>
- <?php echo $this->makeListItem($key, $item); ?>
+<?php foreach ( $this->getPersonalTools() as $key => $item ) { ?>
+ <?php echo $this->makeListItem( $key, $item ); ?>
<?php } ?>
</ul>
@@ -133,19 +134,19 @@ class ModernTemplate extends MonoBookTemplate {
<!-- footer -->
- <div id="footer" role="contentinfo"<?php $this->html('userlangattributes') ?>>
+ <div id="footer" role="contentinfo"<?php $this->html( 'userlangattributes' ) ?>>
<ul id="f-list">
<?php
- foreach( $this->getFooterLinks("flat") as $aLink ) {
- if( isset( $this->data[$aLink] ) && $this->data[$aLink] ) {
-?> <li id="<?php echo$aLink?>"><?php $this->html($aLink) ?></li>
+ foreach ( $this->getFooterLinks( "flat" ) as $aLink ) {
+ if ( isset( $this->data[$aLink] ) && $this->data[$aLink] ) {
+?> <li id="<?php echo $aLink ?>"><?php $this->html( $aLink ) ?></li>
<?php }
}
?>
</ul>
<?php
- foreach ( $this->getFooterIcons("nocopyright") as $blockName => $footerIcons ) { ?>
- <div id="mw_<?php echo htmlspecialchars($blockName); ?>">
+ foreach ( $this->getFooterIcons( "nocopyright" ) as $blockName => $footerIcons ) { ?>
+ <div id="mw_<?php echo htmlspecialchars( $blockName ); ?>">
<?php
foreach ( $footerIcons as $icon ) { ?>
<?php echo $this->getSkin()->makeFooterIcon( $icon, 'withoutImage' ); ?>
diff --git a/skins/MonoBook.php b/skins/MonoBook.php
index f03d31b8..6d66cac3 100644
--- a/skins/MonoBook.php
+++ b/skins/MonoBook.php
@@ -25,8 +25,9 @@
* @ingroup Skins
*/
-if( !defined( 'MEDIAWIKI' ) )
+if ( !defined( 'MEDIAWIKI' ) ) {
die( -1 );
+}
/**
* Inherit main code from SkinTemplate, set the CSS and template filter.
@@ -42,17 +43,10 @@ class SkinMonoBook extends SkinTemplate {
* @param $out OutputPage
*/
function setupSkinUserCss( OutputPage $out ) {
- global $wgHandheldStyle;
parent::setupSkinUserCss( $out );
$out->addModuleStyles( 'skins.monobook' );
- // Ugh. Can't do this properly because $wgHandheldStyle may be a URL
- if( $wgHandheldStyle ) {
- // Currently in testing... try 'chick/main.css'
- $out->addStyle( $wgHandheldStyle, 'handheld' );
- }
-
// TODO: Migrate all of these
$out->addStyle( 'monobook/IE60Fixes.css', 'screen', 'IE 6' );
$out->addStyle( 'monobook/IE70Fixes.css', 'screen', 'IE 7' );
@@ -82,39 +76,39 @@ class MonoBookTemplate extends BaseTemplate {
?><div id="globalWrapper">
<div id="column-content"><div id="content" class="mw-body-primary" role="main">
<a id="top"></a>
- <?php if($this->data['sitenotice']) { ?><div id="siteNotice"><?php $this->html('sitenotice') ?></div><?php } ?>
+ <?php if ( $this->data['sitenotice'] ) { ?><div id="siteNotice"><?php $this->html( 'sitenotice' ) ?></div><?php } ?>
<h1 id="firstHeading" class="firstHeading" lang="<?php
- $this->data['pageLanguage'] = $this->getSkin()->getTitle()->getPageViewLanguage()->getCode();
- $this->html( 'pageLanguage' );
- ?>"><span dir="auto"><?php $this->html('title') ?></span></h1>
+ $this->data['pageLanguage'] = $this->getSkin()->getTitle()->getPageViewLanguage()->getHtmlCode();
+ $this->text( 'pageLanguage' );
+ ?>"><span dir="auto"><?php $this->html( 'title' ) ?></span></h1>
<div id="bodyContent" class="mw-body">
- <div id="siteSub"><?php $this->msg('tagline') ?></div>
- <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['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><?php $this->msg( 'comma-separator' ) ?><a href="#searchInput"><?php $this->msg('jumptosearch') ?></a></div>
+ <div id="siteSub"><?php $this->msg( 'tagline' ) ?></div>
+ <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['newtalk'] ) { ?>
+ <div class="usermessage"><?php $this->html( 'newtalk' ) ?></div>
<?php } ?>
+ <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>
+
<!-- start content -->
-<?php $this->html('bodytext') ?>
- <?php if($this->data['catlinks']) { $this->html('catlinks'); } ?>
+<?php $this->html( 'bodytext' ) ?>
+ <?php if ( $this->data['catlinks'] ) { $this->html( 'catlinks' ); } ?>
<!-- end content -->
- <?php if($this->data['dataAfterContent']) { $this->html ('dataAfterContent'); } ?>
+ <?php if ( $this->data['dataAfterContent'] ) { $this->html( 'dataAfterContent' ); } ?>
<div class="visualClear"></div>
</div>
</div></div>
-<div id="column-one"<?php $this->html('userlangattributes') ?>>
+<div id="column-one"<?php $this->html( 'userlangattributes' ) ?>>
<h2><?php $this->msg( 'navigation-heading' ) ?></h2>
<?php $this->cactions(); ?>
<div class="portlet" id="p-personal" role="navigation">
- <h3><?php $this->msg('personaltools') ?></h3>
+ <h3><?php $this->msg( 'personaltools' ) ?></h3>
<div class="pBody">
- <ul<?php $this->html('userlangattributes') ?>>
-<?php foreach($this->getPersonalTools() as $key => $item) { ?>
- <?php echo $this->makeListItem($key, $item); ?>
+ <ul<?php $this->html( 'userlangattributes' ) ?>>
+<?php foreach ( $this->getPersonalTools() as $key => $item ) { ?>
+ <?php echo $this->makeListItem( $key, $item ); ?>
<?php } ?>
</ul>
@@ -125,7 +119,7 @@ class MonoBookTemplate extends BaseTemplate {
echo Html::element( 'a', array(
'href' => $this->data['nav_urls']['mainpage']['href'],
'style' => "background-image: url({$this->data['logopath']});" )
- + Linker::tooltipAndAccesskeyAttribs('p-logo') ); ?>
+ + Linker::tooltipAndAccesskeyAttribs( 'p-logo' ) ); ?>
</div>
<?php
@@ -138,14 +132,14 @@ class MonoBookTemplate extends BaseTemplate {
$validFooterLinks = $this->getFooterLinks( "flat" ); // Additional footer links
if ( count( $validFooterIcons ) + count( $validFooterLinks ) > 0 ) { ?>
-<div id="footer" role="contentinfo"<?php $this->html('userlangattributes') ?>>
+<div id="footer" role="contentinfo"<?php $this->html( 'userlangattributes' ) ?>>
<?php
$footerEnd = '</div>';
} else {
$footerEnd = '';
}
foreach ( $validFooterIcons as $blockName => $footerIcons ) { ?>
- <div id="f-<?php echo htmlspecialchars($blockName); ?>ico">
+ <div id="f-<?php echo htmlspecialchars( $blockName ); ?>ico">
<?php foreach ( $footerIcons as $icon ) { ?>
<?php echo $this->getSkin()->makeFooterIcon( $icon ); ?>
@@ -157,8 +151,8 @@ class MonoBookTemplate extends BaseTemplate {
if ( count( $validFooterLinks ) > 0 ) {
?> <ul id="f-list">
<?php
- foreach( $validFooterLinks as $aLink ) { ?>
- <li id="<?php echo $aLink ?>"><?php $this->html($aLink) ?></li>
+ foreach ( $validFooterLinks as $aLink ) { ?>
+ <li id="<?php echo $aLink ?>"><?php $this->html( $aLink ) ?></li>
<?php
}
?>
@@ -181,13 +175,20 @@ echo $footerEnd;
* @param $sidebar array
*/
protected function renderPortals( $sidebar ) {
- if ( !isset( $sidebar['SEARCH'] ) ) $sidebar['SEARCH'] = true;
- if ( !isset( $sidebar['TOOLBOX'] ) ) $sidebar['TOOLBOX'] = true;
- if ( !isset( $sidebar['LANGUAGES'] ) ) $sidebar['LANGUAGES'] = true;
+ if ( !isset( $sidebar['SEARCH'] ) ) {
+ $sidebar['SEARCH'] = true;
+ }
+ if ( !isset( $sidebar['TOOLBOX'] ) ) {
+ $sidebar['TOOLBOX'] = true;
+ }
+ if ( !isset( $sidebar['LANGUAGES'] ) ) {
+ $sidebar['LANGUAGES'] = true;
+ }
- foreach( $sidebar as $boxName => $content ) {
- if ( $content === false )
+ foreach ( $sidebar as $boxName => $content ) {
+ if ( $content === false ) {
continue;
+ }
if ( $boxName == 'SEARCH' ) {
$this->searchBox();
@@ -205,19 +206,19 @@ echo $footerEnd;
global $wgUseTwoButtonsSearchForm;
?>
<div id="p-search" class="portlet" role="search">
- <h3><label for="searchInput"><?php $this->msg('search') ?></label></h3>
+ <h3><label for="searchInput"><?php $this->msg( 'search' ) ?></label></h3>
<div id="searchBody" class="pBody">
- <form action="<?php $this->text('wgScript') ?>" id="searchform">
- <input type='hidden' name="title" value="<?php $this->text('searchtitle') ?>"/>
- <?php echo $this->makeSearchInput(array( "id" => "searchInput" )); ?>
+ <form action="<?php $this->text( 'wgScript' ) ?>" id="searchform">
+ <input type='hidden' name="title" value="<?php $this->text( 'searchtitle' ) ?>"/>
+ <?php echo $this->makeSearchInput( array( "id" => "searchInput" ) ); ?>
- <?php echo $this->makeSearchButton("go", array( "id" => "searchGoButton", "class" => "searchButton" ));
- if ($wgUseTwoButtonsSearchForm): ?>&#160;
- <?php echo $this->makeSearchButton("fulltext", array( "id" => "mw-searchButton", "class" => "searchButton" ));
- else: ?>
+ <?php echo $this->makeSearchButton( "go", array( "id" => "searchGoButton", "class" => "searchButton" ) );
+ if ( $wgUseTwoButtonsSearchForm ) { ?>&#160;
+ <?php echo $this->makeSearchButton( "fulltext", array( "id" => "mw-searchButton", "class" => "searchButton" ) );
+ } else { ?>
- <div><a href="<?php $this->text('searchaction') ?>" rel="search"><?php $this->msg('powersearch-legend') ?></a></div><?php
- endif; ?>
+ <div><a href="<?php $this->text( 'searchaction' ) ?>" rel="search"><?php $this->msg( 'powersearch-legend' ) ?></a></div><?php
+ } ?>
</form>
</div>
@@ -232,10 +233,10 @@ echo $footerEnd;
function cactions() {
?>
<div id="p-cactions" class="portlet" role="navigation">
- <h3><?php $this->msg('views') ?></h3>
+ <h3><?php $this->msg( 'views' ) ?></h3>
<div class="pBody">
<ul><?php
- foreach($this->data['content_actions'] as $key => $tab) {
+ foreach ( $this->data['content_actions'] as $key => $tab ) {
echo '
' . $this->makeListItem( $key, $tab );
} ?>
@@ -249,12 +250,12 @@ echo $footerEnd;
function toolbox() {
?>
<div class="portlet" id="p-tb" role="navigation">
- <h3><?php $this->msg('toolbox') ?></h3>
+ <h3><?php $this->msg( 'toolbox' ) ?></h3>
<div class="pBody">
<ul>
<?php
foreach ( $this->getToolbox() as $key => $tbitem ) { ?>
- <?php echo $this->makeListItem($key, $tbitem); ?>
+ <?php echo $this->makeListItem( $key, $tbitem ); ?>
<?php
}
@@ -269,14 +270,14 @@ echo $footerEnd;
/*************************************************************************************************/
function languageBox() {
- if( $this->data['language_urls'] ) {
+ if ( $this->data['language_urls'] ) {
?>
<div id="p-lang" class="portlet" role="navigation">
- <h3<?php $this->html('userlangattributes') ?>><?php $this->msg('otherlanguages') ?></h3>
+ <h3<?php $this->html( 'userlangattributes' ) ?>><?php $this->msg( 'otherlanguages' ) ?></h3>
<div class="pBody">
<ul>
-<?php foreach($this->data['language_urls'] as $key => $langlink) { ?>
- <?php echo $this->makeListItem($key, $langlink); ?>
+<?php foreach ( $this->data['language_urls'] as $key => $langlink ) { ?>
+ <?php echo $this->makeListItem( $key, $langlink ); ?>
<?php } ?>
</ul>
@@ -298,14 +299,15 @@ echo $footerEnd;
$portletAttribs['title'] = $tooltip;
}
echo ' ' . Html::openElement( 'div', $portletAttribs );
+ $msgObj = wfMessage( $bar );
?>
- <h3><?php $msg = wfMessage( $bar ); echo htmlspecialchars( $msg->exists() ? $msg->text() : $bar ); ?></h3>
+ <h3><?php echo htmlspecialchars( $msgObj->exists() ? $msgObj->text() : $bar ); ?></h3>
<div class='pBody'>
<?php if ( is_array( $cont ) ) { ?>
<ul>
-<?php foreach($cont as $key => $val) { ?>
- <?php echo $this->makeListItem($key, $val); ?>
+<?php foreach ( $cont as $key => $val ) { ?>
+ <?php echo $this->makeListItem( $key, $val ); ?>
<?php } ?>
</ul>
diff --git a/skins/MySkin.php b/skins/MySkin.php
deleted file mode 100644
index fb49b88d..00000000
--- a/skins/MySkin.php
+++ /dev/null
@@ -1,35 +0,0 @@
-<?php
-/**
- * MySkin: Monobook without the CSS. The idea is that you
- * 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
- */
-
-if( !defined( 'MEDIAWIKI' ) )
- die( -1 );
-
-/**
- * Inherit main code from SkinTemplate, set the CSS and template filter.
- * @ingroup Skins
- */
-class SkinMySkin extends SkinTemplate {
- var $skinname = 'myskin', $stylename = 'myskin',
- $template = 'MonoBookTemplate', $useHeadElement = true;
-}
diff --git a/skins/Nostalgia.php b/skins/Nostalgia.php
deleted file mode 100644
index 3028915e..00000000
--- a/skins/Nostalgia.php
+++ /dev/null
@@ -1,147 +0,0 @@
-<?php
-/**
- * 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
- */
-
-if( !defined( 'MEDIAWIKI' ) ) {
- die( -1 );
-}
-
-/**
- * @todo document
- * @ingroup Skins
- */
-class SkinNostalgia extends SkinLegacy {
- var $skinname = 'nostalgia', $stylename = 'nostalgia',
- $template = 'NostalgiaTemplate';
-
- /**
- * @param $out OutputPage
- */
- function setupSkinUserCss( OutputPage $out ) {
- parent::setupSkinUserCss( $out );
- $out->addModuleStyles( 'skins.nostalgia' );
- }
-
-}
-
-class NostalgiaTemplate extends LegacyTemplate {
-
- /**
- * @return string
- */
- function doBeforeContent() {
- $s = "\n<div id='content'>\n<div id='top'>\n";
- $s .= '<div id="logo">' . $this->getSkin()->logoText( 'right' ) . '</div>';
-
- $s .= $this->pageTitle();
- $s .= $this->pageSubtitle() . "\n";
-
- $s .= '<div id="topbar">';
- $s .= $this->topLinks() . "\n<br />";
-
- $notice = $this->getSkin()->getSiteNotice();
- if( $notice ) {
- $s .= "\n<div id='siteNotice'>$notice</div>\n";
- }
- $s .= $this->pageTitleLinks();
-
- $ol = $this->otherLanguages();
- if( $ol ) {
- $s .= '<br />' . $ol;
- }
-
- $s .= $this->getSkin()->getCategories();
-
- $s .= "<br clear='all' /></div><hr />\n</div>\n";
- $s .= "\n<div id='article'>";
-
- return $s;
- }
-
- /**
- * @return string
- */
- function topLinks() {
- $sep = " |\n";
-
- $s = $this->getSkin()->mainPageLink() . $sep
- . Linker::specialLink( 'Recentchanges' );
-
- if ( $this->data['isarticle'] ) {
- $s .= $sep . '<strong>' . $this->editThisPage() . '</strong>' . $sep . $this->talkLink() .
- $sep . $this->historyLink();
- }
-
- /* show links to different language variants */
- $s .= $this->variantLinks();
- $s .= $this->extensionTabLinks();
- if ( !$this->data['loggedin'] ) {
- $s .= $sep . Linker::specialLink( 'Userlogin' );
- } else {
- /* show user page and user talk links */
- $user = $this->getSkin()->getUser();
- $s .= $sep . Linker::link( $user->getUserPage(), wfMessage( 'mypage' )->escaped() );
- $s .= $sep . Linker::link( $user->getTalkPage(), wfMessage( 'mytalk' )->escaped() );
- if ( $user->getNewtalk() ) {
- $s .= ' *';
- }
- /* show watchlist link */
- $s .= $sep . Linker::specialLink( 'Watchlist' );
- /* show my contributions link */
- $s .= $sep . Linker::link(
- SpecialPage::getSafeTitleFor( 'Contributions', $this->data['username'] ),
- wfMessage( 'mycontris' )->escaped() );
- /* show my preferences link */
- $s .= $sep . Linker::specialLink( 'Preferences' );
- /* show upload file link */
- if( UploadBase::isEnabled() && UploadBase::isAllowed( $user ) === true ) {
- $s .= $sep . $this->getUploadLink();
- }
-
- /* show log out link */
- $s .= $sep . Linker::specialLink( 'Userlogout' );
- }
-
- $s .= $sep . $this->specialPagesList();
-
- return $s;
- }
-
- /**
- * @return string
- */
- function doAfterContent() {
- $s = "\n</div><br clear='all' />\n";
-
- $s .= "\n<div id='footer'><hr />";
-
- $s .= $this->bottomLinks();
- $s .= "\n<br />" . $this->pageStats();
- $s .= "\n<br />" . $this->getSkin()->mainPageLink()
- . ' | ' . $this->getSkin()->aboutLink()
- . ' | ' . $this->searchForm();
-
- $s .= "\n</div>\n</div>\n";
-
- return $s;
- }
-}
diff --git a/skins/Simple.php b/skins/Simple.php
deleted file mode 100644
index 9a3ab946..00000000
--- a/skins/Simple.php
+++ /dev/null
@@ -1,58 +0,0 @@
-<?php
-/**
- * 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
- */
-
-if( !defined( 'MEDIAWIKI' ) )
- die( -1 );
-
-/** */
-require_once( __DIR__ . '/MonoBook.php' );
-
-/**
- * Inherit main code from SkinTemplate, set the CSS and template filter.
- * @ingroup Skins
- */
-class SkinSimple extends SkinTemplate {
- var $skinname = 'simple', $stylename = 'simple',
- $template = 'MonoBookTemplate', $useHeadElement = true;
-
- /**
- * @param $out OutputPage
- */
- function setupSkinUserCss( OutputPage $out ) {
- parent::setupSkinUserCss( $out );
-
- $out->addModuleStyles( 'skins.simple' );
-
- /* Add some userprefs specific CSS styling */
- $rules = array();
- $underline = "";
-
- if ( $this->getUser()->getOption( 'underline' ) < 2 ) {
- $underline = "text-decoration: " . $this->getUser()->getOption( 'underline' ) ? 'underline !important' : 'none' . ";";
- }
- $style = implode( "\n", $rules );
- $out->addInlineStyle( $style, 'flip' );
-
- }
-}
diff --git a/skins/Standard.php b/skins/Standard.php
deleted file mode 100644
index 5b358e06..00000000
--- a/skins/Standard.php
+++ /dev/null
@@ -1,294 +0,0 @@
-<?php
-/**
- * Standard (a.k.a. Classic) skin: old MediaWiki default skin
- *
- * 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
- */
-
-if( !defined( 'MEDIAWIKI' ) ) {
- die( -1 );
-}
-
-/**
- * @todo document
- * @ingroup Skins
- */
-class SkinStandard extends SkinLegacy {
- var $skinname = 'standard', $stylename = 'standard',
- $template = 'StandardTemplate';
-
- /**
- * @param $out OutputPage
- */
- function setupSkinUserCss( OutputPage $out ) {
- parent::setupSkinUserCss( $out );
- $out->addModuleStyles( 'skins.standard' );
-
- $qb = $this->qbSetting();
- $rules = array();
-
- if ( 2 == $qb ) { # Right
- $rules[] = "/* @noflip */#quickbar { position: absolute; top: 4px; right: 4px; border-left: 2px solid #000000; }";
- $rules[] = "/* @noflip */#article, #mw-data-after-content { margin-left: 4px; margin-right: 152px; }";
- $rules[] = "/* @noflip */#topbar, #footer { margin-right: 152px; }";
- } elseif ( 1 == $qb || 3 == $qb ) {
- $rules[] = "/* @noflip */#quickbar { position: absolute; top: 4px; left: 4px; border-right: 1px solid gray; }";
- $rules[] = "/* @noflip */#article, #mw-data-after-content { margin-left: 152px; margin-right: 4px; }";
- $rules[] = "/* @noflip */#topbar, #footer { margin-left: 152px; }";
- if( 3 == $qb ) {
- $rules[] = "/* @noflip */#quickbar { position: fixed; padding: 4px; }";
- }
- } elseif ( 4 == $qb ) {
- $rules[] = "/* @noflip */#quickbar { position: fixed; right: 0; top: 0; padding: 4px; }";
- $rules[] = "/* @noflip */#quickbar { border-right: 1px solid gray; }";
- $rules[] = "/* @noflip */#article, #mw-data-after-content { margin-right: 152px; margin-left: 4px; }";
- $rules[] = "/* @noflip */#topbar, #footer { margin-right: 152px; }";
- }
- $style = implode( "\n", $rules );
- $out->addInlineStyle( $style, 'flip' );
- }
-
-}
-
-class StandardTemplate extends LegacyTemplate {
-
- /**
- * @return string
- */
- function doAfterContent() {
- wfProfileIn( __METHOD__ );
- wfProfileIn( __METHOD__ . '-1' );
-
- $s = "\n</div><br style=\"clear:both\" />\n";
- $s .= "\n<div id='footer'>";
- $s .= '<table cellspacing="0"><tr>';
-
- wfProfileOut( __METHOD__ . '-1' );
- wfProfileIn( __METHOD__ . '-2' );
- $l = $this->getSkin()->getLanguage()->alignStart();
- $s .= "<td class='bottom' style='text-align: $l; vertical-align: top;'>";
-
- $s .= $this->bottomLinks();
- $s .= "\n<br />" . $this->getSkin()->getLanguage()->pipeList( array(
- $this->getSkin()->mainPageLink(),
- $this->getSkin()->aboutLink(),
- Linker::specialLink( 'Recentchanges' ),
- $this->searchForm() ) )
- . '<br /><span id="pagestats">' . $this->pageStats() . '</span>';
-
- $s .= '</td>';
- $s .= "</tr></table>\n</div>\n</div>\n";
-
- wfProfileOut( __METHOD__ . '-2' );
- wfProfileIn( __METHOD__ . '-3' );
- if ( $this->getSkin()->qbSetting() != 0 ) {
- $s .= $this->quickBar();
- }
- wfProfileOut( __METHOD__ . '-3' );
- wfProfileOut( __METHOD__ );
- return $s;
- }
-
- /**
- * @return string
- */
- function quickBar() {
- global $wgContLang;
-
- wfProfileIn( __METHOD__ );
-
- $action = $this->getSkin()->getRequest()->getText( 'action' );
- $wpPreview = $this->getSkin()->getRequest()->getBool( 'wpPreview' );
- $title = $this->getSkin()->getTitle();
- $tns = $title->getNamespace();
-
- $s = "\n<div id='quickbar'>";
- $s .= "\n" . $this->getSkin()->logoText() . "\n<hr class='sep' />";
-
- $sep = "\n<br />";
-
- # Use the first heading from the Monobook sidebar as the "browse" section
- $bar = $this->getSkin()->buildSidebar();
- unset( $bar['SEARCH'] );
- unset( $bar['LANGUAGES'] );
- unset( $bar['TOOLBOX'] );
-
- $barnumber = 1;
- foreach ( $bar as $browseLinks ) {
- if ( is_array( $browseLinks ) ) {
- if ( $barnumber > 1 ) {
- $s .= "\n<hr class='sep' />";
- }
- foreach ( $browseLinks as $link ) {
- if ( $link['text'] != '-' ) {
- $s .= "<a href=\"{$link['href']}\">" .
- htmlspecialchars( $link['text'] ) . '</a>' . $sep;
- }
- }
- }
- if ( $barnumber == 1 ) {
- // only show watchlist link if logged in
- if( $this->data['loggedin'] ) {
- $s.= Linker::specialLink( 'Watchlist' ) ;
- $s .= $sep . Linker::linkKnown(
- SpecialPage::getTitleFor( 'Contributions' ),
- wfMessage( 'mycontris' )->escaped(),
- array(),
- array( 'target' => $this->data['username'] )
- );
- }
- }
- $barnumber = $barnumber + 1;
- }
-
- $s .= "\n<hr class='sep' />";
- $articleExists = $title->getArticleID();
- if ( $this->data['isarticle'] || $action == 'edit' || $action == 'history' || $wpPreview ) {
- if( $this->data['isarticle'] ) {
- $s .= '<strong>' . $this->editThisPage() . '</strong>';
- } else { # backlink to the article in edit or history mode
- if( $articleExists ){ # no backlink if no article
- switch( $tns ) {
- case NS_TALK:
- case NS_USER_TALK:
- case NS_PROJECT_TALK:
- case NS_FILE_TALK:
- case NS_MEDIAWIKI_TALK:
- case NS_TEMPLATE_TALK:
- case NS_HELP_TALK:
- case NS_CATEGORY_TALK:
- $text = wfMessage('viewtalkpage');
- break;
- case NS_MAIN:
- $text = wfMessage( 'articlepage' );
- break;
- case NS_USER:
- $text = wfMessage( 'userpage' );
- break;
- case NS_PROJECT:
- $text = wfMessage( 'projectpage' );
- break;
- case NS_FILE:
- $text = wfMessage( 'imagepage' );
- break;
- case NS_MEDIAWIKI:
- $text = wfMessage( 'mediawikipage' );
- break;
- case NS_TEMPLATE:
- $text = wfMessage( 'templatepage' );
- break;
- case NS_HELP:
- $text = wfMessage( 'viewhelppage' );
- break;
- case NS_CATEGORY:
- $text = wfMessage( 'categorypage' );
- break;
- default:
- $text = wfMessage( 'articlepage' );
- }
-
- $link = $title->getText();
- $nstext = $wgContLang->getNsText( $tns );
- if( $nstext ) { # add namespace if necessary
- $link = $nstext . ':' . $link;
- }
-
- $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>' . wfMessage( 'newpage' )->escaped() . '</strong>';
- }
- }
-
- # "Post a comment" link
- if( ( $title->isTalkPage() || $this->getSkin()->getOutput()->showNewSectionLink() ) && $action != 'edit' && !$wpPreview )
- $s .= '<br />' . Linker::link(
- $title,
- wfMessage( 'postcomment' )->escaped(),
- array(),
- array(
- 'action' => 'edit',
- 'section' => 'new'
- )
- );
-
- /**
- * Watching could cause problems in edit mode:
- * if user edits article, then loads "watch this article" in background and then saves
- * article with "Watch this article" checkbox disabled, the article is transparently
- * unwatched. Therefore we do not show the "Watch this page" link in edit mode.
- */
- if ( $this->data['loggedin'] && $articleExists ) {
- if( $action != 'edit' && $action != 'submit' ) {
- $s .= $sep . $this->watchThisPage();
- }
- if ( $title->userCan( 'edit' ) )
- $s .= $sep . $this->moveThisPage();
- }
- if ( $this->getSkin()->getUser()->isAllowed( 'delete' ) && $articleExists ) {
- $s .= $sep . $this->deleteThisPage() .
- $sep . $this->protectThisPage();
- }
- $s .= $sep . $this->talkLink();
- if( $articleExists && $action != 'history' ) {
- $s .= $sep . $this->historyLink();
- }
- $s .= $sep . $this->whatLinksHere();
-
- if( $this->getSkin()->getOutput()->isArticleRelated() ) {
- $s .= $sep . $this->watchPageLinksLink();
- }
-
- if (
- NS_USER == $title->getNamespace() ||
- $title->getNamespace() == NS_USER_TALK
- ) {
-
- $id = User::idFromName( $title->getText() );
- $ip = User::isIP( $title->getText() );
-
- if( $id || $ip ){
- $s .= $sep . $this->userContribsLink();
- }
- if( $this->getSkin()->showEmailUser( $id ) ) {
- $s .= $sep . $this->emailUserLink();
- }
- }
- $s .= "\n<br /><hr class='sep' />";
- }
-
- if( UploadBase::isEnabled() && UploadBase::isAllowed( $this->getSkin()->getUser() ) === true ) {
- $s .= $this->getUploadLink() . $sep;
- }
-
- $s .= Linker::specialLink( 'Specialpages' );
-
- global $wgSiteSupportPage;
- if( $wgSiteSupportPage ) {
- $s .= "\n<br /><a href=\"" . htmlspecialchars( $wgSiteSupportPage ) .
- '" class="internal">' . wfMessage( 'sitesupport' )->escaped() . '</a>';
- }
-
- $s .= "\n<br /></div>\n";
- wfProfileOut( __METHOD__ );
- return $s;
- }
-}
diff --git a/skins/Vector.php b/skins/Vector.php
index d0f99951..288b5fd6 100644
--- a/skins/Vector.php
+++ b/skins/Vector.php
@@ -23,7 +23,7 @@
* @ingroup Skins
*/
-if( !defined( 'MEDIAWIKI' ) ) {
+if ( !defined( 'MEDIAWIKI' ) ) {
die( -1 );
}
@@ -48,7 +48,7 @@ class SkinVector extends SkinTemplate {
parent::initPage( $out );
// Append CSS which includes IE only behavior fixes for hover support -
- // this is better than including this in a CSS fille since it doesn't
+ // this is better than including this in a CSS file since it doesn't
// wait for the CSS file to load before fetching the HTC file.
$min = $this->getRequest()->getFuzzyBool( 'debug' ) ? '' : '.min';
$out->addHeadItem( 'csshover',
@@ -57,17 +57,19 @@ class SkinVector extends SkinTemplate {
"/{$this->stylename}/csshover{$min}.htc\")}</style><![endif]-->"
);
- $out->addModules( 'skins.vector.js' );
+ $out->addModules( array( 'skins.vector.js', 'skins.vector.collapsibleNav' ) );
}
/**
- * Load skin and user CSS files in the correct order
- * fixes bug 22916
+ * Loads skin and user CSS files.
* @param $out OutputPage object
*/
function setupSkinUserCss( OutputPage $out ) {
parent::setupSkinUserCss( $out );
- $out->addModuleStyles( 'skins.vector' );
+
+ $styles = array( 'skins.vector' );
+ wfRunHooks( 'SkinVectorStyleModules', array( &$this, &$styles ) );
+ $out->addModuleStyles( $styles );
}
/**
@@ -155,81 +157,50 @@ class VectorTemplate extends BaseTemplate {
?>
<div id="mw-page-base" class="noprint"></div>
<div id="mw-head-base" class="noprint"></div>
- <!-- content -->
<div id="content" class="mw-body" role="main">
<a id="top"></a>
<div id="mw-js-message" style="display:none;"<?php $this->html( 'userlangattributes' ) ?>></div>
- <?php if ( $this->data['sitenotice'] ): ?>
- <!-- sitenotice -->
+ <?php if ( $this->data['sitenotice'] ) { ?>
<div id="siteNotice"><?php $this->html( 'sitenotice' ) ?></div>
- <!-- /sitenotice -->
- <?php endif; ?>
- <!-- firstHeading -->
+ <?php } ?>
<h1 id="firstHeading" class="firstHeading" lang="<?php
- $this->data['pageLanguage'] = $this->getSkin()->getTitle()->getPageViewLanguage()->getCode();
- $this->html( 'pageLanguage' );
+ $this->data['pageLanguage'] = $this->getSkin()->getTitle()->getPageViewLanguage()->getHtmlCode();
+ $this->text( 'pageLanguage' );
?>"><span dir="auto"><?php $this->html( 'title' ) ?></span></h1>
- <!-- /firstHeading -->
- <!-- bodyContent -->
<div id="bodyContent">
- <?php if ( $this->data['isarticle'] ): ?>
- <!-- tagline -->
+ <?php if ( $this->data['isarticle'] ) { ?>
<div id="siteSub"><?php $this->msg( 'tagline' ) ?></div>
- <!-- /tagline -->
- <?php endif; ?>
- <!-- subtitle -->
+ <?php } ?>
<div id="contentSub"<?php $this->html( 'userlangattributes' ) ?>><?php $this->html( 'subtitle' ) ?></div>
- <!-- /subtitle -->
- <?php if ( $this->data['undelete'] ): ?>
- <!-- undelete -->
+ <?php if ( $this->data['undelete'] ) { ?>
<div id="contentSub2"><?php $this->html( 'undelete' ) ?></div>
- <!-- /undelete -->
- <?php endif; ?>
- <?php if( $this->data['newtalk'] ): ?>
- <!-- newtalk -->
- <div class="usermessage"><?php $this->html( 'newtalk' ) ?></div>
- <!-- /newtalk -->
- <?php endif; ?>
- <?php if ( $this->data['showjumplinks'] ): ?>
- <!-- jumpto -->
+ <?php } ?>
+ <?php if ( $this->data['newtalk'] ) { ?>
+ <div class="usermessage"><?php $this->html( 'newtalk' ) ?></div>
+ <?php } ?>
<div id="jump-to-nav" class="mw-jump">
<?php $this->msg( 'jumpto' ) ?>
<a href="#mw-navigation"><?php $this->msg( 'jumptonavigation' ) ?></a><?php $this->msg( 'comma-separator' ) ?>
<a href="#p-search"><?php $this->msg( 'jumptosearch' ) ?></a>
</div>
- <!-- /jumpto -->
- <?php endif; ?>
- <!-- bodycontent -->
<?php $this->html( 'bodycontent' ) ?>
- <!-- /bodycontent -->
- <?php if ( $this->data['printfooter'] ): ?>
- <!-- printfooter -->
+ <?php if ( $this->data['printfooter'] ) { ?>
<div class="printfooter">
<?php $this->html( 'printfooter' ); ?>
</div>
- <!-- /printfooter -->
- <?php endif; ?>
- <?php if ( $this->data['catlinks'] ): ?>
- <!-- catlinks -->
+ <?php } ?>
+ <?php if ( $this->data['catlinks'] ) { ?>
<?php $this->html( 'catlinks' ); ?>
- <!-- /catlinks -->
- <?php endif; ?>
- <?php if ( $this->data['dataAfterContent'] ): ?>
- <!-- dataAfterContent -->
+ <?php } ?>
+ <?php if ( $this->data['dataAfterContent'] ) { ?>
<?php $this->html( 'dataAfterContent' ); ?>
- <!-- /dataAfterContent -->
- <?php endif; ?>
+ <?php } ?>
<div class="visualClear"></div>
- <!-- debughtml -->
<?php $this->html( 'debughtml' ); ?>
- <!-- /debughtml -->
</div>
- <!-- /bodyContent -->
</div>
- <!-- /content -->
<div id="mw-navigation">
<h2><?php $this->msg( 'navigation-heading' ) ?></h2>
- <!-- header -->
<div id="mw-head">
<?php $this->renderNavigation( 'PERSONAL' ); ?>
<div id="left-navigation">
@@ -239,41 +210,34 @@ class VectorTemplate extends BaseTemplate {
<?php $this->renderNavigation( array( 'VIEWS', 'ACTIONS', 'SEARCH' ) ); ?>
</div>
</div>
- <!-- /header -->
- <!-- panel -->
<div id="mw-panel">
- <!-- logo -->
<div id="p-logo" role="banner"><a style="background-image: url(<?php $this->text( 'logopath' ) ?>);" href="<?php echo htmlspecialchars( $this->data['nav_urls']['mainpage']['href'] ) ?>" <?php echo Xml::expandAttributes( Linker::tooltipAndAccesskeyAttribs( 'p-logo' ) ) ?>></a></div>
- <!-- /logo -->
<?php $this->renderPortals( $this->data['sidebar'] ); ?>
</div>
- <!-- /panel -->
</div>
- <!-- footer -->
<div id="footer" role="contentinfo"<?php $this->html( 'userlangattributes' ) ?>>
- <?php foreach( $this->getFooterLinks() as $category => $links ): ?>
+ <?php foreach ( $this->getFooterLinks() as $category => $links ) { ?>
<ul id="footer-<?php echo $category ?>">
- <?php foreach( $links as $link ): ?>
+ <?php foreach ( $links as $link ) { ?>
<li id="footer-<?php echo $category ?>-<?php echo $link ?>"><?php $this->html( $link ) ?></li>
- <?php endforeach; ?>
+ <?php } ?>
</ul>
- <?php endforeach; ?>
- <?php $footericons = $this->getFooterIcons("icononly");
- if ( count( $footericons ) > 0 ): ?>
+ <?php } ?>
+ <?php $footericons = $this->getFooterIcons( "icononly" );
+ if ( count( $footericons ) > 0 ) { ?>
<ul id="footer-icons" class="noprint">
-<?php foreach ( $footericons as $blockName => $footerIcons ): ?>
+<?php foreach ( $footericons as $blockName => $footerIcons ) { ?>
<li id="footer-<?php echo htmlspecialchars( $blockName ); ?>ico">
-<?php foreach ( $footerIcons as $icon ): ?>
+<?php foreach ( $footerIcons as $icon ) { ?>
<?php echo $this->getSkin()->makeFooterIcon( $icon ); ?>
-<?php endforeach; ?>
+<?php } ?>
</li>
-<?php endforeach; ?>
+<?php } ?>
</ul>
- <?php endif; ?>
+ <?php } ?>
<div style="clear:both"></div>
</div>
- <!-- /footer -->
<?php $this->printTrail(); ?>
</body>
@@ -299,11 +263,11 @@ class VectorTemplate extends BaseTemplate {
}
// Render portals
foreach ( $portals as $name => $content ) {
- if ( $content === false )
+ if ( $content === false ) {
continue;
+ }
- echo "\n<!-- {$name} -->\n";
- switch( $name ) {
+ switch ( $name ) {
case 'SEARCH':
break;
case 'TOOLBOX':
@@ -318,7 +282,6 @@ class VectorTemplate extends BaseTemplate {
$this->renderPortal( $name, $content );
break;
}
- echo "\n<!-- /{$name} -->\n";
}
}
@@ -332,29 +295,30 @@ class VectorTemplate extends BaseTemplate {
if ( $msg === null ) {
$msg = $name;
}
+ $msgObj = wfMessage( $msg );
?>
-<div class="portal" role="navigation" id='<?php echo Sanitizer::escapeId( "p-$name" ) ?>'<?php echo Linker::tooltip( 'p-' . $name ) ?>>
- <h3<?php $this->html( 'userlangattributes' ) ?>><?php $msgObj = wfMessage( $msg ); echo htmlspecialchars( $msgObj->exists() ? $msgObj->text() : $msg ); ?></h3>
+<div class="portal" role="navigation" id='<?php echo Sanitizer::escapeId( "p-$name" ) ?>'<?php echo Linker::tooltip( 'p-' . $name ) ?> aria-labelledby='<?php echo Sanitizer::escapeId( "p-$name-label" ) ?>'>
+ <h3<?php $this->html( 'userlangattributes' ) ?> id='<?php echo Sanitizer::escapeId( "p-$name-label" ) ?>'><?php echo htmlspecialchars( $msgObj->exists() ? $msgObj->text() : $msg ); ?></h3>
<div class="body">
<?php
- if ( is_array( $content ) ): ?>
+ if ( is_array( $content ) ) { ?>
<ul>
<?php
- foreach( $content as $key => $val ): ?>
+ foreach ( $content as $key => $val ) { ?>
<?php echo $this->makeListItem( $key, $val ); ?>
<?php
- endforeach;
+ }
if ( $hook !== null ) {
wfRunHooks( $hook, array( &$this, true ) );
}
?>
</ul>
<?php
- else: ?>
+ } else { ?>
<?php echo $content; /* Allow raw HTML block to be defined by extensions */ ?>
<?php
- endif; ?>
+ } ?>
</div>
</div>
<?php
@@ -379,36 +343,35 @@ class VectorTemplate extends BaseTemplate {
}
// Render elements
foreach ( $elements as $name => $element ) {
- echo "\n<!-- {$name} -->\n";
switch ( $element ) {
case 'NAMESPACES':
?>
-<div id="p-namespaces" role="navigation" class="vectorTabs<?php if ( count( $this->data['namespace_urls'] ) == 0 ) echo ' emptyPortlet'; ?>">
- <h3><?php $this->msg( 'namespaces' ) ?></h3>
+<div id="p-namespaces" role="navigation" class="vectorTabs<?php if ( count( $this->data['namespace_urls'] ) == 0 ) { echo ' emptyPortlet'; } ?>" aria-labelledby="p-namespaces-label">
+ <h3 id="p-namespaces-label"><?php $this->msg( 'namespaces' ) ?></h3>
<ul<?php $this->html( 'userlangattributes' ) ?>>
- <?php foreach ( $this->data['namespace_urls'] as $link ): ?>
+ <?php foreach ( $this->data['namespace_urls'] as $link ) { ?>
<li <?php echo $link['attributes'] ?>><span><a href="<?php echo htmlspecialchars( $link['href'] ) ?>" <?php echo $link['key'] ?>><?php echo htmlspecialchars( $link['text'] ) ?></a></span></li>
- <?php endforeach; ?>
+ <?php } ?>
</ul>
</div>
<?php
break;
case 'VARIANTS':
?>
-<div id="p-variants" role="navigation" class="vectorMenu<?php if ( count( $this->data['variant_urls'] ) == 0 ) echo ' emptyPortlet'; ?>">
+<div id="p-variants" role="navigation" class="vectorMenu<?php if ( count( $this->data['variant_urls'] ) == 0 ) { echo ' emptyPortlet'; } ?>" aria-labelledby="p-variants-label">
<h3 id="mw-vector-current-variant">
- <?php foreach ( $this->data['variant_urls'] as $link ): ?>
- <?php if ( stripos( $link['attributes'], 'selected' ) !== false ): ?>
+ <?php foreach ( $this->data['variant_urls'] as $link ) { ?>
+ <?php if ( stripos( $link['attributes'], 'selected' ) !== false ) { ?>
<?php echo htmlspecialchars( $link['text'] ) ?>
- <?php endif; ?>
- <?php endforeach; ?>
+ <?php } ?>
+ <?php } ?>
</h3>
- <h3><span><?php $this->msg( 'variants' ) ?></span><a href="#"></a></h3>
+ <h3 id="p-variants-label"><span><?php $this->msg( 'variants' ) ?></span><a href="#"></a></h3>
<div class="menu">
<ul>
- <?php foreach ( $this->data['variant_urls'] as $link ): ?>
+ <?php foreach ( $this->data['variant_urls'] as $link ) { ?>
<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; ?>
+ <?php } ?>
</ul>
</div>
</div>
@@ -416,30 +379,30 @@ class VectorTemplate extends BaseTemplate {
break;
case 'VIEWS':
?>
-<div id="p-views" role="navigation" class="vectorTabs<?php if ( count( $this->data['view_urls'] ) == 0 ) { echo ' emptyPortlet'; } ?>">
- <h3><?php $this->msg('views') ?></h3>
- <ul<?php $this->html('userlangattributes') ?>>
- <?php foreach ( $this->data['view_urls'] as $link ): ?>
+<div id="p-views" role="navigation" class="vectorTabs<?php if ( count( $this->data['view_urls'] ) == 0 ) { echo ' emptyPortlet'; } ?>" aria-labelledby="p-views-label">
+ <h3 id="p-views-label"><?php $this->msg( 'views' ) ?></h3>
+ <ul<?php $this->html( 'userlangattributes' ) ?>>
+ <?php foreach ( $this->data['view_urls'] as $link ) { ?>
<li<?php echo $link['attributes'] ?>><span><a href="<?php echo htmlspecialchars( $link['href'] ) ?>" <?php echo $link['key'] ?>><?php
// $link['text'] can be undefined - bug 27764
if ( array_key_exists( 'text', $link ) ) {
- echo array_key_exists( 'img', $link ) ? '<img src="' . $link['img'] . '" alt="' . $link['text'] . '" />' : htmlspecialchars( $link['text'] );
+ echo array_key_exists( 'img', $link ) ? '<img src="' . $link['img'] . '" alt="' . $link['text'] . '" />' : htmlspecialchars( $link['text'] );
}
?></a></span></li>
- <?php endforeach; ?>
+ <?php } ?>
</ul>
</div>
<?php
break;
case 'ACTIONS':
?>
-<div id="p-cactions" role="navigation" class="vectorMenu<?php if ( count( $this->data['action_urls'] ) == 0 ) echo ' emptyPortlet'; ?>">
- <h3><span><?php $this->msg( 'actions' ) ?></span><a href="#"></a></h3>
+<div id="p-cactions" role="navigation" class="vectorMenu<?php if ( count( $this->data['action_urls'] ) == 0 ) { echo ' emptyPortlet'; } ?>" aria-labelledby="p-cactions-label">
+ <h3 id="p-cactions-label"><span><?php $this->msg( 'actions' ) ?></span><a href="#"></a></h3>
<div class="menu">
<ul<?php $this->html( 'userlangattributes' ) ?>>
- <?php foreach ( $this->data['action_urls'] as $link ): ?>
+ <?php foreach ( $this->data['action_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>
- <?php endforeach; ?>
+ <?php } ?>
</ul>
</div>
</div>
@@ -447,8 +410,8 @@ class VectorTemplate extends BaseTemplate {
break;
case 'PERSONAL':
?>
-<div id="p-personal" role="navigation" class="<?php if ( count( $this->data['personal_urls'] ) == 0 ) echo ' emptyPortlet'; ?>">
- <h3><?php $this->msg( 'personaltools' ) ?></h3>
+<div id="p-personal" role="navigation" class="<?php if ( count( $this->data['personal_urls'] ) == 0 ) { echo ' emptyPortlet'; } ?>" aria-labelledby="p-personal-label">
+ <h3 id="p-personal-label"><?php $this->msg( 'personaltools' ) ?></h3>
<ul<?php $this->html( 'userlangattributes' ) ?>>
<?php
$personalTools = $this->getPersonalTools();
@@ -465,21 +428,21 @@ class VectorTemplate extends BaseTemplate {
<div id="p-search" role="search">
<h3<?php $this->html( 'userlangattributes' ) ?>><label for="searchInput"><?php $this->msg( 'search' ) ?></label></h3>
<form action="<?php $this->text( 'wgScript' ) ?>" id="searchform">
- <?php if ( $wgVectorUseSimpleSearch && $this->getSkin()->getUser()->getOption( 'vector-simplesearch' ) ): ?>
+ <?php if ( $wgVectorUseSimpleSearch && $this->getSkin()->getUser()->getOption( 'vector-simplesearch' ) ) { ?>
<div id="simpleSearch">
- <?php if ( $this->data['rtl'] ): ?>
+ <?php if ( $this->data['rtl'] ) { ?>
<?php echo $this->makeSearchButton( 'image', array( 'id' => 'searchButton', 'src' => $this->getSkin()->getSkinStylePath( 'images/search-rtl.png' ), 'width' => '12', 'height' => '13' ) ); ?>
- <?php endif; ?>
+ <?php } ?>
<?php echo $this->makeSearchInput( array( 'id' => 'searchInput', 'type' => 'text' ) ); ?>
- <?php if ( !$this->data['rtl'] ): ?>
+ <?php if ( !$this->data['rtl'] ) { ?>
<?php echo $this->makeSearchButton( 'image', array( 'id' => 'searchButton', 'src' => $this->getSkin()->getSkinStylePath( 'images/search-ltr.png' ), 'width' => '12', 'height' => '13' ) ); ?>
- <?php endif; ?>
- <?php else: ?>
+ <?php } ?>
+ <?php } else { ?>
<div>
<?php echo $this->makeSearchInput( array( 'id' => 'searchInput' ) ); ?>
<?php echo $this->makeSearchButton( 'go', array( 'id' => 'searchGoButton', 'class' => 'searchButton' ) ); ?>
<?php echo $this->makeSearchButton( 'fulltext', array( 'id' => 'mw-searchButton', 'class' => 'searchButton' ) ); ?>
- <?php endif; ?>
+ <?php } ?>
<input type='hidden' name="title" value="<?php $this->text( 'searchtitle' ) ?>"/>
</div>
</form>
@@ -488,7 +451,6 @@ class VectorTemplate extends BaseTemplate {
break;
}
- echo "\n<!-- /{$name} -->\n";
}
}
}
diff --git a/skins/archlinux/IE60Fixes.css b/skins/archlinux/IE60Fixes.css
index ec1ce430..534d3333 100644
--- a/skins/archlinux/IE60Fixes.css
+++ b/skins/archlinux/IE60Fixes.css
@@ -70,15 +70,6 @@ div#footer {
#portal-personaltools {
padding-bottom: 0.1em;
}
-#bodyContent a.external {
- background: url(external.png) center right no-repeat;
- padding-right: 13px;
-}
-
-.rtl #bodyContent a.external {
- background-image: url(external-rtl.png);
- padding-right: 13px;
-}
.rtl a.feedlink {
background-position: right;
diff --git a/skins/archlinux/Opera6Fixes.css b/skins/archlinux/Opera6Fixes.css
deleted file mode 100644
index 77dec095..00000000
--- a/skins/archlinux/Opera6Fixes.css
+++ /dev/null
@@ -1,20 +0,0 @@
-/* opera 6 fixes */
-div#column-one {
- position: relative;
- max-width: 11.7em;
-}
-#p-personal {
- width: 45em;
- margin-left: 8.6em;
- right: 0;
-}
-#bodyContent a.external {
- background: url(external.png) center right no-repeat;
- padding-right: 13px;
-}
-
-.rtl a.feedlink {
- background-position: right;
- padding-right: 0;
- padding-left: 16px;
-}
diff --git a/skins/archlinux/Opera7Fixes.css b/skins/archlinux/Opera7Fixes.css
deleted file mode 100644
index 1dcba7c9..00000000
--- a/skins/archlinux/Opera7Fixes.css
+++ /dev/null
@@ -1,21 +0,0 @@
-/* small tweaks for opera seven */
-#p-cactions {
- margin-top: .1em;
-}
-#p-cactions li a {
- top: 2px;
-}
-#bodyContent a.external {
- background: url(external.png) center right no-repeat;
- padding-right: 13px;
-}
-.rtl #bodyContent a.external {
- background-image: url(external-rtl.png);
- padding-right: 13px;
-}
-
-.rtl a.feedlink {
- background-position: right;
- padding-right: 0;
- padding-left: 16px;
-}
diff --git a/skins/archlinux/Opera9Fixes.css b/skins/archlinux/Opera9Fixes.css
deleted file mode 100644
index 9c312a84..00000000
--- a/skins/archlinux/Opera9Fixes.css
+++ /dev/null
@@ -1,11 +0,0 @@
-.rtl #bodyContent a.external {
- background-image: url(external-rtl.png);
- padding-right: 13px;
- padding-left: 0;
-}
-
-.rtl a.feedlink {
- background-position: right;
- padding-right: 0;
- padding-left: 16px;
-}
diff --git a/skins/archlinux/external-ltr.png b/skins/archlinux/external-ltr.png
index acf260fc..63083831 100644
--- a/skins/archlinux/external-ltr.png
+++ b/skins/archlinux/external-ltr.png
Binary files differ
diff --git a/skins/archlinux/external-rtl.png b/skins/archlinux/external-rtl.png
index 7d5ee375..5313234e 100644
--- a/skins/archlinux/external-rtl.png
+++ b/skins/archlinux/external-rtl.png
Binary files differ
diff --git a/skins/archlinux/main.css b/skins/archlinux/main.css
index 4cbc0939..d8f25ebb 100644
--- a/skins/archlinux/main.css
+++ b/skins/archlinux/main.css
@@ -17,7 +17,7 @@ div#column-content {
}
div#content {
margin: 2.8em 0 0 12.2em;
- padding: 0 1em 1em 1em;
+ padding: 1em;
position: relative;
z-index: 2;
}
@@ -93,6 +93,9 @@ pre, .mw-code {
line-height: 1.1em;
}
+#firstHeading {
+ padding-top: 0;
+}
/*
** the main content area
*/
@@ -139,8 +142,7 @@ table.rimage {
** keep the whitespace in front of the ^=, hides rule from konqueror
** this is css3, the validator doesn't like it when validating as css2
*/
-#bodyContent a.external,
-#bodyContent a.external[href ^="gopher://"] {
+#bodyContent a.external {
/* @embed */
background: url(external-ltr.png) center right no-repeat;
padding-right: 13px;
@@ -319,7 +321,7 @@ input.searchButton {
position: absolute;
left: 0;
top: 0;
- z-index: 0;
+ z-index: 3;
}
#p-personal {
width: 100%;
@@ -381,19 +383,22 @@ input.searchButton {
#p-personal li.active a:hover {
background-color: transparent;
}
-/* the icon in front of the user name, single quotes
-in bg url to hide it from iemac */
+/* The icon in front of the username / login link */
li#pt-userpage,
li#pt-anonuserpage,
li#pt-login {
/* @embed */
background: url(user.gif) top left no-repeat;
padding-left: 20px;
- text-transform: none;
}
#p-personal ul {
text-transform: lowercase;
}
+/* Don't lowercase username or IP addresses (IPv6) */
+li#pt-userpage,
+li#pt-anonuserpage {
+ text-transform: none;
+}
#p-personal li.active {
font-weight: bold;
}
@@ -422,14 +427,13 @@ li#pt-login {
display: inline;
border: 1px solid #aaa;
border-bottom: none;
- padding: 0 0 .1em 0;
+ padding: 0 0 1em 0;
margin: 0 .3em 0 0;
overflow: visible;
background: white;
}
#p-cactions li.selected {
border-color: #fabd23;
- padding: 0 0 .2em 0;
font-weight: bold;
}
#p-cactions li a {
@@ -515,7 +519,8 @@ div#footer {
border-top: 1px solid #fabd23;
border-bottom: 1px solid #fabd23;
margin: .6em 0 1em 0;
- padding: .4em 0 1.2em 0;
+ overflow: hidden;
+ padding: .4em 0 .3em 0;
text-align: center;
font-size: 90%;
}
@@ -897,6 +902,5 @@ div.mw-lag-warn-high {
/* 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/wiki-indexed.png b/skins/archlinux/wiki-indexed.png
index 0ec584a3..799ebac8 100644
--- a/skins/archlinux/wiki-indexed.png
+++ b/skins/archlinux/wiki-indexed.png
Binary files differ
diff --git a/skins/chick/IE60Fixes.css b/skins/chick/IE60Fixes.css
deleted file mode 100644
index 18e9655d..00000000
--- a/skins/chick/IE60Fixes.css
+++ /dev/null
@@ -1,79 +0,0 @@
-/* 6.0 - only fixes */
-/* content area */
-/* workaround for various ie float bugs */
-#column-content {
- float: none;
- margin-left: 0;
- height: 1%;
-}
-#column-content #content {
- margin-left: 12.2em;
- margin-top: 3em;
- height: 1%;
-}
-#column-one {
- position: absolute;
- top: 0;
- left: 0;
- z-index: 4;
-}
-#footer {
- margin-left: 13.6em;
- border-left: 1px solid #fabd23;
-}
-
-/* the tabs */
-
-#p-cactions {
- z-index: 3;
-}
-
-#p-cactions li {
- padding-bottom: 0 !important;
- border: none;
- background-color: transparent;
- cursor: default;
- float: none !important;
-}
-#p-cactions li a {
- display: inline-block !important;
- vertical-align: top;
- padding-bottom: 0;
- border: solid #aaa;
- border-width: 1px 1px 0;
-}
-#p-cactions li.selected a {
- border-color: #fabd23;
- padding-bottom: 0.17em;
-}
-#p-cactions li a:hover {
- padding-bottom: 0.17em;
-}
-#portal-personaltools {
- padding-bottom: 0.1em;
-}
-#bodyContent a.external {
- background: url(external.png) center right no-repeat;
- padding-right: 13px;
-}
-
-/* show the hand */
-#p-logo a,
-#p-logo a:hover {
- cursor: pointer;
-}
-div.visualClear {
- width:100%;
- line-height: 0;
-}
-textarea {
- width: 96%;
-}
-
-div.editsection,
-#catlinks,
-div.tright,
-div.tleft {
- position: relative;
-}
-/*{ border:1px solid Red !important;}*/
diff --git a/skins/chick/main.css b/skins/chick/main.css
deleted file mode 100644
index 5e2a2e7a..00000000
--- a/skins/chick/main.css
+++ /dev/null
@@ -1,368 +0,0 @@
-/*
-** MediaWiki 'chick' style sheet for PDAs or other small-screen devices.
-** Copyright Timwi
-** License: GPL (http://www.gnu.org/copyleft/gpl.html)
-**
-** Loosely based on Monobook by Gabriel Wicke
-*/
-
-body {
- font-family: sans-serif;
- color: black;
- background: white;
- margin: 0;
- padding: 0.3em;
-}
-
-a { color: #002bb8; }
-a:visited { color: #5a3696; }
-a:active { color: #ffa500; }
-a.stub { color: #772233; }
-a.new,
-#p-personal a.new { color:#ba0000; }
-a.new:visited,
-#p-personal a.new:visited { color:#a55858; }
-
-img {
- border: none;
- vertical-align: middle;
-}
-p {
- margin: 0.4em 0em 0.5em 0em;
- line-height: 1.5em;
-}
-
-p img { margin: 0; }
-
-hr {
- height: 1px;
- color: #aaaaaa;
- background-color: #aaaaaa;
- border: 0;
- margin: 0.2em 0 0.2em 0;
-}
-
-h1, h2, h3, h4, h5, h6 {
- color: black;
- background: none;
- font-weight: normal;
- margin: 0;
- overflow: hidden;
- padding-top: 0.5em;
- padding-bottom: 0.17em;
- border-bottom: 1px solid #aaaaaa;
-}
-.editsection {
- font-weight: normal;
-}
-h1 { font-size: 188%; }
-h1 .editsection { font-size: 53.2%; }
-h2 { font-size: 150%; }
-h2 .editsection { font-size: 66.7%; }
-h3, h4, h5, h6 {
- border-bottom: none;
- font-weight: bold;
-}
-h3 { font-size: 132%; }
-h3 .editsection { font-size: 75.8%; }
-h4 { font-size: 116%; }
-h4 .editsection { font-size: 86.2%; }
-h5 { font-size: 100%; }
-h6 { font-size: 80%; }
-h6 .editsection { font-size: 125%; }
-
-ul {
- line-height: 1.5em;
- margin: 0.3em 0 0 1.5em;
- padding:0;
-}
-ol {
- line-height: 1.5em;
- margin: 0.3em 0 0 3.2em;
- padding:0;
- list-style-image: none;
-}
-li { margin-bottom: 0.1em; }
-dt {
- font-weight: bold;
- margin-bottom: 0.1em;
-}
-dl{
- margin-top: 0.2em;
- margin-bottom: 0.5em;
-}
-dd {
- line-height: 1.5em;
- margin-left: 2em;
- margin-bottom: 0.1em;
-}
-
-fieldset {
- border: 1px solid #2f6fab;
- margin: 1em 0em 1em 0em;
- padding: 0em 1em 1em 1em;
- line-height: 1.5em;
-}
-legend {
- background: white;
- padding: 0.5em;
- font-size: 95%;
-}
-form {
- border: none;
- margin: 0;
-}
-
-textarea {
- border: 1px solid #2f6fab;
- color: black;
- background-color: white;
- width: 100%;
- padding: 0.1em;
- overflow: auto;
-}
-/* hide this from ie/mac and konq2.2 */
-@media All {
- head:first-child+body input {
- visibility: visible;
- border: 1px solid #2f6fab;
- color: black;
- background-color: white;
- vertical-align: middle;
- padding: 0.2em;
- }
-}
-input.historysubmit {
- padding: 0 0.3em 0.3em 0.3em !important;
- font-size: 94%;
- cursor: pointer;
- height: 1.7em !important;
- margin-left: 1.6em;
-}
-input[type="radio"],
-input[type="checkbox"] { border:none; }
-select {
- border: 1px solid #2f6fab;
- color: black;
- vertical-align: top;
-}
-q {
- font-family: Times, "Times New Roman", serif;
- font-style: italic;
-}
-code { background-color: #f9f9f9; }
-pre, .mw-code {
- padding: 1em;
- border: 1px dashed #2f6fab;
- color: black;
- background-color: #f9f9f9;
- line-height: 1.1em;
-}
-
-/*
-** the main content area
-*/
-
-span.subpages { display: block; }
-
-/* Some space under the headers in the content area */
-#bodyContent h1, #bodyContent h2 { margin-bottom:0.6em; }
-#bodyContent h3,
-#bodyContent h4,
-#bodyContent h5 {
- margin-bottom: 0.3em;
-}
-#firstHeading { margin-bottom:0.1em; }
-
-/* user notification thing */
-.usermessage {
- background-color: #ffce7b;
- border: 1px solid #ffa500;
- color: black;
- font-weight: bold;
- margin: 0.1em 0 0 0;
- padding: 2px 5px;
- vertical-align: middle;
-}
-#siteNotice {
- text-align: center;
- font-size: 95%;
- padding: 0 0.9em 0 0.9em;
-}
-#siteNotice p { margin: 0; padding: 0; }
-.error {
- color: red;
- font-size: larger;
-}
-.catlinks {
- border:1px solid #aaaaaa;
- background-color:#f9f9f9;
- padding: 2px 5px;
- margin: 0.1em 0 0 0;
- clear: both;
-}
-.catlinks { margin: 0; padding: 0; }
-
-/* emulate center */
-.center {
- width: 100%;
- text-align: center;
-}
-*.center * {
- margin-left: auto;
- margin-right: auto;
-}
-/* small for tables and similar */
-.small { font-size: 94%; }
-table.small { font-size: 100% }
-
-/*
-** content styles
-*/
-
-#toc {
- /*border:1px solid #2f6fab;*/
- border:1px solid #aaaaaa;
- background-color:#f9f9f9;
- padding:5px;
- font-size: 95%;
-}
-#toc ul { margin: 0 2em; }
-#toc .toctoggle { font-size: 94%; }
-#toc .editsection {
- margin-top: 0.7em;
- font-size: 94%;
-}
-
-/* images */
-/* @noflip */div.floatright, table.floatright {
- margin: 0;
- border: 0.5em solid white;
- border-width: 0.5em 0 0.8em 1.4em;
-}
-div.floatright p { font-style: italic; }
-/* @noflip */div.floatleft, table.floatleft {
- margin: 0.3em 0.5em 0.5em 0;
- border: 0.5em solid white;
- border-width: 0.5em 1.4em 0.8em 0;
-}
-div.floatleft p { font-style: italic; }
-/* thumbnails */
-div.thumb {
- margin-bottom: 0.5em;
- width: auto;
-}
-div.thumbinner {
- border:1px solid #cccccc;
- padding: 3px !important;
- background-color:#f9f9f9;
- font-size: 94%;
- text-align: center;
- overflow: hidden;
-}
-html .thumbimage {
- border:1px solid #cccccc;
-}
-html .thumbcaption {
- border: none;
- text-align: left;
- line-height: 1.4em;
- padding: 0.3em 0 0.1em 0;
-}
-div.magnify {
- float: right;
- border: none !important;
- background: none !important;
-}
-div.magnify a, div.magnify img {
- display: block;
- border: none !important;
- background: none !important;
-}
-/* @noflip */div.tright {
- margin: 0.5em 0 1.3em 1.4em;
-}
-/* @noflip */div.tleft {
- margin: 0.5em 1.4em 1.3em 0;
-}
-img.thumbborder {
- border: 1px solid #dddddd;
-}
-
-/*
-** classes for special content elements like town boxes
-** intended to be referenced directly from the wiki src
-*/
-
-/*
-** User styles
-*/
-/* table standards */
-table.rimage {
- float:right;
- position:relative;
- margin-left:1em;
- margin-bottom:1em;
- text-align:center;
-}
-.toccolours {
- border:1px solid #aaaaaa;
- background-color:#f9f9f9;
- padding:5px;
- font-size: 95%;
-}
-
-/*
-** edit views etc
-*/
-.special li {
- line-height: 1.4em;
- margin: 0;
- padding: 0;
-}
-
-a.external { color: #3366bb; }
-div#footer { text-align: center; }
-ul#f-list li { list-style: none; text-align: center; }
-div.portlet { margin: 0.5em 0; }
-
-.redirectText {
- font-size:150%;
- margin:5px;
-}
-
-ul.special li.not-patrolled, ol.special li.not-patrolled {
- background-color: #ffa;
-}
-div.patrollink {
- font-size: 75%;
- text-align: right;
-}
-
-span.updatedmarker {
- color:black;
- background-color:#00FF00;
-}
-
-div.gallerybox {
- width: 150px;
-}
-
-#xjump-to-nav {
- display: none;
-}
-
-.templatesUsed { margin-top: 1.5em; }
-
-#footer {
- background-color: white;
- border-top: 1px solid #fabd23;
- border-bottom: 1px solid #fabd23;
- margin: .6em 0 1em 0;
- padding: .4em 0 1.2em 0;
- text-align: center;
- font-size: 90%;
-}
-#f-poweredbyico, #f-copyrightico {
- display: inline;
-}
diff --git a/skins/cologneblue/print.css b/skins/cologneblue/print.css
new file mode 100644
index 00000000..d4b05518
--- /dev/null
+++ b/skins/cologneblue/print.css
@@ -0,0 +1,6 @@
+#sitetitle,
+#sitesub,
+#titlelinks,
+#footer-navigation {
+ display: none;
+}
diff --git a/skins/cologneblue/screen.css b/skins/cologneblue/screen.css
index 349638aa..bc5dd316 100644
--- a/skins/cologneblue/screen.css
+++ b/skins/cologneblue/screen.css
@@ -55,6 +55,14 @@ p, pre, .mw-code, td, th, li, dd, dt {
textarea {
overflow: auto;
+ width: 100%;
+}
+
+#editform textarea {
+ display: block;
+ -moz-box-sizing: border-box;
+ -webkit-box-sizing: border-box;
+ box-sizing: border-box;
}
#footer {
@@ -135,10 +143,6 @@ h1 {
line-height: 21pt;
}
-h1 .editsection {
- font-size: 55.6%;
-}
-
h1#firstHeading {
padding-bottom: 0;
margin-bottom: 0;
@@ -197,8 +201,8 @@ input.mw-searchInput {
#sitetitle, #sitesub, #toplinks, #linkcollection {
- margin-top: 0;
- margin-bottom: 0;
+ margin-top: 0;
+ margin-bottom: 0;
}
#sitetitle, #toplinks {
@@ -216,7 +220,7 @@ input.mw-searchInput {
}
#sitetitle a, #toplinks a {
color: white;
- text-decoration: none;
+ text-decoration: none;
}
/* Bring #sitetitle to top. Otherwise #toplinks is overlaid over it, making the link unclickable. */
#sitetitle a {
@@ -263,6 +267,7 @@ input.mw-searchInput {
font-size: small;
margin-right: 8px;
text-align: right;
+ padding-left: 140px;
}
/* Override text justification (user preference), see bug 31990 */
#linkcollection * {
diff --git a/skins/common/IEFixes.js b/skins/common/IEFixes.js
index dd999ed4..e35fcd1a 100644
--- a/skins/common/IEFixes.js
+++ b/skins/common/IEFixes.js
@@ -1,10 +1,17 @@
-// IE fixes javascript
+// IE fixes javascript loaded by wikibits.js for IE <= 6.0
+( function ( mw, $ ) {
-window.isMSIE55 = ( window.showModalDialog && window.clipboardData && window.createPopup );
-window.doneIETransform = undefined;
-window.doneIEAlphaFix = undefined;
+var doneIEAlphaFix, doneIETransform, expandedURLs, fixalpha, isMSIE55,
+ relativeforfloats, setrelative, hasClass;
-window.hookit = function() {
+// Also returns true for IE6, 7, 8, 9 and 10. createPopup is removed in IE11.
+// Good thing this is only loaded for IE <= 6 by wikibits.
+// Might as well set it to true.
+isMSIE55 = window.isMSIE55 = ( window.showModalDialog && window.clipboardData && window.createPopup );
+doneIETransform = window.doneIETransform = undefined;
+doneIEAlphaFix = window.doneIEAlphaFix = undefined;
+
+window.hookit = function () {
if ( !doneIETransform && document.getElementById && document.getElementById( 'bodyContent' ) ) {
doneIETransform = true;
relativeforfloats();
@@ -17,26 +24,27 @@ if ( document.attachEvent ) {
}
// png alpha transparency fixes
-window.fixalpha = function( logoId ) {
+fixalpha = window.fixalpha = function ( logoId ) {
// bg
if ( isMSIE55 && !doneIEAlphaFix ) {
- var plogo = document.getElementById( logoId || 'p-logo' );
+ var bg, imageUrl, linkFix, logoa, logospan, plogo;
+ plogo = document.getElementById( logoId || 'p-logo' );
if ( !plogo ) {
return;
}
- var logoa = plogo.getElementsByTagName('a')[0];
+ logoa = plogo.getElementsByTagName('a')[0];
if ( !logoa ) {
return;
}
- var bg = logoa.currentStyle.backgroundImage;
- var imageUrl = bg.substring( 5, bg.length - 2 );
+ bg = logoa.currentStyle.backgroundImage;
+ imageUrl = bg.substring( 5, bg.length - 2 );
doneIEAlphaFix = true;
- if ( imageUrl.substr( imageUrl.length - 4 ).toLowerCase() == '.png' ) {
- var logospan = logoa.appendChild( document.createElement( 'span' ) );
+ if ( imageUrl.substr( imageUrl.length - 4 ).toLowerCase() === '.png' ) {
+ logospan = logoa.appendChild( document.createElement( 'span' ) );
logoa.style.backgroundImage = 'none';
logospan.style.filter = 'progid:DXImageTransform.Microsoft.AlphaImageLoader(src=' + imageUrl + ')';
@@ -45,7 +53,7 @@ window.fixalpha = function( logoId ) {
logospan.style.width = logoa.currentStyle.width;
logospan.style.cursor = 'hand';
// Center image with hack for IE5.5
- if ( document.documentElement.dir == 'rtl' ) {
+ if ( document.documentElement.dir === 'rtl' ) {
logospan.style.right = '50%';
logospan.style.setExpression( 'marginRight', '"-" + (this.offsetWidth / 2) + "px"' );
} else {
@@ -55,7 +63,7 @@ window.fixalpha = function( logoId ) {
logospan.style.top = '50%';
logospan.style.setExpression( 'marginTop', '"-" + (this.offsetHeight / 2) + "px"' );
- var linkFix = logoa.appendChild( logoa.cloneNode() );
+ linkFix = logoa.appendChild( logoa.cloneNode() );
linkFix.style.position = 'absolute';
linkFix.style.height = '100%';
linkFix.style.width = '100%';
@@ -69,22 +77,23 @@ if ( isMSIE55 ) {
}
// fix ie6 disappering float bug
-window.relativeforfloats = function() {
- var bc = document.getElementById( 'bodyContent' );
+relativeforfloats = window.relativeforfloats = function () {
+ var bc, tables, divs;
+ bc = document.getElementById( 'bodyContent' );
if ( bc ) {
- var tables = bc.getElementsByTagName( 'table' );
- var divs = bc.getElementsByTagName( 'div' );
+ tables = bc.getElementsByTagName( 'table' );
+ divs = bc.getElementsByTagName( 'div' );
setrelative( tables );
setrelative( divs );
}
};
-window.setrelative = function( nodes ) {
+setrelative = window.setrelative = function ( nodes ) {
var i = 0;
while ( i < nodes.length ) {
- if( ( ( nodes[i].style.float && nodes[i].style.float != ( 'none' ) ||
- ( nodes[i].align && nodes[i].align != ( 'none' ) ) ) &&
- ( !nodes[i].style.position || nodes[i].style.position != 'relative' ) ) )
+ if( ( ( nodes[i].style.float && nodes[i].style.float !== ( 'none' ) ||
+ ( nodes[i].align && nodes[i].align !== ( 'none' ) ) ) &&
+ ( !nodes[i].style.position || nodes[i].style.position !== 'relative' ) ) )
{
nodes[i].style.position = 'relative';
}
@@ -93,30 +102,31 @@ window.setrelative = function( nodes ) {
};
// Expand links for printing
-String.prototype.hasClass = function( classWanted ) {
- var classArr = this.split(/\s/);
- for ( var i = 0; i < classArr.length; i++ ) {
- if ( classArr[i].toLowerCase() == classWanted.toLowerCase() ) {
+hasClass = function ( classText, classWanted ) {
+ var i = 0, classArr = classText.split(/\s/);
+ for ( i = 0; i < classArr.length; i++ ) {
+ if ( classArr[i].toLowerCase() === classWanted.toLowerCase() ) {
return true;
}
}
return false;
};
-window.expandedURLs = undefined;
+expandedURLs = window.expandedURLs = undefined;
-window.onbeforeprint = function() {
- expandedURLs = [];
+window.onbeforeprint = function () {
+ var allLinks, contentEl, expandedLink, expandedText, i;
- var contentEl = document.getElementById( 'content' );
+ expandedURLs = [];
+ contentEl = document.getElementById( 'content' );
if ( contentEl ) {
- var allLinks = contentEl.getElementsByTagName( 'a' );
+ allLinks = contentEl.getElementsByTagName( 'a' );
- for ( var i = 0; i < allLinks.length; i++ ) {
- if ( allLinks[i].className.hasClass( 'external' ) && !allLinks[i].className.hasClass( 'free' ) ) {
- var expandedLink = document.createElement( 'span' );
- var expandedText = document.createTextNode( ' (' + allLinks[i].href + ')' );
+ for ( i = 0; i < allLinks.length; i++ ) {
+ if ( hasClass( allLinks[i].className, 'external' ) && !hasClass( allLinks[i].className, 'free' ) ) {
+ expandedLink = document.createElement( 'span' );
+ expandedText = document.createTextNode( ' (' + allLinks[i].href + ')' );
expandedLink.appendChild( expandedText );
allLinks[i].parentNode.insertBefore( expandedLink, allLinks[i].nextSibling );
expandedURLs[i] = expandedLink;
@@ -132,3 +142,5 @@ window.onafterprint = function() {
}
}
};
+
+}( mediaWiki, jQuery ) );
diff --git a/skins/common/ajax.js b/skins/common/ajax.js
index 121f9d12..ca74b384 100644
--- a/skins/common/ajax.js
+++ b/skins/common/ajax.js
@@ -1,15 +1,23 @@
-// remote scripting library
-// (c) copyright 2005 modernmethod, inc
-window.sajax_debug_mode = false;
-window.sajax_request_type = 'GET';
+/**
+ * Remote Scripting Library
+ * Copyright 2005 modernmethod, inc
+ * Under the open source BSD license
+ * http://www.modernmethod.com/sajax/
+ */
+
+/*jshint camelcase:false, onevar:false */
+/*global alert */
+( function ( mw ) {
/**
- * if sajax_debug_mode is true, this function outputs given the message into
- * the element with id = sajax_debug; if no such element exists in the document,
+ * if sajax_debug_mode is true, this function outputs given the message into
+ * the element with id = sajax_debug; if no such element exists in the document,
* it is injected.
*/
-window.sajax_debug = function(text) {
- if (!sajax_debug_mode) return false;
+function debug( text ) {
+ if ( !window.sajax_debug_mode ) {
+ return false;
+ }
var e = document.getElementById( 'sajax_debug' );
@@ -33,36 +41,36 @@ window.sajax_debug = function(text) {
e.appendChild( m );
return true;
-};
+}
/**
* Compatibility wrapper for creating a new XMLHttpRequest object.
*/
-window.sajax_init_object = function() {
- sajax_debug( 'sajax_init_object() called..' );
- var A;
+function createXhr() {
+ debug( 'sajax_init_object() called..' );
+ var a;
try {
// Try the new style before ActiveX so we don't
// unnecessarily trigger warnings in IE 7 when
// set to prompt about ActiveX usage
- A = new XMLHttpRequest();
- } catch ( e ) {
+ a = new XMLHttpRequest();
+ } catch ( xhrE ) {
try {
- A = new ActiveXObject( 'Msxml2.XMLHTTP' );
- } catch ( e ) {
+ a = new window.ActiveXObject( 'Msxml2.XMLHTTP' );
+ } catch ( msXmlE ) {
try {
- A = new ActiveXObject( 'Microsoft.XMLHTTP' );
- } catch ( oc ) {
- A = null;
+ a = new window.ActiveXObject( 'Microsoft.XMLHTTP' );
+ } catch ( msXhrE ) {
+ a = null;
}
}
}
- if ( !A ) {
- sajax_debug( 'Could not create connection object.' );
+ if ( !a ) {
+ debug( 'Could not create connection object.' );
}
- return A;
-};
+ return a;
+}
/**
* Perform an AJAX call to MediaWiki. Calls are handled by AjaxDispatcher.php
@@ -80,13 +88,13 @@ window.sajax_init_object = function() {
* (1, 2, 3) as the parameter list, and will show the result in the element
* with id = showFoo
*/
-window.sajax_do_call = function(func_name, args, target) {
- var i, x, n;
+function doAjaxRequest( func_name, args, target ) {
+ var i, x;
var uri;
var post_data;
uri = mw.util.wikiScript() + '?action=ajax';
- if ( sajax_request_type == 'GET' ) {
- if ( uri.indexOf( '?' ) == -1 ) {
+ if ( window.sajax_request_type === 'GET' ) {
+ if ( uri.indexOf( '?' ) === -1 ) {
uri = uri + '?rs=' + encodeURIComponent( func_name );
} else {
uri = uri + '&rs=' + encodeURIComponent( func_name );
@@ -102,47 +110,47 @@ window.sajax_do_call = function(func_name, args, target) {
post_data = post_data + '&rsargs[]=' + encodeURIComponent( args[i] );
}
}
- x = sajax_init_object();
+ x = createXhr();
if ( !x ) {
alert( 'AJAX not supported' );
return false;
}
try {
- x.open( sajax_request_type, uri, true );
+ x.open( window.sajax_request_type, uri, true );
} catch ( e ) {
- if ( window.location.hostname == 'localhost' ) {
- alert( "Your browser blocks XMLHttpRequest to 'localhost', try using a real hostname for development/testing." );
+ if ( location.hostname === 'localhost' ) {
+ alert( 'Your browser blocks XMLHttpRequest to "localhost", try using a real hostname for development/testing.' );
}
throw e;
}
- if ( sajax_request_type == 'POST' ) {
+ if ( window.sajax_request_type === 'POST' ) {
x.setRequestHeader( 'Method', 'POST ' + uri + ' HTTP/1.1' );
x.setRequestHeader( 'Content-Type', 'application/x-www-form-urlencoded' );
}
x.setRequestHeader( 'Pragma', 'cache=yes' );
x.setRequestHeader( 'Cache-Control', 'no-transform' );
- x.onreadystatechange = function() {
- if ( x.readyState != 4 ) {
+ x.onreadystatechange = function () {
+ if ( x.readyState !== 4 ) {
return;
}
- sajax_debug( 'received (' + x.status + ' ' + x.statusText + ') ' + x.responseText );
+ debug( 'received (' + x.status + ' ' + x.statusText + ') ' + x.responseText );
//if ( x.status != 200 )
// alert( 'Error: ' + x.status + ' ' + x.statusText + ': ' + x.responseText );
//else
- if ( typeof( target ) == 'function' ) {
+ if ( typeof target === 'function' ) {
target( x );
- } else if ( typeof( target ) == 'object' ) {
- if ( target.tagName == 'INPUT' ) {
- if ( x.status == 200 ) {
+ } else if ( typeof target === 'object' ) {
+ if ( target.tagName === 'INPUT' ) {
+ if ( x.status === 200 ) {
target.value= x.responseText;
}
//else alert( 'Error: ' + x.status + ' ' + x.statusText + ' (' + x.responseText + ')' );
} else {
- if ( x.status == 200 ) {
+ if ( x.status === 200 ) {
target.innerHTML = x.responseText;
} else {
target.innerHTML = '<div class="error">Error: ' + x.status +
@@ -150,24 +158,37 @@ window.sajax_do_call = function(func_name, args, target) {
}
}
} else {
- alert( 'bad target for sajax_do_call: not a function or object: ' + target );
+ alert( 'Bad target for sajax_do_call: not a function or object: ' + target );
}
};
- sajax_debug( func_name + ' uri = ' + uri + ' / post = ' + post_data );
+ debug( func_name + ' uri = ' + uri + ' / post = ' + post_data );
x.send( post_data );
- sajax_debug( func_name + ' waiting..' );
- delete x;
+ debug( func_name + ' waiting..' );
return true;
-};
+}
/**
- * @return boolean whether the browser supports XMLHttpRequest
+ * @return {boolean} Whether the browser supports AJAX
*/
-window.wfSupportsAjax = function() {
- var request = sajax_init_object();
+function wfSupportsAjax() {
+ var request = createXhr();
var supportsAjax = request ? true : false;
- delete request;
+ request = undefined;
return supportsAjax;
-};
+}
+
+// Expose + Mark as deprecated
+var deprecationNotice = 'Sajax is deprecated, use jQuery.ajax or mediawiki.api instead.';
+
+// Variables
+mw.log.deprecate( window, 'sajax_debug_mode', false, deprecationNotice );
+mw.log.deprecate( window, 'sajax_request_type', 'GET', deprecationNotice );
+// Methods
+mw.log.deprecate( window, 'sajax_debug', debug, deprecationNotice );
+mw.log.deprecate( window, 'sajax_init_object', createXhr, deprecationNotice );
+mw.log.deprecate( window, 'sajax_do_call', doAjaxRequest, deprecationNotice );
+mw.log.deprecate( window, 'wfSupportsAjax', wfSupportsAjax, deprecationNotice );
+
+}( mediaWiki ) );
diff --git a/skins/common/commonContent.css b/skins/common/commonContent.css
index a550d97a..14d39b92 100644
--- a/skins/common/commonContent.css
+++ b/skins/common/commonContent.css
@@ -14,6 +14,43 @@
padding: 5px;
font-size: 95%;
}
+
+/**
+ * We want to display the ToC element with intrinsic width in block mode. The fit-content
+ * value for width is however not supported by large groups of browsers.
+ *
+ * We use display:table. Even though it should only contain other table-* display
+ * elements, there are no known problems with using this.
+ *
+ * Because IE < 8, FF 2 and other older browsers don't support display:table, we fallback to
+ * using inline-block mode, which features at least intrinsic width, but won't clear preceding
+ * inline elements. In practice inline elements surrounding the TOC are uncommon enough that
+ * this is an acceptable sacrifice.
+ */
+#toc,
+.toc {
+ display: -moz-inline-block;
+ display: inline-block;
+ display: table;
+
+ /* IE7 and earlier */
+ zoom: 1;
+ *display: inline;
+
+ padding: 7px;
+}
+
+/* CSS for backwards-compatibility with cached page renders and creative uses in wikitext */
+table#toc,
+table.toc {
+ border-collapse: collapse;
+}
+/* Remove additional paddings inside table-cells that are not present in <div>s */
+table#toc td,
+table.toc td {
+ padding: 0;
+}
+
#toc h2,
.toc h2 {
display: inline;
@@ -96,6 +133,7 @@ html .thumbcaption {
div.magnify {
border: none !important;
background: none !important;
+ margin-left: 3px;
}
div.magnify a, div.magnify img {
display: block;
@@ -128,6 +166,13 @@ img.thumbborder {
#userlogin, #userloginForm {
border: solid 1px #cccccc;
padding: 1.2em;
- margin: .5em;
- float: left;
+ margin: 0.5em;
+}
+
+#loginend {
+ margin: 0.5em;
+}
+
+#loginend table {
+ width: 100%;
}
diff --git a/skins/common/commonElements.css b/skins/common/commonElements.css
index 2fa0cbaf..76ec4af7 100644
--- a/skins/common/commonElements.css
+++ b/skins/common/commonElements.css
@@ -86,15 +86,9 @@ h6 {
h1 {
font-size: 188%;
}
-h1 .editsection {
- font-size: 53%;
-}
h2 {
font-size: 150%;
}
-h2 .editsection {
- font-size: 67%;
-}
h3,
h4,
h5,
@@ -105,28 +99,14 @@ h6 {
h3 {
font-size: 132%;
}
-h3 .editsection {
- font-size: 76%;
- font-weight: normal;
-}
h4 {
font-size: 116%;
}
-h4 .editsection {
- font-size: 86%;
- font-weight: normal; }
h5 {
- font-size: 100%;
-}
-h5 .editsection {
- font-weight: normal;
+ font-size: 108%;
}
h6 {
- font-size: 80%;
-}
-h6 .editsection {
- font-size: 125%;
- font-weight: normal;
+ font-size: 100%;
}
/* Some space under the headers in the content area */
@@ -198,7 +178,7 @@ code {
}
pre, .mw-code {
padding: 1em;
- border: 1px dashed #2f6fab;
+ border: 1px solid #ddd;
color: black;
background-color: #f9f9f9;
}
diff --git a/skins/common/commonPrint.css b/skins/common/commonPrint.css
index 6cb213f2..58628772 100644
--- a/skins/common/commonPrint.css
+++ b/skins/common/commonPrint.css
@@ -111,7 +111,7 @@ div#jump-to-nav,
div.top,
div#column-one,
#colophon,
-.editsection,
+.mw-editsection,
.toctoggle,
.tochidden,
div#f-poweredbyico,
@@ -127,6 +127,7 @@ tr.mw-metadata-show-hide-extended,
span.mw-filepage-other-resolutions,
#filetoc,
.usermessage,
+.patrollink,
#mw-navigation {
/* Hides all the elements irrelevant for printing */
display: none;
@@ -191,7 +192,7 @@ a:link, a:visited {
#content a.external.text:after,
#content a.external.autonumber:after {
/* Expand URLs for printing */
- content: " (" attr(href) ") ";
+ content: " (" attr(href) ")";
}
#globalWrapper {
@@ -352,7 +353,7 @@ a.sortheader {
.wikitable, .thumb, img {
page-break-inside: avoid;
}
-h2, h3, h4, h5, h6, h7 {
+h2, h3, h4, h5, h6 {
page-break-after: avoid;
}
p {
diff --git a/skins/common/config.css b/skins/common/config.css
index 39206c3a..79780da9 100644
--- a/skins/common/config.css
+++ b/skins/common/config.css
@@ -88,7 +88,13 @@
}
.config-input-check {
- margin-left: 10em;
+ margin-left: 3.7em;
+ margin-right: 2em;
+ margin-bottom: 0.25em;
+}
+
+.config-input-check input {
+ margin-left: -1em;
}
.error {
diff --git a/skins/common/config.js b/skins/common/config.js
index b1e28aba..fb8edc1f 100644
--- a/skins/common/config.js
+++ b/skins/common/config.js
@@ -1,5 +1,5 @@
( function ( $ ) {
- $( document ).ready( function () {
+ $( function () {
var $label, labelText;
function syncText() {
@@ -25,7 +25,7 @@
.find( '.mw-help-field-data' )
.slideToggle( 'fast' );
} );
-
+
// Show/hide code for DB-specific options
// FIXME: Do we want slow, fast, or even non-animated (instantaneous) showing/hiding here?
$( '.dbRadio' ).each( function () {
@@ -40,12 +40,12 @@
$wrapper.show( 'slow' );
}
} );
-
+
// Scroll to the bottom of upgrade log
$( '#config-live-log' ).children( 'textarea' ).each( function () {
this.scrollTop = this.scrollHeight;
} );
-
+
// Show/hide Creative Commons thingy
$( '.licenseRadio' ).click( function () {
var $wrapper = $( '#config-cc-wrapper' );
@@ -55,7 +55,7 @@
$wrapper.hide( 'slow' );
}
} );
-
+
// Show/hide random stuff (email, upload)
$( '.showHideRadio' ).click( function () {
var $wrapper = $( '#' + $(this).attr( 'rel' ) );
@@ -88,7 +88,7 @@
$textbox.prop( 'readonly', true ).closest( '.config-block' ).slideUp( 'fast' );
}
} );
-
+
// Synchronize radio button label for sitename with textbox
$label = $( 'label[for=config__NamespaceType_site-name]' );
labelText = $label.text();
@@ -97,7 +97,7 @@
// Show/Hide memcached servers when needed
$( 'input[name$="config_wgMainCacheType"]' ).change( function () {
- var $memc = $( "#config-memcachewrapper" );
+ var $memc = $( '#config-memcachewrapper' );
if( $( 'input[name$="config_wgMainCacheType"]:checked' ).val() === 'memcached' ) {
$memc.show( 'slow' );
} else {
diff --git a/skins/common/images/Arr_u.png b/skins/common/images/Arr_u.png
index 6132836b..1aa543af 100644
--- a/skins/common/images/Arr_u.png
+++ b/skins/common/images/Arr_u.png
Binary files differ
diff --git a/skins/common/images/ar/button_headline.png b/skins/common/images/ar/button_headline.png
index 04fb8f11..398e5614 100644
--- a/skins/common/images/ar/button_headline.png
+++ b/skins/common/images/ar/button_headline.png
Binary files differ
diff --git a/skins/common/images/ar/button_nowiki.png b/skins/common/images/ar/button_nowiki.png
index 12b986b4..743ea61b 100644
--- a/skins/common/images/ar/button_nowiki.png
+++ b/skins/common/images/ar/button_nowiki.png
Binary files differ
diff --git a/skins/common/images/arrow_disabled_left_25.png b/skins/common/images/arrow_disabled_left_25.png
index 8f979aab..83df0684 100644
--- a/skins/common/images/arrow_disabled_left_25.png
+++ b/skins/common/images/arrow_disabled_left_25.png
Binary files differ
diff --git a/skins/common/images/arrow_disabled_right_25.png b/skins/common/images/arrow_disabled_right_25.png
index 11022f62..aa4fbf8c 100644
--- a/skins/common/images/arrow_disabled_right_25.png
+++ b/skins/common/images/arrow_disabled_right_25.png
Binary files differ
diff --git a/skins/common/images/arrow_right_25.png b/skins/common/images/arrow_right_25.png
index 9e1b550c..3f8fee38 100644
--- a/skins/common/images/arrow_right_25.png
+++ b/skins/common/images/arrow_right_25.png
Binary files differ
diff --git a/skins/common/images/button_hr.png b/skins/common/images/button_hr.png
index 19e4ad45..47e1ca40 100644
--- a/skins/common/images/button_hr.png
+++ b/skins/common/images/button_hr.png
Binary files differ
diff --git a/skins/common/images/button_nowiki.png b/skins/common/images/button_nowiki.png
index c647de2b..2ba818de 100644
--- a/skins/common/images/button_nowiki.png
+++ b/skins/common/images/button_nowiki.png
Binary files differ
diff --git a/skins/common/images/button_sig.png b/skins/common/images/button_sig.png
index ff7348a9..fe34b3fb 100644
--- a/skins/common/images/button_sig.png
+++ b/skins/common/images/button_sig.png
Binary files differ
diff --git a/skins/common/images/button_template.png b/skins/common/images/button_template.png
index 53b6f92f..94d9d0b9 100644
--- a/skins/common/images/button_template.png
+++ b/skins/common/images/button_template.png
Binary files differ
diff --git a/skins/common/images/critical-32.png b/skins/common/images/critical-32.png
index dce5667a..9b38e6a2 100644
--- a/skins/common/images/critical-32.png
+++ b/skins/common/images/critical-32.png
Binary files differ
diff --git a/skins/common/images/fa/button_nowiki.png b/skins/common/images/fa/button_nowiki.png
index 12b986b4..743ea61b 100644
--- a/skins/common/images/fa/button_nowiki.png
+++ b/skins/common/images/fa/button_nowiki.png
Binary files differ
diff --git a/skins/common/images/feed-icon.png b/skins/common/images/feed-icon.png
index 7188fa23..00f49f6c 100644
--- a/skins/common/images/feed-icon.png
+++ b/skins/common/images/feed-icon.png
Binary files differ
diff --git a/skins/common/images/icons/fileicon-psd.png b/skins/common/images/icons/fileicon-psd.png
index 5bd40cb0..598f190e 100644
--- a/skins/common/images/icons/fileicon-psd.png
+++ b/skins/common/images/icons/fileicon-psd.png
Binary files differ
diff --git a/skins/common/images/magnify-clip-rtl.png b/skins/common/images/magnify-clip-rtl.png
index cfddc279..ff85c077 100644
--- a/skins/common/images/magnify-clip-rtl.png
+++ b/skins/common/images/magnify-clip-rtl.png
Binary files differ
diff --git a/skins/common/images/question-small.png b/skins/common/images/question-small.png
new file mode 100644
index 00000000..f7405d26
--- /dev/null
+++ b/skins/common/images/question-small.png
Binary files differ
diff --git a/skins/common/images/question.svg b/skins/common/images/question.svg
new file mode 100644
index 00000000..27973053
--- /dev/null
+++ b/skins/common/images/question.svg
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
+<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
+ width="21.059px" height="21.06px" viewBox="0 0 21.059 21.06" enable-background="new 0 0 21.059 21.06" xml:space="preserve">
+<path fill="#575757" d="M10.529,0C4.715,0,0,4.714,0,10.529s4.715,10.53,10.529,10.53c5.816,0,10.529-4.715,10.529-10.53
+ S16.346,0,10.529,0z M10.527,16.767c-0.861,0-1.498-0.688-1.498-1.516c0-0.862,0.637-1.534,1.498-1.534c0.828,0,1.5,0.672,1.5,1.534
+ C12.027,16.078,11.355,16.767,10.527,16.767z M12.664,10.255c-0.723,0.568-1,0.931-1,1.739v0.5H9.459v-0.603
+ c0-1.517,0.449-2.136,1.154-2.688c0.707-0.552,1.139-0.845,1.139-1.637c0-0.672-0.414-1.051-1.24-1.051
+ c-0.707,0-1.328,0.189-1.982,0.638L7.479,5.346c0.861-0.604,1.93-1.034,3.342-1.034c1.912,0,3.516,1.051,3.516,3.066
+ C14.336,8.808,13.543,9.566,12.664,10.255z"/>
+</svg>
diff --git a/skins/common/images/tick-32.png b/skins/common/images/tick-32.png
index dfde1707..34cfa9ce 100644
--- a/skins/common/images/tick-32.png
+++ b/skins/common/images/tick-32.png
Binary files differ
diff --git a/skins/common/images/warning-32.png b/skins/common/images/warning-32.png
index b14a8315..0400734c 100644
--- a/skins/common/images/warning-32.png
+++ b/skins/common/images/warning-32.png
Binary files differ
diff --git a/skins/common/oldshared.css b/skins/common/oldshared.css
index 6dcdf6f1..eea8b8ee 100644
--- a/skins/common/oldshared.css
+++ b/skins/common/oldshared.css
@@ -11,24 +11,15 @@
h1 { font-size: 2em; }
h2 { font-size: 1.5em; }
h3 { font-size: 1.17em; }
-h5 { font-size: .83em; }
-h6 { font-size: .75em; }
+h4 { font-size: 1.11em; }
+h5 { font-size: 1.05em; }
+h6 { font-size: 1em; }
h1, h2, h3, h4, h5, h6 {
font-weight: bolder;
}
/* Now the custom parts */
-/* Make edit sections (which are inside h# tags) normal-sized */
-.editsection {
- font-weight: normal;
-}
-h1 .editsection { font-size: 50%; }
-h2 .editsection { font-size: 66.7%; }
-h3 .editsection { font-size: 85.5%; }
-h5 .editsection { font-size: 120%; }
-h6 .editsection { font-size: 133%; }
-
#footer { clear: both }
/* images */
/* @noflip */
@@ -93,6 +84,7 @@ div.magnify {
float: right;
border: none !important;
background: none !important;
+ margin-left: 3px;
}
div.magnify a,
div.magnify img {
@@ -130,6 +122,25 @@ img { border: none; }
padding: 5px;
font-size: 95%;
text-align: center;
+ display: -moz-inline-block;
+ display: inline-block;
+ display: table;
+
+ /* IE7 and earlier */
+ zoom: 1;
+ *display: inline;
+
+ padding: 7px;
+}
+/* CSS for backwards-compatibility with cached page renders and creative uses in wikitext */
+table#toc,
+table.toc {
+ border-collapse: collapse;
+}
+/* Remove additional paddings inside table-cells that are not present in <div>s */
+table#toc td,
+table.toc td {
+ padding: 0;
}
#toc h2,
.toc h2 {
@@ -161,9 +172,6 @@ img { border: none; }
}
/* preference page with js-genrated toc */
-#mw-pref-clear {
- clear: both;
-}
#preftoc {
float: left;
margin: 1em 1em 1em 1em;
@@ -283,7 +291,7 @@ li span.deleted {
font-style: italic;
}
-/* Classes for EXIF data display */
+/* Classes for Exif data display */
table.mw_metadata {
margin-left: 0.5em;
}
@@ -458,4 +466,4 @@ html > body.rtl div#bodyContent ul#filetoc {
display: block;
}
-/* RTL specific CSS ends here **/ \ No newline at end of file
+/* RTL specific CSS ends here **/
diff --git a/skins/common/protect.js b/skins/common/protect.js
index a23c0cbd..dc142ca9 100644
--- a/skins/common/protect.js
+++ b/skins/common/protect.js
@@ -1,6 +1,7 @@
+( function ( mw, $ ) {
-window.ProtectionForm = {
- 'existingMatch': false,
+var ProtectionForm = window.ProtectionForm = {
+ existingMatch: false,
/**
* Set up the protection chaining interface (i.e. "unlock move permissions" checkbox)
@@ -12,40 +13,47 @@ window.ProtectionForm = {
* numTypes The number of protection types
* existingMatch True if all the existing expiry times match
*/
- 'init': function( opts ) {
- if( !( document.createTextNode && document.getElementById && document.getElementsByTagName ) )
+ init: function ( opts ) {
+ var box, boxbody, row, cell, check, label;
+
+ if ( !( document.createTextNode && document.getElementById && document.getElementsByTagName ) ) {
return false;
+ }
- var box = document.getElementById( opts.tableId );
- if( !box )
+ box = document.getElementById( opts.tableId );
+ if ( !box ) {
return false;
-
- var boxbody = box.getElementsByTagName('tbody')[0];
- var row = document.createElement( 'tr' );
+ }
+
+ boxbody = box.getElementsByTagName( 'tbody' )[0];
+ row = document.createElement( 'tr' );
boxbody.insertBefore( row, boxbody.firstChild.nextSibling );
this.existingMatch = opts.existingMatch;
- var cell = document.createElement( 'td' );
+ cell = document.createElement( 'td' );
row.appendChild( cell );
// If there is only one protection type, there is nothing to chain
- if( opts.numTypes > 1 ) {
- var check = document.createElement( 'input' );
+ if ( opts.numTypes > 1 ) {
+ check = document.createElement( 'input' );
check.id = 'mwProtectUnchained';
check.type = 'checkbox';
- cell.appendChild( check );
- addClickHandler( check, function() { ProtectionForm.onChainClick(); } );
+ $( check ).click( function () {
+ ProtectionForm.onChainClick();
+ } );
- cell.appendChild( document.createTextNode( ' ' ) );
- var label = document.createElement( 'label' );
+ label = document.createElement( 'label' );
label.htmlFor = 'mwProtectUnchained';
label.appendChild( document.createTextNode( opts.labelText ) );
+
+ cell.appendChild( check );
+ cell.appendChild( document.createTextNode( ' ' ) );
cell.appendChild( label );
check.checked = !this.areAllTypesMatching();
this.enableUnchainedInputs( check.checked );
}
-
+
$( '#mwProtect-reason' ).byteLimit( 180 );
this.updateCascadeCheckbox();
@@ -56,17 +64,19 @@ window.ProtectionForm = {
/**
* Sets the disabled attribute on the cascade checkbox depending on the current selected levels
*/
- 'updateCascadeCheckbox': function() {
+ updateCascadeCheckbox: function () {
+ var i, lists, items, selected;
+
// For non-existent titles, there is no cascade option
- if( !document.getElementById( 'mwProtect-cascade' ) ) {
+ if ( !document.getElementById( 'mwProtect-cascade' ) ) {
return;
}
- var lists = this.getLevelSelectors();
- for( var i = 0; i < lists.length; i++ ) {
- if( lists[i].selectedIndex > -1 ) {
- var items = lists[i].getElementsByTagName( 'option' );
- var selected = items[ lists[i].selectedIndex ].value;
- if( !this.isCascadeableLevel(selected) ) {
+ lists = this.getLevelSelectors();
+ for ( i = 0; i < lists.length; i++ ) {
+ if ( lists[i].selectedIndex > -1 ) {
+ items = lists[i].getElementsByTagName( 'option' );
+ selected = items[ lists[i].selectedIndex ].value;
+ if ( !this.isCascadeableLevel( selected ) ) {
document.getElementById( 'mwProtect-cascade' ).checked = false;
document.getElementById( 'mwProtect-cascade' ).disabled = true;
return;
@@ -81,7 +91,7 @@ window.ProtectionForm = {
* @param level {String}
* @return {Boolean}
*/
- 'isCascadeableLevel': function( level ) {
+ isCascadeableLevel: function ( level ) {
var cascadeLevels, len, i;
cascadeLevels = mw.config.get( 'wgCascadeableLevels' );
@@ -102,9 +112,10 @@ window.ProtectionForm = {
*
* @param source Element Level selector that changed
*/
- 'updateLevels': function(source) {
- if( !this.isUnchained() )
+ updateLevels: function ( source ) {
+ if ( !this.isUnchained() ) {
this.setAllSelectors( source.selectedIndex );
+ }
this.updateCascadeCheckbox();
},
@@ -115,22 +126,24 @@ window.ProtectionForm = {
* @param source Element expiry input that changed
*/
- 'updateExpiry': function(source) {
- if( !this.isUnchained() ) {
- var expiry = source.value;
- this.forEachExpiryInput(function(element) {
+ updateExpiry: function ( source ) {
+ var expiry, listId, list;
+
+ if ( !this.isUnchained() ) {
+ expiry = source.value;
+ this.forEachExpiryInput( function ( element ) {
element.value = expiry;
- });
+ } );
}
- var listId = source.id.replace( /^mwProtect-(\w+)-expires$/, 'mwProtectExpirySelection-$1' );
- var list = document.getElementById( listId );
- if (list && list.value != 'othertime' ) {
+ listId = source.id.replace( /^mwProtect-(\w+)-expires$/, 'mwProtectExpirySelection-$1' );
+ list = document.getElementById( listId );
+ if ( list && list.value !== 'othertime' ) {
if ( this.isUnchained() ) {
list.value = 'othertime';
} else {
- this.forEachExpirySelector(function(element) {
+ this.forEachExpirySelector( function ( element ) {
element.value = 'othertime';
- });
+ } );
}
}
},
@@ -141,15 +154,16 @@ window.ProtectionForm = {
*
* @param source Element expiry selector that changed
*/
- 'updateExpiryList': function(source) {
- if( !this.isUnchained() ) {
- var expiry = source.value;
- this.forEachExpirySelector(function(element) {
+ updateExpiryList: function ( source ) {
+ var expiry;
+ if ( !this.isUnchained() ) {
+ expiry = source.value;
+ this.forEachExpirySelector( function ( element ) {
element.value = expiry;
- });
- this.forEachExpiryInput(function(element) {
+ } );
+ this.forEachExpiryInput( function ( element ) {
element.value = '';
- });
+ } );
}
},
@@ -157,8 +171,8 @@ window.ProtectionForm = {
* Update chain status and enable/disable various bits of the UI
* when the user changes the "unlock move permissions" checkbox
*/
- 'onChainClick': function() {
- if( this.isUnchained() ) {
+ onChainClick: function () {
+ if ( this.isUnchained() ) {
this.enableUnchainedInputs( true );
} else {
this.setAllSelectors( this.getMaxLevel() );
@@ -170,16 +184,17 @@ window.ProtectionForm = {
/**
* Returns true if the named attribute in all objects in the given array are matching
*/
- 'matchAttribute' : function( objects, attrName ) {
- var value = null;
+ matchAttribute: function ( objects, attrName ) {
+ var i, element, value;
// Check levels
- for ( var i = 0; i < objects.length; i++ ) {
- var element = objects[i];
- if ( value == null ) {
+ value = null;
+ for ( i = 0; i < objects.length; i++ ) {
+ element = objects[i];
+ if ( value === null ) {
value = element[attrName];
} else {
- if ( value != element[attrName] ) {
+ if ( value !== element[attrName] ) {
return false;
}
}
@@ -192,7 +207,7 @@ window.ProtectionForm = {
*
* @return boolean
*/
- 'areAllTypesMatching': function() {
+ areAllTypesMatching: function () {
return this.existingMatch
&& this.matchAttribute( this.getLevelSelectors(), 'selectedIndex' )
&& this.matchAttribute( this.getExpirySelectors(), 'selectedIndex' )
@@ -204,7 +219,7 @@ window.ProtectionForm = {
*
* @return bool
*/
- 'isUnchained': function() {
+ isUnchained: function () {
var element = document.getElementById( 'mwProtectUnchained' );
return element
? element.checked
@@ -214,13 +229,13 @@ window.ProtectionForm = {
/**
* Find the highest protection level in any selector
*/
- 'getMaxLevel': function() {
+ getMaxLevel: function () {
var maxIndex = -1;
- this.forEachLevelSelector(function(element) {
- if (element.selectedIndex > maxIndex) {
+ this.forEachLevelSelector( function ( element ) {
+ if ( element.selectedIndex > maxIndex ) {
maxIndex = element.selectedIndex;
}
- });
+ } );
return maxIndex;
},
@@ -229,12 +244,12 @@ window.ProtectionForm = {
*
* @param index int Protection level
*/
- 'setAllSelectors': function(index) {
- this.forEachLevelSelector(function(element) {
- if (element.selectedIndex != index) {
+ setAllSelectors: function ( index ) {
+ this.forEachLevelSelector( function ( element ) {
+ if ( element.selectedIndex !== index ) {
element.selectedIndex = index;
}
- });
+ } );
},
/**
@@ -242,10 +257,12 @@ window.ProtectionForm = {
*
* @param func callable Callback function
*/
- 'forEachLevelSelector': function(func) {
- var selectors = this.getLevelSelectors();
- for (var i = 0; i < selectors.length; i++) {
- func(selectors[i]);
+ forEachLevelSelector: function ( func ) {
+ var i, selectors;
+
+ selectors = this.getLevelSelectors();
+ for ( i = 0; i < selectors.length; i++ ) {
+ func( selectors[i] );
}
},
@@ -254,12 +271,14 @@ window.ProtectionForm = {
*
* @return Array
*/
- 'getLevelSelectors': function() {
- var all = document.getElementsByTagName("select");
- var ours = [];
- for (var i = 0; i < all.length; i++) {
- var element = all[i];
- if (element.id.match(/^mwProtect-level-/)) {
+ getLevelSelectors: function () {
+ var i, ours, all, element;
+
+ all = document.getElementsByTagName( 'select' );
+ ours = [];
+ for ( i = 0; i < all.length; i++ ) {
+ element = all[i];
+ if ( element.id.match( /^mwProtect-level-/ ) ) {
ours[ours.length] = element;
}
}
@@ -271,10 +290,12 @@ window.ProtectionForm = {
*
* @param func callable Callback function
*/
- 'forEachExpiryInput': function(func) {
- var inputs = this.getExpiryInputs();
- for (var i = 0; i < inputs.length; i++) {
- func(inputs[i]);
+ forEachExpiryInput: function ( func ) {
+ var i, inputs;
+
+ inputs = this.getExpiryInputs();
+ for ( i = 0; i < inputs.length; i++ ) {
+ func( inputs[i] );
}
},
@@ -283,12 +304,14 @@ window.ProtectionForm = {
*
* @return Array
*/
- 'getExpiryInputs': function() {
- var all = document.getElementsByTagName("input");
- var ours = [];
- for (var i = 0; i < all.length; i++) {
- var element = all[i];
- if (element.name.match(/^mwProtect-expiry-/)) {
+ getExpiryInputs: function () {
+ var i, all, element, ours;
+
+ all = document.getElementsByTagName( 'input' );
+ ours = [];
+ for ( i = 0; i < all.length; i++ ) {
+ element = all[i];
+ if ( element.name.match( /^mwProtect-expiry-/ ) ) {
ours[ours.length] = element;
}
}
@@ -299,10 +322,12 @@ window.ProtectionForm = {
* Apply a callback to each expiry selector list
* @param func callable Callback function
*/
- 'forEachExpirySelector': function(func) {
- var inputs = this.getExpirySelectors();
- for (var i = 0; i < inputs.length; i++) {
- func(inputs[i]);
+ forEachExpirySelector: function ( func ) {
+ var i, inputs;
+
+ inputs = this.getExpirySelectors();
+ for ( i = 0; i < inputs.length; i++ ) {
+ func( inputs[i] );
}
},
@@ -311,12 +336,14 @@ window.ProtectionForm = {
*
* @return Array
*/
- 'getExpirySelectors': function() {
- var all = document.getElementsByTagName("select");
- var ours = [];
- for (var i = 0; i < all.length; i++) {
- var element = all[i];
- if (element.id.match(/^mwProtectExpirySelection-/)) {
+ getExpirySelectors: function () {
+ var i, all, ours, element;
+
+ all = document.getElementsByTagName( 'select' );
+ ours = [];
+ for ( i = 0; i < all.length; i++ ) {
+ element = all[i];
+ if ( element.id.match( /^mwProtectExpirySelection-/ ) ) {
ours[ours.length] = element;
}
}
@@ -328,30 +355,33 @@ window.ProtectionForm = {
*
* @param val boolean Enable?
*/
- 'enableUnchainedInputs': function(val) {
+ enableUnchainedInputs: function ( val ) {
var first = true;
- this.forEachLevelSelector(function(element) {
- if (first) {
+
+ this.forEachLevelSelector( function ( element ) {
+ if ( first ) {
first = false;
} else {
element.disabled = !val;
}
- });
+ } );
first = true;
- this.forEachExpiryInput(function(element) {
- if (first) {
+ this.forEachExpiryInput( function ( element ) {
+ if ( first ) {
first = false;
} else {
element.disabled = !val;
}
- });
+ } );
first = true;
- this.forEachExpirySelector(function(element) {
- if (first) {
+ this.forEachExpirySelector( function ( element ) {
+ if ( first ) {
first = false;
} else {
element.disabled = !val;
}
- });
+ } );
}
};
+
+}( mediaWiki, jQuery ) );
diff --git a/skins/common/shared.css b/skins/common/shared.css
index 6e1c94fd..ac7265a8 100644
--- a/skins/common/shared.css
+++ b/skins/common/shared.css
@@ -59,9 +59,8 @@ input[dir="rtl"] {
}
/* Default style for semantic tags */
-abbr,
-acronym,
-.explain {
+abbr[title],
+.explain[title] {
border-bottom: 1px dotted;
cursor: help;
}
@@ -127,21 +126,6 @@ span.texhtml {
cursor: pointer;
}
-/* Edit section links */
-/* Correct directionality when page dir is different from site/user dir */
-/* @noflip */
-.mw-content-ltr .editsection,
-.mw-content-rtl .mw-content-ltr .editsection {
- float: right;
- margin-left: 5px;
-}
-/* @noflip */
-.mw-content-rtl .editsection,
-.mw-content-ltr .mw-content-rtl .editsection {
- float: left;
- margin-right: 5px;
-}
-
/**
* File description page
*/
@@ -235,6 +219,32 @@ td.mw-label {
.prefsection table.mw-htmlform-matrix {
width: auto;
}
+
+.mw-icon-question {
+ /* @embed */
+ background: url('images/question-small.png') no-repeat;
+ /* SVG support using a transparent gradient to guarantee cross-browser
+ * compatibility (browsers able to understand gradient syntax support also SVG)
+ * lifted from #pt-login css rule in skins/vector/screen.css */
+ /* @embed */
+ background: -webkit-linear-gradient(transparent, transparent), url('images/question.svg') no-repeat;
+ /* @embed */
+ background: linear-gradient(transparent, transparent), url('images/question.svg') no-repeat;
+ background-size: 13px 13px;
+ display: inline-block;
+ height: 13px;
+ width: 13px;
+ margin-left: 4px;
+}
+
+.mw-icon-question:lang(ar),
+.mw-icon-question:lang(fa),
+.mw-icon-question:lang(ur) {
+ -webkit-transform: scaleX(-1);
+ -ms-transform: scaleX(-1);
+ transform: scaleX(-1);
+}
+
td.mw-submit {
white-space: nowrap;
}
@@ -525,49 +535,57 @@ table.collapsed tr.collapsable {
}
/* success and error messages */
+.error,
+.warning,
.success {
- color: green;
font-size: larger;
}
+.error {
+ color: #cc0000;
+}
.warning {
- color: #FFA500; /* orange */
- font-size: larger;
+ color: #705000;
}
-.error {
- color: red;
- font-size: larger;
+.success {
+ color: #009000;
}
+
.errorbox,
.warningbox,
.successbox {
- font-size: larger;
- border: 2px solid;
+ border: 1px solid;
padding: .5em 1em;
- float: left;
- margin-bottom: 2em;
- color: #000;
-}
-.errorbox {
- border-color: red;
- background-color: #fff2f2;
-}
-.warningbox {
- border-color: #FF8C00; /* darkorange */
- background-color: #FFFFC0;
-}
-.successbox {
- border-color: green;
- background-color: #dfd;
+ margin-bottom: 1em;
+ display: -moz-inline-block;
+ display: inline-block;
+ zoom: 1;
+ *display: inline;
}
.errorbox h2,
.warningbox h2,
.successbox h2 {
font-size: 1em;
+ color: inherit;
font-weight: bold;
display: inline;
margin: 0 .5em 0 0;
border: none;
}
+.errorbox {
+ color: #cc0000;
+ border-color: #fac5c5;
+ background-color: #fae3e3;
+}
+.warningbox {
+ color: #705000;
+ border-color: #fde29b;
+ background-color: #fdf1d1;
+}
+.successbox {
+ color: #009000;
+ border-color: #b7fdb5;
+ background-color: #e1fddf;
+}
/* general info/warning box for SP */
.mw-infobox {
@@ -684,7 +702,7 @@ ul#filetoc {
padding-right: 2em;
}
-/* Classes for EXIF data display */
+/* Classes for Exif data display */
table.mw_metadata {
font-size: 0.8em;
margin-left: 0.5em;
@@ -818,6 +836,69 @@ div.gallerytext {
word-wrap: break-word;
}
+/* new gallery stuff */
+ul.mw-gallery-nolines li.gallerybox div.thumb {
+ background-color: transparent;
+ border: none;
+}
+
+ul.mw-gallery-nolines li.gallerybox div.gallerytext {
+ text-align: center;
+}
+
+/* height constrained gallery */
+
+ul.mw-gallery-packed li.gallerybox div.thumb,
+ul.mw-gallery-packed-overlay li.gallerybox div.thumb,
+ul.mw-gallery-packed-hover li.gallerybox div.thumb {
+ background-color: transparent;
+ border: none;
+}
+ul.mw-gallery-packed li.gallerybox div.thumb img,
+ul.mw-gallery-packed-overlay li.gallerybox div.thumb img,
+ul.mw-gallery-packed-hover li.gallerybox div.thumb img {
+ margin: 0 auto;
+}
+
+ul.mw-gallery-packed-hover li.gallerybox,
+ul.mw-gallery-packed-overlay li.gallerybox {
+ position:relative;
+}
+
+ul.mw-gallery-packed-hover div.gallerytextwrapper {
+ overflow: hidden;
+ height: 0;
+}
+
+ul.mw-gallery-packed-hover li.gallerybox:hover div.gallerytextwrapper,
+ul.mw-gallery-packed-overlay li.gallerybox div.gallerytextwrapper,
+ul.mw-gallery-packed-hover li.gallerybox.mw-gallery-focused div.gallerytextwrapper {
+ position:absolute;
+ opacity:.8;
+ filter:alpha(opacity=80);
+ zoom: 1;
+ background-color:white;
+ padding: 5px 10px;
+ bottom: 0;
+ left: 0; /* Needed for IE */
+ height: auto;
+ font-weight: bold;
+ margin: 2px; /* correspond to style on div.thumb */
+}
+
+ul.mw-gallery-packed-hover,
+ul.mw-gallery-packed-overlay,
+ul.mw-gallery-packed {
+ text-align: center;
+}
+
+ul.mw-gallery-packed-hover div.gallerytext,
+ul.mw-gallery-packed-overlay div.gallerytext {
+ opacity: 1;
+ position: relative; /* Resets opacity in old IE */
+}
+
+
.mw-ajax-loader {
/* @embed */
background-image: url(images/ajax-loader.gif);
@@ -1033,6 +1114,7 @@ ol:lang(or) li {
direction: ltr;
unicode-bidi: embed;
}
+.diff-multi,
.diff-otitle,
.diff-ntitle,
.diff-lineno {
@@ -1092,9 +1174,37 @@ table.floatleft {
z-index: 99;
}
-.editsection, .toctoggle {
+.mw-editsection,
+.toctoggle {
-moz-user-select: none;
-webkit-user-select: none;
-ms-user-select: none;
user-select: none;
}
+
+/* Display editsection links smaller and next to headings */
+.mw-editsection {
+ font-size: small;
+ font-weight: normal;
+ margin-left: 1em;
+ vertical-align: baseline;
+ /* Reset line-height; headings tend to have it set to larger values */
+ line-height: 1em;
+ /* As .mw-editsection is a <span> (inline element), it is treated as part */
+ /* of the heading content when selecting text by multiple clicks and thus */
+ /* selected together with heading content, despite the user-select: none; */
+ /* rule set above. This enforces non-selection without changing the look. */
+ display: inline-block;
+}
+
+/* Correct directionality when page dir is different from site/user dir */
+/* @noflip */
+.mw-content-ltr .mw-editsection,
+.mw-content-rtl .mw-content-ltr .mw-editsection {
+ margin-left: 1em;
+}
+/* @noflip */
+.mw-content-rtl .mw-editsection,
+.mw-content-ltr .mw-content-rtl .mw-editsection {
+ margin-right: 1em;
+}
diff --git a/skins/common/upload.js b/skins/common/upload.js
index df819e19..d639f63a 100644
--- a/skins/common/upload.js
+++ b/skins/common/upload.js
@@ -1,12 +1,15 @@
+/*jshint camelcase:false */
( function ( mw, $ ) {
-var ajaxUploadDestCheck = mw.config.get( 'wgAjaxUploadDestCheck' ),
- fileExtensions = mw.config.get( 'wgFileExtensions' );
-
-window.licenseSelectorCheck = function() {
- var selector = document.getElementById( "wpLicense" );
- var selection = selector.options[selector.selectedIndex].value;
- if( selector.selectedIndex > 0 ) {
- if( selection == "" ) {
+var licenseSelectorCheck, wgUploadWarningObj, wgUploadLicenseObj, fillDestFilename,
+ ajaxUploadDestCheck = mw.config.get( 'wgAjaxUploadDestCheck' ),
+ fileExtensions = mw.config.get( 'wgFileExtensions' ),
+ $spinnerDestCheck, $spinnerLicense;
+
+licenseSelectorCheck = window.licenseSelectorCheck = function () {
+ var selector = document.getElementById( 'wpLicense' ),
+ selection = selector.options[selector.selectedIndex].value;
+ if ( selector.selectedIndex > 0 ) {
+ if ( !selection ) {
// Option disabled, but browser is broken and doesn't respect this
selector.selectedIndex = 0;
}
@@ -17,23 +20,29 @@ window.licenseSelectorCheck = function() {
function uploadSetup() {
// Disable URL box if the URL copy upload source type is not selected
- var e = document.getElementById( 'wpSourceTypeurl' );
- if( e ) {
- if( !e.checked ) {
- var ein = document.getElementById( 'wpUploadFileURL' );
- if(ein)
- ein.setAttribute( 'disabled', 'disabled' );
+ var ein,
+ selector, ua, isMacIe, i,
+ optionsTable, row, td,
+ wpLicense, wpLicenseRow, wpLicenseTbody,
+ uploadSourceIds, len, onchange,
+ e = document.getElementById( 'wpSourceTypeurl' );
+ if ( e ) {
+ if ( !e.checked ) {
+ ein = document.getElementById( 'wpUploadFileURL' );
+ if ( ein ) {
+ ein.disabled = true;
+ }
}
}
// For MSIE/Mac: non-breaking spaces cause the <option> not to render.
// But for some reason, setting the text to itself works
- var selector = document.getElementById("wpLicense");
- if (selector) {
- var ua = navigator.userAgent;
- var isMacIe = (ua.indexOf("MSIE") != -1) && (ua.indexOf("Mac") != -1);
- if (isMacIe) {
- for (var i = 0; i < selector.options.length; i++) {
+ selector = document.getElementById( 'wpLicense' );
+ if ( selector ) {
+ ua = navigator.userAgent;
+ isMacIe = ua.indexOf( 'MSIE' ) !== -1 && ua.indexOf( 'Mac' ) !== -1;
+ if ( isMacIe ) {
+ for ( i = 0; i < selector.options.length; i++ ) {
selector.options[i].text = selector.options[i].text;
}
}
@@ -43,31 +52,31 @@ function uploadSetup() {
if ( ajaxUploadDestCheck ) {
// Insert an event handler that fetches upload warnings when wpDestFile
// has been changed
- document.getElementById( 'wpDestFile' ).onchange = function ( e ) {
- wgUploadWarningObj.checkNow(this.value);
+ document.getElementById( 'wpDestFile' ).onchange = function () {
+ wgUploadWarningObj.checkNow( this.value );
};
// Insert a row where the warnings will be displayed just below the
// wpDestFile row
- var optionsTable = document.getElementById( 'mw-htmlform-description' ).tBodies[0];
- var row = optionsTable.insertRow( 1 );
- var td = document.createElement( 'td' );
+ optionsTable = document.getElementById( 'mw-htmlform-description' ).tBodies[0];
+ row = optionsTable.insertRow( 1 );
+ td = document.createElement( 'td' );
td.id = 'wpDestFile-warning';
td.colSpan = 2;
row.appendChild( td );
}
- var wpLicense = document.getElementById( 'wpLicense' );
+ wpLicense = document.getElementById( 'wpLicense' );
if ( mw.config.get( 'wgAjaxLicensePreview' ) && wpLicense ) {
// License selector check
wpLicense.onchange = licenseSelectorCheck;
// License selector table row
- var wpLicenseRow = wpLicense.parentNode.parentNode;
- var wpLicenseTbody = wpLicenseRow.parentNode;
+ wpLicenseRow = wpLicense.parentNode.parentNode;
+ wpLicenseTbody = wpLicenseRow.parentNode;
- var row = document.createElement( 'tr' );
- var td = document.createElement( 'td' );
+ row = document.createElement( 'tr' );
+ td = document.createElement( 'td' );
row.appendChild( td );
td = document.createElement( 'td' );
td.id = 'mw-license-preview';
@@ -78,156 +87,185 @@ function uploadSetup() {
// fillDestFile setup
- var i,
- uploadSourceIds = mw.config.get( 'wgUploadSourceIds' ),
- len = uploadSourceIds.length;
- for ( i = 0; i < len; i += 1 )
- document.getElementById( uploadSourceIds[i] ).onchange = function (e) {
- fillDestFilename( this.id );
- };
-};
+ uploadSourceIds = mw.config.get( 'wgUploadSourceIds' );
+ len = uploadSourceIds.length;
+ onchange = function () {
+ fillDestFilename( this.id );
+ };
+ for ( i = 0; i < len; i += 1 ) {
+ document.getElementById( uploadSourceIds[i] ).onchange = onchange;
+ }
+}
+wgUploadWarningObj = window.wgUploadWarningObj = {
+ responseCache: { '' : '&nbsp;' },
+ nameToCheck: '',
+ typing: false,
+ delay: 500, // ms
+ timeoutID: false,
-window.wgUploadWarningObj = {
- 'responseCache' : { '' : '&nbsp;' },
- 'nameToCheck' : '',
- 'typing': false,
- 'delay': 500, // ms
- 'timeoutID': false,
+ keypress: function () {
+ var cached, destFile, warningElt;
- 'keypress': function () {
- if ( !ajaxUploadDestCheck || !sajax_init_object() ) return;
+ if ( !ajaxUploadDestCheck ) {
+ return;
+ }
// Find file to upload
- var destFile = document.getElementById('wpDestFile');
- var warningElt = document.getElementById( 'wpDestFile-warning' );
- if ( !destFile || !warningElt ) return ;
+ destFile = document.getElementById( 'wpDestFile' );
+ warningElt = document.getElementById( 'wpDestFile-warning' );
+ if ( !destFile || !warningElt ) {
+ return;
+ }
- this.nameToCheck = destFile.value ;
+ this.nameToCheck = destFile.value;
// Clear timer
if ( this.timeoutID ) {
- window.clearTimeout( this.timeoutID );
+ clearTimeout( this.timeoutID );
}
// Check response cache
- for (cached in this.responseCache) {
- if (this.nameToCheck == cached) {
+ for ( cached in this.responseCache ) {
+ if ( this.nameToCheck === cached ) {
this.setWarning(this.responseCache[this.nameToCheck]);
return;
}
}
- this.timeoutID = window.setTimeout( 'wgUploadWarningObj.timeout()', this.delay );
+ this.timeoutID = setTimeout( function () {
+ wgUploadWarningObj.timeout();
+ }, this.delay );
},
- 'checkNow': function (fname) {
- if ( !ajaxUploadDestCheck || !sajax_init_object() ) return;
+ checkNow: function ( fname ) {
+ if ( !ajaxUploadDestCheck ) {
+ return;
+ }
if ( this.timeoutID ) {
- window.clearTimeout( this.timeoutID );
+ clearTimeout( this.timeoutID );
}
this.nameToCheck = fname;
this.timeout();
},
- 'timeout' : function() {
- if ( !ajaxUploadDestCheck || !sajax_init_object() ) return;
- injectSpinner( document.getElementById( 'wpDestFile' ), 'destcheck' );
-
- // Get variables into local scope so that they will be preserved for the
- // anonymous callback. fileName is copied so that multiple overlapping
- // ajax requests can be supported.
- var obj = this;
- var fileName = this.nameToCheck;
- sajax_do_call( 'SpecialUpload::ajaxGetExistsWarning', [this.nameToCheck],
- function (result) {
- obj.processResult(result, fileName)
+ timeout: function () {
+ if ( !ajaxUploadDestCheck || this.nameToCheck === '' ) {
+ return;
+ }
+ $spinnerDestCheck = $.createSpinner().insertAfter( '#wpDestFile' );
+
+ var uploadWarningObj = this;
+ ( new mw.Api() ).get( {
+ action: 'query',
+ titles: ( new mw.Title( this.nameToCheck, mw.config.get( 'wgNamespaceIds' ).file ) ).getPrefixedText(),
+ prop: 'imageinfo',
+ iiprop: 'uploadwarning',
+ indexpageids: ''
+ } ).done( function ( result ) {
+ var resultOut = '';
+ if ( result.query ) {
+ resultOut = result.query.pages[result.query.pageids[0]].imageinfo[0];
}
- );
+ uploadWarningObj.processResult( resultOut, uploadWarningObj.nameToCheck );
+ } );
},
- 'processResult' : function (result, fileName) {
- removeSpinner( 'destcheck' );
- this.setWarning(result.responseText);
- this.responseCache[fileName] = result.responseText;
+ processResult: function ( result, fileName ) {
+ $spinnerDestCheck.remove();
+ $spinnerDestCheck = undefined;
+ this.setWarning( result.html );
+ this.responseCache[fileName] = result.html;
},
- 'setWarning' : function (warning) {
- var warningElt = document.getElementById( 'wpDestFile-warning' );
- var ackElt = document.getElementsByName( 'wpDestFileWarningAck' );
+ setWarning: function ( warning ) {
+ var warningElt = document.getElementById( 'wpDestFile-warning' ),
+ ackElt = document.getElementsByName( 'wpDestFileWarningAck' );
- this.setInnerHTML(warningElt, warning);
+ this.setInnerHTML( warningElt, warning );
// Set a value in the form indicating that the warning is acknowledged and
// doesn't need to be redisplayed post-upload
- if ( warning == '' || warning == '&nbsp;' ) {
+ if ( !warning ) {
ackElt[0].value = '';
} else {
ackElt[0].value = '1';
}
},
- 'setInnerHTML' : function (element, text) {
+ setInnerHTML: function ( element, text ) {
// Check for no change to avoid flicker in IE 7
- if (element.innerHTML != text) {
+ if ( element.innerHTML !== text ) {
element.innerHTML = text;
}
}
};
-window.fillDestFilename = function(id) {
+fillDestFilename = window.fillDestFilename = function ( id ) {
+ var e, path, slash, backslash, fname,
+ found, ext, i,
+ destFile;
if ( !mw.config.get( 'wgUploadAutoFill' ) ) {
return;
}
- if (!document.getElementById) {
+ if ( !document.getElementById ) {
return;
}
// Remove any previously flagged errors
- var e = document.getElementById( 'mw-upload-permitted' );
- if( e ) e.className = '';
+ e = document.getElementById( 'mw-upload-permitted' );
+ if ( e ) {
+ e.className = '';
+ }
- var e = document.getElementById( 'mw-upload-prohibited' );
- if( e ) e.className = '';
+ e = document.getElementById( 'mw-upload-prohibited' );
+ if ( e ) {
+ e.className = '';
+ }
- var path = document.getElementById(id).value;
+ path = document.getElementById( id ).value;
// Find trailing part
- var slash = path.lastIndexOf('/');
- var backslash = path.lastIndexOf('\\');
- var fname;
- if (slash == -1 && backslash == -1) {
+ slash = path.lastIndexOf( '/' );
+ backslash = path.lastIndexOf( '\\' );
+ if ( slash === -1 && backslash === -1 ) {
fname = path;
- } else if (slash > backslash) {
- fname = path.substring(slash+1, 10000);
+ } else if ( slash > backslash ) {
+ fname = path.substring( slash + 1, 10000 );
} else {
- fname = path.substring(backslash+1, 10000);
+ fname = path.substring( backslash + 1, 10000 );
}
// Clear the filename if it does not have a valid extension.
// URLs are less likely to have a useful extension, so don't include them in the
// extension check.
if ( mw.config.get( 'wgStrictFileExtensions' ) && fileExtensions && id !== 'wpUploadFileURL' ) {
- var found = false;
+ found = false;
if ( fname.lastIndexOf( '.' ) !== -1 ) {
- var ext = fname.substr( fname.lastIndexOf( '.' ) + 1 );
- for ( var i = 0; i < fileExtensions.length; i += 1 ) {
+ ext = fname.substr( fname.lastIndexOf( '.' ) + 1 );
+ for ( i = 0; i < fileExtensions.length; i += 1 ) {
if ( fileExtensions[i].toLowerCase() === ext.toLowerCase() ) {
found = true;
break;
}
}
}
- if( !found ) {
+ if ( !found ) {
// Not a valid extension
// Clear the upload and set mw-upload-permitted to error
- document.getElementById(id).value = '';
- var e = document.getElementById( 'mw-upload-permitted' );
- if( e ) e.className = 'error';
+ document.getElementById( id ).value = '';
+ e = document.getElementById( 'mw-upload-permitted' );
+ if ( e ) {
+ e.className = 'error';
+ }
- var e = document.getElementById( 'mw-upload-prohibited' );
- if( e ) e.className = 'error';
+ e = document.getElementById( 'mw-upload-prohibited' );
+ if ( e ) {
+ e.className = 'error';
+ }
// Clear wpDestFile as well
- var e = document.getElementById( 'wpDestFile' );
- if( e ) e.value = '';
+ e = document.getElementById( 'wpDestFile' );
+ if ( e ) {
+ e.value = '';
+ }
return false;
}
@@ -241,72 +279,78 @@ window.fillDestFilename = function(id) {
}
// Output result
- var destFile = document.getElementById( 'wpDestFile' );
+ 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 ) {
+ } catch ( err ) {
destFile.value = fname;
}
wgUploadWarningObj.checkNow( fname );
}
};
-window.toggleFilenameFiller = function() {
- if(!document.getElementById) return;
- var upfield = document.getElementById('wpUploadFile');
- var destName = document.getElementById('wpDestFile').value;
- wgUploadAutoFill = ( destName == '' || destName == ' ' );
+window.toggleFilenameFiller = function () {
+ if ( !document.getElementById ) {
+ return;
+ }
+ var destName = document.getElementById( 'wpDestFile' ).value;
+ mw.config.set( 'wgUploadAutoFill', !destName );
};
-window.wgUploadLicenseObj = {
+wgUploadLicenseObj = window.wgUploadLicenseObj = {
- 'responseCache' : { '' : '' },
+ responseCache: { '' : '' },
- 'fetchPreview': function( license ) {
- if ( !mw.config.get( 'wgAjaxLicensePreview' ) ) return;
- for (cached in this.responseCache) {
- if (cached == license) {
+ fetchPreview: function ( license ) {
+ var cached, title;
+ if ( !mw.config.get( 'wgAjaxLicensePreview' ) ) {
+ return;
+ }
+ for ( cached in this.responseCache ) {
+ if ( cached === license ) {
this.showPreview( this.responseCache[license] );
return;
}
}
- injectSpinner( document.getElementById( 'wpLicense' ), 'license' );
- var title = document.getElementById('wpDestFile').value;
- if ( !title ) title = 'File:Sample.jpg';
+ $spinnerLicense = $.createSpinner().insertAfter( '#wpLicense' );
- var url = mw.util.wikiScript( 'api' )
- + '?action=parse&text={{' + encodeURIComponent( license ) + '}}'
- + '&title=' + encodeURIComponent( title )
- + '&prop=text&pst&format=json';
+ title = document.getElementById( 'wpDestFile' ).value;
+ if ( !title ) {
+ title = 'File:Sample.jpg';
+ }
- var req = sajax_init_object();
- req.onreadystatechange = function() {
- if ( req.readyState == 4 && req.status == 200 )
- wgUploadLicenseObj.processResult( eval( '(' + req.responseText + ')' ), license );
- };
- req.open( 'GET', url, true );
- req.send( '' );
+ ( new mw.Api() ).get( {
+ action: 'parse',
+ text: '{{' + license + '}}',
+ title: title,
+ prop: 'text',
+ pst: ''
+ } ).done( function ( result ) {
+ wgUploadLicenseObj.processResult( result, license );
+ } );
},
- 'processResult' : function( result, license ) {
- removeSpinner( 'license' );
- this.responseCache[license] = result['parse']['text']['*'];
+ processResult: function ( result, license ) {
+ $spinnerLicense.remove();
+ $spinnerLicense = undefined;
+ this.responseCache[license] = result.parse.text['*'];
this.showPreview( this.responseCache[license] );
},
- 'showPreview' : function( preview ) {
+ showPreview: function ( preview ) {
var previewPanel = document.getElementById( 'mw-license-preview' );
- if( previewPanel.innerHTML != preview )
+ if ( previewPanel.innerHTML !== preview ) {
previewPanel.innerHTML = preview;
+ }
}
};
-$( document ).ready( uploadSetup );
+$( uploadSetup );
}( mediaWiki, jQuery ) );
diff --git a/skins/common/wikibits.js b/skins/common/wikibits.js
index 709cc334..d28ca0a3 100644
--- a/skins/common/wikibits.js
+++ b/skins/common/wikibits.js
@@ -1,496 +1,36 @@
/**
* MediaWiki legacy wikibits
*/
-( function ( mw ) {
-
-window.clientPC = navigator.userAgent.toLowerCase(); // Get client info
-window.is_gecko = /gecko/.test( clientPC ) &&
- !/khtml|spoofer|netscape\/7\.0/.test(clientPC);
-
-window.is_safari = window.is_safari_win = window.webkit_version =
- window.is_chrome = window.is_chrome_mac = false;
-window.webkit_match = clientPC.match(/applewebkit\/(\d+)/);
-if (webkit_match) {
- window.is_safari = clientPC.indexOf('applewebkit') != -1 &&
- clientPC.indexOf('spoofer') == -1;
- window.is_safari_win = is_safari && clientPC.indexOf('windows') != -1;
- window.webkit_version = parseInt(webkit_match[1]);
- // Tests for chrome here, to avoid breaking old scripts safari left alone
- // This is here for accesskeys
- window.is_chrome = clientPC.indexOf('chrome') !== -1 &&
- clientPC.indexOf('spoofer') === -1;
- window.is_chrome_mac = is_chrome && clientPC.indexOf('mac') !== -1
-}
-
-// For accesskeys; note that FF3+ is included here!
-window.is_ff2 = /firefox\/[2-9]|minefield\/3/.test( clientPC );
-window.ff2_bugs = /firefox\/2/.test( clientPC );
-// These aren't used here, but some custom scripts rely on them
-window.is_ff2_win = is_ff2 && clientPC.indexOf('windows') != -1;
-window.is_ff2_x11 = is_ff2 && clientPC.indexOf('x11') != -1;
-
-window.is_opera = window.is_opera_preseven = window.is_opera_95 =
- window.opera6_bugs = window.opera7_bugs = window.opera95_bugs = false;
-if (clientPC.indexOf('opera') != -1) {
- window.is_opera = true;
- window.is_opera_preseven = window.opera && !document.childNodes;
- window.is_opera_seven = window.opera && document.childNodes;
- window.is_opera_95 = /opera\/(9\.[5-9]|[1-9][0-9])/.test( clientPC );
- window.opera6_bugs = is_opera_preseven;
- window.opera7_bugs = is_opera_seven && !is_opera_95;
- window.opera95_bugs = /opera\/(9\.5)/.test( clientPC );
-}
-// As recommended by <http://msdn.microsoft.com/en-us/library/ms537509.aspx>,
-// avoiding false positives from moronic extensions that append to the IE UA
-// string (bug 23171)
-window.ie6_bugs = false;
-if ( /msie ([0-9]{1,}[\.0-9]{0,})/.exec( clientPC ) != null
-&& parseFloat( RegExp.$1 ) <= 6.0 ) {
- ie6_bugs = true;
-}
-
-// add any onload functions in this hook (please don't hard-code any events in the xhtml source)
-window.doneOnloadHook = undefined;
-
-if (!window.onloadFuncts) {
- window.onloadFuncts = [];
-}
-
-window.addOnloadHook = function( hookFunct ) {
- // Allows add-on scripts to add onload functions
- if( !doneOnloadHook ) {
- onloadFuncts[onloadFuncts.length] = hookFunct;
- } else {
- hookFunct(); // bug in MSIE script loading
- }
-};
-
-window.importScript = function( page ) {
- var uri = mw.config.get( 'wgScript' ) + '?title=' +
- mw.util.wikiUrlencode( page ) +
- '&action=raw&ctype=text/javascript';
- return importScriptURI( uri );
-};
-
-window.loadedScripts = {}; // included-scripts tracker
-window.importScriptURI = function( url ) {
- if ( loadedScripts[url] ) {
- return null;
- }
- loadedScripts[url] = true;
- var s = document.createElement( 'script' );
- s.setAttribute( 'src', url );
- s.setAttribute( 'type', 'text/javascript' );
- document.getElementsByTagName('head')[0].appendChild( s );
- return s;
-};
-
-window.importStylesheet = function( page ) {
- return importStylesheetURI( mw.config.get( 'wgScript' ) + '?action=raw&ctype=text/css&title=' + mw.util.wikiUrlencode( page ) );
-};
-
-window.importStylesheetURI = function( url, media ) {
- var l = document.createElement( 'link' );
- l.rel = 'stylesheet';
- l.href = url;
- if ( media ) {
- l.media = media;
- }
- document.getElementsByTagName('head')[0].appendChild( l );
- return l;
-};
-
-window.appendCSS = function( text ) {
- var s = document.createElement( 'style' );
- s.type = 'text/css';
- s.rel = 'stylesheet';
- if ( s.styleSheet ) {
- s.styleSheet.cssText = text; // IE
- } else {
- s.appendChild( document.createTextNode( text + '' ) ); // Safari sometimes borks on null
- }
- document.getElementsByTagName('head')[0].appendChild( s );
- return s;
-};
-
-// Special stylesheet links for Monobook only (see bug 14717)
-var skinpath = mw.config.get( 'stylepath' ) + '/' + mw.config.get( 'skin' );
-if ( mw.config.get( 'skin' ) === 'monobook' ) {
- if ( opera6_bugs ) {
- importStylesheetURI( skinpath + '/Opera6Fixes.css' );
- } else if ( opera7_bugs ) {
- importStylesheetURI( skinpath + '/Opera7Fixes.css' );
- } else if ( opera95_bugs ) {
- importStylesheetURI( skinpath + '/Opera9Fixes.css' );
- }
-}
+( function ( mw, $ ) {
+ var msg,
+ win = window,
+ ua = navigator.userAgent.toLowerCase(),
+ isIE6 = ( /msie ([0-9]{1,}[\.0-9]{0,})/.exec( ua ) && parseFloat( RegExp.$1 ) <= 6.0 ),
+ isGecko = /gecko/.test( ua ) && !/khtml|spoofer|netscape\/7\.0/.test( ua ),
+ onloadFuncts = [];
if ( mw.config.get( 'wgBreakFrames' ) ) {
- // Un-trap us from framesets
- if ( window.top != window ) {
- window.top.location = window.location;
+ // Note: In IE < 9 strict comparison to window is non-standard (the standard didn't exist yet)
+ // it works only comparing to window.self or window.window (http://stackoverflow.com/q/4850978/319266)
+ if ( win.top !== win.self ) {
+ // Un-trap us from framesets
+ win.top.location = win.location;
}
}
-window.changeText = function( el, newText ) {
- // Safari work around
- if ( el.innerText ) {
- el.innerText = newText;
- } else if ( el.firstChild && el.firstChild.nodeValue ) {
- el.firstChild.nodeValue = newText;
- }
-};
-
-window.killEvt = function( evt ) {
- evt = evt || window.event || window.Event; // W3C, IE, Netscape
- if ( typeof ( evt.preventDefault ) != 'undefined' ) {
- evt.preventDefault(); // Don't follow the link
- evt.stopPropagation();
- } else {
- evt.cancelBubble = true; // IE
- }
- return false; // Don't follow the link (IE)
-};
-
-window.mwEditButtons = [];
-window.mwCustomEditButtons = []; // eg to add in MediaWiki:Common.js
-
-window.escapeQuotes = function( text ) {
- var re = new RegExp( "'", "g" );
- text = text.replace( re, "\\'" );
- re = new RegExp( "\\n", "g" );
- text = text.replace( re, "\\n" );
- return escapeQuotesHTML( text );
-};
-
-window.escapeQuotesHTML = function( text ) {
- var re = new RegExp( '&', "g" );
- text = text.replace( re, "&amp;" );
- re = new RegExp( '"', "g" );
- text = text.replace( re, "&quot;" );
- re = new RegExp( '<', "g" );
- text = text.replace( re, "&lt;" );
- re = new RegExp( '>', "g" );
- text = text.replace( re, "&gt;" );
- return text;
-};
-
-/**
- * Set the accesskey prefix based on browser detection.
- */
-window.tooltipAccessKeyPrefix = 'alt-';
-if ( is_opera ) {
- tooltipAccessKeyPrefix = 'shift-esc-';
-} else if ( is_chrome ) {
- tooltipAccessKeyPrefix = is_chrome_mac ? 'ctrl-option-' : 'alt-';
-} else if ( !is_safari_win && is_safari && webkit_version > 526 ) {
- tooltipAccessKeyPrefix = 'ctrl-alt-';
-} else if ( !is_safari_win && ( is_safari
- || clientPC.indexOf('mac') != -1
- || clientPC.indexOf('konqueror') != -1 ) ) {
- tooltipAccessKeyPrefix = 'ctrl-';
-} else if ( is_ff2 ) {
- tooltipAccessKeyPrefix = 'alt-shift-';
-}
-window.tooltipAccessKeyRegexp = /\[(ctrl-)?(alt-)?(shift-)?(esc-)?(.)\]$/;
-
-/**
- * Add the appropriate prefix to the accesskey shown in the tooltip.
- * If the nodeList parameter is given, only those nodes are updated;
- * otherwise, all the nodes that will probably have accesskeys by
- * default are updated.
- *
- * @param nodeList Array list of elements to update
- */
-window.updateTooltipAccessKeys = function( nodeList ) {
- if ( !nodeList ) {
- // Rather than scan all links on the whole page, we can just scan these
- // containers which contain the relevant links. This is really just an
- // optimization technique.
- var linkContainers = [
- 'column-one', // Monobook and Modern
- 'mw-head', 'mw-panel', 'p-logo' // Vector
- ];
- for ( var i in linkContainers ) {
- var linkContainer = document.getElementById( linkContainers[i] );
- if ( linkContainer ) {
- updateTooltipAccessKeys( linkContainer.getElementsByTagName( 'a' ) );
- }
- }
- // these are rare enough that no such optimization is needed
- updateTooltipAccessKeys( document.getElementsByTagName( 'input' ) );
- updateTooltipAccessKeys( document.getElementsByTagName( 'label' ) );
- return;
- }
-
- for ( var i = 0; i < nodeList.length; i++ ) {
- var element = nodeList[i];
- var tip = element.getAttribute( 'title' );
- if ( tip && tooltipAccessKeyRegexp.exec( tip ) ) {
- tip = tip.replace(tooltipAccessKeyRegexp,
- '[' + tooltipAccessKeyPrefix + "$5]");
- element.setAttribute( 'title', tip );
- }
- }
-};
-
-/**
- * Add a link to one of the portlet menus on the page, including:
- *
- * p-cactions: Content actions (shown as tabs above the main content in Monobook)
- * p-personal: Personal tools (shown at the top right of the page in Monobook)
- * p-navigation: Navigation
- * p-tb: Toolbox
- *
- * This function exists for the convenience of custom JS authors. All
- * but the first three parameters are optional, though providing at
- * least an id and a tooltip is recommended.
- *
- * By default the new link will be added to the end of the list. To
- * add the link before a given existing item, pass the DOM node of
- * that item (easily obtained with document.getElementById()) as the
- * nextnode parameter; to add the link _after_ an existing item, pass
- * the node's nextSibling instead.
- *
- * @param portlet String id of the target portlet ("p-cactions", "p-personal", "p-navigation" or "p-tb")
- * @param href String link URL
- * @param text String link text (will be automatically lowercased by CSS for p-cactions in Monobook)
- * @param id String id of the new item, should be unique and preferably have the appropriate prefix ("ca-", "pt-", "n-" or "t-")
- * @param tooltip String text to show when hovering over the link, without accesskey suffix
- * @param accesskey String accesskey to activate this link (one character, try to avoid conflicts)
- * @param nextnode Node the DOM node before which the new item should be added, should be another item in the same list
- *
- * @return Node -- the DOM node of the new item (an LI element) or null
- */
-window.addPortletLink = function( portlet, href, text, id, tooltip, accesskey, nextnode ) {
- var root = document.getElementById( portlet );
- if ( !root ) {
- return null;
- }
- var uls = root.getElementsByTagName( 'ul' );
- var node;
- if ( uls.length > 0 ) {
- node = uls[0];
- } else {
- node = document.createElement( 'ul' );
- var lastElementChild = null;
- for ( var i = 0; i < root.childNodes.length; ++i ) { /* get root.lastElementChild */
- if ( root.childNodes[i].nodeType == 1 ) {
- lastElementChild = root.childNodes[i];
- }
- }
- if ( lastElementChild && lastElementChild.nodeName.match( /div/i ) ) {
- /* Insert into the menu divs */
- lastElementChild.appendChild( node );
- } else {
- root.appendChild( node );
- }
- }
- if ( !node ) {
- return null;
- }
-
- // unhide portlet if it was hidden before
- root.className = root.className.replace( /(^| )emptyPortlet( |$)/, "$2" );
-
- var link = document.createElement( 'a' );
- link.appendChild( document.createTextNode( text ) );
- link.href = href;
-
- // Wrap in a span - make it work with vector tabs and has no effect on any other portlets
- var span = document.createElement( 'span' );
- span.appendChild( link );
-
- var item = document.createElement( 'li' );
- item.appendChild( span );
- if ( id ) {
- item.id = id;
- }
-
- if ( accesskey ) {
- link.setAttribute( 'accesskey', accesskey );
- tooltip += ' [' + accesskey + ']';
- }
- if ( tooltip ) {
- link.setAttribute( 'title', tooltip );
- }
- if ( accesskey && tooltip ) {
- updateTooltipAccessKeys( [link] );
- }
-
- if ( nextnode && nextnode.parentNode == node ) {
- node.insertBefore( item, nextnode );
- } else {
- node.appendChild( item ); // IE compatibility (?)
- }
-
- return item;
-};
-
-window.getInnerText = function( el ) {
- if ( typeof el == 'string' ) {
- return el;
- }
- if ( typeof el == 'undefined' ) {
- return el;
- }
- // Custom sort value through 'data-sort-value' attribute
- // (no need to prepend hidden text to change sort value)
- if ( el.nodeType && el.getAttribute( 'data-sort-value' ) !== null ) {
- // Make sure it's a valid DOM element (.nodeType) and that the attribute is set (!null)
- return el.getAttribute( 'data-sort-value' );
- }
- if ( el.textContent ) {
- return el.textContent; // not needed but it is faster
- }
- if ( el.innerText ) {
- return el.innerText; // IE doesn't have textContent
- }
- var str = '';
-
- var cs = el.childNodes;
- var l = cs.length;
- for ( var i = 0; i < l; i++ ) {
- switch ( cs[i].nodeType ) {
- case 1: // ELEMENT_NODE
- str += getInnerText( cs[i] );
- break;
- case 3: // TEXT_NODE
- str += cs[i].nodeValue;
- break;
- }
- }
- return str;
-};
-
-window.checkboxes = undefined;
-window.lastCheckbox = undefined;
-
-window.setupCheckboxShiftClick = function() {
- checkboxes = [];
- lastCheckbox = null;
- var inputs = document.getElementsByTagName( 'input' );
- addCheckboxClickHandlers( inputs );
-};
-
-window.addCheckboxClickHandlers = function( inputs, start ) {
- if ( !start ) {
- start = 0;
- }
-
- var finish = start + 250;
- if ( finish > inputs.length ) {
- finish = inputs.length;
- }
-
- for ( var i = start; i < finish; i++ ) {
- var cb = inputs[i];
- if ( !cb.type || cb.type.toLowerCase() != 'checkbox' || ( ' ' + cb.className + ' ' ).indexOf( ' noshiftselect ' ) != -1 ) {
- continue;
- }
- var end = checkboxes.length;
- checkboxes[end] = cb;
- cb.index = end;
- addClickHandler( cb, checkboxClickHandler );
- }
-
- if ( finish < inputs.length ) {
- setTimeout( function() {
- addCheckboxClickHandlers( inputs, finish );
- }, 200 );
- }
-};
-
-window.checkboxClickHandler = function( e ) {
- if ( typeof e == 'undefined' ) {
- e = window.event;
- }
- if ( !e.shiftKey || lastCheckbox === null ) {
- lastCheckbox = this.index;
- return true;
- }
- var endState = this.checked;
- var start, finish;
- if ( this.index < lastCheckbox ) {
- start = this.index + 1;
- finish = lastCheckbox;
- } else {
- start = lastCheckbox;
- finish = this.index - 1;
- }
- for ( var i = start; i <= finish; ++i ) {
- checkboxes[i].checked = endState;
- if( i > start && typeof checkboxes[i].onchange == 'function' ) {
- checkboxes[i].onchange(); // fire triggers
- }
- }
- lastCheckbox = this.index;
- return true;
-};
-
-
-/*
- Written by Jonathan Snook, http://www.snook.ca/jonathan
- Add-ons by Robert Nyman, http://www.robertnyman.com
- Author says "The credit comment is all it takes, no license. Go crazy with it!:-)"
- From http://www.robertnyman.com/2005/11/07/the-ultimate-getelementsbyclassname/
-*/
-window.getElementsByClassName = function( oElm, strTagName, oClassNames ) {
- var arrReturnElements = [];
- if ( typeof( oElm.getElementsByClassName ) == 'function' ) {
- /* Use a native implementation where possible FF3, Saf3.2, Opera 9.5 */
- var arrNativeReturn = oElm.getElementsByClassName( oClassNames );
- if ( strTagName == '*' ) {
- return arrNativeReturn;
- }
- for ( var h = 0; h < arrNativeReturn.length; h++ ) {
- if( arrNativeReturn[h].tagName.toLowerCase() == strTagName.toLowerCase() ) {
- arrReturnElements[arrReturnElements.length] = arrNativeReturn[h];
- }
- }
- return arrReturnElements;
- }
- var arrElements = ( strTagName == '*' && oElm.all ) ? oElm.all : oElm.getElementsByTagName( strTagName );
- var arrRegExpClassNames = [];
- if( typeof oClassNames == 'object' ) {
- for( var i = 0; i < oClassNames.length; i++ ) {
- arrRegExpClassNames[arrRegExpClassNames.length] =
- new RegExp("(^|\\s)" + oClassNames[i].replace(/\-/g, "\\-") + "(\\s|$)");
- }
- } else {
- arrRegExpClassNames[arrRegExpClassNames.length] =
- new RegExp("(^|\\s)" + oClassNames.replace(/\-/g, "\\-") + "(\\s|$)");
- }
- var oElement;
- var bMatchesAll;
- for( var j = 0; j < arrElements.length; j++ ) {
- oElement = arrElements[j];
- bMatchesAll = true;
- for( var k = 0; k < arrRegExpClassNames.length; k++ ) {
- if( !arrRegExpClassNames[k].test( oElement.className ) ) {
- bMatchesAll = false;
- break;
- }
- }
- if( bMatchesAll ) {
- arrReturnElements[arrReturnElements.length] = oElement;
- }
- }
- return ( arrReturnElements );
-};
-
-window.redirectToFragment = function( fragment ) {
- var match = navigator.userAgent.match(/AppleWebKit\/(\d+)/);
+win.redirectToFragment = function ( fragment ) {
+ var webKitVersion,
+ match = navigator.userAgent.match( /AppleWebKit\/(\d+)/ );
if ( match ) {
- var webKitVersion = parseInt( match[1] );
+ webKitVersion = parseInt( match[1], 10 );
if ( webKitVersion < 420 ) {
// Released Safari w/ WebKit 418.9.1 messes up horribly
// Nightlies of 420+ are ok
return;
}
}
- if ( window.location.hash == '' ) {
- window.location.hash = fragment;
+ if ( !win.location.hash ) {
+ win.location.hash = fragment;
// Mozilla needs to wait until after load, otherwise the window doesn't
// scroll. See <https://bugzilla.mozilla.org/show_bug.cgi?id=516293>.
@@ -498,122 +38,211 @@ window.redirectToFragment = function( fragment ) {
// version-testing. If Firefox fixes the bug, they'll jump twice, but
// better twice than not at all, so make the fix hit future versions as
// well.
- if ( is_gecko ) {
- addOnloadHook(function() {
- if ( window.location.hash == fragment ) {
- window.location.hash = fragment;
+ if ( isGecko ) {
+ $( function () {
+ if ( win.location.hash === fragment ) {
+ win.location.hash = fragment;
}
- });
+ } );
}
}
};
/**
- * Add a cute little box at the top of the screen to inform the user of
- * something, replacing any preexisting message.
+ * User-agent sniffing.
+ * To be removed in MediaWiki 1.23.
*
- * @deprecated since 1.17 Use the 'mediawiki.notify' module instead.
- * @param {String|HTMLElement} message To be put inside the message box.
+ * @deprecated since 1.17 Use jquery.client instead
*/
-window.jsMsg = function () {
- return mw.util.jsMessage.apply( mw.util, arguments );
-};
+
+msg = 'Use feature detection or module jquery.client instead';
+
+mw.log.deprecate( win, 'clientPC', ua, msg );
+
+// Ignored dummy values
+mw.log.deprecate( win, 'is_gecko', false, msg );
+mw.log.deprecate( win, 'is_chrome_mac', false, msg );
+mw.log.deprecate( win, 'is_chrome', false, msg );
+mw.log.deprecate( win, 'webkit_version', false, msg );
+mw.log.deprecate( win, 'is_safari_win', false, msg );
+mw.log.deprecate( win, 'is_safari', false, msg );
+mw.log.deprecate( win, 'webkit_match', false, msg );
+mw.log.deprecate( win, 'is_ff2', false, msg );
+mw.log.deprecate( win, 'ff2_bugs', false, msg );
+mw.log.deprecate( win, 'is_ff2_win', false, msg );
+mw.log.deprecate( win, 'is_ff2_x11', false, msg );
+mw.log.deprecate( win, 'opera95_bugs', false, msg );
+mw.log.deprecate( win, 'opera7_bugs', false, msg );
+mw.log.deprecate( win, 'opera6_bugs', false, msg );
+mw.log.deprecate( win, 'is_opera_95', false, msg );
+mw.log.deprecate( win, 'is_opera_preseven', false, msg );
+mw.log.deprecate( win, 'is_opera', false, msg );
+mw.log.deprecate( win, 'ie6_bugs', false, msg );
/**
- * Inject a cute little progress spinner after the specified element
+ * DOM utilities for handling of events, text nodes and selecting elements
+ *
+ * To be removed in MediaWiki 1.23.
*
- * @param element Element to inject after
- * @param id Identifier string (for use with removeSpinner(), below)
+ * @deprecated since 1.17 Use jQuery instead
*/
-window.injectSpinner = function( element, id ) {
- var spinner = document.createElement( 'img' );
- spinner.id = 'mw-spinner-' + id;
- spinner.src = mw.config.get( 'stylepath' ) + '/common/images/spinner.gif';
- spinner.alt = spinner.title = '...';
- if( element.nextSibling ) {
- element.parentNode.insertBefore( spinner, element.nextSibling );
+msg = 'Use jQuery instead';
+
+// Ignored dummy values
+mw.log.deprecate( win, 'doneOnloadHook', undefined, msg );
+mw.log.deprecate( win, 'onloadFuncts', [], msg );
+mw.log.deprecate( win, 'runOnloadHook', $.noop, msg );
+mw.log.deprecate( win, 'changeText', $.noop, msg );
+mw.log.deprecate( win, 'killEvt', $.noop, msg );
+mw.log.deprecate( win, 'addHandler', $.noop, msg );
+mw.log.deprecate( win, 'hookEvent', $.noop, msg );
+mw.log.deprecate( win, 'addClickHandler', $.noop, msg );
+mw.log.deprecate( win, 'removeHandler', $.noop, msg );
+mw.log.deprecate( win, 'getElementsByClassName', function () { return []; }, msg );
+mw.log.deprecate( win, 'getInnerText', function () { return ''; }, msg );
+
+// Run a function after the window onload event is fired
+mw.log.deprecate( win, 'addOnloadHook', function ( hookFunct ) {
+ if ( onloadFuncts ) {
+ onloadFuncts.push(hookFunct);
} else {
- element.parentNode.appendChild( spinner );
+ // If func queue is gone the event has happened already,
+ // run immediately instead of queueing.
+ hookFunct();
}
-};
+}, msg );
-/**
- * Remove a progress spinner added with injectSpinner()
- *
- * @param id Identifier string
- */
-window.removeSpinner = function( id ) {
- var spinner = document.getElementById( 'mw-spinner-' + id );
- if( spinner ) {
- spinner.parentNode.removeChild( spinner );
- }
-};
+$( win ).on( 'load', function () {
+ var i, functs;
-window.runOnloadHook = function() {
- // don't run anything below this for non-dom browsers
- if ( doneOnloadHook || !( document.getElementById && document.getElementsByTagName ) ) {
+ // Don't run twice
+ if ( !onloadFuncts ) {
return;
}
- // set this before running any hooks, since any errors below
- // might cause the function to terminate prematurely
- doneOnloadHook = true;
+ // Deference and clear onloadFuncts before running any
+ // hooks to make sure we don't miss any addOnloadHook
+ // calls.
+ functs = onloadFuncts.slice();
+ onloadFuncts = undefined;
- // Run any added-on functions
- for ( var i = 0; i < onloadFuncts.length; i++ ) {
- onloadFuncts[i]();
+ // Execute the queued functions
+ for ( i = 0; i < functs.length; i++ ) {
+ functs[i]();
}
-};
+} );
/**
- * Add an event handler to an element
+ * Toggle checkboxes with shift selection
+ *
+ * To be removed in MediaWiki 1.23.
*
- * @param element Element to add handler to
- * @param attach String Event to attach to
- * @param handler callable Event handler callback
+ * @deprecated since 1.17 Use jquery.checkboxShiftClick instead
*/
-window.addHandler = function( element, attach, handler ) {
- if( element.addEventListener ) {
- element.addEventListener( attach, handler, false );
- } else if( element.attachEvent ) {
- element.attachEvent( 'on' + attach, handler );
- }
-};
+msg = 'Use jquery.checkboxShiftClick instead';
+mw.log.deprecate( win, 'checkboxes', [], msg );
+mw.log.deprecate( win, 'lastCheckbox', null, msg );
+mw.log.deprecate( win, 'setupCheckboxShiftClick', $.noop, msg );
+mw.log.deprecate( win, 'addCheckboxClickHandlers', $.noop, msg );
+mw.log.deprecate( win, 'checkboxClickHandler', $.noop, msg );
-window.hookEvent = function( hookName, hookFunct ) {
- addHandler( window, hookName, hookFunct );
-};
+/**
+ * Add a button to the default editor toolbar
+ *
+ * To be removed in MediaWiki 1.23.
+ *
+ * @deprecated since 1.17 Use mw.toolbar instead
+ */
+mw.log.deprecate( win, 'mwEditButtons', [], 'Use mw.toolbar instead' );
+mw.log.deprecate( win, 'mwCustomEditButtons', [], 'Use mw.toolbar instead' );
/**
- * Add a click event handler to an element
+ * Spinner creation, injection and removal
+ *
+ * To be removed in MediaWiki 1.23.
*
- * @param element Element to add handler to
- * @param handler callable Event handler callback
+ * @deprecated since 1.18 Use jquery.spinner instead
*/
-window.addClickHandler = function( element, handler ) {
- addHandler( element, 'click', handler );
-};
+mw.log.deprecate( win, 'injectSpinner', $.noop, 'Use jquery.spinner instead' );
+mw.log.deprecate( win, 'removeSpinner', $.noop, 'Use jquery.spinner instead' );
/**
- * Removes an event handler from an element
+ * Escape utilities
*
- * @param element Element to remove handler from
- * @param remove String Event to remove
- * @param handler callable Event handler callback to remove
+ * To be removed in MediaWiki 1.23.
+ *
+ * @deprecated since 1.18 Use mw.html instead
*/
-window.removeHandler = function( element, remove, handler ) {
- if( window.removeEventListener ) {
- element.removeEventListener( remove, handler, false );
- } else if( window.detachEvent ) {
- element.detachEvent( 'on' + remove, handler );
+mw.log.deprecate( win, 'escapeQuotes', $.noop,'Use mw.html instead' );
+mw.log.deprecate( win, 'escapeQuotesHTML', $.noop,'Use mw.html instead' );
+
+/**
+ * Display a message to the user
+ *
+ * To be removed in MediaWiki 1.23.
+ *
+ * @deprecated since 1.17 Use mediawiki.notify instead
+ * @param {string|HTMLElement} message To be put inside the message box
+ */
+mw.log.deprecate( win, 'jsMsg', mw.util.jsMessage, 'Use mediawiki.notify instead' );
+
+/**
+ * Misc. utilities
+ *
+ * To be removed in MediaWiki 1.23.
+ *
+ * @deprecated since 1.17 Use mediawiki.util instead
+ */
+msg = 'Use mediawiki.util instead';
+mw.log.deprecate( win, 'tooltipAccessKeyPrefix', 'alt-', msg );
+mw.log.deprecate( win, 'tooltipAccessKeyRegexp', /\[(alt-)?(.)\]$/, msg );
+mw.log.deprecate( win, 'updateTooltipAccessKeys', mw.util.updateTooltipAccessKeys, msg );
+mw.log.deprecate( win, 'addPortletLink', mw.util.addPortletLink, msg );
+mw.log.deprecate( win, 'appendCSS', mw.util.addCSS, msg );
+
+/**
+ * Wikipage import methods
+ */
+
+// included-scripts tracker
+win.loadedScripts = {};
+
+win.importScript = function ( page ) {
+ var uri = mw.config.get( 'wgScript' ) + '?title=' +
+ mw.util.wikiUrlencode( page ) +
+ '&action=raw&ctype=text/javascript';
+ return win.importScriptURI( uri );
+};
+
+win.importScriptURI = function ( url ) {
+ if ( win.loadedScripts[url] ) {
+ return null;
}
+ win.loadedScripts[url] = true;
+ var s = document.createElement( 'script' );
+ s.setAttribute( 'src', url );
+ s.setAttribute( 'type', 'text/javascript' );
+ document.getElementsByTagName( 'head' )[0].appendChild( s );
+ return s;
+};
+
+win.importStylesheet = function( page ) {
+ return win.importStylesheetURI( mw.config.get( 'wgScript' ) + '?action=raw&ctype=text/css&title=' + mw.util.wikiUrlencode( page ) );
+};
+
+win.importStylesheetURI = function( url, media ) {
+ var l = document.createElement( 'link' );
+ l.rel = 'stylesheet';
+ l.href = url;
+ if ( media ) {
+ l.media = media;
+ }
+ document.getElementsByTagName('head')[0].appendChild( l );
+ return l;
};
-// note: all skins should call runOnloadHook() at the end of html output,
-// so the below should be redundant. It's there just in case.
-hookEvent( 'load', runOnloadHook );
-if ( ie6_bugs ) {
- importScriptURI( mw.config.get( 'stylepath' ) + '/common/IEFixes.js' );
+if ( isIE6 ) {
+ win.importScriptURI( mw.config.get( 'stylepath' ) + '/common/IEFixes.js' );
}
-}( mediaWiki ) );
+}( mediaWiki, jQuery ) );
diff --git a/skins/common/wikiprintable.css b/skins/common/wikiprintable.css
deleted file mode 100644
index 95fcfef3..00000000
--- a/skins/common/wikiprintable.css
+++ /dev/null
@@ -1,59 +0,0 @@
-/* MediaWiki print stylesheet */
-
-body {
- color: #000000;
- background: #ffffff;
-}
-
-/* MSIE/Win doesn't understand 'inherit' */
-a,
-a.external,
-a.new,
-a.stub {
- color: black !important;
- text-decoration: none !important;
-}
-#article {
- margin: 0 !important;
-}
-
-/* Continue ... */
-a,
-a.external,
-a.new,
-a.stub {
- color: inherit !important;
- text-decoration: inherit !important;
-}
-
-/* Hide UI stuff */
-#quickbar,
-#topbar,
-#logo,
-#footer,
-#siteNotice,
-.editsection,
-.toctoggle {
- display: none;
-}
-
-/* */
-#article {
- position: relative;
- margin: inherit !important;
-}
-
-.printfooter {
- border-top: solid 1px black;
- display: block !important;
-}
-
-/* Old stuff. @todo FIXME:
-a.CBlink { color: #0000AA; text-decoration: none; font-size: 12pt; }
-a.interwiki,
-a.external { color: #3333BB; text-decoration: none; }
-h1.pagetitle { padding-bottom: 0; margin-bottom: 0; }
-i.link,
-u.link { color: #000066; }
-p.subtitle { padding-top: 0; margin-top: 0; }
-*/
diff --git a/skins/modern/external.png b/skins/modern/external.png
index acf260fc..63083831 100644
--- a/skins/modern/external.png
+++ b/skins/modern/external.png
Binary files differ
diff --git a/skins/modern/main.css b/skins/modern/main.css
index f201209d..40fbfd78 100644
--- a/skins/modern/main.css
+++ b/skins/modern/main.css
@@ -58,8 +58,7 @@ body {
font-variant: small-caps;
}
-#p-personal h3,
-#p-personal h5 {
+#p-personal h3 {
display: none;
}
@@ -177,8 +176,7 @@ textarea {
margin-top: .4em;
}
-.portlet h3,
-.portlet h5 {
+.portlet h3 {
padding: 0.1em 0 0.3em 1em;
margin: 0 0 0 0;
background-color: #dddddd;
@@ -252,8 +250,7 @@ ul {
color: white;
}
-#p-cactions h3,
-#p-cactions h5 {
+#p-cactions h3 {
display: none;
}
@@ -340,10 +337,6 @@ a.new:visited {
color: #a55858;
}
-span.editsection {
- font-size: small;
-}
-
h1, h2 {
border-bottom: solid 1px #003366;
}
@@ -412,13 +405,7 @@ h1, h2, h3, h4, h5, h6 {
text-decoration: none;
color: white;
}
-
-#mw-pref-clear {
- clear: both;
-}
-
-#mw_content a.external,
-#mw_content a.external[href ^="gopher://"] {
+#mw_content a.external {
/* @embed */
background: url(external.png) center right no-repeat;
padding-right: 13px;
@@ -526,6 +513,7 @@ div.magnify {
float: right;
border: none !important;
background: none !important;
+ margin-left: 3px;
}
div.magnify a, div.magnify img {
display: block;
@@ -555,6 +543,27 @@ img.thumbborder {
border-spacing: 0;
background-color: #f0f0f0;
border: solid 1px #bbbbbb;
+ display: -moz-inline-block;
+ display: inline-block;
+ display: table;
+
+ /* IE7 and earliers */
+ zoom: 1;
+ *display: inline;
+
+ padding: 7px;
+}
+
+/* CSS for backwards-compatibility with cached page renders and creative uses in wikitext */
+table#toc,
+table.toc {
+ border-collapse: collapse;
+}
+
+/* Remove additional paddings inside table-cells that are not present in <div>s */
+table#toc td,
+table.toc td {
+ padding: 0;
}
#toc tr, #toc td {
diff --git a/skins/modern/print.css b/skins/modern/print.css
index 82784100..e97bbdb4 100644
--- a/skins/modern/print.css
+++ b/skins/modern/print.css
@@ -3,7 +3,7 @@
#p-personal,
#jump-to-nav,
#footer,
-span.editsection,
+.mw-editsection,
.noprint {
display: none;
}
diff --git a/skins/monobook/IE60Fixes.css b/skins/monobook/IE60Fixes.css
index ec1ce430..534d3333 100644
--- a/skins/monobook/IE60Fixes.css
+++ b/skins/monobook/IE60Fixes.css
@@ -70,15 +70,6 @@ div#footer {
#portal-personaltools {
padding-bottom: 0.1em;
}
-#bodyContent a.external {
- background: url(external.png) center right no-repeat;
- padding-right: 13px;
-}
-
-.rtl #bodyContent a.external {
- background-image: url(external-rtl.png);
- padding-right: 13px;
-}
.rtl a.feedlink {
background-position: right;
diff --git a/skins/monobook/Opera6Fixes.css b/skins/monobook/Opera6Fixes.css
deleted file mode 100644
index 77dec095..00000000
--- a/skins/monobook/Opera6Fixes.css
+++ /dev/null
@@ -1,20 +0,0 @@
-/* opera 6 fixes */
-div#column-one {
- position: relative;
- max-width: 11.7em;
-}
-#p-personal {
- width: 45em;
- margin-left: 8.6em;
- right: 0;
-}
-#bodyContent a.external {
- background: url(external.png) center right no-repeat;
- padding-right: 13px;
-}
-
-.rtl a.feedlink {
- background-position: right;
- padding-right: 0;
- padding-left: 16px;
-}
diff --git a/skins/monobook/Opera7Fixes.css b/skins/monobook/Opera7Fixes.css
deleted file mode 100644
index 1dcba7c9..00000000
--- a/skins/monobook/Opera7Fixes.css
+++ /dev/null
@@ -1,21 +0,0 @@
-/* small tweaks for opera seven */
-#p-cactions {
- margin-top: .1em;
-}
-#p-cactions li a {
- top: 2px;
-}
-#bodyContent a.external {
- background: url(external.png) center right no-repeat;
- padding-right: 13px;
-}
-.rtl #bodyContent a.external {
- background-image: url(external-rtl.png);
- padding-right: 13px;
-}
-
-.rtl a.feedlink {
- background-position: right;
- padding-right: 0;
- padding-left: 16px;
-}
diff --git a/skins/monobook/Opera9Fixes.css b/skins/monobook/Opera9Fixes.css
deleted file mode 100644
index 9c312a84..00000000
--- a/skins/monobook/Opera9Fixes.css
+++ /dev/null
@@ -1,11 +0,0 @@
-.rtl #bodyContent a.external {
- background-image: url(external-rtl.png);
- padding-right: 13px;
- padding-left: 0;
-}
-
-.rtl a.feedlink {
- background-position: right;
- padding-right: 0;
- padding-left: 16px;
-}
diff --git a/skins/monobook/external-ltr.png b/skins/monobook/external-ltr.png
index acf260fc..63083831 100644
--- a/skins/monobook/external-ltr.png
+++ b/skins/monobook/external-ltr.png
Binary files differ
diff --git a/skins/monobook/external-rtl.png b/skins/monobook/external-rtl.png
index 7d5ee375..5313234e 100644
--- a/skins/monobook/external-rtl.png
+++ b/skins/monobook/external-rtl.png
Binary files differ
diff --git a/skins/monobook/main.css b/skins/monobook/main.css
index 4cbc0939..d8f25ebb 100644
--- a/skins/monobook/main.css
+++ b/skins/monobook/main.css
@@ -17,7 +17,7 @@ div#column-content {
}
div#content {
margin: 2.8em 0 0 12.2em;
- padding: 0 1em 1em 1em;
+ padding: 1em;
position: relative;
z-index: 2;
}
@@ -93,6 +93,9 @@ pre, .mw-code {
line-height: 1.1em;
}
+#firstHeading {
+ padding-top: 0;
+}
/*
** the main content area
*/
@@ -139,8 +142,7 @@ table.rimage {
** keep the whitespace in front of the ^=, hides rule from konqueror
** this is css3, the validator doesn't like it when validating as css2
*/
-#bodyContent a.external,
-#bodyContent a.external[href ^="gopher://"] {
+#bodyContent a.external {
/* @embed */
background: url(external-ltr.png) center right no-repeat;
padding-right: 13px;
@@ -319,7 +321,7 @@ input.searchButton {
position: absolute;
left: 0;
top: 0;
- z-index: 0;
+ z-index: 3;
}
#p-personal {
width: 100%;
@@ -381,19 +383,22 @@ input.searchButton {
#p-personal li.active a:hover {
background-color: transparent;
}
-/* the icon in front of the user name, single quotes
-in bg url to hide it from iemac */
+/* The icon in front of the username / login link */
li#pt-userpage,
li#pt-anonuserpage,
li#pt-login {
/* @embed */
background: url(user.gif) top left no-repeat;
padding-left: 20px;
- text-transform: none;
}
#p-personal ul {
text-transform: lowercase;
}
+/* Don't lowercase username or IP addresses (IPv6) */
+li#pt-userpage,
+li#pt-anonuserpage {
+ text-transform: none;
+}
#p-personal li.active {
font-weight: bold;
}
@@ -422,14 +427,13 @@ li#pt-login {
display: inline;
border: 1px solid #aaa;
border-bottom: none;
- padding: 0 0 .1em 0;
+ padding: 0 0 1em 0;
margin: 0 .3em 0 0;
overflow: visible;
background: white;
}
#p-cactions li.selected {
border-color: #fabd23;
- padding: 0 0 .2em 0;
font-weight: bold;
}
#p-cactions li a {
@@ -515,7 +519,8 @@ div#footer {
border-top: 1px solid #fabd23;
border-bottom: 1px solid #fabd23;
margin: .6em 0 1em 0;
- padding: .4em 0 1.2em 0;
+ overflow: hidden;
+ padding: .4em 0 .3em 0;
text-align: center;
font-size: 90%;
}
@@ -897,6 +902,5 @@ div.mw-lag-warn-high {
/* 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/wiki-indexed.png b/skins/monobook/wiki-indexed.png
index 0ec584a3..799ebac8 100644
--- a/skins/monobook/wiki-indexed.png
+++ b/skins/monobook/wiki-indexed.png
Binary files differ
diff --git a/skins/myskin/main.css b/skins/myskin/main.css
deleted file mode 100644
index f3ab0204..00000000
--- a/skins/myskin/main.css
+++ /dev/null
@@ -1 +0,0 @@
-/* this file must be empty */
diff --git a/skins/nostalgia/screen.css b/skins/nostalgia/screen.css
deleted file mode 100644
index aed5715b..00000000
--- a/skins/nostalgia/screen.css
+++ /dev/null
@@ -1,56 +0,0 @@
-body {
- /* background color is set separately on page type */
- color: black;
-}
-
-#specialform {
- display: inline;
-}
-
-#powersearch {
- background: #DDEEFF;
- border-style: solid;
- border-width: 1px;
- padding: 2px;
-}
-
-a.new {
- color: #ba0000;
-}
-
-a.interwiki,
-a.external {
- color: #3366BB;
-}
-
-a.printable {
- text-decoration: underline;
-}
-
-a.stub {
- color: #772233;
- text-decoration: none;
-}
-
-h1.pagetitle {
- padding-top: 0;
- margin-top: 0;
- padding-bottom: 0;
- margin-bottom: 0;
-}
-
-h2, h3, h4, h5, h6 {
- margin-bottom: 0;
-}
-
-textarea {
- overflow: auto;
-}
-
-p.subtitle {
- padding-top: 0;
- margin-top: 0;
-}
-div.sitenotice {
- clear: both;
-}
diff --git a/skins/simple/discussionitem_icon.gif b/skins/simple/discussionitem_icon.gif
deleted file mode 100644
index e3ca6d9e..00000000
--- a/skins/simple/discussionitem_icon.gif
+++ /dev/null
Binary files differ
diff --git a/skins/simple/external.png b/skins/simple/external.png
deleted file mode 100644
index acf260fc..00000000
--- a/skins/simple/external.png
+++ /dev/null
Binary files differ
diff --git a/skins/simple/file_icon.gif b/skins/simple/file_icon.gif
deleted file mode 100644
index 69dbeaf7..00000000
--- a/skins/simple/file_icon.gif
+++ /dev/null
Binary files differ
diff --git a/skins/simple/link_icon.gif b/skins/simple/link_icon.gif
deleted file mode 100644
index 168c1a2f..00000000
--- a/skins/simple/link_icon.gif
+++ /dev/null
Binary files differ
diff --git a/skins/simple/lock_icon.gif b/skins/simple/lock_icon.gif
deleted file mode 100644
index 82844033..00000000
--- a/skins/simple/lock_icon.gif
+++ /dev/null
Binary files differ
diff --git a/skins/simple/mail_icon.gif b/skins/simple/mail_icon.gif
deleted file mode 100644
index cf5680d9..00000000
--- a/skins/simple/mail_icon.gif
+++ /dev/null
Binary files differ
diff --git a/skins/simple/main.css b/skins/simple/main.css
deleted file mode 100644
index edb1d7d4..00000000
--- a/skins/simple/main.css
+++ /dev/null
@@ -1,427 +0,0 @@
-/**
- * For clarity, explicitly state some recommendations from
- * http://www.w3.org/TR/CSS21/sample.html to make sure the editsection links scale right.
- */
-
-h1 {
- font-size: 2em;
-}
-h2 {
- font-size: 1.5em;
-}
-h3 {
- font-size: 1.17em;
-}
-h5 {
- font-size: .83em;
-}
-h6 {
- font-size: .75em;
-}
-h1, h2, h3, h4, h5, h6 {
- font-weight: bolder;
-}
-
-/* Now the custom parts */
-
-/* Make edit sections (which are inside h# tags) normal-sized */
-.editsection {
- font-weight: normal;
-}
-h1 .editsection {
- font-size: 50%;
-}
-h2 .editsection {
- font-size: 66.7%;
-}
-h3 .editsection {
- font-size: 85.5%;
-}
-h5 .editsection {
- font-size: 120%;
-}
-h6 .editsection {
- font-size: 133%;
-}
-
-#toolbar {
- display: none;
-}
-
-div.center {
- text-align: center;
-}
-
-#contentSub {
- padding-left: 2em;
-}
-
-a {
- text-decoration: none;
-}
-
-a:hover {
- text-decoration: underline;
-}
-
-#column-content {
- width: 100%;
- float: right;
- margin: 0 0 0.6em -12.2em;
- padding: 0;
-}
-
-#content {
- margin: 0em 0 0 12.2em;
- padding: 0em 1em 1.5em 1em;
- border-left: 1px solid #959595;
- line-height: 1.5em;
-}
-
-#column-one {
- position: absolute;
- top: 0;
- left: 0;
-}
-
-/* Hide, but keep accessible for screen-readers */
-#column-one h2 {
- position: absolute;
- top: -9999px;
-}
-
-body {
- margin: 0;
- padding: 0;
-}
-
-#globalWrapper {
- width: 100%;
- height: 100%;
- margin: 0;
- padding: 0;
-}
-.visualClear {
- clear: both;
-}
-
-img {
- border: none;
-}
-p {
- margin: 0.4em 0em 0.5em 0em;
- line-height: 1.5em;
-}
-p img {
- margin: 0;
-}
-
-h1, h2, h3, h4, h5, h6 {
- margin: 0;
- padding-top: 0.5em;
- padding-bottom: 0.17em;
-}
-fieldset {
- margin: 1em 0em 1em 0em;
- padding: 0em 1em 1em 1em;
-}
-.usermessage {
- background-color: #ffce7b;
- border: 1px solid #ffa500;
- color: black;
- font-weight: bold;
- margin: 2em 0em 1em 0em;
- padding: 0.5em 1em;
- vertical-align: middle;
-}
-.error {
- color: red;
- font-size: larger;
-}
-
-table.rimage {
- float: right;
- position: relative;
- margin-left: 1em;
- margin-bottom: 1em;
- text-align: center;
-}
-
-.portlet {
- border: none;
- float: none;
- padding: 0;
- width: 11.8em;
- overflow: hidden;
-}
-.portlet h4 {
- font-weight: normal;
- white-space: nowrap;
-}
-.portlet h5 {
- padding: 0em 1em 0em 0.5em;
- display: inline;
- height: 1em;
- font-weight: normal;
- white-space: nowrap;
-}
-.portlet h6 {
- padding: 0em 1em 0em 1em;
- display: block;
- height: 1.2em;
- font-weight: normal;
- white-space: nowrap;
-}
-.pBody {
- border-collapse: collapse;
- padding: 0 0.8em 0.3em 0.5em;
-}
-.portlet h1,
-.portlet h2,
-.portlet h3,
-.portlet h4 {
- margin: 0;
- padding: 0;
- font-size: small;
-}
-
-#p-search .pBody {
- text-align: center;
-}
-
-#searchInput {
- width: 100%;
- clear: both;
- margin: 0 0 0 0;
-}
-
-input.searchButton {
- margin-top: 1px;
- padding: 0 0.4em;
- cursor: pointer;
-}
-
-#p-search .pBody {
- padding: 0.5em 0.4em 0.4em 0.4em;
-}
-
-/* feed links */
-a.feedlink {
- background: url(../common/images/feed-icon.png) center left no-repeat;
- padding-left: 16px;
-}
-
-textarea {
- width: 100%;
-}
-
-.pBody li,
-.pBody ul {
- padding-left: 0em;
- margin-left: 0.5em;
-}
-
-pre, .mw-code {
- margin: 2em;
- border: solid 1px black;
-}
-
-h1.firstHeading,
-h2 {
- border-bottom: solid 1px black;
-}
-#bodyContent a.external,
-#bodyContent a.external[href ^="gopher://"] {
- background: url(external.png) center right no-repeat;
- padding-right: 13px;
-}
-#bodyContent a.external[href ^="https://"],
-.link-https {
- background: url(lock_icon.gif) center right no-repeat;
- padding-right: 16px;
-}
-#bodyContent a.external[href ^="mailto:"],
-.link-mailto {
- background: url(mail_icon.gif) center right no-repeat;
- padding-right: 18px;
-}
-#bodyContent a.external[href ^="news:"] {
- background: url(news_icon.png) center right no-repeat;
- padding-right: 18px;
-}
-#bodyContent a.external[href ^="ftp://"],
-.link-ftp {
- background: url(file_icon.gif) center right no-repeat;
- padding-right: 18px;
-}
-#bodyContent a.external[href ^="irc://"],
-#bodyContent a.external[href ^="ircs://"],
-.link-irc {
- background: url(discussionitem_icon.gif) center right no-repeat;
- padding-right: 18px;
-}
-
-#bodyContent a.extiw,
-#bodyContent a.extiw:active {
- color: #5E7CFF;
-}
-
-td.diff-addedline {
- background-color: #B9FFB0;
-}
-
-td.diff-deletedline {
- background-color: #f8ffaa;
-}
-
-.diffchange {
- background-color: #FFCDF3;
- text-decoration: none;
-}
-
-#pagehistory li {
- border: none;
-}
-
-div.tocindent {
- margin-left: 2em;
-}
-#toc {
- text-align: left;
- border-top: solid 1px black;
- border-bottom: solid 1px black;
-}
-
-/* @noflip */div.floatright, table.floatright {
- margin: 0;
- border-width: 0.5em 0 0.8em 1.4em;
-}
-div.floatright p {
- font-style: italic;
-}
-/* @noflip */div.floatleft, table.floatleft {
- margin: 0.3em 0.5em 0.5em 0;
- border-width: 0.5em 1.4em 0.8em 0;
-}
-div.floatleft p {
- font-style: italic;
-}
-
-/* thumbnails */
-div.thumb {
- margin-bottom: 0.5em;
- width: auto;
-}
-div.thumbinner {
- padding: 3px !important;
- text-align: center;
- overflow: hidden;
-}
-
-html .thumbcaption {
- border: none;
- text-align: left;
- line-height: 1.4;
- padding: 0.3em 0 0.1em 0;
-}
-div.magnify {
- float: right;
- border: none !important;
- background: none !important;
-}
-div.magnify a,
-div.magnify img {
- display: block;
- border: none !important;
- background: none !important;
-}
-/* @noflip */div.tright {
- border-width: 0.5em 0 0.8em 1.4em;
-}
-/* @noflip */div.tleft {
- margin-right: 0.5em;
- border-width: 0.5em 1.4em 0.8em 0;
-}
-img.thumbborder {
- border: 1px solid #dddddd;
-}
-
-a.stub {
- color: #772233;
-}
-a.new,
-#p-personal a.new {
- color: #BA0000;
- text-decoration: line-through;
-}
-li.new {
- text-decoration: line-through;
-}
-/**
- * Overrides text justification (user preference)
- * See bug 31990
- */
-#catlinks {
- text-align: center;
-}
-.catlinks {
- text-align: center;
- width: 80%;
- margin-left: auto;
- margin-right: auto;
- padding: 3px;
-}
-
-#mytabs {
- background-color: inherit;
-}
-#p-cactions {
- background-color: inherit;
-}
-
-#footer {
- padding-left: 11.8em;
-}
-
-#n-portal,
-#n-currentevents,
-#n-help,
-#n-sitesupport {
- display: none;
-}
-
-#preftoc {
- float: left;
- margin: 1em;
- width: 13em;
-}
-#preftoc li {
-}
-#preftoc li.selected {
- border: 1px dashed #aaa;
-}
-#preftoc a,
-#preftoc a:active {
- display: block;
-}
-div.htmlform-tip {
- font-size: 95%;
- margin-top: 1em;
-}
-
-#mw_trackbacks {
- border-style: groove;
-}
-
-#jump-to-nav {
- display: none;
-}
-
-table.collapsed tr.collapsable {
- display: none;
-}
-
-.templatesUsed {
- margin-top: 1.5em;
-}
-
diff --git a/skins/standard/main.css b/skins/standard/main.css
deleted file mode 100644
index a4b03a87..00000000
--- a/skins/standard/main.css
+++ /dev/null
@@ -1,188 +0,0 @@
-/**
- * This style sheet is used by the classic (aka standard) skin
- */
-
-#article {
- padding: 4px;
-}
-
-#content {
- margin: 0;
- padding: 0;
-}
-
-#footer {
- padding: 4px;
- font-size: 95%;
- clear: both;
-}
-
-#pagestats {
- font-size: 9pt;
-}
-
-#powersearch {
- background: #DDEEFF;
- border-style: solid;
- border-width: 1px;
- padding: 2px;
-}
-
-#quickbar {
- width: 140px;
- height: 100%;
- padding: 4px;
- visibility: visible;
- z-index: 99;
- font-size: 95%;
-}
-
-#topbar {
- padding: 4px;
- font-size: 95%;
-}
-
-/* Table of contents */
-.toctoggle,
-.editsection {
- font-size: smaller;
-}
-
-/* ... */
-#toolbar {
- padding: 0;
-}
-
-#infobox {
- background: #eeeeff;
- color: black;
-}
-
-#editform {
- margin-top: 1px;
-}
-
-a.interwiki,
-a.external {
- color: #3366BB;
-}
-
-a.printable {
- text-decoration: underline;
-}
-
-a.new {
- color: #ba0000;
-}
-
-a.stub {
- color: #772233;
- text-decoration: none;
-}
-
-a:visited {
- color: #5A3696;
-}
-
-body {
- margin: 0;
- padding: 4px;
- color: black;
-}
-
-form.inline {
- display: inline;
-}
-
-textarea {
- overflow: auto;
-}
-
-h1.pagetitle {
- padding-top: 0;
- margin-top: 0;
- padding-bottom: 0;
- margin-bottom: 0;
- font-size: 150%;
-}
-
-h1.pagetitle .editsection {
- font-size: 66.7%;
-}
-
-h2 {
- font-size: 120%;
-}
-
-h2 .editsection {
- font-size: 83.3%;
-}
-
-h2, h3, h4, h5, h6 {
- margin-bottom: 0;
-}
-
-h3 {
- font-size: 106.25%;
-}
-
-h3 .editsection {
- font-size: 94.1%;
-}
-
-h4 {
- font-size: 103.125%;
-}
-
-h4 .editsection {
- font-size: 97.0%;
-}
-
-h5 {
- font-size: 100%;
-}
-
-h5 .editsection {
- font-size: 100%;
-}
-
-h6 {
- font-size: 95%;
-}
-
-h6 .editsection {
- font-size: 105.3%;
-}
-
-hr.sep {
- color: gray;
- height: 1px;
- background-color: gray;
-}
-
-p.subpages {
- font-size: small;
-}
-
-p.subtitle {
- padding-top: 0;
- margin-top: 0;
-}
-
-.catlinks {
- font-size: small;
- margin-top: 0;
- text-align:right;
-}
-
-td {
- empty-cells: show;
-}
-
-td.bottom {
- border-top: 1px solid gray;
-}
-
-td.top {
- border-bottom: 1px solid gray;
-}
diff --git a/skins/vector/beta/screen.less b/skins/vector/beta/screen.less
new file mode 100644
index 00000000..6d56cd5c
--- /dev/null
+++ b/skins/vector/beta/screen.less
@@ -0,0 +1,75 @@
+/* Content */
+#content {
+ line-height: 1.5em;
+ .mw-editsection {
+ font-family: @content-font-family;
+ }
+
+ h1,
+ #firstHeading {
+ font-family: @content-heading-font-family;
+ font-size: 1.833em;
+ line-height: 22pt;
+ padding: 0;
+ margin-bottom: 4pt;
+ }
+
+ h2 {
+ font-size: 1.5em;
+ line-height: 22pt;
+ }
+
+ h2,
+ h3,
+ h4,
+ h5,
+ h6 {
+ font-family: @content-heading-font-family;
+ padding: 0;
+ margin-bottom: 4pt;
+ margin-top: 14pt;
+ }
+
+ h3 {
+ font-size: 1.17em;
+ line-height: 22pt;
+ }
+
+ h3,
+ h4 {
+ font-weight: bold;
+ }
+
+ h4,
+ h5,
+ h6 {
+ font-size: 100%; /* (reset) */
+ }
+
+ h6 {
+ font-style: italic;
+ }
+
+ p {
+ margin-bottom: 8pt;
+ }
+
+ // FIXME: this is hacky
+ #toc h2 {
+ font-size: 100%;
+ }
+}
+
+/* Personal menu */
+#p-personal a {
+ color: #555;
+}
+
+/* Main menu */
+div#mw-panel div.portal {
+ margin-left: 1.25em;
+ h3 {
+ margin: 0;
+ line-height: 1;
+ }
+}
diff --git a/skins/vector/beta/variables.less b/skins/vector/beta/variables.less
new file mode 100644
index 00000000..08e662dc
--- /dev/null
+++ b/skins/vector/beta/variables.less
@@ -0,0 +1,37 @@
+@html-font-size: 90%;
+
+@body-font-size: inherit;
+
+// Page content
+@content-font-family: "Helvetica Neue", "Helvetica", "Nimbus Sans L", "Arial", "Liberation Sans", sans-serif;
+@content-font-color: #252525;
+@content-font-size: 0.9em;
+@content-line-height: inherit;
+@content-padding: 1em;
+@content-heading-font-size: 1.6em;
+@content-heading-font-family: Georgia, "DejaVu Serif", serif;
+
+// Common menu
+@menu-link-color: #555;
+
+// Main menu
+@menu-main-font-size: 0.82em;
+@menu-main-heading-font-size: 100%;
+@menu-main-heading-padding: 5px 0;
+
+@menu-main-body-font-size: inherit;
+@menu-main-body-link-color: inherit;
+@menu-main-body-link-visited-color: inherit;
+@menu-main-body-margin: 0;
+@menu-main-body-padding: 0 0 10px;
+@menu-main-logo-left: 1.6em;
+
+// Personal menu
+@menu-personal-font-size: 0.75em;
+
+// Collapsible nav
+@collapsible-nav-heading-color: #555;
+@collapsible-nav-heading-collapsed-color: inherit;
+
+@collapsible-nav-heading-padding: 4px 0 3px 1.5em;
+@collapsible-nav-body-margin: 0 0 0 1.25em;
diff --git a/skins/vector/collapsibleNav.js b/skins/vector/collapsibleNav.js
new file mode 100644
index 00000000..67313c95
--- /dev/null
+++ b/skins/vector/collapsibleNav.js
@@ -0,0 +1,121 @@
+/**
+ * Collapsible navigation for Vector
+ */
+( function ( mw, $ ) {
+ 'use strict';
+ var map;
+
+ // Use the same function for all navigation headings - don't repeat
+ function toggle( $element ) {
+ $.cookie(
+ 'vector-nav-' + $element.parent().attr( 'id' ),
+ $element.parent().is( '.collapsed' ),
+ { 'expires': 30, 'path': '/' }
+ );
+ $element
+ .parent()
+ .toggleClass( 'expanded' )
+ .toggleClass( 'collapsed' )
+ .find( '.body' )
+ .slideToggle( 'fast' );
+ }
+
+ /* Browser Support */
+
+ map = {
+ // Left-to-right languages
+ ltr: {
+ // Collapsible Nav is broken in Opera < 9.6 and Konqueror < 4
+ opera: [['>=', 9.6]],
+ konqueror: [['>=', 4.0]],
+ blackberry: false,
+ ipod: false,
+ iphone: false,
+ ps3: false
+ },
+ // Right-to-left languages
+ rtl: {
+ opera: [['>=', 9.6]],
+ konqueror: [['>=', 4.0]],
+ blackberry: false,
+ ipod: false,
+ iphone: false,
+ ps3: false
+ }
+ };
+ if ( !$.client.test( map ) ) {
+ return true;
+ }
+
+ $( function ( $ ) {
+ var $headings, tabIndex;
+
+ /* General Portal Modification */
+
+ // Always show the first portal
+ $( '#mw-panel > .portal:first' ).addClass( 'first persistent' );
+ // Apply a class to the entire panel to activate styles
+ $( '#mw-panel' ).addClass( 'collapsible-nav' );
+ // Use cookie data to restore preferences of what to show and hide
+ $( '#mw-panel > .portal:not(.persistent)' )
+ .each( function ( i ) {
+ var id = $(this).attr( 'id' ),
+ state = $.cookie( 'vector-nav-' + id );
+ // Add anchor tag to heading for better accessibility
+ $( this ).find( 'h3' ).wrapInner( $( '<a href="#"></a>' ).click( false ) );
+ // In the case that we are not showing the new version, let's show the languages by default
+ if (
+ state === 'true' ||
+ ( state === null && i < 1 ) ||
+ ( state === null && id === 'p-lang' )
+ ) {
+ $(this)
+ .addClass( 'expanded' )
+ .removeClass( 'collapsed' )
+ .find( '.body' )
+ .hide() // bug 34450
+ .show();
+ } else {
+ $(this)
+ .addClass( 'collapsed' )
+ .removeClass( 'expanded' );
+ }
+ // Re-save cookie
+ if ( state !== null ) {
+ $.cookie( 'vector-nav-' + $(this).attr( 'id' ), state, { 'expires': 30, 'path': '/' } );
+ }
+ } );
+
+ /* Tab Indexing */
+
+ $headings = $( '#mw-panel > .portal:not(.persistent) > h3' );
+
+ // Get the highest tab index
+ tabIndex = $( document ).lastTabIndex() + 1;
+
+ // Fix the search not having a tabindex
+ $( '#searchInput' ).attr( 'tabindex', tabIndex++ );
+
+ // Make it keyboard accessible
+ $headings.attr( 'tabindex', function () {
+ return tabIndex++;
+ });
+
+ // Toggle the selected menu's class and expand or collapse the menu
+ $( '#mw-panel' )
+ .delegate( '.portal:not(.persistent) > h3', 'keydown', function ( e ) {
+ // Make the space and enter keys act as a click
+ if ( e.which === 13 /* Enter */ || e.which === 32 /* Space */ ) {
+ toggle( $(this) );
+ }
+ } )
+ .delegate( '.portal:not(.persistent) > h3', 'mousedown', function ( e ) {
+ if ( e.which !== 3 ) { // Right mouse click
+ toggle( $(this) );
+ $(this).blur();
+ }
+ return false;
+ } );
+ });
+
+}( mediaWiki, jQuery ) );
diff --git a/skins/vector/collapsibleNav.less b/skins/vector/collapsibleNav.less
new file mode 100644
index 00000000..e6f5c9aa
--- /dev/null
+++ b/skins/vector/collapsibleNav.less
@@ -0,0 +1,91 @@
+/**
+ * LESS Stylesheet for collapsible nav
+ */
+@import "mediawiki.mixins.less";
+
+#mw-panel.collapsible-nav {
+ .portal {
+ background-position: left top;
+ background-repeat: no-repeat;
+ .background-image('images/portal-break.png');
+ padding: 0.25em 0 !important;
+ margin: -11px 9px 10px 11px;
+
+ h3 {
+ font-size: @menu-main-heading-font-size;
+ color: @collapsible-nav-heading-color;
+ font-weight: normal;
+ background-position: left center;
+ background-repeat: no-repeat;
+ .background-image-svg('images/arrow-expanded.svg', 'images/arrow-expanded.png');
+ padding: @collapsible-nav-heading-padding;
+ margin-bottom: 0;
+
+ &:hover {
+ cursor: pointer;
+ text-decoration: none;
+ }
+
+ a {
+ color: @collapsible-nav-heading-color;
+ text-decoration: none;
+ }
+ }
+
+ .body {
+ margin: @collapsible-nav-body-margin;
+ background-image: none !important;
+ padding-top: 0;
+ display: none;
+
+ ul {
+ li {
+ padding: 0.25em 0;
+ }
+ }
+ }
+
+
+ /* First */
+ &.first {
+ background-image: none;
+ margin-top: 0;
+ h3 {
+ display: none;
+ }
+ }
+
+ /* Persistent */
+ &.persistent {
+ .body {
+ display: block;
+ margin-left: 0.5em;
+ }
+
+ h3 {
+ background-image: none !important;
+ padding-left: 0.7em;
+ cursor: default;
+ }
+ }
+
+ /* Collapsed */
+ &.collapsed {
+ h3 {
+ color: @collapsible-nav-heading-collapsed-color;
+ background-position: left center;
+ background-repeat: no-repeat;
+ .background-image-svg('images/arrow-collapsed-ltr.svg', 'images/arrow-collapsed-ltr.png');
+ margin-bottom: 0;
+
+ &:hover {
+ text-decoration: underline;
+ }
+
+ a {
+ color: @collapsible-nav-heading-collapsed-color;
+ }
+ }
+ }
+ }
+}
diff --git a/skins/vector/collapsibleTabs.js b/skins/vector/collapsibleTabs.js
new file mode 100644
index 00000000..e3c2c519
--- /dev/null
+++ b/skins/vector/collapsibleTabs.js
@@ -0,0 +1,210 @@
+/**
+ * Collapsible tabs jQuery Plugin
+ */
+( function ( $ ) {
+ var rtl = $( 'html' ).attr( 'dir' ) === 'rtl';
+ $.fn.collapsibleTabs = function ( options ) {
+ // return if the function is called on an empty jquery object
+ if ( !this.length ) {
+ return this;
+ }
+ // Merge options into the defaults
+ var $settings = $.extend( {}, $.collapsibleTabs.defaults, options );
+
+ this.each( function () {
+ var $el = $( this );
+ // add the element to our array of collapsible managers
+ $.collapsibleTabs.instances = ( $.collapsibleTabs.instances.length === 0 ?
+ $el : $.collapsibleTabs.instances.add( $el ) );
+ // attach the settings to the elements
+ $el.data( 'collapsibleTabsSettings', $settings );
+ // attach data to our collapsible elements
+ $el.children( $settings.collapsible ).each( function () {
+ $.collapsibleTabs.addData( $( this ) );
+ } );
+ } );
+
+ // if we haven't already bound our resize hanlder, bind it now
+ if ( !$.collapsibleTabs.boundEvent ) {
+ $( window )
+ .delayedBind( 500, 'resize', function () {
+ $.collapsibleTabs.handleResize();
+ } );
+ }
+ // call our resize handler to setup the page
+ $.collapsibleTabs.handleResize();
+ return this;
+ };
+ /**
+ * Returns the amount of horizontal distance between the two tabs groups
+ * (#left-navigation and #right-navigation), in pixels. If negative, this
+ * means that the tabs overlap, and the value is the width of overlapping
+ * parts.
+ *
+ * Used in default expandCondition and collapseCondition.
+ *
+ * @return {Numeric} distance/overlap in pixels
+ */
+ function calculateTabDistance() {
+ var $leftTab, $rightTab, leftEnd, rightStart;
+
+ // In RTL, #right-navigation is actually on the left and vice versa.
+ // Hooray for descriptive naming.
+ if ( !rtl ) {
+ $leftTab = $( '#left-navigation' );
+ $rightTab = $( '#right-navigation' );
+ } else {
+ $leftTab = $( '#right-navigation' );
+ $rightTab = $( '#left-navigation' );
+ }
+
+ leftEnd = $leftTab.offset().left + $leftTab.width();
+ rightStart = $rightTab.offset().left;
+
+ return rightStart - leftEnd;
+ }
+ $.collapsibleTabs = {
+ instances: [],
+ boundEvent: null,
+ defaults: {
+ expandedContainer: '#p-views ul',
+ collapsedContainer: '#p-cactions ul',
+ collapsible: 'li.collapsible',
+ shifting: false,
+ expandCondition: function ( eleWidth ) {
+ // If there's at least eleWidth pixels free space, expand.
+ return calculateTabDistance() >= eleWidth;
+ },
+ collapseCondition: function () {
+ // If there's an overlap, collapse.
+ return calculateTabDistance() < 0;
+ }
+ },
+ addData: function ( $collapsible ) {
+ var $settings = $collapsible.parent().data( 'collapsibleTabsSettings' );
+ if ( $settings !== null ) {
+ $collapsible.data( 'collapsibleTabsSettings', {
+ expandedContainer: $settings.expandedContainer,
+ collapsedContainer: $settings.collapsedContainer,
+ expandedWidth: $collapsible.width(),
+ prevElement: $collapsible.prev()
+ } );
+ }
+ },
+ getSettings: function ( $collapsible ) {
+ var $settings = $collapsible.data( 'collapsibleTabsSettings' );
+ if ( $settings === undefined ) {
+ $.collapsibleTabs.addData( $collapsible );
+ $settings = $collapsible.data( 'collapsibleTabsSettings' );
+ }
+ return $settings;
+ },
+ /**
+ * @param {jQuery.Event} e
+ */
+ handleResize: function () {
+ $.collapsibleTabs.instances.each( function () {
+ var $el = $( this ),
+ data = $.collapsibleTabs.getSettings( $el );
+
+ if ( data.shifting ) {
+ return;
+ }
+
+ // if the two navigations are colliding
+ if ( $el.children( data.collapsible ).length > 0 && data.collapseCondition() ) {
+
+ $el.trigger( 'beforeTabCollapse' );
+ // move the element to the dropdown menu
+ $.collapsibleTabs.moveToCollapsed( $el.children( data.collapsible + ':last' ) );
+ }
+
+ // if there are still moveable items in the dropdown menu,
+ // and there is sufficient space to place them in the tab container
+ if ( $( data.collapsedContainer + ' ' + data.collapsible ).length > 0 &&
+ data.expandCondition( $.collapsibleTabs.getSettings( $( data.collapsedContainer ).children(
+ data.collapsible + ':first' ) ).expandedWidth ) ) {
+ //move the element from the dropdown to the tab
+ $el.trigger( 'beforeTabExpand' );
+ $.collapsibleTabs
+ .moveToExpanded( data.collapsedContainer + ' ' + data.collapsible + ':first' );
+ }
+ } );
+ },
+ moveToCollapsed: function ( ele ) {
+ var data, expContainerSettings, target,
+ $moving = $( ele );
+
+ data = $.collapsibleTabs.getSettings( $moving );
+ if ( !data ) {
+ return;
+ }
+ expContainerSettings = $.collapsibleTabs.getSettings( $( data.expandedContainer ) );
+ if ( !expContainerSettings ) {
+ return;
+ }
+ expContainerSettings.shifting = true;
+
+ // Remove the element from where it's at and put it in the dropdown menu
+ target = data.collapsedContainer;
+ $moving.css( 'position', 'relative' )
+ .css( ( rtl ? 'left' : 'right' ), 0 )
+ .animate( { width: '1px' }, 'normal', function () {
+ var data, expContainerSettings;
+ $( this ).hide();
+ // add the placeholder
+ $( '<span class="placeholder" style="display: none;"></span>' ).insertAfter( this );
+ // XXX: 'data' is undefined here, should the 'data' from the outer scope have
+ // a different name?
+ $( this ).detach().prependTo( target ).data( 'collapsibleTabsSettings', data );
+ $( this ).attr( 'style', 'display: list-item;' );
+ data = $.collapsibleTabs.getSettings( $( ele ) );
+ if ( data ) {
+ expContainerSettings = $.collapsibleTabs.getSettings( $( data.expandedContainer ) );
+ if ( expContainerSettings ) {
+ expContainerSettings.shifting = false;
+ $.collapsibleTabs.handleResize();
+ }
+ }
+ } );
+ },
+ moveToExpanded: function ( ele ) {
+ var data, expContainerSettings, $target, expandedWidth,
+ $moving = $( ele );
+
+ data = $.collapsibleTabs.getSettings( $moving );
+ if ( !data ) {
+ return;
+ }
+ expContainerSettings = $.collapsibleTabs.getSettings( $( data.expandedContainer ) );
+ if ( !expContainerSettings ) {
+ return;
+ }
+ expContainerSettings.shifting = true;
+
+ // grab the next appearing placeholder so we can use it for replacing
+ $target = $( data.expandedContainer ).find( 'span.placeholder:first' );
+ expandedWidth = data.expandedWidth;
+ $moving.css( 'position', 'relative' ).css( ( rtl ? 'right' : 'left' ), 0 ).css( 'width', '1px' );
+ $target.replaceWith(
+ $moving
+ .detach()
+ .css( 'width', '1px' )
+ .data( 'collapsibleTabsSettings', data )
+ .animate( { width: expandedWidth + 'px' }, 'normal', function () {
+ $( this ).attr( 'style', 'display: block;' );
+ var data, expContainerSettings;
+ data = $.collapsibleTabs.getSettings( $( this ) );
+ if ( data ) {
+ expContainerSettings = $.collapsibleTabs.getSettings( $( data.expandedContainer ) );
+ if ( expContainerSettings ) {
+ expContainerSettings.shifting = false;
+ $.collapsibleTabs.handleResize();
+ }
+ }
+ } )
+ );
+ }
+ };
+
+}( jQuery ) );
diff --git a/skins/vector/externalLinks.less b/skins/vector/externalLinks.less
new file mode 100644
index 00000000..5b02abbd
--- /dev/null
+++ b/skins/vector/externalLinks.less
@@ -0,0 +1,75 @@
+// FIXME: This size of this CSS is ridiculous. Please refactor (see bug 54604)
+@import "mediawiki.mixins.less";
+
+div#content a.external {
+ background-position: center right;
+ background-repeat: no-repeat;
+ .background-image('images/external-link-ltr-icon.png');
+ padding-right: 13px;
+}
+div#content a.external[href ^="https://"],
+.link-https {
+ background-position: center right;
+ background-repeat: no-repeat;
+ .background-image('images/lock-icon.png');
+ padding-right: 13px;
+}
+div#content a.external[href ^="mailto:"],
+.link-mailto {
+ background-position: center right;
+ background-repeat: no-repeat;
+ .background-image('images/mail-icon.png');
+ padding-right: 13px;
+}
+div#content a.external[href ^="news:"] {
+ background-position: center right;
+ background-repeat: no-repeat;
+ .background-image('images/news-icon.png');
+ padding-right: 13px;
+}
+div#content a.external[href ^="ftp://"],
+.link-ftp {
+ background-position: center right;
+ background-repeat: no-repeat;
+ .background-image('images/file-icon.png');
+ padding-right: 13px;
+}
+div#content a.external[href ^="irc://"],
+div#content a.external[href ^="ircs://"],
+.link-irc {
+ background-position: center right;
+ background-repeat: no-repeat;
+ .background-image('images/talk-icon.png');
+ padding-right: 13px;
+}
+div#content a.external[href $=".ogg"], div#content a.external[href $=".OGG"],
+div#content a.external[href $=".mid"], div#content a.external[href $=".MID"],
+div#content a.external[href $=".midi"], div#content a.external[href $=".MIDI"],
+div#content a.external[href $=".mp3"], div#content a.external[href $=".MP3"],
+div#content a.external[href $=".wav"], div#content a.external[href $=".WAV"],
+div#content a.external[href $=".wma"], div#content a.external[href $=".WMA"],
+.link-audio {
+ background-position: center right;
+ background-repeat: no-repeat;
+ .background-image('images/audio-icon.png');
+ padding-right: 13px;
+}
+div#content a.external[href $=".ogm"], div#content a.external[href $=".OGM"],
+div#content a.external[href $=".avi"], div#content a.external[href $=".AVI"],
+div#content a.external[href $=".mpeg"], div#content a.external[href $=".MPEG"],
+div#content a.external[href $=".mpg"], div#content a.external[href $=".MPG"],
+.link-video {
+ background-position: center right;
+ background-repeat: no-repeat;
+ .background-image('images/video-icon.png');
+ padding-right: 13px;
+}
+div#content a.external[href $=".pdf"], div#content a.external[href $=".PDF"],
+div#content a.external[href *=".pdf#"], div#content a.external[href *=".PDF#"],
+div#content a.external[href *=".pdf?"], div#content a.external[href *=".PDF?"],
+.link-document {
+ background-position: center right;
+ background-repeat: no-repeat;
+ .background-image('images/document-icon.png');
+ padding-right: 13px;
+}
diff --git a/skins/vector/images/arrow-collapsed-ltr.png b/skins/vector/images/arrow-collapsed-ltr.png
new file mode 100644
index 00000000..063ac6f7
--- /dev/null
+++ b/skins/vector/images/arrow-collapsed-ltr.png
Binary files differ
diff --git a/skins/vector/images/arrow-collapsed-ltr.svg b/skins/vector/images/arrow-collapsed-ltr.svg
new file mode 100644
index 00000000..d0c4729c
--- /dev/null
+++ b/skins/vector/images/arrow-collapsed-ltr.svg
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ version="1.1"
+ width="16"
+ height="16"
+ id="svg2">
+ <defs
+ id="defs4" />
+ <metadata
+ id="metadata7">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title></dc:title>
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ transform="translate(0,-1036.0288)"
+ id="layer1">
+ <path
+ d="M 10.028624,3.7729932 8.1976442,6.9443424 6.3666649,3.7729932 z"
+ transform="matrix(0,-2.7307791,1.576616,0,0.05143855,1066.4148)"
+ id="path2985"
+ style="fill:#797979;fill-opacity:1;stroke:none" />
+ </g>
+</svg>
diff --git a/skins/vector/images/arrow-collapsed-rtl.png b/skins/vector/images/arrow-collapsed-rtl.png
new file mode 100644
index 00000000..c3462182
--- /dev/null
+++ b/skins/vector/images/arrow-collapsed-rtl.png
Binary files differ
diff --git a/skins/vector/images/arrow-collapsed-rtl.svg b/skins/vector/images/arrow-collapsed-rtl.svg
new file mode 100644
index 00000000..8c5e04b9
--- /dev/null
+++ b/skins/vector/images/arrow-collapsed-rtl.svg
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ version="1.1"
+ width="16"
+ height="16"
+ id="svg2">
+ <defs
+ id="defs4" />
+ <metadata
+ id="metadata7">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title></dc:title>
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ transform="translate(0,-1036.0288)"
+ id="layer1">
+ <path
+ d="M 10.028624,3.7729932 8.1976442,6.9443424 6.3666649,3.7729932 z"
+ transform="matrix(0,2.7307791,-1.576616,0,15.948561,1021.6428)"
+ id="path2985"
+ style="fill:#797979;fill-opacity:1;stroke:none" />
+ </g>
+</svg>
diff --git a/skins/vector/images/arrow-down-focus-icon.svg b/skins/vector/images/arrow-down-focus-icon.svg
new file mode 100644
index 00000000..f2edf263
--- /dev/null
+++ b/skins/vector/images/arrow-down-focus-icon.svg
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ version="1.1"
+ width="22"
+ height="16"
+ id="svg2">
+ <defs
+ id="defs4" />
+ <metadata
+ id="metadata7">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title></dc:title>
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ transform="translate(0,-1036.3622)"
+ id="layer1">
+ <path
+ d="M 10.028624,3.7729932 8.1976442,6.9443424 6.3666649,3.7729932 z"
+ transform="matrix(2.7307791,0,0,1.576616,-11.885956,1036.4136)"
+ id="path2985"
+ style="fill:#929292;fill-opacity:1;stroke:none" />
+ </g>
+</svg>
diff --git a/skins/vector/images/arrow-down-icon.svg b/skins/vector/images/arrow-down-icon.svg
new file mode 100644
index 00000000..9218ff28
--- /dev/null
+++ b/skins/vector/images/arrow-down-icon.svg
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ version="1.1"
+ width="22"
+ height="16"
+ id="svg2">
+ <defs
+ id="defs4" />
+ <metadata
+ id="metadata7">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title></dc:title>
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ transform="translate(0,-1036.3622)"
+ id="layer1">
+ <path
+ d="M 10.028624,3.7729932 8.1976442,6.9443424 6.3666649,3.7729932 z"
+ transform="matrix(2.7307791,0,0,1.576616,-11.885956,1036.4136)"
+ id="path2985"
+ style="fill:#797979;fill-opacity:1;stroke:none" />
+ </g>
+</svg>
diff --git a/skins/vector/images/arrow-expanded.png b/skins/vector/images/arrow-expanded.png
new file mode 100644
index 00000000..0221028e
--- /dev/null
+++ b/skins/vector/images/arrow-expanded.png
Binary files differ
diff --git a/skins/vector/images/arrow-expanded.svg b/skins/vector/images/arrow-expanded.svg
new file mode 100644
index 00000000..60704d27
--- /dev/null
+++ b/skins/vector/images/arrow-expanded.svg
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ version="1.1"
+ width="16"
+ height="16"
+ id="svg2">
+ <defs
+ id="defs4" />
+ <metadata
+ id="metadata7">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title></dc:title>
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ transform="translate(0,-1036.3622)"
+ id="layer1">
+ <path
+ d="M 10.028624,3.7729932 8.1976442,6.9443424 6.3666649,3.7729932 z"
+ transform="matrix(2.7307791,0,0,1.576616,-14.385956,1036.4136)"
+ id="path2985"
+ style="fill:#797979;fill-opacity:1;stroke:none" />
+ </g>
+</svg>
diff --git a/skins/vector/images/edit-icon.png b/skins/vector/images/edit-icon.png
index 462ca643..43e46919 100644
--- a/skins/vector/images/edit-icon.png
+++ b/skins/vector/images/edit-icon.png
Binary files differ
diff --git a/skins/vector/images/external-link-ltr-icon.png b/skins/vector/images/external-link-ltr-icon.png
index acf260fc..63083831 100644
--- a/skins/vector/images/external-link-ltr-icon.png
+++ b/skins/vector/images/external-link-ltr-icon.png
Binary files differ
diff --git a/skins/vector/images/external-link-rtl-icon.png b/skins/vector/images/external-link-rtl-icon.png
index 7d5ee375..5313234e 100644
--- a/skins/vector/images/external-link-rtl-icon.png
+++ b/skins/vector/images/external-link-rtl-icon.png
Binary files differ
diff --git a/skins/vector/images/mail-icon.png b/skins/vector/images/mail-icon.png
index 9823d72c..0d93a2f8 100644
--- a/skins/vector/images/mail-icon.png
+++ b/skins/vector/images/mail-icon.png
Binary files differ
diff --git a/skins/vector/images/news-icon.png b/skins/vector/images/news-icon.png
index ade1a376..6f27054b 100644
--- a/skins/vector/images/news-icon.png
+++ b/skins/vector/images/news-icon.png
Binary files differ
diff --git a/skins/vector/images/page-fade.png b/skins/vector/images/page-fade.png
index 1436cda0..b4a60342 100644
--- a/skins/vector/images/page-fade.png
+++ b/skins/vector/images/page-fade.png
Binary files differ
diff --git a/skins/vector/images/portal-break-ltr.png b/skins/vector/images/portal-break-ltr.png
index cec17ea1..20bf3668 100644
--- a/skins/vector/images/portal-break-ltr.png
+++ b/skins/vector/images/portal-break-ltr.png
Binary files differ
diff --git a/skins/vector/images/preferences-break.png b/skins/vector/images/preferences-break.png
index e59f5783..b5293082 100644
--- a/skins/vector/images/preferences-break.png
+++ b/skins/vector/images/preferences-break.png
Binary files differ
diff --git a/skins/vector/images/tab-break.png b/skins/vector/images/tab-break.png
index c03c72e4..6d37af5b 100644
--- a/skins/vector/images/tab-break.png
+++ b/skins/vector/images/tab-break.png
Binary files differ
diff --git a/skins/vector/images/talk-icon.png b/skins/vector/images/talk-icon.png
index c4434351..0332054e 100644
--- a/skins/vector/images/talk-icon.png
+++ b/skins/vector/images/talk-icon.png
Binary files differ
diff --git a/skins/vector/images/user-icon.svg b/skins/vector/images/user-icon.svg
new file mode 100644
index 00000000..767d5107
--- /dev/null
+++ b/skins/vector/images/user-icon.svg
@@ -0,0 +1,424 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink"
+ version="1.1"
+ width="12"
+ height="13.837458"
+ id="svg2108">
+ <metadata
+ id="metadata68">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title></dc:title>
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <defs
+ id="defs3">
+ <linearGradient
+ id="linearGradient4356">
+ <stop
+ id="stop4358"
+ style="stop-color:#000000;stop-opacity:1"
+ offset="0" />
+ <stop
+ id="stop4360"
+ style="stop-color:#000000;stop-opacity:0"
+ offset="1" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient4344">
+ <stop
+ id="stop4346"
+ style="stop-color:#727e0a;stop-opacity:1"
+ offset="0" />
+ <stop
+ id="stop4348"
+ style="stop-color:#5b6508;stop-opacity:1"
+ offset="1" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient4338">
+ <stop
+ id="stop4340"
+ style="stop-color:#e9b15e;stop-opacity:1"
+ offset="0" />
+ <stop
+ id="stop4342"
+ style="stop-color:#966416;stop-opacity:1"
+ offset="1" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient4163">
+ <stop
+ id="stop4165"
+ style="stop-color:#3b74bc;stop-opacity:1"
+ offset="0" />
+ <stop
+ id="stop4167"
+ style="stop-color:#2d5990;stop-opacity:1"
+ offset="1" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient3824">
+ <stop
+ id="stop3826"
+ style="stop-color:#ffffff;stop-opacity:1"
+ offset="0" />
+ <stop
+ id="stop3828"
+ style="stop-color:#c9c9c9;stop-opacity:1"
+ offset="1" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient3816">
+ <stop
+ id="stop3818"
+ style="stop-color:#000000;stop-opacity:1"
+ offset="0" />
+ <stop
+ id="stop3820"
+ style="stop-color:#000000;stop-opacity:0"
+ offset="1" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient3800">
+ <stop
+ id="stop3802"
+ style="stop-color:#f4d9b1;stop-opacity:1"
+ offset="0" />
+ <stop
+ id="stop3804"
+ style="stop-color:#df9725;stop-opacity:1"
+ offset="1" />
+ </linearGradient>
+ <radialGradient
+ cx="29.344931"
+ cy="17.064077"
+ r="9.1620579"
+ fx="29.344931"
+ fy="17.064077"
+ id="radialGradient3806"
+ xlink:href="#linearGradient3800"
+ gradientUnits="userSpaceOnUse" />
+ <radialGradient
+ cx="31.112698"
+ cy="19.008621"
+ r="8.6620579"
+ fx="31.112698"
+ fy="19.008621"
+ id="radialGradient3822"
+ xlink:href="#linearGradient3816"
+ gradientUnits="userSpaceOnUse" />
+ <linearGradient
+ x1="30.935921"
+ y1="29.553486"
+ x2="30.935921"
+ y2="35.803486"
+ id="linearGradient3830"
+ xlink:href="#linearGradient3824"
+ gradientUnits="userSpaceOnUse" />
+ <radialGradient
+ cx="28.089741"
+ cy="27.203083"
+ r="13.56536"
+ fx="28.089741"
+ fy="27.203083"
+ id="radialGradient4169"
+ xlink:href="#linearGradient4163"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1.297564,0,0,0.884831,-8.358505,4.940469)" />
+ <radialGradient
+ cx="29.344931"
+ cy="17.064077"
+ r="9.1620579"
+ fx="29.344931"
+ fy="17.064077"
+ id="radialGradient4171"
+ xlink:href="#linearGradient3800"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0.787998,0,0,0.787998,6.221198,3.617627)" />
+ <linearGradient
+ x1="30.935921"
+ y1="29.553486"
+ x2="30.935921"
+ y2="35.803486"
+ id="linearGradient4175"
+ xlink:href="#linearGradient3824"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="translate(0.707108,0)" />
+ <radialGradient
+ cx="31.112698"
+ cy="19.008621"
+ r="8.6620579"
+ fx="31.112698"
+ fy="19.008621"
+ id="radialGradient4179"
+ xlink:href="#linearGradient3816"
+ gradientUnits="userSpaceOnUse" />
+ <linearGradient
+ x1="30.935921"
+ y1="29.553486"
+ x2="30.935921"
+ y2="35.803486"
+ id="linearGradient4326"
+ xlink:href="#linearGradient3824"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="translate(-12.41789,-7)" />
+ <radialGradient
+ cx="29.344931"
+ cy="17.064077"
+ r="9.1620579"
+ fx="29.344931"
+ fy="17.064077"
+ id="radialGradient4328"
+ xlink:href="#linearGradient4338"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0.787998,0,0,0.787998,6.221198,3.617627)" />
+ <radialGradient
+ cx="31.112698"
+ cy="19.008621"
+ r="8.6620579"
+ fx="31.112698"
+ fy="19.008621"
+ id="radialGradient4330"
+ xlink:href="#linearGradient3816"
+ gradientUnits="userSpaceOnUse" />
+ <linearGradient
+ x1="30.935921"
+ y1="29.553486"
+ x2="30.935921"
+ y2="35.803486"
+ id="linearGradient4332"
+ xlink:href="#linearGradient3824"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="translate(-13.125,-7)" />
+ <radialGradient
+ cx="31.112698"
+ cy="19.008621"
+ r="8.6620579"
+ fx="31.112698"
+ fy="19.008621"
+ id="radialGradient4336"
+ xlink:href="#linearGradient3816"
+ gradientUnits="userSpaceOnUse" />
+ <radialGradient
+ cx="16.214741"
+ cy="19.836468"
+ r="13.56536"
+ fx="16.214741"
+ fy="19.836468"
+ id="radialGradient4350"
+ xlink:href="#linearGradient4344"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1,0,0,0.681917,0,8.233773)" />
+ <linearGradient
+ x1="20.661695"
+ y1="35.817974"
+ x2="22.626925"
+ y2="36.217758"
+ id="linearGradient4362"
+ xlink:href="#linearGradient4356"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0.983375,0.181588,-0.181588,0.983375,6.231716,-2.651466)" />
+ <linearGradient
+ x1="22.686766"
+ y1="36.3904"
+ x2="21.408455"
+ y2="35.739632"
+ id="linearGradient4366"
+ xlink:href="#linearGradient4356"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(-0.977685,0.210075,0.210075,0.977685,55.1096,-3.945209)" />
+ <linearGradient
+ x1="20.661695"
+ y1="35.817974"
+ x2="22.626925"
+ y2="36.217758"
+ id="linearGradient4372"
+ xlink:href="#linearGradient4356"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0.983375,0.181588,-0.181588,0.983375,-7.07212,-9.82492)" />
+ <linearGradient
+ x1="22.686766"
+ y1="36.3904"
+ x2="21.408455"
+ y2="35.739632"
+ id="linearGradient4374"
+ xlink:href="#linearGradient4356"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(-0.977685,0.210075,0.210075,0.977685,41.80576,-11.11866)" />
+ <linearGradient
+ x1="22.686766"
+ y1="36.3904"
+ x2="21.408455"
+ y2="35.739632"
+ id="linearGradient1366"
+ xlink:href="#linearGradient4356"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(-0.977685,0.210075,0.210075,0.977685,41.80576,-11.11866)" />
+ <linearGradient
+ x1="20.661695"
+ y1="35.817974"
+ x2="22.626925"
+ y2="36.217758"
+ id="linearGradient1369"
+ xlink:href="#linearGradient4356"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0.983375,0.181588,-0.181588,0.983375,-7.07212,-9.82492)" />
+ <linearGradient
+ x1="30.935921"
+ y1="29.553486"
+ x2="30.935921"
+ y2="35.803486"
+ id="linearGradient1372"
+ xlink:href="#linearGradient3824"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="translate(-12.41789,-7)" />
+ <radialGradient
+ cx="16.214741"
+ cy="19.836468"
+ r="13.56536"
+ fx="16.214741"
+ fy="19.836468"
+ id="radialGradient1381"
+ xlink:href="#linearGradient4344"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1,0,0,0.681917,0,8.233773)" />
+ <radialGradient
+ cx="31.112698"
+ cy="19.008621"
+ r="8.6620579"
+ fx="31.112698"
+ fy="19.008621"
+ id="radialGradient2243"
+ xlink:href="#linearGradient3816"
+ gradientUnits="userSpaceOnUse" />
+ <radialGradient
+ cx="28.089741"
+ cy="27.203083"
+ r="13.56536"
+ fx="28.089741"
+ fy="27.203083"
+ id="radialGradient2245"
+ xlink:href="#linearGradient4163"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1.297564,0,0,0.884831,-8.358505,4.940469)" />
+ <linearGradient
+ x1="30.935921"
+ y1="29.553486"
+ x2="30.935921"
+ y2="35.803486"
+ id="linearGradient2247"
+ xlink:href="#linearGradient3824"
+ gradientUnits="userSpaceOnUse" />
+ <radialGradient
+ cx="31.112698"
+ cy="19.008621"
+ r="8.6620579"
+ fx="31.112698"
+ fy="19.008621"
+ id="radialGradient2249"
+ xlink:href="#linearGradient3816"
+ gradientUnits="userSpaceOnUse" />
+ <radialGradient
+ cx="29.344931"
+ cy="17.064077"
+ r="9.1620579"
+ fx="29.344931"
+ fy="17.064077"
+ id="radialGradient2251"
+ xlink:href="#linearGradient3800"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0.787998,0,0,0.787998,6.221198,3.617627)" />
+ <linearGradient
+ x1="20.661695"
+ y1="35.817974"
+ x2="22.626925"
+ y2="36.217758"
+ id="linearGradient2253"
+ xlink:href="#linearGradient4356"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0.983375,0.181588,-0.181588,0.983375,6.231716,-2.651466)" />
+ <linearGradient
+ x1="22.686766"
+ y1="36.3904"
+ x2="21.408455"
+ y2="35.739632"
+ id="linearGradient2255"
+ xlink:href="#linearGradient4356"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(-0.977685,0.210075,0.210075,0.977685,55.1096,-3.945209)" />
+ </defs>
+ <g
+ transform="translate(-5.0000039,-32.070112)"
+ id="layer1"
+ style="display:inline" />
+ <g
+ transform="translate(-5.0000039,-32.070112)"
+ id="layer2"
+ style="display:inline">
+ <g
+ transform="matrix(0.39012793,0,0,0.39012793,-1.0891578,28.22979)"
+ id="g2230">
+ <path
+ d="m 39.774755,19.008621 a 8.6620579,8.6620579 0 1 1 -17.324115,0 8.6620579,8.6620579 0 1 1 17.324115,0 z"
+ transform="matrix(1.77551,0,0,0.959183,-24.25322,18.77153)"
+ id="path4306"
+ style="color:#000000;fill:url(#radialGradient2243);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;marker:none;visibility:visible;display:inline;overflow:visible" />
+ <path
+ d="m 25.986174,41.636039 10.606602,0 c 3.005204,0 5.980484,-1.101932 7.071067,-4.242641 1.035639,-2.982476 0.176777,-8.662058 -6.540737,-13.258252 l -12.551146,0 c -6.717514,4.24264 -7.556991,10.044831 -6.010407,13.435028 1.575595,3.45379 4.24264,4.065865 7.424621,4.065865 z"
+ id="path4308"
+ style="color:#000000;fill:url(#radialGradient2245);fill-opacity:1;fill-rule:evenodd;stroke:#204a87;stroke-width:1px;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible" />
+ <path
+ d="m 26.693281,25.726136 c 3.18198,2.828427 4.596194,13.081476 4.596194,13.081476 0,0 1.414213,-10.253048 3.889087,-13.258252 l -8.485281,0.176776 z"
+ id="path4310"
+ style="color:#000000;fill:url(#linearGradient2247);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;marker:none;visibility:visible;display:inline;overflow:visible" />
+ <path
+ d="m 28.972721,26.786797 c 0,0 -2.151323,1.660335 -1.965991,3.660533 -2.041226,-1.800794 -2.099873,-5.251524 -2.099873,-5.251524 l 4.065864,1.590991 z"
+ id="path4312"
+ style="color:#000000;fill:#729fcf;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;marker:none;visibility:visible;display:inline;overflow:visible" />
+ <path
+ d="m 25.914862,40.593933 10.493447,-0.0221 c 2.639723,0 5.253161,-0.967919 6.211112,-3.726667 0.909689,-2.61976 -0.09472,-7.608614 -5.995279,-11.645837 L 25.099417,24.956264 c -5.900557,3.726667 -7.04262,8.823219 -5.662029,12.044182 1.380592,3.220963 3.395211,3.57139 6.477474,3.593487 z"
+ id="path4314"
+ style="opacity:0.21518986;color:#000000;fill:none;stroke:#ffffff;stroke-width:0.99999976px;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible" />
+ <path
+ d="m 33.410795,26.786797 c 0,0 2.151323,1.660335 1.965991,3.660533 2.041226,-1.800794 2.099873,-5.251524 2.099873,-5.251524 l -4.065864,1.590991 z"
+ id="path4316"
+ style="color:#000000;fill:#729fcf;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;marker:none;visibility:visible;display:inline;overflow:visible" />
+ <path
+ d="m 39.774755,19.008621 a 8.6620579,8.6620579 0 1 1 -17.324115,0 8.6620579,8.6620579 0 1 1 17.324115,0 z"
+ transform="translate(-0.125,3.5)"
+ id="path4318"
+ style="color:#000000;fill:url(#radialGradient2249);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;marker:none;visibility:visible;display:inline;overflow:visible" />
+ <path
+ d="m 39.774755,19.008621 a 8.6620579,8.6620579 0 1 1 -17.324115,0 8.6620579,8.6620579 0 1 1 17.324115,0 z"
+ id="path4320"
+ style="color:#000000;fill:url(#radialGradient2251);fill-opacity:1;fill-rule:evenodd;stroke:#c17d11;stroke-width:1px;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible" />
+ <path
+ d="m 39.774755,19.008621 a 8.6620579,8.6620579 0 1 1 -17.324115,0 8.6620579,8.6620579 0 1 1 17.324115,0 z"
+ transform="matrix(0.877095,0,0,0.877095,3.823927,2.336267)"
+ id="path4322"
+ style="opacity:0.19620254;color:#000000;fill:none;stroke:#ffffff;stroke-width:1.14012825px;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible" />
+ <path
+ d="m 21.85179,40.775197 c -1.247607,-0.544969 -1.805994,-1.858277 -1.805994,-1.858277 0.841281,-4.069136 3.719925,-7.046216 3.719925,-7.046216 0,0 -2.279321,6.411514 -1.913931,8.904493 z"
+ id="path4354"
+ style="opacity:0.22784807;color:#000000;fill:url(#linearGradient2253);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;marker:none;visibility:visible;display:inline;overflow:visible" />
+ <path
+ d="m 40.757497,39.916846 c 1.231251,-0.580978 1.80438,-2.002321 1.80438,-2.002321 -0.95912,-4.042983 -3.976149,-6.842821 -3.976149,-6.842821 0,0 2.464593,6.342602 2.171769,8.845142 z"
+ id="path4364"
+ style="opacity:0.22784807;color:#000000;fill:url(#linearGradient2255);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;marker:none;visibility:visible;display:inline;overflow:visible" />
+ </g>
+ </g>
+</svg>
diff --git a/skins/vector/images/video-icon.png b/skins/vector/images/video-icon.png
index e934a0ff..ed852322 100644
--- a/skins/vector/images/video-icon.png
+++ b/skins/vector/images/video-icon.png
Binary files differ
diff --git a/skins/vector/screen-hd.css b/skins/vector/screen-hd.less
index b90fd63b..5a1fc055 100644
--- a/skins/vector/screen-hd.css
+++ b/skins/vector/screen-hd.less
@@ -5,7 +5,7 @@ div#content {
padding: 1.25em 1.5em 1.5em 1.5em;
}
#p-logo {
- left: 0.5em;
+ left: @menu-main-logo-left;
}
div#footer {
margin-left: 11em;
@@ -18,7 +18,7 @@ div#footer {
margin-right: 1em;
}
#left-navigation {
- left: 11em;
+ margin-left: 11em;
}
#p-personal {
right: 1em;
diff --git a/skins/vector/screen.css b/skins/vector/screen.less
index 2e09ee17..bb4be725 100644
--- a/skins/vector/screen.css
+++ b/skins/vector/screen.less
@@ -1,39 +1,43 @@
/*
* Any rules which should not be flipped automatically in right-to-left situations should be
- * prepended with @noflip in a comment block. Images that should be embedded as base64 data-URLs
- * should be prepended with @embed in a comment block.
+ * prepended with @noflip in a comment block.
*
- * This style-sheet employs a few CSS trick to accomplish compatibility with a wide range of web
+ * This stylesheet employs a few CSS trick to accomplish compatibility with a wide range of web
* browsers. The most common trick is to use some styles in IE6 only. This is accomplished by using
* a rule that makes things work in IE6, and then following it with a rule that begins with
* "html > body" or use a child selector ">", which is ignored by IE6 because it does not support
* the child selector. You can spot this by looking for the "OVERRIDDEN BY COMPLIANT BROWSERS" and
* "IGNORED BY IE6" comments.
*/
+@import "mediawiki.mixins";
/* Framework */
+html {
+ font-size: @html-font-size;
+}
html,
body {
height: 100%;
margin: 0;
padding: 0;
- font-family: sans-serif;
- font-size: 1em;
+ font-family: @content-font-family;
}
body {
background-color: #f6f6f6;
+ font-size: @body-font-size;
}
/* Content */
div#content {
+ line-height: @content-line-height;
margin-left: 10em;
- padding: 1em;
+ padding: @content-padding;
/* Border on top, left, and bottom side */
border: 1px solid #a7d7f9;
border-right-width: 0;
/* Merge the border with tabs' one (in their background image) */
margin-top: -1px;
background-color: white;
- color: black;
+ color: @content-font-color;
direction: ltr;
}
/* Hide, but keep accessible for screen-readers */
@@ -45,8 +49,7 @@ div#content {
#mw-page-base {
height: 5em;
background-color: white;
- /* @embed */
- background-image: url(images/page-fade.png);
+ .background-image('images/page-fade.png');
background-position: bottom left;
background-repeat: repeat-x;
}
@@ -61,8 +64,7 @@ div#mw-head {
right: 0;
width: 100%;
}
-div#mw-head h3,
-div#mw-head h5 {
+div#mw-head h3 {
margin: 0;
padding: 0;
}
@@ -75,11 +77,10 @@ div.emptyPortlet {
position: absolute;
top: 0.33em;
right: 0.75em;
- /* Display on top of page tabs - bug 37158 */
- z-index: 1;
+ /* Display on top of page tabs - bugs 37158, 48078 */
+ z-index: 100;
}
-#p-personal h3,
-#p-personal h5 {
+#p-personal h3 {
display: none;
}
#p-personal ul {
@@ -88,23 +89,28 @@ div.emptyPortlet {
margin: 0;
padding-left: 10em; /* Keep from overlapping logo */
}
-/* @noflip */
#p-personal li {
line-height: 1.125em;
+ /* @noflip */
float: left;
-}
-/* This one flips! */
-#p-personal li {
margin-left: 0.75em;
margin-top: 0.5em;
- font-size: 0.75em;
+ font-size: @menu-personal-font-size;
white-space: nowrap;
}
/* Navigation Containers */
#left-navigation {
- position: absolute;
- left: 10em;
- top: 2.5em;
+ float: left;
+ margin-left: 10em;
+ margin-top: 2.5em;
+ /* When right nav would overlap left nav, it's placed below it
+ (normal CSS floats behavior). This rule ensures that no empty space
+ is shown between them due to right nav's margin-top. Page layout
+ is still broken, but at least the nav overlaps only the page title
+ instead of half the content. */
+ margin-bottom: -2.5em;
+ /* IE 6 double-margin bug fix */
+ display: inline;
}
#right-navigation {
float: right;
@@ -112,49 +118,41 @@ div.emptyPortlet {
}
/* Navigation Labels */
div.vectorTabs h3,
-div.vectorTabs h5,
-div.vectorMenu h3 span,
-div.vectorMenu h5 span {
+div.vectorMenu h3 span {
display: none;
}
/* Namespaces and Views */
-/* @noflip */
div.vectorTabs {
+ /* @noflip */
float: left;
height: 2.5em;
}
div.vectorTabs {
- /* @embed */
- background-image: url(images/tab-break.png);
+ .background-image('images/tab-break.png');
background-position: bottom left;
background-repeat: no-repeat;
padding-left: 1px;
}
-/* @noflip */
div.vectorTabs ul {
+ /* @noflip */
float: left;
-}
-div.vectorTabs ul {
height: 100%;
list-style-type: none;
list-style-image: none;
margin: 0;
padding: 0;
}
-/* @noflip */
-div.vectorTabs ul li {
- float: left;
-}
/* OVERRIDDEN BY COMPLIANT BROWSERS */
div.vectorTabs ul li {
+ /* @noflip */
+ float: left;
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-image('images/tab-normal-fade.png');
background-position: bottom left;
background-repeat: repeat-x;
white-space: nowrap;
@@ -164,8 +162,7 @@ div.vectorTabs ul > li {
display: block;
}
div.vectorTabs li.selected {
- /* @embed */
- background-image: url(images/tab-current-fade.png);
+ .background-image('images/tab-current-fade.png');
}
/* OVERRIDDEN BY COMPLIANT BROWSERS */
div.vectorTabs li a {
@@ -173,7 +170,7 @@ div.vectorTabs li a {
height: 1.9em;
padding-left: 0.5em;
padding-right: 0.5em;
- color: #0645ad;
+ color: @menu-link-color;
cursor: pointer;
font-size: 0.8em;
}
@@ -191,15 +188,14 @@ div.vectorTabs span a {
padding-top: 1.25em;
}
/* IGNORED BY IE6 */
-/* @noflip */
div.vectorTabs span > a {
+ /* @noflip */
float: left;
display: block;
}
div.vectorTabs span {
display: inline-block;
- /* @embed */
- background-image: url(images/tab-break.png);
+ .background-image('images/tab-break.png');
background-position: bottom right;
background-repeat: no-repeat;
}
@@ -213,43 +209,40 @@ div.vectorTabs li.new a:visited{
color: #a55858;
}
/* Variants and Actions */
-/* @noflip */
div.vectorMenu {
+ /* @noflip */
direction: ltr;
+ /* @noflip */
float: left;
- /* @embed */
- background-image: url(images/arrow-down-icon.png);
+ /* SVG support using a transparent gradient to guarantee cross-browser
+ * compatibility (browsers able to understand gradient syntax support also SVG) */
+ .background-image-svg('images/arrow-down-icon.svg', 'images/arrow-down-icon.png');
+ /* @noflip */
background-position: 100% 60%;
background-repeat: no-repeat;
cursor: pointer;
}
div.vectorMenuFocus {
- /* @embed */
- background-image: url(images/arrow-down-focus-icon.png);
+ /* SVG support using a transparent gradient to guarantee cross-browser
+ * compatibility (browsers able to understand gradient syntax support also SVG) */
+ .background-image-svg('images/arrow-down-focus-icon.svg', 'images/arrow-down-focus-icon.png');
background-position: 100% 60%;
}
-/* @noflip */
body.rtl div.vectorMenu {
+ /* @noflip */
direction: rtl;
}
/* OVERRIDDEN BY COMPLIANT BROWSERS */
-/* @noflip */
-div#mw-head div.vectorMenu h3,
-div#mw-head div.vectorMenu h5 {
+div#mw-head div.vectorMenu h3 {
+ /* @noflip */
float: left;
- /* @embed */
- background-image: url(images/tab-break.png);
+ .background-image('images/tab-break.png');
background-repeat: no-repeat;
-}
-/* This will be flipped - unlike the one above it */
-div#mw-head div.vectorMenu h3,
-div#mw-head div.vectorMenu h5 {
background-position: bottom left;
margin-left: -1px;
}
/* IGNORED BY IE6 */
-div#mw-head div.vectorMenu > h3,
-div#mw-head div.vectorMenu > h5 {
+div#mw-head div.vectorMenu > h3 {
background-image: none;
}
div#mw-head div.vectorMenu h4,
@@ -263,25 +256,17 @@ div.vectorMenu#p-variants #mw-vector-current-variant {
border: none;
}
/* OVERRIDDEN BY COMPLIANT BROWSERS */
-/* @noflip */
-div.vectorMenu h3 a,
-div.vectorMenu h5 a {
+div.vectorMenu h3 a {
display: inline-block;
width: 24px;
height: 1.9em;
text-decoration: none;
- /* @embed */
- background-image: url(images/tab-break.png);
+ .background-image('images/tab-break.png');
background-repeat: no-repeat;
-}
-/* This will be flipped - unlike the one above it */
-div.vectorMenu h3 a,
-div.vectorMenu h5 a {
background-position: bottom right;
}
/* IGNORED BY IE6 */
-div.vectorMenu h3 > a,
-div.vectorMenu h5 > a {
+div.vectorMenu h3 > a {
display: block;
}
div.vectorMenu div.menu {
@@ -291,20 +276,20 @@ div.vectorMenu div.menu {
text-align: left;
}
/* OVERRIDDEN BY COMPLIANT BROWSERS */
-/* @noflip */
body.rtl div.vectorMenu div.menu {
+ /* @noflip */
margin-left: 24px;
}
/* IGNORED BY IE6 */
-/* @noflip */
body.rtl div.vectorMenu > div.menu {
+ /* @noflip */
margin-left: auto;
}
/* IGNORED BY IE6 */
/* Also fixes old versions of FireFox */
-/* @noflip */
body.rtl div.vectorMenu > div.menu,
x:-moz-any-link {
+ /* @noflip */
margin-left: 23px;
}
/* Enable forcing showing of the menu for accessibility */
@@ -346,7 +331,7 @@ div.vectorMenu li a {
display: inline-block;
padding: 0.5em;
white-space: nowrap;
- color: #0645ad;
+ color: @menu-link-color;
cursor: pointer;
font-size: 0.8em;
}
@@ -360,12 +345,11 @@ div.vectorMenu li.selected a:visited {
text-decoration: none;
}
/* Search */
-#p-search h3,
-#p-search h5 {
+#p-search h3 {
display: none;
}
-/* @noflip */
#p-search {
+ /* @noflip */
float: left;
}
#p-search {
@@ -387,26 +371,15 @@ div#simpleSearch {
border: solid 1px #aaa;
color: black;
background-color: white;
- /* @embed */
- background-image: url(images/search-fade.png);
+ .background-image('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:focus {
+ outline: none;
}
div#simpleSearch input {
color: black;
- direction: ltr;
-}
-div#simpleSearch input:focus {
- outline: none;
}
div#simpleSearch input.placeholder {
color: #999;
@@ -468,6 +441,7 @@ div#simpleSearch button#searchButton > img {
}
/* Panel */
div#mw-panel {
+ font-size: @menu-main-font-size;
position: absolute;
top: 160px;
padding-top: 1em;
@@ -478,30 +452,26 @@ div#mw-panel div.portal {
padding-bottom: 1.5em;
direction: ltr;
}
-div#mw-panel div.portal h3,
-div#mw-panel div.portal h5 {
+div#mw-panel div.portal h3 {
font-weight: normal;
color: #444;
- padding: 0.25em;
- padding-top: 0;
- padding-left: 1.75em;
+ padding: @menu-main-heading-padding;
cursor: default;
border: none;
- font-size: 0.75em;
+ font-size: @menu-main-heading-font-size;
}
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);
+ margin: @menu-main-body-margin;
+
+ .background-image('images/portal-break.png');
background-repeat: no-repeat;
background-position: top left;
}
div#mw-panel div.portal div.body ul {
list-style-type: none;
list-style-image: none;
- padding: 0;
+ padding: @menu-main-body-padding;
margin: 0;
}
div#mw-panel div.portal div.body ul li {
@@ -509,15 +479,16 @@ div#mw-panel div.portal div.body ul li {
padding: 0;
padding-bottom: 0.5em;
margin: 0;
- font-size: 0.75em;
+ font-size: @menu-main-body-font-size;
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;
+ color: @menu-main-body-link-color;
+ &:visited {
+ color: @menu-main-body-link-visited-color;
+ }
}
+
/* Footer */
div#footer {
margin-left: 10em;
@@ -542,8 +513,9 @@ div#footer ul li {
div#footer #footer-icons {
float: right;
}
-/* @noflip */
+
body.ltr div#footer #footer-places {
+ /* @noflip */
float: left;
}
div#footer #footer-info li {
@@ -592,8 +564,7 @@ div#footer #footer-places li {
clear: both;
margin: 0 !important;
padding: 0 !important;
- /* @embed */
- background-image: url(images/preferences-break.png);
+ .background-image('images/preferences-break.png');
background-position: bottom left;
background-repeat: no-repeat;
}
@@ -607,8 +578,7 @@ div#footer #footer-places li {
white-space: nowrap;
list-style-type: none;
list-style-image: none;
- /* @embed */
- background-image: url(images/preferences-break.png);
+ .background-image('images/preferences-break.png');
background-position: bottom right;
background-repeat: no-repeat;
}
@@ -620,7 +590,7 @@ div#footer #footer-places li {
#preftoc a:active {
display: inline-block;
position: relative;
- color: #0645ad;
+ color: @menu-link-color;
padding: 0.5em;
text-decoration: none;
background-image: none;
@@ -631,8 +601,7 @@ div#footer #footer-places li {
text-decoration: underline;
}
#preftoc li.selected a {
- /* @embed */
- background-image: url(images/preferences-fade.png);
+ .background-image('images/preferences-fade.png');
background-position: bottom;
background-repeat: repeat-x;
color: #333;
@@ -678,24 +647,9 @@ div#footer #footer-places li {
margin-right: 0.25em;
}
-/**
- * The following code is slightly modified from monobook
- */
-div#content {
- line-height: 1.5em;
-}
-#bodyContent {
- font-size: 0.8em;
-}
-
-.editsection {
- float: right;
-}
-
ul {
list-style-type: disc;
- /* @embed */
- list-style-image: url(images/bullet-icon.png);
+ .list-style-image('images/bullet-icon.png');
}
pre, .mw-code {
@@ -709,82 +663,19 @@ pre, .mw-code {
#firstHeading {
padding-top: 0;
margin-top: 0;
- padding-top: 0;
- font-size: 1.6em;
-}
-div#content a.external,
-div#content a.external[href ^="gopher://"] {
- /* @embed */
- background: url(images/external-link-ltr-icon.png) center right no-repeat;
- padding-right: 13px;
-}
-div#content a.external[href ^="https://"],
-.link-https {
- /* @embed */
- background: url(images/lock-icon.png) center right no-repeat;
- padding-right: 13px;
-}
-div#content a.external[href ^="mailto:"],
-.link-mailto {
- /* @embed */
- background: url(images/mail-icon.png) center right no-repeat;
- padding-right: 13px;
-}
-div#content a.external[href ^="news:"] {
- /* @embed */
- background: url(images/news-icon.png) center right no-repeat;
- padding-right: 13px;
-}
-div#content a.external[href ^="ftp://"],
-.link-ftp {
- /* @embed */
- background: url(images/file-icon.png) center right no-repeat;
- padding-right: 13px;
-}
-div#content a.external[href ^="irc://"],
-div#content a.external[href ^="ircs://"],
-.link-irc {
- /* @embed */
- background: url(images/talk-icon.png) center right no-repeat;
- padding-right: 13px;
-}
-div#content a.external[href $=".ogg"], div#content a.external[href $=".OGG"],
-div#content a.external[href $=".mid"], div#content a.external[href $=".MID"],
-div#content a.external[href $=".midi"], div#content a.external[href $=".MIDI"],
-div#content a.external[href $=".mp3"], div#content a.external[href $=".MP3"],
-div#content a.external[href $=".wav"], div#content a.external[href $=".WAV"],
-div#content a.external[href $=".wma"], div#content a.external[href $=".WMA"],
-.link-audio {
- /* @embed */
- background: url(images/audio-icon.png) center right no-repeat;
- padding-right: 13px;
-}
-div#content a.external[href $=".ogm"], div#content a.external[href $=".OGM"],
-div#content a.external[href $=".avi"], div#content a.external[href $=".AVI"],
-div#content a.external[href $=".mpeg"], div#content a.external[href $=".MPEG"],
-div#content a.external[href $=".mpg"], div#content a.external[href $=".MPG"],
-.link-video {
- /* @embed */
- background: url(images/video-icon.png) center right no-repeat;
- padding-right: 13px;
-}
-div#content a.external[href $=".pdf"], div#content a.external[href $=".PDF"],
-div#content a.external[href *=".pdf#"], div#content a.external[href *=".PDF#"],
-div#content a.external[href *=".pdf?"], div#content a.external[href *=".PDF?"],
-.link-document {
- /* @embed */
- background: url(images/document-icon.png) center right no-repeat;
- padding-right: 13px;
+ font-size: @content-heading-font-size;
}
/* Icon for Usernames */
#pt-userpage,
#pt-anonuserpage,
#pt-login {
- /* @embed */
- background: url(images/user-icon.png) left top no-repeat;
+ background-position: left top;
+ background-repeat: no-repeat;
+ /* SVG support using a transparent gradient to guarantee cross-browser
+ * compatibility (browsers able to understand gradient syntax support also SVG) */
+ .background-image-svg('images/user-icon.svg', 'images/user-icon.png');
padding-left: 15px !important;
- text-transform: none;
}
.redirectText {
@@ -798,16 +689,17 @@ div#content a.external[href *=".pdf?"], div#content a.external[href *=".PDF?"],
#bodyContent {
position: relative;
width: 100%;
-}
-div#bodyContent {
line-height: 1.5em;
+ font-size: @content-font-size;
}
/* mediawiki.notification */
-.skin-vector #mw-notification-area {
- top: 7em;
+.skin-vector .mw-notification-area {
font-size: 0.8em;
}
+.skin-vector .mw-notification-area-layout {
+ top: 7em;
+}
.skin-vector .mw-notification {
background-color: #fff;
background-color: rgba(255, 255, 255, 0.93);
@@ -815,7 +707,6 @@ div#bodyContent {
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);
}
@@ -834,8 +725,7 @@ div#bodyContent {
margin-top: -0.8em !ie;
height: 0;
overflow: hidden;
- /* @embed */
- background-image: url(images/watch-icons.png);
+ .background-image('images/watch-icons.png');
}
#ca-unwatch.icon a {
background-position: -43px 60%;
@@ -853,8 +743,7 @@ div#bodyContent {
}
#ca-unwatch.icon a.loading,
#ca-watch.icon a.loading {
- /* @embed */
- background-image: url(images/watch-icon-loading.gif);
+ .background-image('images/watch-icon-loading.gif');
background-position: 5px 60%;
}
#ca-unwatch.icon a span,
@@ -862,8 +751,7 @@ div#bodyContent {
display: none;
}
div.vectorTabs ul {
- /* @embed */
- background-image: url(images/tab-break.png);
+ .background-image('images/tab-break.png');
background-position: right bottom;
background-repeat: no-repeat;
}
@@ -874,42 +762,30 @@ div.vectorTabs ul {
}
/* Animate between standard and high definition layouts */
+body.vector-animateLayout {
+ div#content,
+ div#footer,
+ #left-navigation {
+ .transition(margin-left 250ms, padding 250ms;);
+ }
+
+ #p-logo {
+ .transition(left 250ms);
+ }
+
+ #mw-panel {
+ .transition(padding-right 250ms);
+ }
+
+ #p-search {
+ .transition(margin-right 250ms);
+ }
+
+ #p-personal {
+ .transition(right 250ms);
+ }
-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;
+ #mw-head-base {
+ .transition(margin-left 250ms);
+ }
}
diff --git a/skins/vector/styles-beta.less b/skins/vector/styles-beta.less
new file mode 100644
index 00000000..a76b6394
--- /dev/null
+++ b/skins/vector/styles-beta.less
@@ -0,0 +1,13 @@
+@import "variables.less";
+@import "beta/variables.less";
+
+@media screen {
+ @import "screen.less";
+ @import "beta/screen.less";
+ @import "externalLinks.less";
+ @import "collapsibleNav.less";
+}
+
+@media screen and (min-width: 982px) {
+ @import "screen-hd.less";
+}
diff --git a/skins/vector/styles.less b/skins/vector/styles.less
new file mode 100644
index 00000000..bd458510
--- /dev/null
+++ b/skins/vector/styles.less
@@ -0,0 +1,11 @@
+@import "variables.less";
+
+@media screen {
+ @import "screen.less";
+ @import "externalLinks.less";
+ @import "collapsibleNav.less";
+}
+
+@media screen and (min-width: 982px) {
+ @import "screen-hd.less";
+}
diff --git a/skins/vector/variables.less b/skins/vector/variables.less
new file mode 100644
index 00000000..691e0fd5
--- /dev/null
+++ b/skins/vector/variables.less
@@ -0,0 +1,37 @@
+@html-font-size: 1em;
+
+@body-font-size: 1em;
+
+// Page content
+@content-font-family: sans-serif;
+@content-font-color: black;
+@content-font-size: 0.8em;
+@content-line-height: 1.5em;
+@content-padding: 1.5em 1.5em 1.5em 1.75em;
+@content-heading-font-size: 1.6em;
+@content-heading-font-family: sans-serif;
+
+// Common menu
+@menu-link-color: #0645ad;
+
+// Main menu
+@menu-main-font-size: inherit;
+@menu-main-heading-font-size: 0.75em;
+@menu-main-heading-padding: 0 1.75em 0.25em 0.25em;
+
+@menu-main-body-font-size: 0.75em;
+@menu-main-body-link-color: #0645ad;
+@menu-main-body-link-visited-color: #0b0080;
+@menu-main-body-margin: 0 0 0 1.25em;
+@menu-main-body-padding: 0;
+@menu-main-logo-left: 0.5em;
+
+// Personal menu
+@menu-personal-font-size: 0.75em;
+
+// Collapsible nav
+@collapsible-nav-heading-color: #4D4D4D;
+@collapsible-nav-heading-collapsed-color: #0645AD;
+
+@collapsible-nav-heading-padding: 4px 0 3px 1.5em;
+@collapsible-nav-body-margin: 0 0 0 1.25em;
diff --git a/skins/vector/vector.js b/skins/vector/vector.js
index 4427d9a3..aa64624a 100644
--- a/skins/vector/vector.js
+++ b/skins/vector/vector.js
@@ -4,18 +4,52 @@
jQuery( function ( $ ) {
$( 'div.vectorMenu' ).each( function () {
var $el = $( this );
- $el.find( 'h3:first a:first' )
- // For accessibility, show the menu when the hidden link in the menu is clicked (bug 24298)
- .click( function ( e ) {
- $el.find( '.menu:first' ).toggleClass( 'menuForceShow' );
- e.preventDefault();
+ $el.find( '> h3 > a' ).parent()
+ .attr( 'tabindex', '0' )
+ // For accessibility, show the menu when the h3 is clicked (bug 24298/46486)
+ .on( 'click keypress', function ( e ) {
+ if( e.type === 'click' || e.which === 13 ) {
+ $el.find( '.menu:first' ).toggleClass( 'menuForceShow' );
+ e.preventDefault();
+ }
} )
- // When the hidden link has focus, also set a class that will change the arrow icon
+ // When the heading has focus, also set a class that will change the arrow icon
.focus( function () {
- $el.addClass( 'vectorMenuFocus' );
+ $el.find( '> a' ).addClass( 'vectorMenuFocus' );
} )
.blur( function () {
- $el.removeClass( 'vectorMenuFocus' );
- } );
+ $el.find( '> a' ).removeClass( 'vectorMenuFocus' );
+ } )
+ .find( '> a:first' )
+ // As the h3 can already be focused there's no need for the link to be focusable
+ .attr( 'tabindex', '-1' );
} );
+
+ /**
+ * Collapsible tabs for Vector
+ */
+ var $cactions = $( '#p-cactions' );
+
+ // Bind callback functions to animate our drop down menu in and out
+ // and then call the collapsibleTabs function on the menu
+ $( '#p-views ul' )
+ .bind( 'beforeTabCollapse', function () {
+ // If the dropdown was hidden, show it
+ if ( $cactions.hasClass( 'emptyPortlet' ) ) {
+ $cactions
+ .removeClass( 'emptyPortlet' )
+ .find( 'h3' )
+ .css( 'width', '1px' ).animate( { 'width': '24px' }, 390 );
+ }
+ } )
+ .bind( 'beforeTabExpand', function () {
+ // If we're removing the last child node right now, hide the dropdown
+ if ( $cactions.find( 'li' ).length === 1 ) {
+ $cactions.find( 'h3' ).animate( { 'width': '1px' }, 390, function () {
+ $( this ).attr( 'style', '' )
+ .parent().addClass( 'emptyPortlet' );
+ });
+ }
+ } )
+ .collapsibleTabs();
} );