From 222b01f5169f1c7e69762e0e8904c24f78f71882 Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Wed, 28 Jul 2010 11:52:48 +0200 Subject: update to MediaWiki 1.16.0 --- skins/ArchLinux.php | 199 +- skins/Chick.php | 16 +- skins/CologneBlue.php | 274 +- skins/Modern.php | 107 +- skins/MonoBook.php | 154 +- skins/MySkin.php | 14 +- skins/Nostalgia.php | 29 +- skins/Simple.php | 31 +- skins/Skin.sample | 19 - skins/Standard.php | 182 +- skins/Vector.deps.php | 11 + skins/Vector.php | 767 ++++ skins/archlinux/IEMacFixes.css | 44 - skins/archlinux/discussionitem_icon.gif | Bin 949 -> 549 bytes skins/archlinux/file_icon.gif | Bin 921 -> 323 bytes skins/archlinux/link_icon.gif | Bin 942 -> 342 bytes skins/archlinux/lock_icon.gif | Bin 918 -> 918 bytes skins/archlinux/magnify-clip.png | Bin 237 -> 170 bytes skins/archlinux/mail_icon.gif | Bin 918 -> 321 bytes skins/archlinux/main.css | 318 +- skins/archlinux/rtl.css | 18 +- skins/archlinux/user.gif | Bin 923 -> 325 bytes skins/archlinux/video.png | Bin 215 -> 169 bytes skins/archlinux/wiki.png | Bin 23064 -> 22987 bytes skins/chick/main.css | 390 +- skins/common/IE80Fixes.css | 15 + skins/common/IEFixes.js | 205 +- skins/common/Makefile | 2 + skins/common/ajaxwatch.js | 53 +- skins/common/allmessages.js | 83 - skins/common/block.js | 37 +- skins/common/commonPrint.css | 36 +- skins/common/common_rtl.css | 7 +- skins/common/edit.js | 209 +- skins/common/history.js | 11 +- skins/common/htmlform.js | 40 + skins/common/images/Arr_.png | Bin 918 -> 246 bytes skins/common/images/Arr_r.xcf | Bin 1437 -> 0 bytes skins/common/images/Arr_u.png | Bin 1044 -> 425 bytes skins/common/images/Zoom_sans.gif | Bin 901 -> 901 bytes skins/common/images/add.png | Bin 0 -> 3329 bytes skins/common/images/ajax-loader.gif | Bin 0 -> 3208 bytes skins/common/images/arrow_first.svg | 85 - skins/common/images/arrow_left.svg | 78 - skins/common/images/be-tarask/button_bold.png | Bin 575 -> 554 bytes skins/common/images/be-tarask/button_italic.png | Bin 638 -> 592 bytes skins/common/images/be-tarask/button_link.png | Bin 550 -> 466 bytes skins/common/images/button_bold.png | Bin 978 -> 288 bytes skins/common/images/button_extlink.png | Bin 1093 -> 494 bytes skins/common/images/button_headline.png | Bin 497 -> 465 bytes skins/common/images/button_hr.png | Bin 372 -> 251 bytes skins/common/images/button_image.png | Bin 1110 -> 584 bytes skins/common/images/button_italic.png | Bin 975 -> 292 bytes skins/common/images/button_link.png | Bin 434 -> 337 bytes skins/common/images/button_math.png | Bin 730 -> 617 bytes skins/common/images/button_media.png | Bin 1155 -> 780 bytes skins/common/images/button_nowiki.png | Bin 375 -> 352 bytes skins/common/images/button_sig.png | Bin 1217 -> 953 bytes skins/common/images/button_template.png | Bin 362 -> 233 bytes skins/common/images/cyrl/button_italic.png | Bin 461 -> 460 bytes skins/common/images/cyrl/button_link.png | Bin 353 -> 347 bytes skins/common/images/de/button_bold.png | Bin 1013 -> 328 bytes skins/common/images/de/button_italic.png | Bin 1021 -> 351 bytes skins/common/images/fa/button_bold.png | Bin 504 -> 500 bytes skins/common/images/fa/button_headline.png | Bin 438 -> 434 bytes skins/common/images/fa/button_italic.png | Bin 577 -> 573 bytes skins/common/images/fa/button_link.png | Bin 538 -> 535 bytes skins/common/images/fileicon.xcf | Bin 26160 -> 0 bytes skins/common/images/gnu-fdl.png | Bin 1748 -> 1730 bytes skins/common/images/gnu-fdl.xcf | Bin 5578 -> 0 bytes skins/common/images/icons/fileicon-c.png | Bin 2995 -> 2211 bytes skins/common/images/icons/fileicon-cpp.png | Bin 2250 -> 1882 bytes skins/common/images/icons/fileicon-deb.png | Bin 5528 -> 4801 bytes skins/common/images/icons/fileicon-djvu.png | Bin 11137 -> 10752 bytes skins/common/images/icons/fileicon-dvi.png | Bin 13042 -> 12778 bytes skins/common/images/icons/fileicon-exe.png | Bin 5864 -> 5680 bytes skins/common/images/icons/fileicon-h.png | Bin 1195 -> 1191 bytes skins/common/images/icons/fileicon-html.png | Bin 7601 -> 7422 bytes skins/common/images/icons/fileicon-iso.png | Bin 6673 -> 6450 bytes skins/common/images/icons/fileicon-java.png | Bin 6825 -> 5989 bytes skins/common/images/icons/fileicon-mid.png | Bin 7191 -> 6657 bytes skins/common/images/icons/fileicon-mov.png | Bin 7946 -> 7716 bytes skins/common/images/icons/fileicon-o.png | Bin 2893 -> 2204 bytes skins/common/images/icons/fileicon-ogg.png | Bin 6143 -> 3750 bytes skins/common/images/icons/fileicon-pdf.png | Bin 5138 -> 4976 bytes skins/common/images/icons/fileicon-ps.png | Bin 3293 -> 3012 bytes skins/common/images/icons/fileicon-rm.png | Bin 4977 -> 2851 bytes skins/common/images/icons/fileicon-rpm.png | Bin 4753 -> 4103 bytes skins/common/images/icons/fileicon-svg.png | Bin 5193 -> 5094 bytes skins/common/images/icons/fileicon-tar.png | Bin 6544 -> 6347 bytes skins/common/images/icons/fileicon-tex.png | Bin 4203 -> 3997 bytes skins/common/images/icons/fileicon-ttf.png | Bin 3625 -> 3469 bytes skins/common/images/icons/fileicon-txt.png | Bin 6801 -> 3638 bytes skins/common/images/ksh/button_S_italic.png | Bin 3812 -> 3206 bytes skins/common/images/link_icon.gif | Bin 942 -> 342 bytes skins/common/images/magnify-clip.png | Bin 267 -> 204 bytes skins/common/images/mediawiki-small.xcf | Bin 36011 -> 0 bytes skins/common/images/mediawiki.png | Bin 23064 -> 22987 bytes skins/common/images/poweredby_mediawiki_88x31.png | Bin 1933 -> 1927 bytes skins/common/images/public-domain.png | Bin 2892 -> 2251 bytes skins/common/images/redirectltr.png | Bin 1024 -> 381 bytes skins/common/images/redirectrtl.png | Bin 1017 -> 381 bytes skins/common/images/remove.png | Bin 0 -> 3346 bytes skins/common/images/sort_down.gif | Bin 879 -> 464 bytes skins/common/images/sort_none.gif | Bin 877 -> 462 bytes skins/common/images/sort_up.gif | Bin 881 -> 466 bytes skins/common/images/spinner.gif | Bin 586 -> 4648 bytes skins/common/images/wiki.png | Bin 24954 -> 24801 bytes skins/common/jquery.js | 4384 ++++++++++++++++++++ skins/common/jquery.min.js | 433 ++ skins/common/metadata.js | 36 +- skins/common/mwsuggest.js | 1312 +++--- skins/common/oldshared.css | 61 +- skins/common/prefs.js | 205 +- skins/common/preview.js | 208 +- skins/common/protect.js | 2 +- skins/common/search.js | 50 + skins/common/shared.css | 587 ++- skins/common/sticky.js | 124 - skins/common/upload.js | 203 +- skins/common/wikibits.js | 782 ++-- skins/disabled/MonoBook.tpl | 200 - skins/disabled/MonoBookCBT.php | 1389 ------- skins/modern/discussionitem_icon.gif | Bin 949 -> 549 bytes skins/modern/file_icon.gif | Bin 921 -> 323 bytes skins/modern/link_icon.gif | Bin 942 -> 342 bytes skins/modern/lock_icon.gif | Bin 918 -> 321 bytes skins/modern/mail_icon.gif | Bin 918 -> 321 bytes skins/modern/main.css | 193 +- skins/modern/rtl.css | 6 +- skins/monobook/IEMacFixes.css | 44 - skins/monobook/discussionitem_icon.gif | Bin 949 -> 549 bytes skins/monobook/file_icon.gif | Bin 921 -> 323 bytes skins/monobook/link_icon.gif | Bin 942 -> 342 bytes skins/monobook/lock_icon.gif | Bin 918 -> 918 bytes skins/monobook/magnify-clip.png | Bin 237 -> 170 bytes skins/monobook/mail_icon.gif | Bin 918 -> 321 bytes skins/monobook/main.css | 318 +- skins/monobook/rtl.css | 18 +- skins/monobook/user.gif | Bin 923 -> 325 bytes skins/monobook/video.png | Bin 215 -> 169 bytes skins/monobook/wiki.png | Bin 23064 -> 22987 bytes skins/simple/discussionitem_icon.gif | Bin 949 -> 549 bytes skins/simple/file_icon.gif | Bin 921 -> 323 bytes skins/simple/link_icon.gif | Bin 942 -> 342 bytes skins/simple/lock_icon.gif | Bin 918 -> 321 bytes skins/simple/mail_icon.gif | Bin 918 -> 321 bytes skins/simple/main.css | 11 +- skins/simple/rtl.css | 6 +- skins/vector/Makefile | 18 + skins/vector/csshover.htc | 262 ++ skins/vector/cssjanus/COPYING | 13 + skins/vector/cssjanus/LICENSE | 202 + skins/vector/cssjanus/README | 91 + skins/vector/cssjanus/cssjanus.py | 574 +++ skins/vector/cssjanus/csslex.py | 114 + skins/vector/experiments/babaco-colors-a.css | 109 + skins/vector/experiments/babaco-colors-b.css | 67 + skins/vector/experiments/babaco-colors-c.css | 91 + skins/vector/experiments/images/new-border.png | Bin 0 -> 124 bytes .../experiments/images/new-portal-break-ltr.png | Bin 0 -> 891 bytes .../experiments/images/new-portal-break-rtl.png | Bin 0 -> 891 bytes skins/vector/experiments/images/page-base-fade.png | Bin 0 -> 306 bytes .../experiments/images/page-base-updated.png | Bin 0 -> 124 bytes .../vector/experiments/images/tab-active-first.png | Bin 0 -> 981 bytes .../vector/experiments/images/tab-active-last.png | Bin 0 -> 980 bytes skins/vector/experiments/images/tab-fade.png | Bin 0 -> 226 bytes skins/vector/experiments/images/tab-first.png | Bin 0 -> 1057 bytes skins/vector/experiments/images/tab-last.png | Bin 0 -> 1057 bytes skins/vector/experiments/images/tab-new-fade.png | Bin 0 -> 216 bytes skins/vector/experiments/new-tabs.css | 322 ++ skins/vector/images/arrow-down-icon.png | Bin 0 -> 181 bytes skins/vector/images/audio-icon.png | Bin 0 -> 345 bytes skins/vector/images/border.png | Bin 0 -> 119 bytes skins/vector/images/bullet-icon.png | Bin 0 -> 152 bytes skins/vector/images/document-icon.png | Bin 0 -> 345 bytes skins/vector/images/edit-icon.png | Bin 0 -> 358 bytes skins/vector/images/external-link-ltr-icon.png | Bin 0 -> 279 bytes skins/vector/images/external-link-rtl-icon.png | Bin 0 -> 277 bytes skins/vector/images/file-icon.png | Bin 0 -> 402 bytes skins/vector/images/link-icon.png | Bin 0 -> 429 bytes skins/vector/images/lock-icon.png | Bin 0 -> 370 bytes skins/vector/images/magnify-clip.png | Bin 0 -> 204 bytes skins/vector/images/mail-icon.png | Bin 0 -> 375 bytes skins/vector/images/news-icon.png | Bin 0 -> 359 bytes skins/vector/images/page-base.png | Bin 0 -> 119 bytes skins/vector/images/page-fade.png | Bin 0 -> 253 bytes skins/vector/images/portal-break-ltr.png | Bin 0 -> 287 bytes skins/vector/images/portal-break-rtl.png | Bin 0 -> 280 bytes skins/vector/images/portal-break.png | Bin 0 -> 242 bytes skins/vector/images/preferences-base.png | Bin 0 -> 119 bytes skins/vector/images/preferences-break.png | Bin 0 -> 286 bytes skins/vector/images/preferences-edge.png | Bin 0 -> 119 bytes skins/vector/images/preferences-fade.png | Bin 0 -> 248 bytes skins/vector/images/search-fade.png | Bin 0 -> 185 bytes skins/vector/images/search-ltr.png | Bin 0 -> 214 bytes skins/vector/images/search-rtl.png | Bin 0 -> 214 bytes skins/vector/images/tab-break.png | Bin 0 -> 263 bytes skins/vector/images/tab-current-fade.png | Bin 0 -> 121 bytes skins/vector/images/tab-normal-fade.png | Bin 0 -> 254 bytes skins/vector/images/talk-icon.png | Bin 0 -> 377 bytes skins/vector/images/user-icon.png | Bin 0 -> 345 bytes skins/vector/images/video-icon.png | Bin 0 -> 395 bytes skins/vector/images/watch-icon-loading.gif | Bin 0 -> 840 bytes skins/vector/images/watch-icons.png | Bin 0 -> 1745 bytes skins/vector/main-ltr.css | 1128 +++++ skins/vector/main-rtl.css | 1128 +++++ skins/vector/wiki-indexed.png | Bin 0 -> 8205 bytes skins/vector/wiki.png | Bin 0 -> 22987 bytes 209 files changed, 12954 insertions(+), 5171 deletions(-) delete mode 100644 skins/Skin.sample create mode 100644 skins/Vector.deps.php create mode 100644 skins/Vector.php delete mode 100644 skins/archlinux/IEMacFixes.css create mode 100644 skins/common/IE80Fixes.css create mode 100644 skins/common/Makefile delete mode 100644 skins/common/allmessages.js create mode 100644 skins/common/htmlform.js delete mode 100644 skins/common/images/Arr_r.xcf create mode 100644 skins/common/images/add.png create mode 100644 skins/common/images/ajax-loader.gif delete mode 100644 skins/common/images/arrow_first.svg delete mode 100644 skins/common/images/arrow_left.svg delete mode 100644 skins/common/images/fileicon.xcf delete mode 100644 skins/common/images/gnu-fdl.xcf delete mode 100644 skins/common/images/mediawiki-small.xcf create mode 100644 skins/common/images/remove.png create mode 100644 skins/common/jquery.js create mode 100644 skins/common/jquery.min.js create mode 100644 skins/common/search.js delete mode 100644 skins/common/sticky.js delete mode 100644 skins/disabled/MonoBook.tpl delete mode 100644 skins/disabled/MonoBookCBT.php delete mode 100644 skins/monobook/IEMacFixes.css create mode 100644 skins/vector/Makefile create mode 100644 skins/vector/csshover.htc create mode 100644 skins/vector/cssjanus/COPYING create mode 100644 skins/vector/cssjanus/LICENSE create mode 100644 skins/vector/cssjanus/README create mode 100644 skins/vector/cssjanus/cssjanus.py create mode 100644 skins/vector/cssjanus/csslex.py create mode 100644 skins/vector/experiments/babaco-colors-a.css create mode 100644 skins/vector/experiments/babaco-colors-b.css create mode 100644 skins/vector/experiments/babaco-colors-c.css create mode 100644 skins/vector/experiments/images/new-border.png create mode 100644 skins/vector/experiments/images/new-portal-break-ltr.png create mode 100644 skins/vector/experiments/images/new-portal-break-rtl.png create mode 100644 skins/vector/experiments/images/page-base-fade.png create mode 100644 skins/vector/experiments/images/page-base-updated.png create mode 100644 skins/vector/experiments/images/tab-active-first.png create mode 100644 skins/vector/experiments/images/tab-active-last.png create mode 100644 skins/vector/experiments/images/tab-fade.png create mode 100644 skins/vector/experiments/images/tab-first.png create mode 100644 skins/vector/experiments/images/tab-last.png create mode 100644 skins/vector/experiments/images/tab-new-fade.png create mode 100644 skins/vector/experiments/new-tabs.css create mode 100644 skins/vector/images/arrow-down-icon.png create mode 100644 skins/vector/images/audio-icon.png create mode 100644 skins/vector/images/border.png create mode 100644 skins/vector/images/bullet-icon.png create mode 100644 skins/vector/images/document-icon.png create mode 100644 skins/vector/images/edit-icon.png create mode 100644 skins/vector/images/external-link-ltr-icon.png create mode 100644 skins/vector/images/external-link-rtl-icon.png create mode 100644 skins/vector/images/file-icon.png create mode 100644 skins/vector/images/link-icon.png create mode 100644 skins/vector/images/lock-icon.png create mode 100644 skins/vector/images/magnify-clip.png create mode 100644 skins/vector/images/mail-icon.png create mode 100644 skins/vector/images/news-icon.png create mode 100644 skins/vector/images/page-base.png create mode 100644 skins/vector/images/page-fade.png create mode 100644 skins/vector/images/portal-break-ltr.png create mode 100644 skins/vector/images/portal-break-rtl.png create mode 100644 skins/vector/images/portal-break.png create mode 100644 skins/vector/images/preferences-base.png create mode 100644 skins/vector/images/preferences-break.png create mode 100644 skins/vector/images/preferences-edge.png create mode 100644 skins/vector/images/preferences-fade.png create mode 100644 skins/vector/images/search-fade.png create mode 100644 skins/vector/images/search-ltr.png create mode 100644 skins/vector/images/search-rtl.png create mode 100644 skins/vector/images/tab-break.png create mode 100644 skins/vector/images/tab-current-fade.png create mode 100644 skins/vector/images/tab-normal-fade.png create mode 100644 skins/vector/images/talk-icon.png create mode 100644 skins/vector/images/user-icon.png create mode 100644 skins/vector/images/video-icon.png create mode 100644 skins/vector/images/watch-icon-loading.gif create mode 100644 skins/vector/images/watch-icons.png create mode 100644 skins/vector/main-ltr.css create mode 100644 skins/vector/main-rtl.css create mode 100644 skins/vector/wiki-indexed.png create mode 100644 skins/vector/wiki.png (limited to 'skins') diff --git a/skins/ArchLinux.php b/skins/ArchLinux.php index 511e20f6..ec17c343 100644 --- a/skins/ArchLinux.php +++ b/skins/ArchLinux.php @@ -17,12 +17,8 @@ if( !defined( 'MEDIAWIKI' ) ) */ class SkinArchLinux extends SkinTemplate { /** Using archlinux. */ - function initPage( OutputPage $out ) { - parent::initPage( $out ); - $this->skinname = 'archlinux'; - $this->stylename = 'archlinux'; - $this->template = 'ArchLinuxTemplate'; - } + var $skinname = 'archlinux', $stylename = 'archlinux', + $template = 'ArchLinuxTemplate', $useHeadElement = true; function setupSkinUserCss( OutputPage $out ) { global $wgHandheldStyle; @@ -70,104 +66,69 @@ class ArchLinuxTemplate extends QuickTemplate { // Suppress warnings to prevent notices about missing indexes in $this->data wfSuppressWarnings(); -?> -data['xhtmlnamespaces'] as $tag => $ns) { - ?>xmlns:xml:lang="text('lang') ?>" lang="text('lang') ?>" dir="text('dir') ?>"> - - - html('headlinks') ?> - <?php $this->text('pagetitle') ?> - html('csslinks') ?> - - - - data ); ?> - - - -html('headscripts') ?> -data['jsvarurl']) { ?> - - -data['pagecss']) { ?> - -data['usercss']) { ?> - -data['userjs']) { ?> - -data['userjsprev']) { ?> - -data['trackbackhtml']) print $this->data['trackbackhtml']; ?> - -data['body_ondblclick']) { ?> ondblclick="text('body_ondblclick') ?>" -data['body_onload']) { ?> onload="text('body_onload') ?>" - class="mediawiki text('dir') ?> text('pageclass') ?> text('skinnameclass') ?>"> + $this->html( 'headelement' ); - -
- -
-
    - $url) { - if ((isset($wgArchNavBarSelected) && $this->data['title'] == $name && in_array($name, $wgArchNavBarSelected)) - || (!(isset($wgArchNavBarSelected) && in_array($this->data['title'], $wgArchNavBarSelected)) && isset($wgArchNavBarSelectedDefault) && $name == $wgArchNavBarSelectedDefault)) { - $anbClass = ' class="anb-selected"'; - } else { - $anbClass = ''; - } - echo '
  • '.$name.'
  • '; +if (empty($_REQUEST['printable'])) {?> +
    + +
    +
      + $url) { + if ((isset($wgArchNavBarSelected) && $this->data['title'] == $name && in_array($name, $wgArchNavBarSelected)) + || (!(isset($wgArchNavBarSelected) && in_array($this->data['title'], $wgArchNavBarSelected)) && isset($wgArchNavBarSelectedDefault) && $name == $wgArchNavBarSelectedDefault)) { + $anbClass = ' class="anb-selected"'; + } else { + $anbClass = ''; } + echo '
    • '.$name.'
    • '; } - ?> -
    -
    -
    - - -
    -
    -
    - - data['sitenotice']) { ?>
    html('sitenotice') ?>
    -

    data['displaytitle']!=""?$this->html('title'):$this->text('title') ?>

    -
    -

    msg('tagline') ?>

    -
    html('subtitle') ?>
    - data['undelete']) { ?>
    html('undelete') ?>
    - data['newtalk'] ) { ?>
    html('newtalk') ?>
    - data['showjumplinks']) { ?> - - html('bodytext') ?> - data['catlinks']) { $this->html('catlinks'); } ?> - - data['dataAfterContent']) { $this->html ('dataAfterContent'); } ?> -
    -
    + } + ?> +
-
-
+
+
+
html("specialpageattributes") ?>> + + data['sitenotice']) { ?>
html('sitenotice') ?>
+ +

html('title') ?>

+
+

msg('tagline') ?>

+
html('userlangattributes') ?>>html('subtitle') ?>
+data['undelete']) { ?> +
html('undelete') ?>
+data['newtalk'] ) { ?> +
html('newtalk') ?>
+data['showjumplinks']) { ?> + + + +html('bodytext') ?> + data['catlinks']) { $this->html('catlinks'); } ?> + + data['dataAfterContent']) { $this->html ('dataAfterContent'); } ?> +
+
+
+
html('userlangattributes') ?>>
msg('views') ?>
-
html('bottomscripts'); /* JS call to runBodyOnloadHook */ ?> html('reporttime') ?> @@ -279,17 +241,23 @@ class ArchLinuxTemplate extends QuickTemplate { data['nav_urls']['recentchangeslinked'] ) { ?>
  • skin->tooltipAndAccesskey('t-recentchangeslinked') ?>>msg('recentchangeslinked') ?>
  • + ?>"skin->tooltipAndAccesskey('t-recentchangeslinked') ?>>msg('recentchangeslinked-toolbox') ?> data['nav_urls']['trackbacklink'])) { ?> + if( isset( $this->data['nav_urls']['trackbacklink'] ) && $this->data['nav_urls']['trackbacklink'] ) { ?> @@ -360,7 +328,7 @@ class ArchLinuxTemplate extends QuickTemplate { if( $this->data['language_urls'] ) { ?>
    -
    msg('otherlanguages') ?>
    + html('userlangattributes') ?>>msg('otherlanguages') ?>
      data['language_urls'] as $langlink) { ?> @@ -378,7 +346,7 @@ class ArchLinuxTemplate extends QuickTemplate { function customBox( $bar, $cont ) { ?>
      skin->tooltip('p-'.$bar) ?>> -
      +
        @@ -397,7 +365,6 @@ class ArchLinuxTemplate extends QuickTemplate {
      skinname = 'chick'; - $this->stylename = 'chick'; - $this->template = 'MonoBookTemplate'; - } + var $skinname = 'chick', $stylename = 'chick', + $template = 'MonoBookTemplate', $useHeadElement = true; function setupSkinUserCss( OutputPage $out ){ parent::setupSkinUserCss( $out ); @@ -34,5 +30,3 @@ class SkinChick extends SkinTemplate { $out->addStyle( 'chick/IE60Fixes.css', 'screen,handheld', 'IE 6' ); } } - - diff --git a/skins/CologneBlue.php b/skins/CologneBlue.php index c650cbee..a7aac8a0 100644 --- a/skins/CologneBlue.php +++ b/skins/CologneBlue.php @@ -1,14 +1,15 @@ qbSetting(); $mainPageObj = Title::newMainPage(); - $s .= "\n
      \n
      " . - ""; + $s = "\n
      \n
      " . + '
      '; - $s .= "
      "; - $s .= "escapeLocalURL() . "\">"; - $s .= "" . wfMsg( "sitetitle" ) . ""; + $s .= ''; + $s .= ''; + $s .= '' . wfMsg( 'sitetitle' ) . ''; - $s .= ""; + $s .= ''; $s .= $this->sysLinks(); - $s .= "
      "; + $s .= '
      '; - $s .= ""; - $s .= htmlspecialchars( wfMsg( "sitesubtitle" ) ) . ""; - $s .= "" ; + $s .= ''; + $s .= htmlspecialchars( wfMsg( 'sitesubtitle' ) ) . ''; + $s .= ''; - $s .= "" ; - $s .= str_replace ( "
      " , "" , $this->otherLanguages() ); + $s .= ''; + $s .= str_replace( '
      ', '', $this->otherLanguages() ); $cat = $this->getCategoryLinks(); - if( $cat ) $s .= "
      $cat\n"; - $s .= "
      " . $this->pageTitleLinks(); - $s .= "
      "; + if( $cat ) { + $s .= "
      $cat\n"; + } + $s .= '
      ' . $this->pageTitleLinks(); + $s .= '
      '; $s .= "
      \n"; @@ -64,37 +66,44 @@ class SkinCologneBlue extends Skin { return $s; } - function doAfterContent() - { - global $wgOut, $wgLang; + function doAfterContent(){ + global $wgLang; $s = "\n

      \n"; $s .= "\n\n
      \n"; - if ( 0 != $qb ) { $s .= $this->quickBar(); } + if ( 0 != $qb ) { + $s .= $this->quickBar(); + } return $s; } @@ -104,42 +113,51 @@ class SkinCologneBlue extends Skin { if ( 2 == $qb ) { # Right $s .= "#quickbar { position: absolute; right: 4px; }\n" . - "#article { margin-left: 4px; margin-right: 148px; }\n"; - } else if ( 1 == $qb ) { + "#article { margin-left: 4px; margin-right: 148px; }\n"; + } elseif ( 1 == $qb ) { $s .= "#quickbar { position: absolute; left: 4px; }\n" . - "#article { margin-left: 148px; margin-right: 4px; }\n"; - } else if ( 3 == $qb ) { # Floating left + "#article { margin-left: 148px; margin-right: 4px; }\n"; + } elseif ( 3 == $qb ) { # Floating left $s .= "#quickbar { position:absolute; left:4px } \n" . - "#topbar { margin-left: 148px }\n" . - "#article { margin-left:148px; margin-right: 4px; } \n" . - "body>#quickbar { position:fixed; left:4px; top:4px; overflow:auto ;bottom:4px;} \n"; # Hides from IE - } else if ( 4 == $qb ) { # Floating right + "#topbar { margin-left: 148px }\n" . + "#article { margin-left:148px; margin-right: 4px; } \n" . + "body>#quickbar { position:fixed; left:4px; top:4px; overflow:auto ;bottom:4px;} \n"; # Hides from IE + } elseif ( 4 == $qb ) { # Floating right $s .= "#quickbar { position: fixed; right: 4px; } \n" . - "#topbar { margin-right: 148px }\n" . - "#article { margin-right: 148px; margin-left: 4px; } \n" . - "body>#quickbar { position: fixed; right: 4px; top: 4px; overflow: auto ;bottom:4px;} \n"; # Hides from IE + "#topbar { margin-right: 148px }\n" . + "#article { margin-right: 148px; margin-left: 4px; } \n" . + "body>#quickbar { position: fixed; right: 4px; top: 4px; overflow: auto ;bottom:4px;} \n"; # Hides from IE } return $s; } function sysLinks() { - global $wgUser, $wgLang, $wgContLang, $wgTitle; - $li = $wgContLang->specialPage("Userlogin"); - $lo = $wgContLang->specialPage("Userlogout"); + global $wgUser, $wgLang, $wgContLang; + $li = SpecialPage::getTitleFor( 'Userlogin' ); + $lo = SpecialPage::getTitleFor( 'Userlogout' ); - $rt = $wgTitle->getPrefixedURL(); + $rt = $this->mTitle->getPrefixedURL(); if ( 0 == strcasecmp( urlencode( $lo ), $rt ) ) { - $q = ""; + $q = array(); } else { - $q = "returnto={$rt}"; + $q = array( 'returnto' => $rt ); } $s = array( $this->mainPageLink(), - $this->makeKnownLink( wfMsgForContent( "aboutpage" ), wfMsg( "about" ) ), - $this->makeKnownLink( wfMsgForContent( "helppage" ), wfMsg( "help" ) ), - $this->makeKnownLink( wfMsgForContent( "faqpage" ), wfMsg("faq") ), - $this->specialLink( "specialpages" ) + $this->linkKnown( + Title::newFromText( wfMsgForContent( 'aboutpage' ) ), + wfMsg( 'about' ) + ), + $this->linkKnown( + Title::newFromText( wfMsgForContent( 'helppage' ) ), + wfMsg( 'help' ) + ), + $this->linkKnown( + Title::newFromText( wfMsgForContent( 'faqpage' ) ), + wfMsg( 'faq' ) + ), + $this->specialLink( 'specialpages' ) ); /* show links to different language variants */ @@ -150,9 +168,19 @@ class SkinCologneBlue extends Skin { $s[] = $this->extensionTabLinks(); } if ( $wgUser->isLoggedIn() ) { - $s[] = $this->makeKnownLink( $lo, wfMsg( "logout" ), $q ); + $s[] = $this->linkKnown( + $lo, + wfMsg( 'logout' ), + array(), + $q + ); } else { - $s[] = $this->makeKnownLink( $li, wfMsg( "login" ), $q ); + $s[] = $this->linkKnown( + $li, + wfMsg( 'login' ), + array(), + $q + ); } return $wgLang->pipeList( $s ); @@ -162,19 +190,18 @@ class SkinCologneBlue extends Skin { * Compute the sidebar * @access private */ - function quickBar() - { - global $wgOut, $wgTitle, $wgUser, $wgLang, $wgContLang, $wgEnableUploads; + function quickBar(){ + global $wgOut, $wgUser, $wgEnableUploads; - $tns=$wgTitle->getNamespace(); + $tns = $this->mTitle->getNamespace(); $s = "\n
      "; - $sep = "
      "; - $s .= $this->menuHead( "qbfind" ); + $sep = '
      '; + $s .= $this->menuHead( 'qbfind' ); $s .= $this->searchForm(); - $s .= $this->menuHead( "qbbrowse" ); + $s .= $this->menuHead( 'qbbrowse' ); # Use the first heading from the Monobook sidebar as the "browse" section $bar = $this->buildSidebar(); @@ -191,46 +218,49 @@ class SkinCologneBlue extends Skin { } if ( $wgOut->isArticle() ) { - $s .= $this->menuHead( "qbedit" ); - $s .= "" . $this->editThisPage() . ""; + $s .= $this->menuHead( 'qbedit' ); + $s .= '' . $this->editThisPage() . ''; - $s .= $sep . $this->makeKnownLink( wfMsgForContent( "edithelppage" ), wfMsg( "edithelp" ) ); + $s .= $sep . $this->linkKnown( + Title::newFromText( wfMsgForContent( 'edithelppage' ) ), + wfMsg( 'edithelp' ) + ); if( $wgUser->isLoggedIn() ) { $s .= $sep . $this->moveThisPage(); } - if ( $wgUser->isAllowed('delete') ) { + if ( $wgUser->isAllowed( 'delete' ) ) { $dtp = $this->deleteThisPage(); - if ( "" != $dtp ) { + if ( $dtp != '' ) { $s .= $sep . $dtp; } } - if ( $wgUser->isAllowed('protect') ) { + if ( $wgUser->isAllowed( 'protect' ) ) { $ptp = $this->protectThisPage(); - if ( "" != $ptp ) { + if ( $ptp != '' ) { $s .= $sep . $ptp; } } $s .= $sep; - $s .= $this->menuHead( "qbpageoptions" ); + $s .= $this->menuHead( 'qbpageoptions' ); $s .= $this->talkLink() - . $sep . $this->commentLink() - . $sep . $this->printableLink(); + . $sep . $this->commentLink() + . $sep . $this->printableLink(); if ( $wgUser->isLoggedIn() ) { $s .= $sep . $this->watchThisPage(); } $s .= $sep; - $s .= $this->menuHead("qbpageinfo") - . $this->historyLink() - . $sep . $this->whatLinksHere() - . $sep . $this->watchPageLinksLink(); + $s .= $this->menuHead( 'qbpageinfo' ) + . $this->historyLink() + . $sep . $this->whatLinksHere() + . $sep . $this->watchPageLinksLink(); if( $tns == NS_USER || $tns == NS_USER_TALK ) { - $id=User::idFromName($wgTitle->getText()); - if ($id != 0) { + $id = User::idFromName( $this->mTitle->getText() ); + if( $id != 0 ) { $s .= $sep . $this->userContribsLink(); if( $this->showEmailUser( $id ) ) { $s .= $sep . $this->emailUserLink(); @@ -240,72 +270,92 @@ class SkinCologneBlue extends Skin { $s .= $sep; } - $s .= $this->menuHead( "qbmyoptions" ); + $s .= $this->menuHead( 'qbmyoptions' ); if ( $wgUser->isLoggedIn() ) { $name = $wgUser->getName(); - $tl = $this->makeKnownLinkObj( $wgUser->getTalkPage(), - wfMsg( 'mytalk' ) ); + $tl = $this->link( + $wgUser->getTalkPage(), + wfMsg( 'mytalk' ), + array(), + array(), + array( 'known', 'noclasses' ) + ); if ( $wgUser->getNewtalk() ) { - $tl .= " *"; + $tl .= ' *'; } - $s .= $this->makeKnownLinkObj( $wgUser->getUserPage(), - wfMsg( "mypage" ) ) - . $sep . $tl - . $sep . $this->specialLink( "watchlist" ) - . $sep . $this->makeKnownLinkObj( SpecialPage::getSafeTitleFor( "Contributions", $wgUser->getName() ), - wfMsg( "mycontris" ) ) - . $sep . $this->specialLink( "preferences" ) - . $sep . $this->specialLink( "userlogout" ); + $s .= $this->link( + $wgUser->getUserPage(), + wfMsg( 'mypage' ), + array(), + array(), + array( 'known', 'noclasses' ) + ) . $sep . $tl . $sep . $this->specialLink( 'watchlist' ) + . $sep . + $this->link( + SpecialPage::getSafeTitleFor( 'Contributions', $wgUser->getName() ), + wfMsg( 'mycontris' ), + array(), + array(), + array( 'known', 'noclasses' ) + ) . $sep . $this->specialLink( 'preferences' ) + . $sep . $this->specialLink( 'userlogout' ); } else { - $s .= $this->specialLink( "userlogin" ); + $s .= $this->specialLink( 'userlogin' ); } - $s .= $this->menuHead( "qbspecialpages" ) - . $this->specialLink( "newpages" ) - . $sep . $this->specialLink( "listfiles" ) - . $sep . $this->specialLink( "statistics" ); + $s .= $this->menuHead( 'qbspecialpages' ) + . $this->specialLink( 'newpages' ) + . $sep . $this->specialLink( 'listfiles' ) + . $sep . $this->specialLink( 'statistics' ); if ( $wgUser->isLoggedIn() && $wgEnableUploads ) { - $s .= $sep . $this->specialLink( "upload" ); + $s .= $sep . $this->specialLink( 'upload' ); } + global $wgSiteSupportPage; - if( $wgSiteSupportPage) { - $s .= $sep."" - .wfMsg( "sitesupport" ).""; + + if( $wgSiteSupportPage ) { + $s .= $sep . '' + . wfMsg( 'sitesupport' ) . ''; } - $s .= $sep . $this->makeKnownLinkObj( + $s .= $sep . $this->link( SpecialPage::getTitleFor( 'Specialpages' ), - wfMsg( 'moredotdotdot' ) ); + wfMsg( 'moredotdotdot' ), + array(), + array(), + array( 'known', 'noclasses' ) + ); $s .= $sep . "\n
      \n"; return $s; } - function menuHead( $key ) - { + function menuHead( $key ) { $s = "\n
      " . wfMsg( $key ) . "
      "; return $s; } - function searchForm( $label = "" ) - { + function searchForm( $label = '' ) { global $wgRequest, $wgUseTwoButtonsSearchForm; $search = $wgRequest->getText( 'search' ); $action = $this->escapeSearchLink(); $s = "
      searchboxes}\" method=\"get\" class=\"inline\" action=\"$action\">"; - if ( "" != $label ) { $s .= "{$label}: "; } + if( $label != '' ) { + $s .= "{$label}: "; + } $s .= "searchboxes}\" class=\"mw-searchInput\" name=\"search\" size=\"14\" value=\"" - . htmlspecialchars(substr($search,0,256)) . "\" />
      " - . "searchboxes}\" class=\"searchButton\" name=\"go\" value=\"" . htmlspecialchars( wfMsg( "searcharticle" ) ) . "\" />"; - - if ($wgUseTwoButtonsSearchForm) - $s .= "searchboxes}\" class=\"searchButton\" name=\"fulltext\" value=\"" . htmlspecialchars( wfMsg( "search" ) ) . "\" />\n"; - else - $s .= '\n"; - + . htmlspecialchars( substr( $search, 0, 256 ) ) . "\" />
      " + . "searchboxes}\" class=\"searchButton\" name=\"go\" value=\"" . htmlspecialchars( wfMsg( 'searcharticle' ) ) . "\" />"; + + if( $wgUseTwoButtonsSearchForm ) { + $s .= "searchboxes}\" class=\"searchButton\" name=\"fulltext\" value=\"" . htmlspecialchars( wfMsg( 'search' ) ) . "\" />\n"; + } else { + $s .= '\n"; + } + $s .= '
      '; // Ensure unique id's for search boxes made after the first @@ -314,5 +364,3 @@ class SkinCologneBlue extends Skin { return $s; } } - - diff --git a/skins/Modern.php b/skins/Modern.php index 6b6651d1..ef1b1a1e 100644 --- a/skins/Modern.php +++ b/skins/Modern.php @@ -16,8 +16,11 @@ if( !defined( 'MEDIAWIKI' ) ) * @ingroup Skins */ class SkinModern extends SkinTemplate { + var $skinname = 'modern', $stylename = 'modern', + $template = 'ModernTemplate', $useHeadElement = true; + /* - * We don't like the default getPoweredBy, the icon clashes with the + * We don't like the default getPoweredBy, the icon clashes with the * skin L&F. */ function getPoweredBy() { @@ -25,14 +28,9 @@ class SkinModern extends SkinTemplate { return "
      Powered by MediaWiki $wgVersion
      "; } - function initPage( OutputPage $out ) { - parent::initPage( $out ); - $this->skinname = 'modern'; - $this->stylename = 'modern'; - $this->template = 'ModernTemplate'; - } - function setupSkinUserCss( OutputPage $out ){ + global $wgStyleVersion, $wgJsMimeType, $wgStylePath; + // Do not call parent::setupSkinUserCss(), we have our own print style $out->addStyle( 'common/shared.css', 'screen' ); $out->addStyle( 'modern/main.css', 'screen' ); @@ -56,53 +54,18 @@ class ModernTemplate extends QuickTemplate { * @access private */ function execute() { - global $wgRequest; + global $wgRequest, $wgOut; $this->skin = $skin = $this->data['skin']; $action = $wgRequest->getText( 'action' ); // Suppress warnings to prevent notices about missing indexes in $this->data wfSuppressWarnings(); -?> -data['xhtmlnamespaces'] as $tag => $ns) { - ?>xmlns:xml:lang="text('lang') ?>" lang="text('lang') ?>" dir="text('dir') ?>"> - - - html('headlinks') ?> - <?php $this->text('pagetitle') ?> - html('csslinks') ?> - - - data ); ?> - - - -html('headscripts') ?> -data['jsvarurl' ]) { ?> - - -data['pagecss' ]) { ?> - -data['usercss' ]) { ?> - -data['userjs' ]) { ?> - -data['userjsprev']) { ?> - -data['trackbackhtml']) print $this->data['trackbackhtml']; ?> - -data['body_ondblclick']) { ?> ondblclick="text('body_ondblclick') ?>" -data['body_onload' ]) { ?> onload="text('body_onload') ?>" - class="mediawiki text('dir') ?> text('pageclass') ?> text('skinnameclass') ?>"> + $this->html( 'headelement' ); +?> -

      data['displaytitle']!=""?$this->html('title'):$this->text('title') ?>

      +

      html('title') ?>

      @@ -141,9 +104,9 @@ class ModernTemplate extends QuickTemplate { -
      +
      html("specialpageattributes") ?>>
      - +
      msg('tagline') ?>
      data['newtalk'] ) { ?>
      html('newtalk') ?>
      @@ -153,7 +116,7 @@ class ModernTemplate extends QuickTemplate {
      -
      html('subtitle') ?>
      +
      html('userlangattributes') ?>>html('subtitle') ?>
      data['undelete']) { ?>
      html('undelete') ?>
      data['showjumplinks']) { ?> @@ -166,11 +129,11 @@ class ModernTemplate extends QuickTemplate {
      -
      +
      html("userlangattributes") ?>> - data['sidebar']; + data['sidebar']; if ( !isset( $sidebar['SEARCH'] ) ) $sidebar['SEARCH'] = true; if ( !isset( $sidebar['TOOLBOX'] ) ) $sidebar['TOOLBOX'] = true; if ( !isset( $sidebar['LANGUAGES'] ) ) $sidebar['LANGUAGES'] = true; @@ -213,8 +176,8 @@ class ModernTemplate extends QuickTemplate {
      - - +
      data['nav_urls']['recentchangeslinked'] ) { ?>
    • skin->tooltipAndAccesskey('t-recentchangeslinked') ?>>msg('recentchangeslinked') ?>
    • + ?>"skin->tooltipAndAccesskey('t-recentchangeslinked') ?>>msg('recentchangeslinked-toolbox') ?> data['nav_urls']['trackbacklink'])) { ?> @@ -320,18 +283,17 @@ class ModernTemplate extends QuickTemplate { } wfRunHooks( 'SkinTemplateToolboxEnd', array( &$this ) ); -?>
    -
    -
    +?> + +
    + data['language_urls'] ) { ?> - -data['language_urls'] ) { ?>
    msg('otherlanguages') ?>
    @@ -341,8 +303,8 @@ class ModernTemplate extends QuickTemplate { ?> -
    -
    + + - - + + + + diff --git a/skins/MonoBook.php b/skins/MonoBook.php index 2312de0f..fdc1684d 100644 --- a/skins/MonoBook.php +++ b/skins/MonoBook.php @@ -20,13 +20,8 @@ if( !defined( 'MEDIAWIKI' ) ) */ class SkinMonoBook extends SkinTemplate { /** Using monobook. */ - function initPage( OutputPage $out ) { - parent::initPage( $out ); - $this->skinname = 'monobook'; - $this->stylename = 'monobook'; - $this->template = 'MonoBookTemplate'; - - } + var $skinname = 'monobook', $stylename = 'monobook', + $template = 'MonoBookTemplate', $useHeadElement = true; function setupSkinUserCss( OutputPage $out ) { global $wgHandheldStyle; @@ -46,6 +41,7 @@ class SkinMonoBook extends SkinTemplate { $out->addStyle( 'monobook/IE70Fixes.css', 'screen', 'IE 7' ); $out->addStyle( 'monobook/rtl.css', 'screen', '', 'rtl' ); + } } @@ -65,84 +61,50 @@ class MonoBookTemplate extends QuickTemplate { */ function execute() { global $wgRequest; + $this->skin = $skin = $this->data['skin']; $action = $wgRequest->getText( 'action' ); // Suppress warnings to prevent notices about missing indexes in $this->data wfSuppressWarnings(); -?> -data['xhtmlnamespaces'] as $tag => $ns) { - ?>xmlns:xml:lang="text('lang') ?>" lang="text('lang') ?>" dir="text('dir') ?>"> - - - html('headlinks') ?> - <?php $this->text('pagetitle') ?> - html('csslinks') ?> - - - - data ); ?> + $this->html( 'headelement' ); +?>
    +
    html("specialpageattributes") ?>> + + data['sitenotice']) { ?>
    html('sitenotice') ?>
    - - -html('headscripts') ?> -data['jsvarurl']) { ?> - - -data['pagecss']) { ?> - -data['usercss']) { ?> - -data['userjs']) { ?> - -data['userjsprev']) { ?> - -data['trackbackhtml']) print $this->data['trackbackhtml']; ?> - -data['body_ondblclick']) { ?> ondblclick="text('body_ondblclick') ?>" -data['body_onload']) { ?> onload="text('body_onload') ?>" - class="mediawiki text('dir') ?> text('pageclass') ?> text('skinnameclass') ?>"> -
    -
    -
    - - data['sitenotice']) { ?>
    html('sitenotice') ?>
    -

    data['displaytitle']!=""?$this->html('title'):$this->text('title') ?>

    -
    -

    msg('tagline') ?>

    -
    html('subtitle') ?>
    - data['undelete']) { ?>
    html('undelete') ?>
    - data['newtalk'] ) { ?>
    html('newtalk') ?>
    - data['showjumplinks']) { ?> - - html('bodytext') ?> - data['catlinks']) { $this->html('catlinks'); } ?> - - data['dataAfterContent']) { $this->html ('dataAfterContent'); } ?> -
    -
    +

    html('title') ?>

    +
    +

    msg('tagline') ?>

    +
    html('userlangattributes') ?>>html('subtitle') ?>
    +data['undelete']) { ?> +
    html('undelete') ?>
    +data['newtalk'] ) { ?> +
    html('newtalk') ?>
    +data['showjumplinks']) { ?> + + + +html('bodytext') ?> + data['catlinks']) { $this->html('catlinks'); } ?> + + data['dataAfterContent']) { $this->html ('dataAfterContent'); } ?> +
    -
    -
    +
    +
    html('userlangattributes') ?>>
    msg('views') ?>
    -
    html('bottomscripts'); /* JS call to runBodyOnloadHook */ ?> html('reporttime') ?> @@ -254,17 +217,23 @@ class MonoBookTemplate extends QuickTemplate { data['nav_urls']['recentchangeslinked'] ) { ?>
  • skin->tooltipAndAccesskey('t-recentchangeslinked') ?>>msg('recentchangeslinked') ?>
  • + ?>"skin->tooltipAndAccesskey('t-recentchangeslinked') ?>>msg('recentchangeslinked-toolbox') ?> data['nav_urls']['trackbacklink'])) { ?> + if( isset( $this->data['nav_urls']['trackbacklink'] ) && $this->data['nav_urls']['trackbacklink'] ) { ?> @@ -335,7 +304,7 @@ class MonoBookTemplate extends QuickTemplate { if( $this->data['language_urls'] ) { ?>
    -
    msg('otherlanguages') ?>
    + html('userlangattributes') ?>>msg('otherlanguages') ?>
      data['language_urls'] as $langlink) { ?> @@ -353,7 +322,7 @@ class MonoBookTemplate extends QuickTemplate { function customBox( $bar, $cont ) { ?>
      skin->tooltip('p-'.$bar) ?>> -
      +
        @@ -372,7 +341,6 @@ class MonoBookTemplate extends QuickTemplate {
      skinname = 'myskin'; - $this->stylename = 'myskin'; - $this->template = 'MonoBookTemplate'; - } + var $skinname = 'myskin', $stylename = 'myskin', + $template = 'MonoBookTemplate', $useHeadElement = true; } diff --git a/skins/Nostalgia.php b/skins/Nostalgia.php index d4dee0f4..d4f3f06f 100644 --- a/skins/Nostalgia.php +++ b/skins/Nostalgia.php @@ -1,14 +1,14 @@ \n
      \n"; - $s .= "
      ".$this->logoText( "right" )."
      "; + $s .= ''; $s .= $this->pageTitle(); $s .= $this->pageSubtitle() . "\n"; - $s .= "
      "; + $s .= '
      '; $s .= $this->topLinks() . "\n
      "; $notice = wfGetSiteNotice(); @@ -40,10 +41,14 @@ class SkinNostalgia extends Skin { $s .= $this->pageTitleLinks(); $ol = $this->otherLanguages(); - if($ol) $s .= "
      " . $ol; + if( $ol ) { + $s .= '
      ' . $ol; + } $cat = $this->getCategoryLinks(); - if($cat) $s .= "
      " . $cat; + if( $cat ) { + $s .= '
      ' . $cat; + } $s .= "

      \n
      \n"; $s .= "\n
      "; @@ -79,7 +84,7 @@ class SkinNostalgia extends Skin { $s .= $sep . $this->specialLink( 'watchlist' ); /* show my contributions link */ $s .= $sep . $this->link( - SpecialPage::getSafeTitleFor( "Contributions", $wgUser->getName() ), + SpecialPage::getSafeTitleFor( 'Contributions', $wgUser->getName() ), wfMsgHtml( 'mycontris' ) ); /* show my preferences link */ $s .= $sep . $this->specialLink( 'preferences' ); @@ -104,13 +109,11 @@ class SkinNostalgia extends Skin { $s .= $this->bottomLinks(); $s .= "\n
      " . $this->pageStats(); $s .= "\n
      " . $this->mainPageLink() - . " | " . $this->aboutLink() - . " | " . $this->searchForm(); + . ' | ' . $this->aboutLink() + . ' | ' . $this->searchForm(); $s .= "\n
      \n
      \n"; return $s; } } - - diff --git a/skins/Simple.php b/skins/Simple.php index b26f50d0..416dc3f6 100644 --- a/skins/Simple.php +++ b/skins/Simple.php @@ -1,8 +1,8 @@ skinname = 'simple'; - $this->stylename = 'simple'; - $this->template = 'MonoBookTemplate'; - } + var $skinname = 'simple', $stylename = 'simple', + $template = 'MonoBookTemplate', $useHeadElement = true; function setupSkinUserCss( OutputPage $out ){ $out->addStyle( 'simple/main.css', 'screen' ); $out->addStyle( 'simple/rtl.css', '', '', 'rtl' ); - } function reallyGenerateUserStylesheet() { global $wgUser; $s = ''; - if (($undopt = $wgUser->getOption("underline")) != 2) { + if( ( $undopt = $wgUser->getOption( 'underline' ) ) != 2 ) { $underline = $undopt ? 'underline' : 'none'; $s .= "a { text-decoration: $underline; }\n"; } - if ($wgUser->getOption('highlightbroken')) { + if( $wgUser->getOption( 'highlightbroken' ) ) { $s .= "a.new, #quickbar a.new { text-decoration: line-through; }\n"; } else { - $s .= <<getOption('justify')) { + if( $wgUser->getOption( 'justify' ) ) { $s .= "#article, #bodyContent { text-align: justify; }\n"; } - if (!$wgUser->getOption('showtoc')) { + if( !$wgUser->getOption( 'showtoc' ) ) { $s .= "#toc { display: none; }\n"; } - if (!$wgUser->getOption('editsection')) { + if( !$wgUser->getOption( 'editsection' ) ) { $s .= ".editsection { display: none; }\n"; } return $s; } } - - diff --git a/skins/Skin.sample b/skins/Skin.sample deleted file mode 100644 index c011c143..00000000 --- a/skins/Skin.sample +++ /dev/null @@ -1,19 +0,0 @@ - diff --git a/skins/Standard.php b/skins/Standard.php index 694bc5e3..e57cfaf9 100644 --- a/skins/Standard.php +++ b/skins/Standard.php @@ -1,14 +1,14 @@ qbSetting() ) { # Floating left - $s .= "\n"; - } - return $s; - } - /** * */ function setupSkinUserCss( OutputPage $out ){ if ( 3 == $this->qbSetting() ) { # Floating left $out->addStyle( 'common/quickbar.css' ); - } else if ( 4 == $this->qbSetting() ) { # Floating right + } elseif ( 4 == $this->qbSetting() ) { # Floating right $out->addStyle( 'common/quickbar-right.css' ); } parent::setupSkinUserCss( $out ); @@ -51,60 +37,44 @@ class SkinStandard extends Skin { if ( 2 == $qb ) { # Right $s .= "#quickbar { position: absolute; top: 4px; right: 4px; " . - "border-left: 2px solid #000000; }\n" . - "#article, #mw-data-after-content { margin-left: 4px; margin-right: 152px; }\n"; - } else if ( 1 == $qb || 3 == $qb ) { + "border-left: 2px solid #000000; }\n" . + "#article, #mw-data-after-content { margin-left: 4px; margin-right: 152px; }\n"; + } elseif ( 1 == $qb || 3 == $qb ) { $s .= "#quickbar { position: absolute; top: 4px; left: 4px; " . - "border-right: 1px solid gray; }\n" . - "#article, #mw-data-after-content { margin-left: 152px; margin-right: 4px; }\n"; - } else if ( 4 == $qb) { + "border-right: 1px solid gray; }\n" . + "#article, #mw-data-after-content { margin-left: 152px; margin-right: 4px; }\n"; + } elseif ( 4 == $qb ) { $s .= "#quickbar { border-right: 1px solid gray; }\n" . - "#article, #mw-data-after-content { margin-right: 152px; margin-left: 4px; }\n"; + "#article, #mw-data-after-content { margin-right: 152px; margin-left: 4px; }\n"; } return $s; } - /** - * - */ - function getBodyOptions() { - $a = parent::getBodyOptions(); - - if ( 3 == $this->qbSetting() ) { # Floating left - $qb = "setup(\"quickbar\")"; - if($a["onload"]) { - $a["onload"] .= ";$qb"; - } else { - $a["onload"] = $qb; - } - } - return $a; - } - function doAfterContent() { global $wgContLang, $wgLang; - $fname = 'SkinStandard::doAfterContent'; - wfProfileIn( $fname ); - wfProfileIn( $fname.'-1' ); + wfProfileIn( __METHOD__ ); + wfProfileIn( __METHOD__ . '-1' ); $s = "\n

      \n"; $s .= "\n\n
    \n"; - wfProfileOut( $fname.'-3' ); - wfProfileIn( $fname.'-4' ); - if ( 0 != $qb ) { $s .= $this->quickBar(); } - wfProfileOut( $fname.'-4' ); - wfProfileOut( $fname ); + wfProfileOut( __METHOD__ . '-3' ); + wfProfileIn( __METHOD__ . '-4' ); + if ( 0 != $qb ) { + $s .= $this->quickBar(); + } + wfProfileOut( __METHOD__ . '-4' ); + wfProfileOut( __METHOD__ ); return $s; } function quickBar() { - global $wgOut, $wgTitle, $wgUser, $wgRequest, $wgContLang; + global $wgOut, $wgUser, $wgRequest, $wgContLang; global $wgEnableUploads, $wgRemoteUploads; - $fname = 'Skin::quickBar'; - wfProfileIn( $fname ); + wfProfileIn( __METHOD__ ); $action = $wgRequest->getText( 'action' ); $wpPreview = $wgRequest->getBool( 'wpPreview' ); - $tns=$wgTitle->getNamespace(); + $tns = $this->mTitle->getNamespace(); $s = "\n
    "; $s .= "\n" . $this->logoText() . "\n
    "; @@ -161,18 +132,22 @@ class SkinStandard extends Skin { if( $wgUser->isLoggedIn() ) { $s.= $this->specialLink( 'watchlist' ) ; - $s .= $sep . $this->makeKnownLink( $wgContLang->specialPage( 'Contributions' ), - wfMsg( 'mycontris' ), 'target=' . wfUrlencode($wgUser->getName() ) ); + $s .= $sep . $this->linkKnown( + SpecialPage::getTitleFor( 'Contributions' ), + wfMsg( 'mycontris' ), + array(), + array( 'target' => $wgUser->getName() ) + ); } // only show watchlist link if logged in $s .= "\n
    "; - $articleExists = $wgTitle->getArticleId(); - if ( $wgOut->isArticle() || $action =='edit' || $action =='history' || $wpPreview) { - if($wgOut->isArticle()) { + $articleExists = $this->mTitle->getArticleId(); + if ( $wgOut->isArticle() || $action == 'edit' || $action == 'history' || $wpPreview ) { + if( $wgOut->isArticle() ) { $s .= '' . $this->editThisPage() . ''; } else { # backlink to the article in edit or history mode - if($articleExists){ # no backlink if no article - switch($tns) { + if( $articleExists ){ # no backlink if no article + switch( $tns ) { case NS_TALK: case NS_USER_TALK: case NS_PROJECT_TALK: @@ -208,29 +183,40 @@ class SkinStandard extends Skin { $text = wfMsg( 'categorypage' ); break; default: - $text= wfMsg( 'articlepage' ); + $text = wfMsg( 'articlepage' ); } - $link = $wgTitle->getText(); - if ($nstext = $wgContLang->getNsText($tns) ) { # add namespace if necessary - $link = $nstext . ':' . $link ; + $link = $this->mTitle->getText(); + if( $nstext = $wgContLang->getNsText( $tns ) ) { # add namespace if necessary + $link = $nstext . ':' . $link; } - $s .= $this->makeLink( $link, $text ); - } elseif( $wgTitle->getNamespace() != NS_SPECIAL ) { + $s .= $this->link( + Title::newFromText( $link ), + $text + ); + } elseif( $this->mTitle->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 .= '' . wfMsg('newpage') . ''; + $s .= '' . wfMsg( 'newpage' ) . ''; } - } # "Post a comment" link - if( ( $wgTitle->isTalkPage() || $wgOut->showNewSectionLink() ) && $action != 'edit' && !$wpPreview ) - $s .= '
    ' . $this->makeKnownLinkObj( $wgTitle, wfMsg( 'postcomment' ), 'action=edit§ion=new' ); - + if( ( $this->mTitle->isTalkPage() || $wgOut->showNewSectionLink() ) && $action != 'edit' && !$wpPreview ) + $s .= '
    ' . $this->link( + $this->mTitle, + wfMsg( 'postcomment' ), + array(), + array( + 'action' => 'edit', + 'section' => 'new' + ), + array( 'known', 'noclasses' ) + ); + #if( $tns%2 && $action!='edit' && !$wpPreview) { - #$s.= '
    '.$this->makeKnownLink($wgTitle->getPrefixedText(),wfMsg('postcomment'),'action=edit§ion=new'); + #$s.= '
    '.$this->linkKnown( Title::newFromText( $wgTitle->getPrefixedText() ),wfMsg('postcomment'),array(),array('action'=>'edit','section'=>'new')); #} /* @@ -239,33 +225,34 @@ class SkinStandard extends Skin { 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 ( $wgUser->isLoggedIn() && $articleExists) { - if($action!='edit' && $action != 'submit' ) - { + if ( $wgUser->isLoggedIn() && $articleExists ) { + if( $action != 'edit' && $action != 'submit' ) { $s .= $sep . $this->watchThisPage(); } - if ( $wgTitle->userCan( 'edit' ) ) + if ( $this->mTitle->userCan( 'edit' ) ) $s .= $sep . $this->moveThisPage(); } - if ( $wgUser->isAllowed('delete') and $articleExists ) { + if ( $wgUser->isAllowed( 'delete' ) && $articleExists ) { $s .= $sep . $this->deleteThisPage() . $sep . $this->protectThisPage(); } $s .= $sep . $this->talkLink(); - if ($articleExists && $action !='history') { + if( $articleExists && $action != 'history' ) { $s .= $sep . $this->historyLink(); } - $s.=$sep . $this->whatLinksHere(); + $s .= $sep . $this->whatLinksHere(); - if($wgOut->isArticleRelated()) { + if( $wgOut->isArticleRelated() ) { $s .= $sep . $this->watchPageLinksLink(); } - if ( NS_USER == $wgTitle->getNamespace() - || $wgTitle->getNamespace() == NS_USER_TALK ) { + if ( + NS_USER == $this->mTitle->getNamespace() || + $this->mTitle->getNamespace() == NS_USER_TALK + ) { - $id=User::idFromName($wgTitle->getText()); - $ip=User::isIP($wgTitle->getText()); + $id = User::idFromName( $this->mTitle->getText() ); + $ip = User::isIP( $this->mTitle->getText() ); if( $id || $ip ){ $s .= $sep . $this->userContribsLink(); @@ -289,9 +276,8 @@ class SkinStandard extends Skin { } $s .= "\n
    \n"; - wfProfileOut( $fname ); + wfProfileOut( __METHOD__ ); return $s; } - } diff --git a/skins/Vector.deps.php b/skins/Vector.deps.php new file mode 100644 index 00000000..7a8c2881 --- /dev/null +++ b/skins/Vector.deps.php @@ -0,0 +1,11 @@ +addStyle( 'vector/main-rtl.css', 'screen', '', 'rtl' ); + $out->addStyle( 'vector/main-ltr.css', 'screen', '', 'ltr' ); + // 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 + // wait for the CSS file to load before fetching the HTC file. + $out->addScript( + '' + ); + // Add extra stylesheets + // THIS IS ONLY USEFUL FOR EXPERIMENTING WITH DIFFERNT STYLE OPTIONS! THIS WILL BE REMOVED IN THE NEAR FUTURE. + if ( is_array( $wgVectorExtraStyles ) ) { + foreach ( $wgVectorExtraStyles as $style ) { + $out->addStyle( 'vector/' . $style, 'screen' ); + } + } + } + /** + * Builds a structured array of links used for tabs and menus + * @return array + * @private + */ + function buildNavigationUrls() { + global $wgContLang, $wgLang, $wgOut, $wgUser, $wgRequest, $wgArticle, $wgStylePath; + global $wgDisableLangConversion, $wgVectorUseIconWatch; + + wfProfileIn( __METHOD__ ); + + $links = array( + 'namespaces' => array(), + 'views' => array(), + 'actions' => array(), + 'variants' => array() + ); + + // Detects parameters + $action = $wgRequest->getVal( 'action', 'view' ); + $section = $wgRequest->getVal( 'section' ); + + // Checks if page is some kind of content + if( $this->iscontent ) { + + // Gets page objects for the related namespaces + $subjectPage = $this->mTitle->getSubjectPage(); + $talkPage = $this->mTitle->getTalkPage(); + + // Determines if this is a talk page + $isTalk = $this->mTitle->isTalkPage(); + + // Generates XML IDs from namespace names + $subjectId = $this->mTitle->getNamespaceKey( '' ); + + if ( $subjectId == 'main' ) { + $talkId = 'talk'; + } else { + $talkId = "{$subjectId}_talk"; + } + $currentId = $isTalk ? $talkId : $subjectId; + + // Adds namespace links + $links['namespaces'][$subjectId] = $this->tabAction( + $subjectPage, 'vector-namespace-' . $subjectId, !$isTalk, '', true + ); + $links['namespaces'][$subjectId]['context'] = 'subject'; + $links['namespaces'][$talkId] = $this->tabAction( + $talkPage, 'vector-namespace-talk', $isTalk, '', true + ); + $links['namespaces'][$talkId]['context'] = 'talk'; + + // Adds view view link + if ( $this->mTitle->exists() ) { + $links['views']['view'] = $this->tabAction( + $isTalk ? $talkPage : $subjectPage, + 'vector-view-view', ( $action == 'view' ), '', true + ); + } + + wfProfileIn( __METHOD__ . '-edit' ); + + // Checks if user can... + if ( + // edit the current page + $this->mTitle->quickUserCan( 'edit' ) && + ( + // if it exists + $this->mTitle->exists() || + // or they can create one here + $this->mTitle->quickUserCan( 'create' ) + ) + ) { + // Builds CSS class for talk page links + $isTalkClass = $isTalk ? ' istalk' : ''; + + // Determines if we're in edit mode + $selected = ( + ( $action == 'edit' || $action == 'submit' ) && + ( $section != 'new' ) + ); + $links['views']['edit'] = array( + 'class' => ( $selected ? 'selected' : '' ) . $isTalkClass, + 'text' => $this->mTitle->exists() + ? wfMsg( 'vector-view-edit' ) + : wfMsg( 'vector-view-create' ), + 'href' => + $this->mTitle->getLocalUrl( $this->editUrlOptions() ) + ); + // Checks if this is a current rev of talk page and we should show a new + // section link + if ( ( $isTalk && $wgArticle->isCurrent() ) || ( $wgOut->showNewSectionLink() ) ) { + // Checks if we should ever show a new section link + if ( !$wgOut->forceHideNewSectionLink() ) { + // Adds new section link + //$links['actions']['addsection'] + $links['views']['addsection'] = array( + 'class' => 'collapsible ' . ( $section == 'new' ? 'selected' : false ), + 'text' => wfMsg( 'vector-action-addsection' ), + 'href' => $this->mTitle->getLocalUrl( + 'action=edit§ion=new' + ) + ); + } + } + // Checks if the page is known (some kind of viewable content) + } elseif ( $this->mTitle->isKnown() ) { + // Adds view source view link + $links['views']['viewsource'] = array( + 'class' => ( $action == 'edit' ) ? 'selected' : false, + 'text' => wfMsg( 'vector-view-viewsource' ), + 'href' => + $this->mTitle->getLocalUrl( $this->editUrlOptions() ) + ); + } + wfProfileOut( __METHOD__ . '-edit' ); + + wfProfileIn( __METHOD__ . '-live' ); + + // Checks if the page exists + if ( $this->mTitle->exists() ) { + // Adds history view link + $links['views']['history'] = array( + 'class' => 'collapsible ' . ( ($action == 'history') ? 'selected' : false ), + 'text' => wfMsg( 'vector-view-history' ), + 'href' => $this->mTitle->getLocalUrl( 'action=history' ), + 'rel' => 'archives', + ); + + if( $wgUser->isAllowed( 'delete' ) ) { + $links['actions']['delete'] = array( + 'class' => ($action == 'delete') ? 'selected' : false, + 'text' => wfMsg( 'vector-action-delete' ), + 'href' => $this->mTitle->getLocalUrl( 'action=delete' ) + ); + } + if ( $this->mTitle->quickUserCan( 'move' ) ) { + $moveTitle = SpecialPage::getTitleFor( + 'Movepage', $this->thispage + ); + $links['actions']['move'] = array( + 'class' => $this->mTitle->isSpecial( 'Movepage' ) ? + 'selected' : false, + 'text' => wfMsg( 'vector-action-move' ), + 'href' => $moveTitle->getLocalUrl() + ); + } + + if ( + $this->mTitle->getNamespace() !== NS_MEDIAWIKI && + $wgUser->isAllowed( 'protect' ) + ) { + if ( !$this->mTitle->isProtected() ){ + $links['actions']['protect'] = array( + 'class' => ($action == 'protect') ? + 'selected' : false, + 'text' => wfMsg( 'vector-action-protect' ), + 'href' => + $this->mTitle->getLocalUrl( 'action=protect' ) + ); + + } else { + $links['actions']['unprotect'] = array( + 'class' => ($action == 'unprotect') ? + 'selected' : false, + 'text' => wfMsg( 'vector-action-unprotect' ), + 'href' => + $this->mTitle->getLocalUrl( 'action=unprotect' ) + ); + } + } + } else { + // article doesn't exist or is deleted + if ( + $wgUser->isAllowed( 'deletedhistory' ) && + $wgUser->isAllowed( 'undelete' ) + ) { + if( $n = $this->mTitle->isDeleted() ) { + $undelTitle = SpecialPage::getTitleFor( 'Undelete' ); + $links['actions']['undelete'] = array( + 'class' => false, + 'text' => wfMsgExt( + 'vector-action-undelete', + array( 'parsemag' ), + $wgLang->formatNum( $n ) + ), + 'href' => $undelTitle->getLocalUrl( + 'target=' . urlencode( $this->thispage ) + ) + ); + } + } + + if ( + $this->mTitle->getNamespace() !== NS_MEDIAWIKI && + $wgUser->isAllowed( 'protect' ) + ) { + if ( !$this->mTitle->getRestrictions( 'create' ) ) { + $links['actions']['protect'] = array( + 'class' => ($action == 'protect') ? + 'selected' : false, + 'text' => wfMsg( 'vector-action-protect' ), + 'href' => + $this->mTitle->getLocalUrl( 'action=protect' ) + ); + + } else { + $links['actions']['unprotect'] = array( + 'class' => ($action == 'unprotect') ? + 'selected' : false, + 'text' => wfMsg( 'vector-action-unprotect' ), + 'href' => + $this->mTitle->getLocalUrl( 'action=unprotect' ) + ); + } + } + } + wfProfileOut( __METHOD__ . '-live' ); + /** + * The following actions use messages which, if made particular to + * the Vector skin, would break the Ajax code which makes this + * action happen entirely inline. Skin::makeGlobalVariablesScript + * defines a set of messages in a javascript object - and these + * messages are assumed to be global for all skins. Without making + * a change to that procedure these messages will have to remain as + * the global versions. + */ + // Checks if the user is logged in + if ( $this->loggedin ) { + if ( $wgVectorUseIconWatch ) { + $class = 'icon '; + $place = 'views'; + } else { + $class = ''; + $place = 'actions'; + } + $mode = $this->mTitle->userIsWatching() ? 'unwatch' : 'watch'; + $links[$place][$mode] = array( + 'class' => $class . ( ( $action == 'watch' || $action == 'unwatch' ) ? ' selected' : false ), + 'text' => wfMsg( $mode ), // uses 'watch' or 'unwatch' message + 'href' => $this->mTitle->getLocalUrl( 'action=' . $mode ) + ); + } + // This is instead of SkinTemplateTabs - which uses a flat array + wfRunHooks( 'SkinTemplateNavigation', array( &$this, &$links ) ); + + // If it's not content, it's got to be a special page + } else { + $links['namespaces']['special'] = array( + 'class' => 'selected', + 'text' => wfMsg( 'vector-namespace-special' ), + 'href' => $wgRequest->getRequestURL() + ); + } + + // Gets list of language variants + $variants = $wgContLang->getVariants(); + // Checks that language conversion is enabled and variants exist + if( !$wgDisableLangConversion && count( $variants ) > 1 ) { + // Gets preferred variant + $preferred = $wgContLang->getPreferredVariant(); + // Loops over each variant + foreach( $variants as $code ) { + // Gets variant name from language code + $varname = $wgContLang->getVariantname( $code ); + // Checks if the variant is marked as disabled + if( $varname == 'disable' ) { + // Skips this variant + continue; + } + // Appends variant link + $links['variants'][] = array( + 'class' => ( $code == $preferred ) ? 'selected' : false, + 'text' => $varname, + 'href' => $this->mTitle->getLocalURL( '', $code ) + ); + } + } + + wfProfileOut( __METHOD__ ); + + return $links; + } +} + +/** + * QuickTemplate class for Vector skin + * @ingroup Skins + */ +class VectorTemplate extends QuickTemplate { + + /* Members */ + + /** + * @var Cached skin object + */ + var $skin; + + /* Functions */ + + /** + * Outputs the entire contents of the XHTML page + */ + public function execute() { + global $wgRequest, $wgOut, $wgContLang; + + $this->skin = $this->data['skin']; + $action = $wgRequest->getText( 'action' ); + + // Build additional attributes for navigation urls + $nav = $this->skin->buildNavigationUrls(); + foreach ( $nav as $section => $links ) { + foreach ( $links as $key => $link ) { + $xmlID = $key; + if ( isset( $link['context'] ) && $link['context'] == 'subject' ) { + $xmlID = 'ca-nstab-' . $xmlID; + } else if ( isset( $link['context'] ) && $link['context'] == 'talk' ) { + $xmlID = 'ca-talk'; + } else { + $xmlID = 'ca-' . $xmlID; + } + $nav[$section][$key]['attributes'] = + ' id="' . Sanitizer::escapeId( $xmlID ) . '"'; + if ( $nav[$section][$key]['class'] ) { + $nav[$section][$key]['attributes'] .= + ' class="' . htmlspecialchars( $link['class'] ) . '"'; + unset( $nav[$section][$key]['class'] ); + } + // We don't want to give the watch tab an accesskey if the page + // is being edited, because that conflicts with the accesskey on + // the watch checkbox. We also don't want to give the edit tab + // an accesskey, because that's fairly superfluous and conflicts + // with an accesskey (Ctrl-E) often used for editing in Safari. + if ( + in_array( $action, array( 'edit', 'submit' ) ) && + in_array( $key, array( 'edit', 'watch', 'unwatch' ) ) + ) { + $nav[$section][$key]['key'] = + $this->skin->tooltip( $xmlID ); + } else { + $nav[$section][$key]['key'] = + $this->skin->tooltipAndAccesskey( $xmlID ); + } + } + } + $this->data['namespace_urls'] = $nav['namespaces']; + $this->data['view_urls'] = $nav['views']; + $this->data['action_urls'] = $nav['actions']; + $this->data['variant_urls'] = $nav['variants']; + // Build additional attributes for personal_urls + foreach ( $this->data['personal_urls'] as $key => $item) { + $this->data['personal_urls'][$key]['attributes'] = + ' id="' . Sanitizer::escapeId( "pt-$key" ) . '"'; + if ( isset( $item['active'] ) && $item['active'] ) { + $this->data['personal_urls'][$key]['attributes'] .= + ' class="active"'; + } + $this->data['personal_urls'][$key]['key'] = + $this->skin->tooltipAndAccesskey('pt-'.$key); + } + + // Generate additional footer links + $footerlinks = array( + 'info' => array( + 'lastmod', + 'viewcount', + 'numberofwatchingusers', + 'credits', + 'copyright', + 'tagline', + ), + 'places' => array( + 'privacy', + 'about', + 'disclaimer', + ), + ); + // Reduce footer links down to only those which are being used + $validFooterLinks = array(); + foreach( $footerlinks as $category => $links ) { + $validFooterLinks[$category] = array(); + foreach( $links as $link ) { + if( isset( $this->data[$link] ) && $this->data[$link] ) { + $validFooterLinks[$category][] = $link; + } + } + } + // Reverse horizontally rendered navigation elements + if ( $wgContLang->isRTL() ) { + $this->data['view_urls'] = + array_reverse( $this->data['view_urls'] ); + $this->data['namespace_urls'] = + array_reverse( $this->data['namespace_urls'] ); + $this->data['personal_urls'] = + array_reverse( $this->data['personal_urls'] ); + } + // Output HTML Page + $this->html( 'headelement' ); +?> +
    +
    + +
    html('specialpageattributes') ?>> + + + data['sitenotice'] ): ?> + +
    html( 'sitenotice' ) ?>
    + + + +

    html( 'title' ) ?>

    + + +
    + +

    msg( 'tagline' ) ?>

    + + +
    html('userlangattributes') ?>>html( 'subtitle' ) ?>
    + + data['undelete'] ): ?> + +
    html( 'undelete' ) ?>
    + + + data['newtalk'] ): ?> + +
    html( 'newtalk' ) ?>
    + + + data['showjumplinks'] ): ?> + + + + + + html( 'bodytext' ) ?> + + data['catlinks'] ): ?> + + html( 'catlinks' ); ?> + + + data['dataAfterContent'] ): ?> + + html( 'dataAfterContent' ); ?> + + +
    +
    + +
    + + +
    + renderNavigation( 'PERSONAL' ); ?> +
    + renderNavigation( array( 'NAMESPACES', 'VARIANTS' ) ); ?> +
    +
    + renderNavigation( array( 'VIEWS', 'ACTIONS', 'SEARCH' ) ); ?> +
    +
    + + +
    + + + + renderPortals( $this->data['sidebar'] ); ?> +
    + + + + + + + + html( 'bottomscripts' ); /* JS call to runBodyOnloadHook */ ?> + html( 'reporttime' ) ?> + data['debug'] ): ?> + + + + + $content ) { + echo "\n\n"; + switch( $name ) { + case 'SEARCH': + break; + case 'TOOLBOX': +?> +
    + html('userlangattributes') ?>>msg( 'toolbox' ) ?> +
    + +
    +
    +data['language_urls'] ) { +?> +
    + html('userlangattributes') ?>>msg( 'otherlanguages' ) ?> +
    +
      + data['language_urls'] as $langlink ): ?> +
    • + +
    +
    +
    + +
    skin->tooltip( 'p-' . $name ) ?>> + html('userlangattributes') ?>> +
    + + + + + +
    +
    +\n"; + } + } + + /** + * Render one or more navigations elements by name, automatically reveresed + * when UI is in RTL mode + */ + private function renderNavigation( $elements ) { + global $wgContLang, $wgVectorUseSimpleSearch, $wgStylePath; + + // If only one element was given, wrap it in an array, allowing more + // flexible arguments + if ( !is_array( $elements ) ) { + $elements = array( $elements ); + // If there's a series of elements, reverse them when in RTL mode + } else if ( $wgContLang->isRTL() ) { + $elements = array_reverse( $elements ); + } + // Render elements + foreach ( $elements as $name => $element ) { + echo "\n\n"; + switch ( $element ) { + case 'NAMESPACES': +?> +
    +
    msg('namespaces') ?>
    + html('userlangattributes') ?>> + data['namespace_urls'] as $key => $link ): ?> +
  • >>
  • + + +
    + +
    +
    msg('variants') ?>
    + +
    + +
    +
    msg('views') ?>
    + html('userlangattributes') ?>> + data['view_urls'] as $key => $link ): ?> + >>' : ''.htmlspecialchars( $link['text'] ).'') ?> + + +
    + +
    +
    msg('actions') ?>
    + +
    + +
    +
    msg('personaltools') ?>
    + html('userlangattributes') ?>> + data['personal_urls'] as $key => $item): ?> +
  • > class="">
  • + + +
    + + +\n"; + } + } +} diff --git a/skins/archlinux/IEMacFixes.css b/skins/archlinux/IEMacFixes.css deleted file mode 100644 index f1b05719..00000000 --- a/skins/archlinux/IEMacFixes.css +++ /dev/null @@ -1,44 +0,0 @@ -/* IE/Mac only fix stylesheet, imported from main.css */ -#portal-column-content { - margin: 0 0 4.8em 0; - float: none; -} -#portal-column-content #content { - z-index: 0; -} -#portal-column-one { - position: absolute; - top: 0; - left: 0; - z-index: 3; -} -#portal-footer { - margin-left: 12em; -} -/* -#portlet-contentViews { - top: 0.6em !important; - left: 14.5em !important; -} -*/ -#portlet-contentViews li, -#portlet-contentViews .selected { - border: none !important; -} -#portlet-contentViews li a { - border: 1px solid #aaaaaa; - border-bottom: none; -} -#portlet-contentViews li.selected a { - border: 1px solid #fabd23; - border-bottom: none; -} -/* no background images */ -li#personaltools-userpage, -li#personaltools-login/* */ { - background: none; - padding-left: none; -} -#mactest { - color: green; -} diff --git a/skins/archlinux/discussionitem_icon.gif b/skins/archlinux/discussionitem_icon.gif index baec471a..e3ca6d9e 100644 Binary files a/skins/archlinux/discussionitem_icon.gif and b/skins/archlinux/discussionitem_icon.gif differ diff --git a/skins/archlinux/file_icon.gif b/skins/archlinux/file_icon.gif index 847f6485..69dbeaf7 100644 Binary files a/skins/archlinux/file_icon.gif and b/skins/archlinux/file_icon.gif differ diff --git a/skins/archlinux/link_icon.gif b/skins/archlinux/link_icon.gif index 815ccb1b..168c1a2f 100644 Binary files a/skins/archlinux/link_icon.gif and b/skins/archlinux/link_icon.gif differ diff --git a/skins/archlinux/lock_icon.gif b/skins/archlinux/lock_icon.gif index 8a87e283..f71cd9b8 100644 Binary files a/skins/archlinux/lock_icon.gif and b/skins/archlinux/lock_icon.gif differ diff --git a/skins/archlinux/magnify-clip.png b/skins/archlinux/magnify-clip.png index 992aa2e3..ffd7637f 100644 Binary files a/skins/archlinux/magnify-clip.png and b/skins/archlinux/magnify-clip.png differ diff --git a/skins/archlinux/mail_icon.gif b/skins/archlinux/mail_icon.gif index 50a87a9a..cf5680d9 100644 Binary files a/skins/archlinux/mail_icon.gif and b/skins/archlinux/mail_icon.gif differ diff --git a/skins/archlinux/main.css b/skins/archlinux/main.css index d6a67c1e..727355bb 100644 --- a/skins/archlinux/main.css +++ b/skins/archlinux/main.css @@ -54,9 +54,6 @@ body { margin: 0; padding: 0; } -.visualClear { - clear: both; -} /* general styles */ @@ -281,43 +278,12 @@ span.subpages { #siteNotice { text-align: center; font-size: 95%; - padding: 0 .9em; + padding: 0 0.9em; } #siteNotice p { margin: 0; padding: 0; } -.success { - color: green; - font-size: larger; -} -.error { - color: red; - font-size: larger; -} -.errorbox, .successbox { - font-size: larger; - border: 2px solid; - padding: .5em 1em; - float: left; - margin-bottom: 2em; - color: #000; -} -.errorbox { - border-color: red; - background-color: #fff2f2; -} -.successbox { - border-color: green; - background-color: #dfd; -} -.errorbox h2, .successbox h2 { - font-size: 1em; - font-weight: bold; - display: inline; - margin: 0 .5em 0 0; - border: none; -} .catlinks { border: 1px solid #aaa; @@ -525,35 +491,34 @@ table.rimage { ** this is css3, the validator doesn't like it when validating as css2 */ #bodyContent a.external, -#bodyContent a[href ^="gopher://"] { +#bodyContent a.external[href ^="gopher://"] { background: url(external.png) center right no-repeat; padding: 0 13px; } .rtl #bodyContent a.external, -.rtl #bodyContent a[href ^="gopher://"] { +.rtl #bodyContent a.external[href ^="gopher://"] { background-image: url(external-rtl.png); } -#bodyContent a[href ^="https://"], +#bodyContent a.external[href ^="https://"], .link-https { background: url(lock_icon.gif) center right no-repeat; padding: 0 16px; } -#bodyContent a[href ^="mailto:"], +#bodyContent a.external[href ^="mailto:"], .link-mailto { background: url(mail_icon.gif) center right no-repeat; padding: 0 18px; } -#bodyContent a[href ^="news://"] { +#bodyContent a.external[href ^="news://"] { background: url(news_icon.png) center right no-repeat; padding: 0 18px; } -#bodyContent a[href ^="ftp://"], +#bodyContent a.external[href ^="ftp://"], .link-ftp { background: url(file_icon.gif) center right no-repeat; padding: 0 18px; } -#bodyContent a[href ^="irc://"], -#bodyContent a.extiw[href ^="irc://"], +#bodyContent a.external[href ^="irc://"], .link-irc { background: url(discussionitem_icon.gif) center right no-repeat; padding: 0 18px; @@ -604,18 +569,10 @@ table.rimage { #bodyContent a.extiw, #bodyContent a.extiw:active { color: #36b; - background: none; - padding: 0; } #bodyContent a.external { color: #36b; } -/* this can be used in the content area to switch off -special external link styling */ -#bodyContent .plainlinks a { - background: none !important; - padding: 0 !important; -} /* ** Structural Elements */ @@ -920,6 +877,14 @@ li#ca-watch, li#ca-unwatch, li#ca-varlang-0, li#ca-print { z-index: 3; } +/* Override text-transform on languages where capitalization is significant */ +.capitalize-all-nouns .portlet h5, +.capitalize-all-nouns .portlet h6, +.capitalize-all-nouns #p-personal ul, +.capitalize-all-nouns #p-cactions ul li a { + text-transform: none; +} + /* TODO: #t-iscite is only used by the Cite extension, come up with some * system which allows extensions to add to this file on the fly */ @@ -956,6 +921,13 @@ li#ca-watch, li#ca-unwatch, li#ca-varlang-0, li#ca-print { height: 1%; } +.mw-htmlform-submit { + font-weight: bold; + padding-left: .3em; + padding-right: .3em; + margin-right: 2em; +} + /* js pref toc */ #preftoc { margin: 0; @@ -1005,10 +977,6 @@ li#ca-watch, li#ca-unwatch, li#ca-varlang-0, li#ca-print { cursor: default; text-decoration: none; } -#prefcontrol { - padding-top: 2em; - clear: both; -} #preferences { margin: 0; border: 1px solid #aaa; @@ -1021,11 +989,7 @@ li#ca-watch, li#ca-unwatch, li#ca-varlang-0, li#ca-print { padding: 0; margin: 0; } -.prefsection fieldset { - border: 1px solid #aaa; - float: left; - margin-right: 2em; -} + .prefsection legend { font-weight: bold; } @@ -1035,16 +999,11 @@ li#ca-watch, li#ca-unwatch, li#ca-varlang-0, li#ca-print { .mainLegend { display: none; } -div.prefsectiontip { +td.htmlform-tip { font-size: x-small; padding: .2em 2em; color: #666; } -.btnSavePrefs { - font-weight: bold; - padding-left: .3em; - padding-right: .3em; -} .preferences-login { clear: both; @@ -1162,20 +1121,9 @@ div#userloginForm .captcha { display: none; } -.not-patrolled { - background-color: #ffa; -} + div.patrollink { clear: both; - font-size: 75%; - text-align: right; -} -span.newpage, span.minor, span.bot { - font-weight: bold; -} -span.unpatrolled { - font-weight: bold; - color: red; } .sharedUploadNotice { @@ -1187,66 +1135,14 @@ span.updatedmarker { background-color: #0f0; } -table.gallery { - border: 1px solid #ccc; - margin: 2px; - padding: 2px; - background-color: white; -} - -table.gallery tr { - vertical-align: top; -} - -table.gallery td { - vertical-align: top; - background-color: #f9f9f9; - border: solid 2px white; -} -/* Keep this temporarily so that cached pages will display right */ -table.gallery td.galleryheader { - text-align: center; - font-weight: bold; -} -table.gallery caption { - font-weight: bold; -} - -div.gallerybox { - margin: 2px; -} - -div.gallerybox div.thumb { - text-align: center; - border: 1px solid #ccc; - margin: 2px; -} - -div.gallerytext { - overflow: hidden; - font-size: 94%; - padding: 2px 4px; -} - -span.comment { - font-style: italic; -} - -span.changedby { - font-size: 95%; -} - .previewnote { - text-indent: 3em; color: #c00; - border-bottom: 1px solid #aaa; - padding-bottom: 1em; margin-bottom: 1em; } .previewnote p { - margin: 0; - padding: 0; + text-indent: 3em; + margin: 0.8em 0; } .editExternally { @@ -1268,69 +1164,6 @@ span.changedby { text-indent: -2em; } -/* Classes for EXIF data display */ -table.mw_metadata { - font-size: 0.8em; - margin-left: 0.5em; - margin-bottom: 0.5em; - width: 300px; -} - -table.mw_metadata caption { - font-weight: bold; -} - -table.mw_metadata th { - font-weight: normal; -} - -table.mw_metadata td { - padding: 0.1em; -} - -table.mw_metadata { - border: none; - border-collapse: collapse; -} - -table.mw_metadata td, table.mw_metadata th { - text-align: center; - border: 1px solid #aaaaaa; - padding-left: 0.1em; - padding-right: 0.1em; -} - -table.mw_metadata th { - background-color: #f9f9f9; -} - -table.mw_metadata td { - background-color: #fcfcfc; -} - -table.collapsed tr.collapsable { - display: none; -} - - -/* filetoc */ -ul#filetoc { - text-align: center; - border: 1px solid #aaaaaa; - background-color: #f9f9f9; - padding: 5px; - font-size: 95%; - margin-bottom: 0.5em; - margin-left: 0; - margin-right: 0; -} - -#filetoc li { - display: inline; - list-style-type: none; - padding-right: 2em; -} - input#wpSummary { width: 80%; } @@ -1368,32 +1201,6 @@ p.revision_saved { font-weight:bold; } -#mw_trackbacks { - border: solid 1px #bbbbff; - background-color: #eeeeff; - padding: 0.2em; -} - - -/* Allmessages table */ - -#allmessagestable th { - background-color: #b2b2ff; -} - -#allmessagestable tr.orig { - background-color: #ffe2e2; -} - -#allmessagestable tr.new { - background-color: #e2ffe2; -} - -#allmessagestable tr.def { - background-color: #f0f0ff; -} - - /* noarticletext */ div.noarticletext { border: 1px solid #ccc; @@ -1457,53 +1264,6 @@ table.multipageimage td { text-align: center; } -/** Special:Version */ - -table#sv-ext, table#sv-hooks, table#sv-software { - margin: 1em; - padding:0em; -} - -#sv-ext td, #sv-hooks td, #sv-software td, -#sv-ext th, #sv-hooks th, #sv-software th { - border: 1px solid #A0A0A0; - padding: 0 0.15em 0 0.15em; -} -#sv-ext th, #sv-hooks th, #sv-software th { - background-color: #F0F0F0; - color: black; - padding: 0 0.15em 0 0.15em; -} -tr.sv-space{ - height: 0.8em; - border:none; -} -tr.sv-space td { display: none; } - -/* - Table pager (e.g. Special:Imagelist) - - remove underlines from the navigation link - - collapse borders - - set the borders to outsets (similar to Special:Allmessages) - - remove line wrapping for all td and th, set background color - - restore line wrapping for the last two table cells (description and size) -*/ -.TablePager { min-width: 80%; } -.TablePager_nav a { text-decoration: none; } -.TablePager { border-collapse: collapse; } -.TablePager, .TablePager td, .TablePager th { - border: 1px solid #aaaaaa; - padding: 0 0.15em 0 0.15em; -} -.TablePager th { background-color: #eeeeff } -.TablePager td { background-color: #ffffff } -.TablePager tr:hover td { background-color: #eeeeff } - -.imagelist td, .imagelist th { white-space: nowrap } -.imagelist .TablePager_col_links { background-color: #eeeeff } -.imagelist .TablePager_col_img_description { white-space: normal } -.imagelist th.TablePager_sort { background-color: #ccccff } - .templatesUsed { margin-top: 1.5em; } .mw-summary-preview { @@ -1537,24 +1297,12 @@ div.mw-lag-warn-high { font-size: 90%; } -/** Special:Search stuff */ -div#mw-search-interwiki-caption { - text-align: center; - font-weight: bold; - font-size: 95%; -} - -.mw-search-interwiki-project { - font-size: 97%; - text-align: left; - padding-left: 0.2em; - padding-right: 0.15em; - padding-bottom: 0.2em; - padding-top: 0.15em; - background: #cae8ff; -} - /* God-damned hack for the crappy layout */ .os-suggest { font-size: 127%; } + +/* Sometimes people don't want personal tools to be lowercase! */ +.no-text-transform { + text-transform: none; +} diff --git a/skins/archlinux/rtl.css b/skins/archlinux/rtl.css index 9b8e4f44..b9bf43c0 100644 --- a/skins/archlinux/rtl.css +++ b/skins/archlinux/rtl.css @@ -211,7 +211,6 @@ input#wpSave, input#wpDiff { } #userlogin { - float: right; margin: 0 0 1em 3em; } /* Convenience links to edit block, delete and protect reasons */ @@ -228,20 +227,25 @@ table.filehistory th { text-align: right; } +/* Special:Allpages styling */ +td.mw-allpages-nav, p.mw-allpages-nav, td.mw-allpages-alphaindexline { + text-align: left; +} + +/* Special:Prefixindex styling */ +td#mw-prefixindex-nav-form { + text-align: left; +} + /** * Lists: * The following lines don't have a visible effect on non-Gecko browsers * They fix a problem ith Gecko browsers rendering lists to the right of * left-floated objects in an RTL layout. */ -html > body div#bodyContent ul { +html > body div#article ul { display: table; } html > body div#bodyContent ul#filetoc { display: block; } -/* Special:Prefixindex styling */ -td#mw-prefixindex-nav-form { - text-align: left; -} - diff --git a/skins/archlinux/user.gif b/skins/archlinux/user.gif index c9c9ab96..34b4839d 100644 Binary files a/skins/archlinux/user.gif and b/skins/archlinux/user.gif differ diff --git a/skins/archlinux/video.png b/skins/archlinux/video.png index 38103dac..fadc4c9b 100644 Binary files a/skins/archlinux/video.png and b/skins/archlinux/video.png differ diff --git a/skins/archlinux/wiki.png b/skins/archlinux/wiki.png index 69fce988..44389389 100644 Binary files a/skins/archlinux/wiki.png and b/skins/archlinux/wiki.png differ diff --git a/skins/chick/main.css b/skins/chick/main.css index fde03301..ac61b91b 100644 --- a/skins/chick/main.css +++ b/skins/chick/main.css @@ -7,10 +7,11 @@ */ body { - font-family: sans-serif; - color: Black; - margin: 0; - padding: 0.3em; + font-family: sans-serif; + color: black; + background: white; + margin: 0; + padding: 0.3em; } a { color: #002bb8; } @@ -23,32 +24,32 @@ a.new:visited, #p-personal a.new:visited { color:#a55858; } img { - border: none; - vertical-align: middle; + border: none; + vertical-align: middle; } p { - margin: 0.4em 0em 0.5em 0em; - line-height: 1.5em; + 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; + 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; - padding-top: 0.5em; - padding-bottom: 0.17em; - border-bottom: 1px solid #aaaaaa; + color: black; + background: none; + font-weight: normal; + margin: 0; + padding-top: 0.5em; + padding-bottom: 0.17em; + border-bottom: 1px solid #aaaaaa; } .editsection { font-weight: normal; @@ -58,8 +59,8 @@ 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; + border-bottom: none; + font-weight: bold; } h3 { font-size: 132%; } h3 .editsection { font-size: 75.8%; } @@ -70,97 +71,97 @@ h6 { font-size: 80%; } h6 .editsection { font-size: 125%; } ul { - line-height: 1.5em; - margin: 0.3em 0 0 1.5em; - padding:0; + 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; + 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; + font-weight: bold; + margin-bottom: 0.1em; } dl{ - margin-top: 0.2em; - margin-bottom: 0.5em; + margin-top: 0.2em; + margin-bottom: 0.5em; } dd { - line-height: 1.5em; - margin-left: 2em; - margin-bottom: 0.1em; + 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; + 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%; + background: white; + padding: 0.5em; + font-size: 95%; } form { - border: none; - margin: 0; + border: none; + margin: 0; } textarea { - border: 1px solid #2f6fab; - color: Black; - background-color: white; - width: 100%; - padding: 0.1em; - overflow: auto; + 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; - } + 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; + 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; + border: 1px solid #2f6fab; + color: black; + vertical-align: top; } abbr, acronym, .explain { - border-bottom: 1px dotted Black; - color: Black; - background: none; - cursor: help; + border-bottom: 1px dotted black; + color: black; + background: none; + cursor: help; } q { - font-family: Times, "Times New Roman", serif; - font-style: italic; + font-family: Times, "Times New Roman", serif; + font-style: italic; } code { background-color: #f9f9f9; } pre { - padding: 1em; - border: 1px dashed #2f6fab; - color: Black; - background-color: #f9f9f9; - line-height: 1.1em; + padding: 1em; + border: 1px dashed #2f6fab; + color: black; + background-color: #f9f9f9; + line-height: 1.1em; } /* @@ -174,36 +175,36 @@ span.subpages { display: block; } #bodyContent h3, #bodyContent h4, #bodyContent h5 { - margin-bottom: 0.3em; + 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; + 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; + 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; + color: red; + font-size: larger; } .catlinks { - border:1px solid #aaaaaa; - background-color:#f9f9f9; - padding: 2px 5px; - margin: 0.1em 0 0 0; - clear: both; + border:1px solid #aaaaaa; + background-color:#f9f9f9; + padding: 2px 5px; + margin: 0.1em 0 0 0; + clear: both; } .catlinks { margin: 0; padding: 0; } @@ -211,28 +212,28 @@ span.subpages { display: block; } /* currently unused, intended to be used by a metadata box in the bottom-right corner of the content area */ .documentDescription { - /* The summary text describing the document */ - font-weight: bold; - display: block; - margin: 1em 0em; - line-height: 1.5em; + /* The summary text describing the document */ + font-weight: bold; + display: block; + margin: 1em 0em; + line-height: 1.5em; } .documentByLine { - text-align: right; - font-size: 90%; - clear: both; - font-weight: normal; - color: #76797c; + text-align: right; + font-size: 90%; + clear: both; + font-weight: normal; + color: #76797c; } /* emulate center */ .center { - width: 100%; - text-align: center; + width: 100%; + text-align: center; } *.center * { - margin-left: auto; - margin-right: auto; + margin-left: auto; + margin-right: auto; } /* small for tables and similar */ .small, .small * { font-size: 94%; } @@ -243,88 +244,88 @@ table.small { font-size: 100% } */ #toc { - /*border:1px solid #2f6fab;*/ - border:1px solid #aaaaaa; - background-color:#f9f9f9; - padding:5px; - font-size: 95%; + /*border:1px solid #2f6fab;*/ + border:1px solid #aaaaaa; + background-color:#f9f9f9; + padding:5px; + font-size: 95%; } #toc ul { margin-left: 2em; } #toc .toctoggle { font-size: 94%; } #toc .editsection { - margin-top: 0.7em; - font-size: 94%; + margin-top: 0.7em; + font-size: 94%; } /* images */ div.floatright, table.floatright { - clear: right; - float: right; - margin: 0; - position: relative; - border: 0.5em solid White; - border-width: 0.5em 0 0.8em 1.4em; + clear: right; + float: right; + margin: 0; + position: relative; + border: 0.5em solid white; + border-width: 0.5em 0 0.8em 1.4em; } div.floatright p { font-style: italic; } div.floatleft, table.floatleft { - float: left; - clear: left; - margin: 0.3em 0.5em 0.5em 0; - position: relative; - border: 0.5em solid White; - border-width: 0.5em 1.4em 0.8em 0; + float: left; + clear: left; + margin: 0.3em 0.5em 0.5em 0; + position: relative; + border: 0.5em solid white; + border-width: 0.5em 1.4em 0.8em 0; } div.floatleft p { font-style: italic; } /* thumbnails */ div.thumb { - margin-bottom: 0.5em; - border-style: solid; border-color: White; - width: auto; -} -div.thumb div { - border:1px solid #cccccc; - padding: 3px !important; - background-color:#f9f9f9; - font-size: 94%; - text-align: center; - overflow: hidden; -} -div.thumb div a img { - border:1px solid #cccccc; -} -div.thumb div div.thumbcaption { - border: none; - text-align: left; - line-height: 1.4em; - padding: 0.3em 0 0.1em 0; + margin-bottom: 0.5em; + border-style: solid; border-color: white; + 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; + float: right; + border: none !important; + background: none !important; } div.magnify a, div.magnify img { - display: block; - border: none !important; - background: none !important; + display: block; + border: none !important; + background: none !important; } div.tright { - clear: right; - float: right; - border-width: 0.5em 0 0.8em 1.4em; + clear: right; + float: right; + border-width: 0.5em 0 0.8em 1.4em; } div.tleft { - float: left; - clear: left; - margin-right:0.5em; - border-width: 0.5em 1.4em 0.8em 0; + float: left; + clear: left; + margin-right:0.5em; + border-width: 0.5em 1.4em 0.8em 0; } img.thumbborder { border: 1px solid #dddddd; } .hiddenStructure { - display: none; + display: none; } /* @@ -337,26 +338,26 @@ img.thumbborder { */ /* table standards */ table.rimage { - float:right; - position:relative; - margin-left:1em; - margin-bottom:1em; - text-align:center; + 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%; + 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; + line-height: 1.4em; + margin: 0; + padding: 0; } a.external { color: #3366bb; } @@ -376,51 +377,18 @@ div.patrollink { font-size: 75%; text-align: right; } -span.newpage, span.minor { - font-weight: bold; -} span.updatedmarker { color:black; background-color:#00FF00; } -table.gallery { - border: 1px solid #cccccc; - margin: 2px; - padding: 2px; - background-color:#ffffff; -} - -table.gallery tr { - vertical-align:top; -} - -table.gallery td { - vertical-align:top; - background-color:#f9f9f9; - border: solid 2px white; -} - div.gallerybox { - margin: 2px; - width: 150px; + width: 150px; } -div.gallerybox div.thumb { - text-align: center; - border: 1px solid #cccccc; - margin: 2px; -} - -div.gallerytext { - overflow: hidden; - font-size: 94%; - padding: 2px 4px; -} - #xjump-to-nav { - display: none; + display: none; } .templatesUsed { margin-top: 1.5em; } @@ -440,4 +408,4 @@ div.gallerytext { } #f-poweredbyico, #f-copyrightico { display: inline; -} \ No newline at end of file +} diff --git a/skins/common/IE80Fixes.css b/skins/common/IE80Fixes.css new file mode 100644 index 00000000..b6360f60 --- /dev/null +++ b/skins/common/IE80Fixes.css @@ -0,0 +1,15 @@ +/** + * Fixes textarea scrolling bug (bug #19334). The bug only occurs when a + * percentage width is given, so instead of width: 100%, use min-width: 100%; + * max-width: 100%. We also need to give a fixed width for the actual width + * property for the hack to work, although the actual value (500px here) ends + * up being ignored; min/max-width take precedence. + * + * More info: http://grantovich.net/posts/2009/06/that-weird-ie8-textarea-bug/ + */ +#wpTextbox1 { + height: 390px; + width: 500px; + min-width: 100%; + max-width: 100%; +} diff --git a/skins/common/IEFixes.js b/skins/common/IEFixes.js index f85f506c..762d7a78 100644 --- a/skins/common/IEFixes.js +++ b/skins/common/IEFixes.js @@ -1,127 +1,128 @@ // IE fixes javascript -var isMSIE55 = (window.showModalDialog && window.clipboardData && window.createPopup); +var isMSIE55 = ( window.showModalDialog && window.clipboardData && window.createPopup ); var doneIETransform; var doneIEAlphaFix; -if (document.attachEvent) - document.attachEvent('onreadystatechange', hookit); +if ( document.attachEvent ) { + document.attachEvent( 'onreadystatechange', hookit ); +} function hookit() { - if (!doneIETransform && document.getElementById && document.getElementById('bodyContent')) { - doneIETransform = true; - relativeforfloats(); - fixalpha(); - } + if ( !doneIETransform && document.getElementById && document.getElementById( 'bodyContent' ) ) { + doneIETransform = true; + relativeforfloats(); + fixalpha(); + } } // png alpha transparency fixes -function fixalpha() { - // bg - if (isMSIE55 && !doneIEAlphaFix) - { - var plogo = document.getElementById('p-logo'); - if (!plogo) return; - - var logoa = plogo.getElementsByTagName('a')[0]; - if (!logoa) return; - - var bg = logoa.currentStyle.backgroundImage; - var imageUrl = bg.substring(5, bg.length-2); - - doneIEAlphaFix = true; - - if (imageUrl.substr(imageUrl.length-4).toLowerCase() == '.png') { - var logospan = logoa.appendChild(document.createElement('span')); - - logoa.style.backgroundImage = 'none'; - logospan.style.filter = 'progid:DXImageTransform.Microsoft.AlphaImageLoader(src=' + imageUrl + ')'; - logospan.style.height = '100%'; - logospan.style.position = 'absolute'; - logospan.style.width = logoa.currentStyle.width; - logospan.style.cursor = 'hand'; - // Center image with hack for IE5.5 - if (document.documentElement.dir == "rtl") - { - logospan.style.right = '50%'; - logospan.style.setExpression('marginRight', '"-" + (this.offsetWidth / 2) + "px"'); - } - else - { - logospan.style.left = '50%'; - logospan.style.setExpression('marginLeft', '"-" + (this.offsetWidth / 2) + "px"'); - } - logospan.style.top = '50%'; - logospan.style.setExpression('marginTop', '"-" + (this.offsetHeight / 2) + "px"'); - - var linkFix = logoa.appendChild(logoa.cloneNode()); - linkFix.style.position = 'absolute'; - linkFix.style.height = '100%'; - linkFix.style.width = '100%'; - } - } +function fixalpha( logoId ) { + // bg + if ( isMSIE55 && !doneIEAlphaFix ) { + var plogo = document.getElementById( logoId || 'p-logo' ); + if ( !plogo ) { + return; + } + + var logoa = plogo.getElementsByTagName('a')[0]; + if ( !logoa ) { + return; + } + + var bg = logoa.currentStyle.backgroundImage; + var imageUrl = bg.substring( 5, bg.length - 2 ); + + doneIEAlphaFix = true; + + if ( imageUrl.substr( imageUrl.length - 4 ).toLowerCase() == '.png' ) { + var logospan = logoa.appendChild( document.createElement( 'span' ) ); + + logoa.style.backgroundImage = 'none'; + logospan.style.filter = 'progid:DXImageTransform.Microsoft.AlphaImageLoader(src=' + imageUrl + ')'; + logospan.style.height = '100%'; + logospan.style.position = 'absolute'; + logospan.style.width = logoa.currentStyle.width; + logospan.style.cursor = 'hand'; + // Center image with hack for IE5.5 + if ( document.documentElement.dir == 'rtl' ) { + logospan.style.right = '50%'; + logospan.style.setExpression( 'marginRight', '"-" + (this.offsetWidth / 2) + "px"' ); + } else { + logospan.style.left = '50%'; + logospan.style.setExpression( 'marginLeft', '"-" + (this.offsetWidth / 2) + "px"' ); + } + logospan.style.top = '50%'; + logospan.style.setExpression( 'marginTop', '"-" + (this.offsetHeight / 2) + "px"' ); + + var linkFix = logoa.appendChild( logoa.cloneNode() ); + linkFix.style.position = 'absolute'; + linkFix.style.height = '100%'; + linkFix.style.width = '100%'; + } + } } // fix ie6 disappering float bug function relativeforfloats() { - var bc = document.getElementById('bodyContent'); - if (bc) { - var tables = bc.getElementsByTagName('table'); - var divs = bc.getElementsByTagName('div'); - } - setrelative(tables); - setrelative(divs); + var bc = document.getElementById( 'bodyContent' ); + if ( bc ) { + var tables = bc.getElementsByTagName( 'table' ); + var divs = bc.getElementsByTagName( 'div' ); + } + setrelative( tables ); + setrelative( divs ); } -function setrelative (nodes) { - var i = 0; - while (i < nodes.length) { - if(((nodes[i].style.float && nodes[i].style.float != ('none') || - (nodes[i].align && nodes[i].align != ('none'))) && - (!nodes[i].style.position || nodes[i].style.position != 'relative'))) - { - nodes[i].style.position = 'relative'; - } - i++; - } +function setrelative( nodes ) { + var i = 0; + while ( i < nodes.length ) { + if( ( ( nodes[i].style.float && nodes[i].style.float != ( 'none' ) || + ( nodes[i].align && nodes[i].align != ( 'none' ) ) ) && + ( !nodes[i].style.position || nodes[i].style.position != 'relative' ) ) ) + { + nodes[i].style.position = 'relative'; + } + i++; + } } - // Expand links for printing - -String.prototype.hasClass = function(classWanted) -{ - var classArr = this.split(/\s/); - for (var i=0; i body div#article ul { display: table; } +html > body div#bodyContent ul#filetoc { + display: block; +} /* feed links */ a.feedlink { diff --git a/skins/common/edit.js b/skins/common/edit.js index 945059e0..423205f8 100644 --- a/skins/common/edit.js +++ b/skins/common/edit.js @@ -1,137 +1,163 @@ +var currentFocused; + // this function generates the actual toolbar buttons with localized text // we use it to avoid creating the toolbar where javascript is not enabled -function addButton(imageFile, speedTip, tagOpen, tagClose, sampleText, imageId) { +function addButton( imageFile, speedTip, tagOpen, tagClose, sampleText, imageId ) { // Don't generate buttons for browsers which don't fully // support it. - mwEditButtons[mwEditButtons.length] = - {"imageId": imageId, - "imageFile": imageFile, - "speedTip": speedTip, - "tagOpen": tagOpen, - "tagClose": tagClose, - "sampleText": sampleText}; + mwEditButtons.push({ + 'imageId': imageId, + 'imageFile': imageFile, + 'speedTip': speedTip, + 'tagOpen': tagOpen, + 'tagClose': tagClose, + 'sampleText': sampleText + }); } // this function generates the actual toolbar buttons with localized text -// we use it to avoid creating the toolbar where javascript is not enabled -function mwInsertEditButton(parent, item) { - var image = document.createElement("img"); +// we use it to avoid creating the toolbar where JavaScript is not enabled +function mwInsertEditButton( parent, item ) { + var image = document.createElement( 'img' ); image.width = 23; image.height = 22; - image.className = "mw-toolbar-editbutton"; - if (item.imageId) image.id = item.imageId; + image.className = 'mw-toolbar-editbutton'; + if ( item.imageId ) { + image.id = item.imageId; + } image.src = item.imageFile; image.border = 0; image.alt = item.speedTip; image.title = item.speedTip; - image.style.cursor = "pointer"; + image.style.cursor = 'pointer'; image.onclick = function() { - insertTags(item.tagOpen, item.tagClose, item.sampleText); + insertTags( item.tagOpen, item.tagClose, item.sampleText ); + // click tracking + if ( ( typeof $j != 'undefined' ) && ( typeof $j.trackAction != 'undefined' ) ) { + $j.trackAction( 'oldedit.' + item.speedTip.replace(/ /g, "-") ); + } return false; }; - parent.appendChild(image); + parent.appendChild( image ); return true; } function mwSetupToolbar() { - var toolbar = document.getElementById('toolbar'); - if (!toolbar) { return false; } - - var textbox = document.getElementById('wpTextbox1'); - if (!textbox) { return false; } + var toolbar = document.getElementById( 'toolbar' ); + if ( !toolbar ) { + return false; + } // Don't generate buttons for browsers which don't fully // support it. - if (!(document.selection && document.selection.createRange) - && textbox.selectionStart === null) { + // but don't assume wpTextbox1 is always here + var textboxes = document.getElementsByTagName( 'textarea' ); + if ( !textboxes.length ) { + // No toolbar if we can't find any textarea return false; } - - for (var i = 0; i < mwEditButtons.length; i++) { - mwInsertEditButton(toolbar, mwEditButtons[i]); + // Only check for selection capability if the textarea is visible - errors will occur otherwise - just because + // the textarea is not visible, doesn't mean we shouldn't build out the toolbar though - it might have been replaced + // with some other kind of control + if ( textboxes[0].style.display != 'none' ) { + if ( !( document.selection && document.selection.createRange ) + && textboxes[0].selectionStart === null ) { + return false; + } + } + for ( var i = 0; i < mwEditButtons.length; i++ ) { + mwInsertEditButton( toolbar, mwEditButtons[i] ); } - for (var i = 0; i < mwCustomEditButtons.length; i++) { - mwInsertEditButton(toolbar, mwCustomEditButtons[i]); + for ( var i = 0; i < mwCustomEditButtons.length; i++ ) { + mwInsertEditButton( toolbar, mwCustomEditButtons[i] ); } return true; } // apply tagOpen/tagClose to selection in textarea, // use sampleText instead of selection if there is none -function insertTags(tagOpen, tagClose, sampleText) { +function insertTags( tagOpen, tagClose, sampleText ) { + if ( typeof $j != 'undefined' && typeof $j.fn.textSelection != 'undefined' && + ( currentFocused.nodeName.toLowerCase() == 'iframe' || currentFocused.id == 'wpTextbox1' ) ) { + $j( '#wpTextbox1' ).textSelection( + 'encapsulateSelection', { 'pre': tagOpen, 'peri': sampleText, 'post': tagClose } + ); + return; + } var txtarea; - if (document.editform) { - txtarea = document.editform.wpTextbox1; + if ( document.editform ) { + txtarea = currentFocused; } else { // some alternate form? take the first one we can find - var areas = document.getElementsByTagName('textarea'); + var areas = document.getElementsByTagName( 'textarea' ); txtarea = areas[0]; } var selText, isSample = false; - if (document.selection && document.selection.createRange) { // IE/Opera - - //save window scroll position - if (document.documentElement && document.documentElement.scrollTop) + if ( document.selection && document.selection.createRange ) { // IE/Opera + // save window scroll position + if ( document.documentElement && document.documentElement.scrollTop ) { var winScroll = document.documentElement.scrollTop - else if (document.body) + } else if ( document.body ) { var winScroll = document.body.scrollTop; - //get current selection + } + // get current selection txtarea.focus(); var range = document.selection.createRange(); selText = range.text; - //insert tags + // insert tags checkSelectedText(); range.text = tagOpen + selText + tagClose; - //mark sample text as selected - if (isSample && range.moveStart) { - if (window.opera) + // mark sample text as selected + if ( isSample && range.moveStart ) { + if ( window.opera ) { tagClose = tagClose.replace(/\n/g,''); - range.moveStart('character', - tagClose.length - selText.length); - range.moveEnd('character', - tagClose.length); + } + range.moveStart('character', - tagClose.length - selText.length); + range.moveEnd('character', - tagClose.length); } - range.select(); - //restore window scroll position - if (document.documentElement && document.documentElement.scrollTop) - document.documentElement.scrollTop = winScroll - else if (document.body) + range.select(); + // restore window scroll position + if ( document.documentElement && document.documentElement.scrollTop ) { + document.documentElement.scrollTop = winScroll; + } else if ( document.body ) { document.body.scrollTop = winScroll; + } - } else if (txtarea.selectionStart || txtarea.selectionStart == '0') { // Mozilla - - //save textarea scroll position + } else if ( txtarea.selectionStart || txtarea.selectionStart == '0' ) { // Mozilla + // save textarea scroll position var textScroll = txtarea.scrollTop; - //get current selection + // get current selection txtarea.focus(); var startPos = txtarea.selectionStart; var endPos = txtarea.selectionEnd; - selText = txtarea.value.substring(startPos, endPos); - //insert tags + selText = txtarea.value.substring( startPos, endPos ); + // insert tags checkSelectedText(); txtarea.value = txtarea.value.substring(0, startPos) + tagOpen + selText + tagClose + txtarea.value.substring(endPos, txtarea.value.length); - //set new selection - if (isSample) { + // set new selection + if ( isSample ) { txtarea.selectionStart = startPos + tagOpen.length; txtarea.selectionEnd = startPos + tagOpen.length + selText.length; } else { txtarea.selectionStart = startPos + tagOpen.length + selText.length + tagClose.length; txtarea.selectionEnd = txtarea.selectionStart; } - //restore textarea scroll position + // restore textarea scroll position txtarea.scrollTop = textScroll; - } + } - function checkSelectedText(){ - if (!selText) { + function checkSelectedText() { + if ( !selText ) { selText = sampleText; isSample = true; - } else if (selText.charAt(selText.length - 1) == ' ') { //exclude ending space char + } else if ( selText.charAt(selText.length - 1) == ' ' ) { // exclude ending space char selText = selText.substring(0, selText.length - 1); - tagClose += ' ' - } + tagClose += ' '; + } } } @@ -144,13 +170,62 @@ function scrollEditBox() { var editBox = document.getElementById( 'wpTextbox1' ); var scrollTop = document.getElementById( 'wpScrolltop' ); var editForm = document.getElementById( 'editform' ); - if( editBox && scrollTop ) { - if( scrollTop.value ) + if( editForm && editBox && scrollTop ) { + if( scrollTop.value ) { editBox.scrollTop = scrollTop.value; + } addHandler( editForm, 'submit', function() { - document.getElementById( 'wpScrolltop' ).value = document.getElementById( 'wpTextbox1' ).scrollTop; + scrollTop.value = editBox.scrollTop; } ); } } hookEvent( 'load', scrollEditBox ); hookEvent( 'load', mwSetupToolbar ); +hookEvent( 'load', function() { + currentFocused = document.getElementById( 'wpTextbox1' ); + // http://www.quirksmode.org/blog/archives/2008/04/delegating_the.html + // focus does not bubble normally, but using a trick we can do event delegation + // on the focus event on all text inputs to make the toolbox usable on all of them + var editForm = document.getElementById( 'editform' ); + if ( !editForm ) { + return; + } + function onfocus( e ) { + var elm = e.target || e.srcElement; + if ( !elm ) { + return; + } + var tagName = elm.tagName.toLowerCase(); + var type = elm.type || ''; + if ( tagName !== 'textarea' && tagName !== 'input' ) { + return; + } + if ( tagName === 'input' && type.toLowerCase() !== 'text' ) { + return; + } + + currentFocused = elm; + } + + if ( editForm.addEventListener ) { + // Gecko, WebKit, Opera, etc... (all standards compliant browsers) + editForm.addEventListener( 'focus', onfocus, true ); // This MUST be true to work + } else if ( editForm.attachEvent ) { + // IE needs a specific trick here since it doesn't support the standard + editForm.attachEvent( 'onfocusin', function() { onfocus( event ); } ); + } + + // HACK: make currentFocused work with the usability iframe + // With proper focus detection support (HTML 5!) this'll be much cleaner + if ( typeof $j != 'undefined' ) { + var iframe = $j( '.wikiEditor-ui-text iframe' ); + if ( iframe.length > 0 ) { + $j( iframe.get( 0 ).contentWindow.document ) + .add( iframe.get( 0 ).contentWindow.document.body ) // for IE + .focus( function() { currentFocused = iframe.get( 0 ); } ); + } + } + + editForm +} ); + diff --git a/skins/common/history.js b/skins/common/history.js index 6a84b997..02651225 100644 --- a/skins/common/history.js +++ b/skins/common/history.js @@ -67,20 +67,19 @@ function diffcheck() { } else { inputs[1].style.visibility = 'visible'; } - lis[i].className = lis[i].classNameOriginal; + if ( typeof lis[i].classNameOriginal != 'undefined' ) { + lis[i].className = lis[i].classNameOriginal; + } } } } return true; } -// page history stuff -// attach event handlers to the input elements on history page +// Attach event handlers to the input elements on history page function histrowinit() { var hf = document.getElementById('pagehistory'); - if (!hf) { - return; - } + if (!hf) return; var lis = hf.getElementsByTagName('li'); for (var i = 0; i < lis.length; i++) { var inputs = historyRadios(lis[i]); diff --git a/skins/common/htmlform.js b/skins/common/htmlform.js new file mode 100644 index 00000000..2045ab48 --- /dev/null +++ b/skins/common/htmlform.js @@ -0,0 +1,40 @@ +// Find select-or-other fields. +addOnloadHook( function() { + var fields = getElementsByClassName( document, 'select', 'mw-htmlform-select-or-other' ); + + for( var i = 0; i < fields.length; i++ ) { + var select = fields[i]; + + addHandler( select, 'change', htmlforms.selectOrOtherSelectChanged ); + + // Use a fake 'e' to update it. + htmlforms.selectOrOtherSelectChanged( { 'target': select } ); + } +} ); + +var htmlforms = { + 'selectOrOtherSelectChanged' : function( e ) { + var select; + if ( !e ) { + e = window.event; + } + if ( e.target ) { + select = e.target; + } else if ( e.srcElement ) { + select = e.srcElement; + } + if ( select.nodeType == 3 ) { // defeat Safari bug + select = select.parentNode; + } + + var id = select.id; + var textbox = document.getElementById( id + '-other' ); + + if ( select.value == 'other' ) { + textbox.disabled = false; + } else { + textbox.disabled = true; + } + } +} + diff --git a/skins/common/images/Arr_.png b/skins/common/images/Arr_.png index 83fafc74..8d8d5d9c 100644 Binary files a/skins/common/images/Arr_.png and b/skins/common/images/Arr_.png differ diff --git a/skins/common/images/Arr_r.xcf b/skins/common/images/Arr_r.xcf deleted file mode 100644 index 83b7b2a8..00000000 Binary files a/skins/common/images/Arr_r.xcf and /dev/null differ diff --git a/skins/common/images/Arr_u.png b/skins/common/images/Arr_u.png index b8e3b6c6..75909865 100644 Binary files a/skins/common/images/Arr_u.png and b/skins/common/images/Arr_u.png differ diff --git a/skins/common/images/Zoom_sans.gif b/skins/common/images/Zoom_sans.gif index 6ba0adca..56a49de8 100644 Binary files a/skins/common/images/Zoom_sans.gif and b/skins/common/images/Zoom_sans.gif differ diff --git a/skins/common/images/add.png b/skins/common/images/add.png new file mode 100644 index 00000000..5b051f64 Binary files /dev/null and b/skins/common/images/add.png differ diff --git a/skins/common/images/ajax-loader.gif b/skins/common/images/ajax-loader.gif new file mode 100644 index 00000000..3288d103 Binary files /dev/null and b/skins/common/images/ajax-loader.gif differ diff --git a/skins/common/images/arrow_first.svg b/skins/common/images/arrow_first.svg deleted file mode 100644 index c1d8e364..00000000 --- a/skins/common/images/arrow_first.svg +++ /dev/null @@ -1,85 +0,0 @@ - - - - - - - - - image/svg+xml - - - - - - - - - diff --git a/skins/common/images/arrow_left.svg b/skins/common/images/arrow_left.svg deleted file mode 100644 index bd4bbc74..00000000 --- a/skins/common/images/arrow_left.svg +++ /dev/null @@ -1,78 +0,0 @@ - - - - - - - - - image/svg+xml - - - - - - - - diff --git a/skins/common/images/be-tarask/button_bold.png b/skins/common/images/be-tarask/button_bold.png index f662c76c..d02aeeeb 100644 Binary files a/skins/common/images/be-tarask/button_bold.png and b/skins/common/images/be-tarask/button_bold.png differ diff --git a/skins/common/images/be-tarask/button_italic.png b/skins/common/images/be-tarask/button_italic.png index 88e1b3bb..d93e9f87 100644 Binary files a/skins/common/images/be-tarask/button_italic.png and b/skins/common/images/be-tarask/button_italic.png differ diff --git a/skins/common/images/be-tarask/button_link.png b/skins/common/images/be-tarask/button_link.png index f68d5d56..07bc6a19 100644 Binary files a/skins/common/images/be-tarask/button_link.png and b/skins/common/images/be-tarask/button_link.png differ diff --git a/skins/common/images/button_bold.png b/skins/common/images/button_bold.png index 5e52deed..2827dba0 100644 Binary files a/skins/common/images/button_bold.png and b/skins/common/images/button_bold.png differ diff --git a/skins/common/images/button_extlink.png b/skins/common/images/button_extlink.png index 12ec5f2e..e551e47e 100644 Binary files a/skins/common/images/button_extlink.png and b/skins/common/images/button_extlink.png differ diff --git a/skins/common/images/button_headline.png b/skins/common/images/button_headline.png index aa0ca540..9867c365 100644 Binary files a/skins/common/images/button_headline.png and b/skins/common/images/button_headline.png differ diff --git a/skins/common/images/button_hr.png b/skins/common/images/button_hr.png index 19cfc480..7f21402a 100644 Binary files a/skins/common/images/button_hr.png and b/skins/common/images/button_hr.png differ diff --git a/skins/common/images/button_image.png b/skins/common/images/button_image.png index 6c3c3308..abd47dde 100644 Binary files a/skins/common/images/button_image.png and b/skins/common/images/button_image.png differ diff --git a/skins/common/images/button_italic.png b/skins/common/images/button_italic.png index 96b1fb9f..f248fa93 100644 Binary files a/skins/common/images/button_italic.png and b/skins/common/images/button_italic.png differ diff --git a/skins/common/images/button_link.png b/skins/common/images/button_link.png index e9507b97..cc72b523 100644 Binary files a/skins/common/images/button_link.png and b/skins/common/images/button_link.png differ diff --git a/skins/common/images/button_math.png b/skins/common/images/button_math.png index e91fb613..507e4b51 100644 Binary files a/skins/common/images/button_math.png and b/skins/common/images/button_math.png differ diff --git a/skins/common/images/button_media.png b/skins/common/images/button_media.png index 02070790..56b1b239 100644 Binary files a/skins/common/images/button_media.png and b/skins/common/images/button_media.png differ diff --git a/skins/common/images/button_nowiki.png b/skins/common/images/button_nowiki.png index 7b2d5392..321a2cb4 100644 Binary files a/skins/common/images/button_nowiki.png and b/skins/common/images/button_nowiki.png differ diff --git a/skins/common/images/button_sig.png b/skins/common/images/button_sig.png index ef3a46d2..39de3b67 100644 Binary files a/skins/common/images/button_sig.png and b/skins/common/images/button_sig.png differ diff --git a/skins/common/images/button_template.png b/skins/common/images/button_template.png index 8e9cc267..ebbca3cf 100644 Binary files a/skins/common/images/button_template.png and b/skins/common/images/button_template.png differ diff --git a/skins/common/images/cyrl/button_italic.png b/skins/common/images/cyrl/button_italic.png index f5e588ec..f79170fd 100644 Binary files a/skins/common/images/cyrl/button_italic.png and b/skins/common/images/cyrl/button_italic.png differ diff --git a/skins/common/images/cyrl/button_link.png b/skins/common/images/cyrl/button_link.png index a690cb35..aa28e85a 100644 Binary files a/skins/common/images/cyrl/button_link.png and b/skins/common/images/cyrl/button_link.png differ diff --git a/skins/common/images/de/button_bold.png b/skins/common/images/de/button_bold.png index 8386828d..32a22800 100644 Binary files a/skins/common/images/de/button_bold.png and b/skins/common/images/de/button_bold.png differ diff --git a/skins/common/images/de/button_italic.png b/skins/common/images/de/button_italic.png index ec719998..875eb2a1 100644 Binary files a/skins/common/images/de/button_italic.png and b/skins/common/images/de/button_italic.png differ diff --git a/skins/common/images/fa/button_bold.png b/skins/common/images/fa/button_bold.png index 2f269a8d..49680152 100644 Binary files a/skins/common/images/fa/button_bold.png and b/skins/common/images/fa/button_bold.png differ diff --git a/skins/common/images/fa/button_headline.png b/skins/common/images/fa/button_headline.png index ef9d109f..9d62767e 100644 Binary files a/skins/common/images/fa/button_headline.png and b/skins/common/images/fa/button_headline.png differ diff --git a/skins/common/images/fa/button_italic.png b/skins/common/images/fa/button_italic.png index 84985848..fc9faf3d 100644 Binary files a/skins/common/images/fa/button_italic.png and b/skins/common/images/fa/button_italic.png differ diff --git a/skins/common/images/fa/button_link.png b/skins/common/images/fa/button_link.png index 4ad5ef56..de56a5c3 100644 Binary files a/skins/common/images/fa/button_link.png and b/skins/common/images/fa/button_link.png differ diff --git a/skins/common/images/fileicon.xcf b/skins/common/images/fileicon.xcf deleted file mode 100644 index 85a0a610..00000000 Binary files a/skins/common/images/fileicon.xcf and /dev/null differ diff --git a/skins/common/images/gnu-fdl.png b/skins/common/images/gnu-fdl.png index 1371aba8..10915329 100644 Binary files a/skins/common/images/gnu-fdl.png and b/skins/common/images/gnu-fdl.png differ diff --git a/skins/common/images/gnu-fdl.xcf b/skins/common/images/gnu-fdl.xcf deleted file mode 100644 index 364440dd..00000000 Binary files a/skins/common/images/gnu-fdl.xcf and /dev/null differ diff --git a/skins/common/images/icons/fileicon-c.png b/skins/common/images/icons/fileicon-c.png index 6da6916e..f7984fa0 100644 Binary files a/skins/common/images/icons/fileicon-c.png and b/skins/common/images/icons/fileicon-c.png differ diff --git a/skins/common/images/icons/fileicon-cpp.png b/skins/common/images/icons/fileicon-cpp.png index ba54e77f..0a9b4cbc 100644 Binary files a/skins/common/images/icons/fileicon-cpp.png and b/skins/common/images/icons/fileicon-cpp.png differ diff --git a/skins/common/images/icons/fileicon-deb.png b/skins/common/images/icons/fileicon-deb.png index ac1e2cf9..605bea17 100644 Binary files a/skins/common/images/icons/fileicon-deb.png and b/skins/common/images/icons/fileicon-deb.png differ diff --git a/skins/common/images/icons/fileicon-djvu.png b/skins/common/images/icons/fileicon-djvu.png index 2e1e2c9b..3eaca1f8 100644 Binary files a/skins/common/images/icons/fileicon-djvu.png and b/skins/common/images/icons/fileicon-djvu.png differ diff --git a/skins/common/images/icons/fileicon-dvi.png b/skins/common/images/icons/fileicon-dvi.png index 6c7aa1a1..790ec41b 100644 Binary files a/skins/common/images/icons/fileicon-dvi.png and b/skins/common/images/icons/fileicon-dvi.png differ diff --git a/skins/common/images/icons/fileicon-exe.png b/skins/common/images/icons/fileicon-exe.png index 6ccf1821..f310ad0d 100644 Binary files a/skins/common/images/icons/fileicon-exe.png and b/skins/common/images/icons/fileicon-exe.png differ diff --git a/skins/common/images/icons/fileicon-h.png b/skins/common/images/icons/fileicon-h.png index d091afff..cf158528 100644 Binary files a/skins/common/images/icons/fileicon-h.png and b/skins/common/images/icons/fileicon-h.png differ diff --git a/skins/common/images/icons/fileicon-html.png b/skins/common/images/icons/fileicon-html.png index 7c479525..1c3a1588 100644 Binary files a/skins/common/images/icons/fileicon-html.png and b/skins/common/images/icons/fileicon-html.png differ diff --git a/skins/common/images/icons/fileicon-iso.png b/skins/common/images/icons/fileicon-iso.png index b4192e9e..74b06615 100644 Binary files a/skins/common/images/icons/fileicon-iso.png and b/skins/common/images/icons/fileicon-iso.png differ diff --git a/skins/common/images/icons/fileicon-java.png b/skins/common/images/icons/fileicon-java.png index 757c6aec..730ab232 100644 Binary files a/skins/common/images/icons/fileicon-java.png and b/skins/common/images/icons/fileicon-java.png differ diff --git a/skins/common/images/icons/fileicon-mid.png b/skins/common/images/icons/fileicon-mid.png index aa826070..5254418e 100644 Binary files a/skins/common/images/icons/fileicon-mid.png and b/skins/common/images/icons/fileicon-mid.png differ diff --git a/skins/common/images/icons/fileicon-mov.png b/skins/common/images/icons/fileicon-mov.png index 2c0da0d8..37e479aa 100644 Binary files a/skins/common/images/icons/fileicon-mov.png and b/skins/common/images/icons/fileicon-mov.png differ diff --git a/skins/common/images/icons/fileicon-o.png b/skins/common/images/icons/fileicon-o.png index bf051cb8..24ac2cc5 100644 Binary files a/skins/common/images/icons/fileicon-o.png and b/skins/common/images/icons/fileicon-o.png differ diff --git a/skins/common/images/icons/fileicon-ogg.png b/skins/common/images/icons/fileicon-ogg.png index b8ba7714..c50d1ee8 100644 Binary files a/skins/common/images/icons/fileicon-ogg.png and b/skins/common/images/icons/fileicon-ogg.png differ diff --git a/skins/common/images/icons/fileicon-pdf.png b/skins/common/images/icons/fileicon-pdf.png index ee39b6c3..c195c761 100644 Binary files a/skins/common/images/icons/fileicon-pdf.png and b/skins/common/images/icons/fileicon-pdf.png differ diff --git a/skins/common/images/icons/fileicon-ps.png b/skins/common/images/icons/fileicon-ps.png index f1f504d7..342a84ee 100644 Binary files a/skins/common/images/icons/fileicon-ps.png and b/skins/common/images/icons/fileicon-ps.png differ diff --git a/skins/common/images/icons/fileicon-rm.png b/skins/common/images/icons/fileicon-rm.png index 5ba04e5a..534dbeb2 100644 Binary files a/skins/common/images/icons/fileicon-rm.png and b/skins/common/images/icons/fileicon-rm.png differ diff --git a/skins/common/images/icons/fileicon-rpm.png b/skins/common/images/icons/fileicon-rpm.png index 0f1c3b87..aab3ec39 100644 Binary files a/skins/common/images/icons/fileicon-rpm.png and b/skins/common/images/icons/fileicon-rpm.png differ diff --git a/skins/common/images/icons/fileicon-svg.png b/skins/common/images/icons/fileicon-svg.png index 8dc6d30f..16a666f3 100644 Binary files a/skins/common/images/icons/fileicon-svg.png and b/skins/common/images/icons/fileicon-svg.png differ diff --git a/skins/common/images/icons/fileicon-tar.png b/skins/common/images/icons/fileicon-tar.png index a4b15d7f..7266b5b5 100644 Binary files a/skins/common/images/icons/fileicon-tar.png and b/skins/common/images/icons/fileicon-tar.png differ diff --git a/skins/common/images/icons/fileicon-tex.png b/skins/common/images/icons/fileicon-tex.png index ee8c0226..55187918 100644 Binary files a/skins/common/images/icons/fileicon-tex.png and b/skins/common/images/icons/fileicon-tex.png differ diff --git a/skins/common/images/icons/fileicon-ttf.png b/skins/common/images/icons/fileicon-ttf.png index 1b53066e..13bd7ced 100644 Binary files a/skins/common/images/icons/fileicon-ttf.png and b/skins/common/images/icons/fileicon-ttf.png differ diff --git a/skins/common/images/icons/fileicon-txt.png b/skins/common/images/icons/fileicon-txt.png index 76e98909..bec58b4e 100644 Binary files a/skins/common/images/icons/fileicon-txt.png and b/skins/common/images/icons/fileicon-txt.png differ diff --git a/skins/common/images/ksh/button_S_italic.png b/skins/common/images/ksh/button_S_italic.png index 0761a1e1..00000a3c 100644 Binary files a/skins/common/images/ksh/button_S_italic.png and b/skins/common/images/ksh/button_S_italic.png differ diff --git a/skins/common/images/link_icon.gif b/skins/common/images/link_icon.gif index 815ccb1b..168c1a2f 100644 Binary files a/skins/common/images/link_icon.gif and b/skins/common/images/link_icon.gif differ diff --git a/skins/common/images/magnify-clip.png b/skins/common/images/magnify-clip.png index 50abcb68..00a9cee1 100644 Binary files a/skins/common/images/magnify-clip.png and b/skins/common/images/magnify-clip.png differ diff --git a/skins/common/images/mediawiki-small.xcf b/skins/common/images/mediawiki-small.xcf deleted file mode 100644 index 75355171..00000000 Binary files a/skins/common/images/mediawiki-small.xcf and /dev/null differ diff --git a/skins/common/images/mediawiki.png b/skins/common/images/mediawiki.png index 69fce988..0f35886a 100644 Binary files a/skins/common/images/mediawiki.png and b/skins/common/images/mediawiki.png differ diff --git a/skins/common/images/poweredby_mediawiki_88x31.png b/skins/common/images/poweredby_mediawiki_88x31.png index ce1765d1..3714414f 100644 Binary files a/skins/common/images/poweredby_mediawiki_88x31.png and b/skins/common/images/poweredby_mediawiki_88x31.png differ diff --git a/skins/common/images/public-domain.png b/skins/common/images/public-domain.png index e5fb33ce..f51f5602 100644 Binary files a/skins/common/images/public-domain.png and b/skins/common/images/public-domain.png differ diff --git a/skins/common/images/redirectltr.png b/skins/common/images/redirectltr.png index 9110ca13..bcf5742c 100644 Binary files a/skins/common/images/redirectltr.png and b/skins/common/images/redirectltr.png differ diff --git a/skins/common/images/redirectrtl.png b/skins/common/images/redirectrtl.png index 60fd59d3..8d99841a 100644 Binary files a/skins/common/images/redirectrtl.png and b/skins/common/images/redirectrtl.png differ diff --git a/skins/common/images/remove.png b/skins/common/images/remove.png new file mode 100644 index 00000000..0cbf7d73 Binary files /dev/null and b/skins/common/images/remove.png differ diff --git a/skins/common/images/sort_down.gif b/skins/common/images/sort_down.gif index 5ff08160..d97e8285 100644 Binary files a/skins/common/images/sort_down.gif and b/skins/common/images/sort_down.gif differ diff --git a/skins/common/images/sort_none.gif b/skins/common/images/sort_none.gif index 6bb02824..edd07e58 100644 Binary files a/skins/common/images/sort_none.gif and b/skins/common/images/sort_none.gif differ diff --git a/skins/common/images/sort_up.gif b/skins/common/images/sort_up.gif index 53002968..488cf279 100644 Binary files a/skins/common/images/sort_up.gif and b/skins/common/images/sort_up.gif differ diff --git a/skins/common/images/spinner.gif b/skins/common/images/spinner.gif index bdd59d52..37d3a43d 100644 Binary files a/skins/common/images/spinner.gif and b/skins/common/images/spinner.gif differ diff --git a/skins/common/images/wiki.png b/skins/common/images/wiki.png index 49913f6a..4f1dc263 100644 Binary files a/skins/common/images/wiki.png and b/skins/common/images/wiki.png differ diff --git a/skins/common/jquery.js b/skins/common/jquery.js new file mode 100644 index 00000000..c25ee31c --- /dev/null +++ b/skins/common/jquery.js @@ -0,0 +1,4384 @@ +/*! + * jQuery JavaScript Library v1.3.2 + * http://jquery.com/ + * + * Copyright (c) 2009 John Resig + * Dual licensed under the MIT and GPL licenses. + * http://docs.jquery.com/License + * + * Date: 2009-02-19 17:34:21 -0500 (Thu, 19 Feb 2009) + * Revision: 6246 + */ +(function(){ + +var + // Will speed up references to window, and allows munging its name. + window = this, + // Will speed up references to undefined, and allows munging its name. + undefined, + // Map over jQuery in case of overwrite + _jQuery = window.jQuery, + // Map over the $ in case of overwrite + _$ = window.$, + + jQuery = window.jQuery = window.$ = function( selector, context ) { + // The jQuery object is actually just the init constructor 'enhanced' + return new jQuery.fn.init( selector, context ); + }, + + // A simple way to check for HTML strings or ID strings + // (both of which we optimize for) + quickExpr = /^[^<]*(<(.|\s)+>)[^>]*$|^#([\w-]+)$/, + // Is it a simple selector + isSimple = /^.[^:#\[\.,]*$/; + +jQuery.fn = jQuery.prototype = { + init: function( selector, context ) { + // Make sure that a selection was provided + selector = selector || document; + + // Handle $(DOMElement) + if ( selector.nodeType ) { + this[0] = selector; + this.length = 1; + this.context = selector; + return this; + } + // Handle HTML strings + if ( typeof selector === "string" ) { + // Are we dealing with HTML string or an ID? + var match = quickExpr.exec( selector ); + + // Verify a match, and that no context was specified for #id + if ( match && (match[1] || !context) ) { + + // HANDLE: $(html) -> $(array) + if ( match[1] ) + selector = jQuery.clean( [ match[1] ], context ); + + // HANDLE: $("#id") + else { + var elem = document.getElementById( match[3] ); + + // Handle the case where IE and Opera return items + // by name instead of ID + if ( elem && elem.id != match[3] ) + return jQuery().find( selector ); + + // Otherwise, we inject the element directly into the jQuery object + var ret = jQuery( elem || [] ); + ret.context = document; + ret.selector = selector; + return ret; + } + + // HANDLE: $(expr, [context]) + // (which is just equivalent to: $(content).find(expr) + } else + return jQuery( context ).find( selector ); + + // HANDLE: $(function) + // Shortcut for document ready + } else if ( jQuery.isFunction( selector ) ) + return jQuery( document ).ready( selector ); + + // Make sure that old selector state is passed along + if ( selector.selector && selector.context ) { + this.selector = selector.selector; + this.context = selector.context; + } + + return this.setArray(jQuery.isArray( selector ) ? + selector : + jQuery.makeArray(selector)); + }, + + // Start with an empty selector + selector: "", + + // The current version of jQuery being used + jquery: "1.3.2", + + // The number of elements contained in the matched element set + size: function() { + return this.length; + }, + + // Get the Nth element in the matched element set OR + // Get the whole matched element set as a clean array + get: function( num ) { + return num === undefined ? + + // Return a 'clean' array + Array.prototype.slice.call( this ) : + + // Return just the object + this[ num ]; + }, + + // Take an array of elements and push it onto the stack + // (returning the new matched element set) + pushStack: function( elems, name, selector ) { + // Build a new jQuery matched element set + var ret = jQuery( elems ); + + // Add the old object onto the stack (as a reference) + ret.prevObject = this; + + ret.context = this.context; + + if ( name === "find" ) + ret.selector = this.selector + (this.selector ? " " : "") + selector; + else if ( name ) + ret.selector = this.selector + "." + name + "(" + selector + ")"; + + // Return the newly-formed element set + return ret; + }, + + // Force the current matched set of elements to become + // the specified array of elements (destroying the stack in the process) + // You should use pushStack() in order to do this, but maintain the stack + setArray: function( elems ) { + // Resetting the length to 0, then using the native Array push + // is a super-fast way to populate an object with array-like properties + this.length = 0; + Array.prototype.push.apply( this, elems ); + + return this; + }, + + // Execute a callback for every element in the matched set. + // (You can seed the arguments with an array of args, but this is + // only used internally.) + each: function( callback, args ) { + return jQuery.each( this, callback, args ); + }, + + // Determine the position of an element within + // the matched set of elements + index: function( elem ) { + // Locate the position of the desired element + return jQuery.inArray( + // If it receives a jQuery object, the first element is used + elem && elem.jquery ? elem[0] : elem + , this ); + }, + + attr: function( name, value, type ) { + var options = name; + + // Look for the case where we're accessing a style value + if ( typeof name === "string" ) + if ( value === undefined ) + return this[0] && jQuery[ type || "attr" ]( this[0], name ); + + else { + options = {}; + options[ name ] = value; + } + + // Check to see if we're setting style values + return this.each(function(i){ + // Set all the styles + for ( name in options ) + jQuery.attr( + type ? + this.style : + this, + name, jQuery.prop( this, options[ name ], type, i, name ) + ); + }); + }, + + css: function( key, value ) { + // ignore negative width and height values + if ( (key == 'width' || key == 'height') && parseFloat(value) < 0 ) + value = undefined; + return this.attr( key, value, "curCSS" ); + }, + + text: function( text ) { + if ( typeof text !== "object" && text != null ) + return this.empty().append( (this[0] && this[0].ownerDocument || document).createTextNode( text ) ); + + var ret = ""; + + jQuery.each( text || this, function(){ + jQuery.each( this.childNodes, function(){ + if ( this.nodeType != 8 ) + ret += this.nodeType != 1 ? + this.nodeValue : + jQuery.fn.text( [ this ] ); + }); + }); + + return ret; + }, + + wrapAll: function( html ) { + if ( this[0] ) { + // The elements to wrap the target around + var wrap = jQuery( html, this[0].ownerDocument ).clone(); + + if ( this[0].parentNode ) + wrap.insertBefore( this[0] ); + + wrap.map(function(){ + var elem = this; + + while ( elem.firstChild ) + elem = elem.firstChild; + + return elem; + }).append(this); + } + + return this; + }, + + wrapInner: function( html ) { + return this.each(function(){ + jQuery( this ).contents().wrapAll( html ); + }); + }, + + wrap: function( html ) { + return this.each(function(){ + jQuery( this ).wrapAll( html ); + }); + }, + + append: function() { + return this.domManip(arguments, true, function(elem){ + if (this.nodeType == 1) + this.appendChild( elem ); + }); + }, + + prepend: function() { + return this.domManip(arguments, true, function(elem){ + if (this.nodeType == 1) + this.insertBefore( elem, this.firstChild ); + }); + }, + + before: function() { + return this.domManip(arguments, false, function(elem){ + this.parentNode.insertBefore( elem, this ); + }); + }, + + after: function() { + return this.domManip(arguments, false, function(elem){ + this.parentNode.insertBefore( elem, this.nextSibling ); + }); + }, + + end: function() { + return this.prevObject || jQuery( [] ); + }, + + // For internal use only. + // Behaves like an Array's method, not like a jQuery method. + push: [].push, + sort: [].sort, + splice: [].splice, + + find: function( selector ) { + if ( this.length === 1 ) { + var ret = this.pushStack( [], "find", selector ); + ret.length = 0; + jQuery.find( selector, this[0], ret ); + return ret; + } else { + return this.pushStack( jQuery.unique(jQuery.map(this, function(elem){ + return jQuery.find( selector, elem ); + })), "find", selector ); + } + }, + + clone: function( events ) { + // Do the clone + var ret = this.map(function(){ + if ( !jQuery.support.noCloneEvent && !jQuery.isXMLDoc(this) ) { + // IE copies events bound via attachEvent when + // using cloneNode. Calling detachEvent on the + // clone will also remove the events from the orignal + // In order to get around this, we use innerHTML. + // Unfortunately, this means some modifications to + // attributes in IE that are actually only stored + // as properties will not be copied (such as the + // the name attribute on an input). + var html = this.outerHTML; + if ( !html ) { + var div = this.ownerDocument.createElement("div"); + div.appendChild( this.cloneNode(true) ); + html = div.innerHTML; + } + + return jQuery.clean([html.replace(/ jQuery\d+="(?:\d+|null)"/g, "").replace(/^\s*/, "")])[0]; + } else + return this.cloneNode(true); + }); + + // Copy the events from the original to the clone + if ( events === true ) { + var orig = this.find("*").andSelf(), i = 0; + + ret.find("*").andSelf().each(function(){ + if ( this.nodeName !== orig[i].nodeName ) + return; + + var events = jQuery.data( orig[i], "events" ); + + for ( var type in events ) { + for ( var handler in events[ type ] ) { + jQuery.event.add( this, type, events[ type ][ handler ], events[ type ][ handler ].data ); + } + } + + i++; + }); + } + + // Return the cloned set + return ret; + }, + + filter: function( selector ) { + return this.pushStack( + jQuery.isFunction( selector ) && + jQuery.grep(this, function(elem, i){ + return selector.call( elem, i ); + }) || + + jQuery.multiFilter( selector, jQuery.grep(this, function(elem){ + return elem.nodeType === 1; + }) ), "filter", selector ); + }, + + closest: function( selector ) { + var pos = jQuery.expr.match.POS.test( selector ) ? jQuery(selector) : null, + closer = 0; + + return this.map(function(){ + var cur = this; + while ( cur && cur.ownerDocument ) { + if ( pos ? pos.index(cur) > -1 : jQuery(cur).is(selector) ) { + jQuery.data(cur, "closest", closer); + return cur; + } + cur = cur.parentNode; + closer++; + } + }); + }, + + not: function( selector ) { + if ( typeof selector === "string" ) + // test special case where just one selector is passed in + if ( isSimple.test( selector ) ) + return this.pushStack( jQuery.multiFilter( selector, this, true ), "not", selector ); + else + selector = jQuery.multiFilter( selector, this ); + + var isArrayLike = selector.length && selector[selector.length - 1] !== undefined && !selector.nodeType; + return this.filter(function() { + return isArrayLike ? jQuery.inArray( this, selector ) < 0 : this != selector; + }); + }, + + add: function( selector ) { + return this.pushStack( jQuery.unique( jQuery.merge( + this.get(), + typeof selector === "string" ? + jQuery( selector ) : + jQuery.makeArray( selector ) + ))); + }, + + is: function( selector ) { + return !!selector && jQuery.multiFilter( selector, this ).length > 0; + }, + + hasClass: function( selector ) { + return !!selector && this.is( "." + selector ); + }, + + val: function( value ) { + if ( value === undefined ) { + var elem = this[0]; + + if ( elem ) { + if( jQuery.nodeName( elem, 'option' ) ) + return (elem.attributes.value || {}).specified ? elem.value : elem.text; + + // We need to handle select boxes special + if ( jQuery.nodeName( elem, "select" ) ) { + var index = elem.selectedIndex, + values = [], + options = elem.options, + one = elem.type == "select-one"; + + // Nothing was selected + if ( index < 0 ) + return null; + + // Loop through all the selected options + for ( var i = one ? index : 0, max = one ? index + 1 : options.length; i < max; i++ ) { + var option = options[ i ]; + + if ( option.selected ) { + // Get the specifc value for the option + value = jQuery(option).val(); + + // We don't need an array for one selects + if ( one ) + return value; + + // Multi-Selects return an array + values.push( value ); + } + } + + return values; + } + + // Everything else, we just grab the value + return (elem.value || "").replace(/\r/g, ""); + + } + + return undefined; + } + + if ( typeof value === "number" ) + value += ''; + + return this.each(function(){ + if ( this.nodeType != 1 ) + return; + + if ( jQuery.isArray(value) && /radio|checkbox/.test( this.type ) ) + this.checked = (jQuery.inArray(this.value, value) >= 0 || + jQuery.inArray(this.name, value) >= 0); + + else if ( jQuery.nodeName( this, "select" ) ) { + var values = jQuery.makeArray(value); + + jQuery( "option", this ).each(function(){ + this.selected = (jQuery.inArray( this.value, values ) >= 0 || + jQuery.inArray( this.text, values ) >= 0); + }); + + if ( !values.length ) + this.selectedIndex = -1; + + } else + this.value = value; + }); + }, + + html: function( value ) { + return value === undefined ? + (this[0] ? + this[0].innerHTML.replace(/ jQuery\d+="(?:\d+|null)"/g, "") : + null) : + this.empty().append( value ); + }, + + replaceWith: function( value ) { + return this.after( value ).remove(); + }, + + eq: function( i ) { + return this.slice( i, +i + 1 ); + }, + + slice: function() { + return this.pushStack( Array.prototype.slice.apply( this, arguments ), + "slice", Array.prototype.slice.call(arguments).join(",") ); + }, + + map: function( callback ) { + return this.pushStack( jQuery.map(this, function(elem, i){ + return callback.call( elem, i, elem ); + })); + }, + + andSelf: function() { + return this.add( this.prevObject ); + }, + + domManip: function( args, table, callback ) { + if ( this[0] ) { + var fragment = (this[0].ownerDocument || this[0]).createDocumentFragment(), + scripts = jQuery.clean( args, (this[0].ownerDocument || this[0]), fragment ), + first = fragment.firstChild; + + if ( first ) + for ( var i = 0, l = this.length; i < l; i++ ) + callback.call( root(this[i], first), this.length > 1 || i > 0 ? + fragment.cloneNode(true) : fragment ); + + if ( scripts ) + jQuery.each( scripts, evalScript ); + } + + return this; + + function root( elem, cur ) { + return table && jQuery.nodeName(elem, "table") && jQuery.nodeName(cur, "tr") ? + (elem.getElementsByTagName("tbody")[0] || + elem.appendChild(elem.ownerDocument.createElement("tbody"))) : + elem; + } + } +}; + +// Give the init function the jQuery prototype for later instantiation +jQuery.fn.init.prototype = jQuery.fn; + +function evalScript( i, elem ) { + if ( elem.src ) + jQuery.ajax({ + url: elem.src, + async: false, + dataType: "script" + }); + + else + jQuery.globalEval( elem.text || elem.textContent || elem.innerHTML || "" ); + + if ( elem.parentNode ) + elem.parentNode.removeChild( elem ); +} + +function now(){ + return +new Date; +} + +jQuery.extend = jQuery.fn.extend = function() { + // copy reference to target object + var target = arguments[0] || {}, i = 1, length = arguments.length, deep = false, options; + + // Handle a deep copy situation + if ( typeof target === "boolean" ) { + deep = target; + target = arguments[1] || {}; + // skip the boolean and the target + i = 2; + } + + // Handle case when target is a string or something (possible in deep copy) + if ( typeof target !== "object" && !jQuery.isFunction(target) ) + target = {}; + + // extend jQuery itself if only one argument is passed + if ( length == i ) { + target = this; + --i; + } + + for ( ; i < length; i++ ) + // Only deal with non-null/undefined values + if ( (options = arguments[ i ]) != null ) + // Extend the base object + for ( var name in options ) { + var src = target[ name ], copy = options[ name ]; + + // Prevent never-ending loop + if ( target === copy ) + continue; + + // Recurse if we're merging object values + if ( deep && copy && typeof copy === "object" && !copy.nodeType ) + target[ name ] = jQuery.extend( deep, + // Never move original objects, clone them + src || ( copy.length != null ? [ ] : { } ) + , copy ); + + // Don't bring in undefined values + else if ( copy !== undefined ) + target[ name ] = copy; + + } + + // Return the modified object + return target; +}; + +// exclude the following css properties to add px +var exclude = /z-?index|font-?weight|opacity|zoom|line-?height/i, + // cache defaultView + defaultView = document.defaultView || {}, + toString = Object.prototype.toString; + +jQuery.extend({ + noConflict: function( deep ) { + window.$ = _$; + + if ( deep ) + window.jQuery = _jQuery; + + return jQuery; + }, + + // See test/unit/core.js for details concerning isFunction. + // Since version 1.3, DOM methods and functions like alert + // aren't supported. They return false on IE (#2968). + isFunction: function( obj ) { + return toString.call(obj) === "[object Function]"; + }, + + isArray: function( obj ) { + return toString.call(obj) === "[object Array]"; + }, + + // check if an element is in a (or is an) XML document + isXMLDoc: function( elem ) { + return elem.nodeType === 9 && elem.documentElement.nodeName !== "HTML" || + !!elem.ownerDocument && jQuery.isXMLDoc( elem.ownerDocument ); + }, + + // Evalulates a script in a global context + globalEval: function( data ) { + if ( data && /\S/.test(data) ) { + // Inspired by code by Andrea Giammarchi + // http://webreflection.blogspot.com/2007/08/global-scope-evaluation-and-dom.html + var head = document.getElementsByTagName("head")[0] || document.documentElement, + script = document.createElement("script"); + + script.type = "text/javascript"; + if ( jQuery.support.scriptEval ) + script.appendChild( document.createTextNode( data ) ); + else + script.text = data; + + // Use insertBefore instead of appendChild to circumvent an IE6 bug. + // This arises when a base node is used (#2709). + head.insertBefore( script, head.firstChild ); + head.removeChild( script ); + } + }, + + nodeName: function( elem, name ) { + return elem.nodeName && elem.nodeName.toUpperCase() == name.toUpperCase(); + }, + + // args is for internal usage only + each: function( object, callback, args ) { + var name, i = 0, length = object.length; + + if ( args ) { + if ( length === undefined ) { + for ( name in object ) + if ( callback.apply( object[ name ], args ) === false ) + break; + } else + for ( ; i < length; ) + if ( callback.apply( object[ i++ ], args ) === false ) + break; + + // A special, fast, case for the most common use of each + } else { + if ( length === undefined ) { + for ( name in object ) + if ( callback.call( object[ name ], name, object[ name ] ) === false ) + break; + } else + for ( var value = object[0]; + i < length && callback.call( value, i, value ) !== false; value = object[++i] ){} + } + + return object; + }, + + prop: function( elem, value, type, i, name ) { + // Handle executable functions + if ( jQuery.isFunction( value ) ) + value = value.call( elem, i ); + + // Handle passing in a number to a CSS property + return typeof value === "number" && type == "curCSS" && !exclude.test( name ) ? + value + "px" : + value; + }, + + className: { + // internal only, use addClass("class") + add: function( elem, classNames ) { + jQuery.each((classNames || "").split(/\s+/), function(i, className){ + if ( elem.nodeType == 1 && !jQuery.className.has( elem.className, className ) ) + elem.className += (elem.className ? " " : "") + className; + }); + }, + + // internal only, use removeClass("class") + remove: function( elem, classNames ) { + if (elem.nodeType == 1) + elem.className = classNames !== undefined ? + jQuery.grep(elem.className.split(/\s+/), function(className){ + return !jQuery.className.has( classNames, className ); + }).join(" ") : + ""; + }, + + // internal only, use hasClass("class") + has: function( elem, className ) { + return elem && jQuery.inArray( className, (elem.className || elem).toString().split(/\s+/) ) > -1; + } + }, + + // A method for quickly swapping in/out CSS properties to get correct calculations + swap: function( elem, options, callback ) { + var old = {}; + // Remember the old values, and insert the new ones + for ( var name in options ) { + old[ name ] = elem.style[ name ]; + elem.style[ name ] = options[ name ]; + } + + callback.call( elem ); + + // Revert the old values + for ( var name in options ) + elem.style[ name ] = old[ name ]; + }, + + css: function( elem, name, force, extra ) { + if ( name == "width" || name == "height" ) { + var val, props = { position: "absolute", visibility: "hidden", display:"block" }, which = name == "width" ? [ "Left", "Right" ] : [ "Top", "Bottom" ]; + + function getWH() { + val = name == "width" ? elem.offsetWidth : elem.offsetHeight; + + if ( extra === "border" ) + return; + + jQuery.each( which, function() { + if ( !extra ) + val -= parseFloat(jQuery.curCSS( elem, "padding" + this, true)) || 0; + if ( extra === "margin" ) + val += parseFloat(jQuery.curCSS( elem, "margin" + this, true)) || 0; + else + val -= parseFloat(jQuery.curCSS( elem, "border" + this + "Width", true)) || 0; + }); + } + + if ( elem.offsetWidth !== 0 ) + getWH(); + else + jQuery.swap( elem, props, getWH ); + + return Math.max(0, Math.round(val)); + } + + return jQuery.curCSS( elem, name, force ); + }, + + curCSS: function( elem, name, force ) { + var ret, style = elem.style; + + // We need to handle opacity special in IE + if ( name == "opacity" && !jQuery.support.opacity ) { + ret = jQuery.attr( style, "opacity" ); + + return ret == "" ? + "1" : + ret; + } + + // Make sure we're using the right name for getting the float value + if ( name.match( /float/i ) ) + name = styleFloat; + + if ( !force && style && style[ name ] ) + ret = style[ name ]; + + else if ( defaultView.getComputedStyle ) { + + // Only "float" is needed here + if ( name.match( /float/i ) ) + name = "float"; + + name = name.replace( /([A-Z])/g, "-$1" ).toLowerCase(); + try{ + var computedStyle = defaultView.getComputedStyle( elem, null ); + }catch(e){ + // Error in getting computedStyle + } + if ( computedStyle ) + ret = computedStyle.getPropertyValue( name ); + + // We should always get a number back from opacity + if ( name == "opacity" && ret == "" ) + ret = "1"; + + } else if ( elem.currentStyle ) { + var camelCase = name.replace(/\-(\w)/g, function(all, letter){ + return letter.toUpperCase(); + }); + + ret = elem.currentStyle[ name ] || elem.currentStyle[ camelCase ]; + + // From the awesome hack by Dean Edwards + // http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102291 + + // If we're not dealing with a regular pixel number + // but a number that has a weird ending, we need to convert it to pixels + if ( !/^\d+(px)?$/i.test( ret ) && /^\d/.test( ret ) ) { + // Remember the original values + var left = style.left, rsLeft = elem.runtimeStyle.left; + + // Put in the new values to get a computed value out + elem.runtimeStyle.left = elem.currentStyle.left; + style.left = ret || 0; + ret = style.pixelLeft + "px"; + + // Revert the changed values + style.left = left; + elem.runtimeStyle.left = rsLeft; + } + } + + return ret; + }, + + clean: function( elems, context, fragment ) { + context = context || document; + + // !context.createElement fails in IE with an error but returns typeof 'object' + if ( typeof context.createElement === "undefined" ) + context = context.ownerDocument || context[0] && context[0].ownerDocument || document; + + // If a single string is passed in and it's a single tag + // just do a createElement and skip the rest + if ( !fragment && elems.length === 1 && typeof elems[0] === "string" ) { + var match = /^<(\w+)\s*\/?>$/.exec(elems[0]); + if ( match ) + return [ context.createElement( match[1] ) ]; + } + + var ret = [], scripts = [], div = context.createElement("div"); + + jQuery.each(elems, function(i, elem){ + if ( typeof elem === "number" ) + elem += ''; + + if ( !elem ) + return; + + // Convert html string into DOM nodes + if ( typeof elem === "string" ) { + // Fix "XHTML"-style tags in all browsers + elem = elem.replace(/(<(\w+)[^>]*?)\/>/g, function(all, front, tag){ + return tag.match(/^(abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i) ? + all : + front + ">"; + }); + + // Trim whitespace, otherwise indexOf won't work as expected + var tags = elem.replace(/^\s+/, "").substring(0, 10).toLowerCase(); + + var wrap = + // option or optgroup + !tags.indexOf("", "" ] || + + !tags.indexOf("", "" ] || + + tags.match(/^<(thead|tbody|tfoot|colg|cap)/) && + [ 1, "", "
    " ] || + + !tags.indexOf("", "" ] || + + // matched above + (!tags.indexOf("", "" ] || + + !tags.indexOf("", "" ] || + + // IE can't serialize and - - {if jsvarurl {}} - {if pagecss {}} - {usercss} - {sitecss} - {gencss} - {if userjs {}} - {if userjsprev {}} - {trackbackhtml} - - -
    -
    -
    - - {if sitenotice {
    {sitenotice}
    }} -

    {title}

    -
    -

    {msg {tagline}}

    -
    {subtitle}
    - {if undelete {
    {undelete}
    }} - {if newtalk {
    {newtalk}
    }} - {if showjumplinks { - - }} - - {bodytext} - {if catlinks { }} - -
    -
    -
    -
    -
    -
    -
    {msg {views}}
    - -
    -
    -
    {msg {personaltools}}
    -
    -
      - {personal_urls {
    • $text
    • }} -
    -
    -
    - - - {sidebar { -
    -
    $barname
    -
    -
      - } { -
    -
    -
    - } {
  • $text
  • - } - } - - -
    -
    {msg {toolbox}}
    -
    - -
    -
    - {language_urls { -
    -
    {msg {otherlanguages}}
    -
    -
      - $body -
    -
    -
    - } { -
  • $text
  • - }} -
    -
    - - -
    -{reporttime} -{if {} { vim: set syn=html ts=2 : }} - diff --git a/skins/disabled/MonoBookCBT.php b/skins/disabled/MonoBookCBT.php deleted file mode 100644 index 0d693a86..00000000 --- a/skins/disabled/MonoBookCBT.php +++ /dev/null @@ -1,1389 +0,0 @@ -execute( $out ); - } - - function execute( &$out ) { - global $wgTitle, $wgStyleDirectory, $wgParserCacheType; - $fname = 'SkinMonoBookCBT::execute'; - wfProfileIn( $fname ); - wfProfileIn( "$fname-setup" ); - Skin::initPage( $out ); - - $this->mOut =& $out; - $this->mTitle =& $wgTitle; - - $sourceFile = "$wgStyleDirectory/MonoBook.tpl"; - - wfProfileOut( "$fname-setup" ); - - if ( $wgParserCacheType == CACHE_NONE ) { - $template = file_get_contents( $sourceFile ); - $text = $this->executeTemplate( $template ); - } else { - $compiled = $this->getCompiledTemplate( $sourceFile ); - - wfProfileIn( "$fname-eval" ); - $text = eval( $compiled ); - wfProfileOut( "$fname-eval" ); - } - wfProfileOut( $fname ); - return $text; - } - - function getCompiledTemplate( $sourceFile ) { - global $wgDBname, $wgMemc, $wgRequest, $wgUser, $parserMemc; - $fname = 'SkinMonoBookCBT::getCompiledTemplate'; - - $expiry = 3600; - - // Sandbox template execution - if ( $this->mCompiling ) { - return; - } - - wfProfileIn( $fname ); - - // Is the request an ordinary page view? - if ( $wgRequest->wasPosted() || - count( array_diff( array_keys( $_GET ), array( 'title', 'useskin', 'recompile' ) ) ) != 0 ) - { - $type = 'nonview'; - } else { - $type = 'view'; - } - - // Per-user compiled template - // Put all logged-out users on the same cache key - $cacheKey = "$wgDBname:monobookcbt:$type:" . $wgUser->getId(); - - $recompile = $wgRequest->getVal( 'recompile' ); - if ( $recompile == 'user' ) { - $recompileUser = true; - $recompileGeneric = false; - } elseif ( $recompile ) { - $recompileUser = true; - $recompileGeneric = true; - } else { - $recompileUser = false; - $recompileGeneric = false; - } - - if ( !$recompileUser ) { - $php = $parserMemc->get( $cacheKey ); - } - if ( $recompileUser || !$php ) { - if ( $wgUser->isLoggedIn() ) { - // Perform staged compilation - // First compile a generic template for all logged-in users - $genericKey = "$wgDBname:monobookcbt:$type:loggedin"; - if ( !$recompileGeneric ) { - $template = $parserMemc->get( $genericKey ); - } - if ( $recompileGeneric || !$template ) { - $template = file_get_contents( $sourceFile ); - $ignore = array( 'loggedin', '!loggedin dynamic' ); - if ( $type == 'view' ) { - $ignore[] = 'nonview dynamic'; - } - $template = $this->compileTemplate( $template, $ignore ); - $parserMemc->set( $genericKey, $template, $expiry ); - } - } else { - $template = file_get_contents( $sourceFile ); - } - - $ignore = array( 'lang', 'loggedin', 'user' ); - if ( $wgUser->isLoggedIn() ) { - $ignore[] = '!loggedin dynamic'; - } else { - $ignore[] = 'loggedin dynamic'; - } - if ( $type == 'view' ) { - $ignore[] = 'nonview dynamic'; - } - $compiled = $this->compileTemplate( $template, $ignore ); - - // Reduce whitespace - // This is done here instead of in CBTProcessor because we can be - // more sure it is safe here. - $compiled = preg_replace( '/^[ \t]+/m', '', $compiled ); - $compiled = preg_replace( '/[\r\n]+/', "\n", $compiled ); - - // Compile to PHP - $compiler = new CBTCompiler( $compiled ); - $ret = $compiler->compile(); - if ( $ret !== true ) { - echo $ret; - wfErrorExit(); - } - $php = $compiler->generatePHP( '$this' ); - - $parserMemc->set( $cacheKey, $php, $expiry ); - } - wfProfileOut( $fname ); - return $php; - } - - function compileTemplate( $template, $ignore ) { - $tp = new CBTProcessor( $template, $this, $ignore ); - $tp->mFunctionCache = $this->mFunctionCache; - - $this->mCompiling = true; - $compiled = $tp->compile(); - $this->mCompiling = false; - - if ( $tp->getLastError() ) { - // If there was a compile error, don't save the template - // Instead just print the error and exit - echo $compiled; - wfErrorExit(); - } - $this->mFunctionCache = $tp->mFunctionCache; - return $compiled; - } - - function executeTemplate( $template ) { - $fname = 'SkinMonoBookCBT::executeTemplate'; - wfProfileIn( $fname ); - $tp = new CBTProcessor( $template, $this ); - $tp->mFunctionCache = $this->mFunctionCache; - - $this->mCompiling = true; - $text = $tp->execute(); - $this->mCompiling = false; - - $this->mFunctionCache = $tp->mFunctionCache; - wfProfileOut( $fname ); - return $text; - } - - /****************************************************** - * Callbacks * - ******************************************************/ - - function lang() { return $GLOBALS['wgContLanguageCode']; } - - function dir() { - global $wgContLang; - return $wgContLang->isRTL() ? 'rtl' : 'ltr'; - } - - function mimetype() { return $GLOBALS['wgMimeType']; } - function charset() { return $GLOBALS['wgOutputEncoding']; } - function headlinks() { - return cbt_value( $this->mOut->getHeadLinks(), 'dynamic' ); - } - function headscripts() { - return cbt_value( $this->mOut->getScript(), 'dynamic' ); - } - - function pagetitle() { - return cbt_value( $this->mOut->getHTMLTitle(), array( 'title', 'lang' ) ); - } - - function stylepath() { return $GLOBALS['wgStylePath']; } - function stylename() { return $this->mStyleName; } - - function notprintable() { - global $wgRequest; - return cbt_value( !$wgRequest->getBool( 'printable' ), 'nonview dynamic' ); - } - - function jsmimetype() { return $GLOBALS['wgJsMimeType']; } - - function jsvarurl() { - global $wgUseSiteJs, $wgUser; - if ( !$wgUseSiteJs ) return ''; - - if ( $wgUser->isLoggedIn() ) { - $url = self::makeUrl( '-','action=raw&smaxage=0&gen=js' ); - } else { - $url = self::makeUrl( '-','action=raw&gen=js' ); - } - return cbt_value( $url, 'loggedin' ); - } - - function pagecss() { - global $wgHooks; - - $out = false; - wfRunHooks( 'SkinTemplateSetupPageCss', array( &$out ) ); - - // Unknown dependencies - return cbt_value( $out, 'dynamic' ); - } - - function usercss() { - if ( $this->isCssPreview() ) { - global $wgRequest; - $usercss = $this->makeStylesheetCdata( $wgRequest->getText('wpTextbox1') ); - } else { - $usercss = $this->makeStylesheetLink( self::makeUrl($this->getUserPageText() . - '/'.$this->mStyleName.'.css', 'action=raw&ctype=text/css' ) ); - } - - // Dynamic when not an ordinary page view, also depends on the username - return cbt_value( $usercss, array( 'nonview dynamic', 'user' ) ); - } - - function sitecss() { - global $wgUseSiteCss; - if ( !$wgUseSiteCss ) { - return ''; - } - - global $wgSquidMaxage, $wgContLang, $wgStylePath; - - $query = "action=raw&ctype=text/css&smaxage=$wgSquidMaxage"; - - $sitecss = ''; - if ( $wgContLang->isRTL() ) { - $sitecss .= $this->makeStylesheetLink( $wgStylePath . '/' . $this->mStyleName . '/rtl.css' ) . "\n"; - } - - $sitecss .= $this->makeStylesheetLink( self::makeNSUrl( 'Common.css', $query, NS_MEDIAWIKI ) ) . "\n"; - $sitecss .= $this->makeStylesheetLink( self::makeNSUrl( ucfirst( $this->mStyleName ) . '.css', $query, NS_MEDIAWIKI ) ) . "\n"; - - // No deps - return $sitecss; - } - - function gencss() { - global $wgUseSiteCss; - if ( !$wgUseSiteCss ) return ''; - - global $wgSquidMaxage, $wgUser, $wgAllowUserCss; - if ( $this->isCssPreview() ) { - $siteargs = '&smaxage=0&maxage=0'; - } else { - $siteargs = '&maxage=' . $wgSquidMaxage; - } - if ( $wgAllowUserCss && $wgUser->isLoggedIn() ) { - $siteargs .= '&ts={user_touched}'; - $isTemplate = true; - } else { - $isTemplate = false; - } - - $link = $this->makeStylesheetLink( self::makeUrl('-','action=raw&gen=css' . $siteargs) ) . "\n"; - - if ( $wgAllowUserCss ) { - $deps = 'loggedin'; - } else { - $deps = array(); - } - return cbt_value( $link, $deps, $isTemplate ); - } - - function user_touched() { - global $wgUser; - return cbt_value( $wgUser->mTouched, 'dynamic' ); - } - - function userjs() { - global $wgAllowUserJs, $wgJsMimeType; - if ( !$wgAllowUserJs ) return ''; - - if ( $this->isJsPreview() ) { - $url = ''; - } else { - $url = self::makeUrl($this->getUserPageText().'/'.$this->mStyleName.'.js', 'action=raw&ctype='.$wgJsMimeType.'&dontcountme=s'); - } - return cbt_value( $url, array( 'nonview dynamic', 'user' ) ); - } - - function userjsprev() { - global $wgAllowUserJs, $wgRequest; - if ( !$wgAllowUserJs ) return ''; - if ( $this->isJsPreview() ) { - $js = '/*getText('wpTextbox1') . ' /*]]>*/'; - } else { - $js = ''; - } - return cbt_value( $js, array( 'nonview dynamic' ) ); - } - - function trackbackhtml() { - global $wgUseTrackbacks; - if ( !$wgUseTrackbacks ) return ''; - - if ( $this->mOut->isArticleRelated() ) { - $tb = $this->mTitle->trackbackRDF(); - } else { - $tb = ''; - } - return cbt_value( $tb, 'dynamic' ); - } - - function body_ondblclick() { - global $wgUser; - if( $this->isEditable() && $wgUser->getOption("editondblclick") ) { - $js = 'document.location = "' . $this->getEditUrl() .'";'; - } else { - $js = ''; - } - - if ( User::getDefaultOption('editondblclick') ) { - return cbt_value( $js, 'user', 'title' ); - } else { - // Optimise away for logged-out users - return cbt_value( $js, 'loggedin dynamic' ); - } - } - - function body_onload() { - global $wgUser; - if ( $this->isEditable() && $wgUser->getOption( 'editsectiononrightclick' ) ) { - $js = 'setupRightClickEdit()'; - } else { - $js = ''; - } - return cbt_value( $js, 'loggedin dynamic' ); - } - - function nsclass() { - return cbt_value( 'ns-' . $this->mTitle->getNamespace(), 'title' ); - } - - function sitenotice() { - // Perhaps this could be given special dependencies using our knowledge of what - // wfGetSiteNotice() depends on. - return cbt_value( wfGetSiteNotice(), 'dynamic' ); - } - - function title() { - return cbt_value( $this->mOut->getPageTitle(), array( 'title', 'lang' ) ); - } - - function title_urlform() { - return cbt_value( $this->getThisTitleUrlForm(), 'title' ); - } - - function title_userurl() { - return cbt_value( urlencode( $this->mTitle->getDBkey() ), 'title' ); - } - - function subtitle() { - $subpagestr = $this->subPageSubtitle(); - if ( !empty( $subpagestr ) ) { - $s = ''.$subpagestr.''.$this->mOut->getSubtitle(); - } else { - $s = $this->mOut->getSubtitle(); - } - return cbt_value( $s, array( 'title', 'nonview dynamic' ) ); - } - - function undelete() { - return cbt_value( $this->getUndeleteLink(), array( 'title', 'lang' ) ); - } - - function newtalk() { - global $wgUser, $wgDBname; - $newtalks = $wgUser->getNewMessageLinks(); - - if (count($newtalks) == 1 && $newtalks[0]["wiki"] === $wgDBname) { - $usertitle = $this->getUserPageTitle(); - $usertalktitle = $usertitle->getTalkPage(); - if( !$usertalktitle->equals( $this->mTitle ) ) { - $ntl = wfMsg( 'youhavenewmessages', - $this->makeKnownLinkObj( - $usertalktitle, - wfMsgHtml( 'newmessageslink' ), - 'redirect=no' - ), - $this->makeKnownLinkObj( - $usertalktitle, - wfMsgHtml( 'newmessagesdifflink' ), - 'diff=cur' - ) - ); - # Disable Cache - $this->mOut->setSquidMaxage(0); - } - } else if (count($newtalks)) { - $sep = str_replace("_", " ", wfMsgHtml("newtalkseparator")); - $msgs = array(); - foreach ($newtalks as $newtalk) { - $msgs[] = wfElement("a", - array('href' => $newtalk["link"]), $newtalk["wiki"]); - } - $parts = implode($sep, $msgs); - $ntl = wfMsgHtml('youhavenewmessagesmulti', $parts); - $this->mOut->setSquidMaxage(0); - } else { - $ntl = ''; - } - return cbt_value( $ntl, 'dynamic' ); - } - - function showjumplinks() { - global $wgUser; - return cbt_value( $wgUser->getOption( 'showjumplinks' ) ? 'true' : '', 'user' ); - } - - function bodytext() { - return cbt_value( $this->mOut->getHTML(), 'dynamic' ); - } - - function catlinks() { - if ( !isset( $this->mCatlinks ) ) { - $this->mCatlinks = $this->getCategories(); - } - return cbt_value( $this->mCatlinks, 'dynamic' ); - } - - function extratabs( $itemTemplate ) { - global $wgContLang, $wgDisableLangConversion; - - $etpl = cbt_escape( $itemTemplate ); - - /* show links to different language variants */ - $variants = $wgContLang->getVariants(); - $s = ''; - if ( !$wgDisableLangConversion && count( $wgContLang->getVariants() ) > 1 ) { - $vcount=0; - foreach ( $variants as $code ) { - $name = $wgContLang->getVariantname( $code ); - if ( $name == 'disable' ) { - continue; - } - $code = cbt_escape( $code ); - $name = cbt_escape( $name ); - $s .= "{ca_variant {{$code}} {{$name}} {{$vcount}} {{$etpl}}}\n"; - $vcount ++; - } - } - return cbt_value( $s, array(), true ); - } - - function is_special() { return cbt_value( $this->mTitle->getNamespace() == NS_SPECIAL, 'title' ); } - function can_edit() { return cbt_value( (string)($this->mTitle->userCan( 'edit' )), 'dynamic' ); } - function can_move() { return cbt_value( (string)($this->mTitle->userCan( 'move' )), 'dynamic' ); } - function is_talk() { return cbt_value( (string)($this->mTitle->isTalkPage()), 'title' ); } - function is_protected() { return cbt_value( (string)$this->mTitle->isProtected(), 'dynamic' ); } - function nskey() { return cbt_value( $this->mTitle->getNamespaceKey(), 'title' ); } - - function request_url() { - global $wgRequest; - return cbt_value( $wgRequest->getRequestURL(), 'dynamic' ); - } - - function subject_url() { - $title = $this->getSubjectPage(); - if ( $title->exists() ) { - $url = $title->getLocalUrl(); - } else { - $url = $title->getLocalUrl( 'action=edit' ); - } - return cbt_value( $url, 'title' ); - } - - function talk_url() { - $title = $this->getTalkPage(); - if ( $title->exists() ) { - $url = $title->getLocalUrl(); - } else { - $url = $title->getLocalUrl( 'action=edit' ); - } - return cbt_value( $url, 'title' ); - } - - function edit_url() { - return cbt_value( $this->getEditUrl(), array( 'title', 'nonview dynamic' ) ); - } - - function move_url() { - return cbt_value( $this->makeSpecialParamUrl( 'Movepage' ), array(), true ); - } - - function localurl( $query ) { - return cbt_value( $this->mTitle->getLocalURL( $query ), 'title' ); - } - - function selecttab( $tab, $extraclass = '' ) { - if ( !isset( $this->mSelectedTab ) ) { - $prevent_active_tabs = false ; - wfRunHooks( 'SkinTemplatePreventOtherActiveTabs', array( &$this , &$preventActiveTabs ) ); - - $actionTabs = array( - 'edit' => 'edit', - 'submit' => 'edit', - 'history' => 'history', - 'protect' => 'protect', - 'unprotect' => 'protect', - 'delete' => 'delete', - 'watch' => 'watch', - 'unwatch' => 'watch', - ); - if ( $preventActiveTabs ) { - $this->mSelectedTab = false; - } else { - $action = $this->getAction(); - $section = $this->getSection(); - - if ( isset( $actionTabs[$action] ) ) { - $this->mSelectedTab = $actionTabs[$action]; - - if ( $this->mSelectedTab == 'edit' && $section == 'new' ) { - $this->mSelectedTab = 'addsection'; - } - } elseif ( $this->mTitle->isTalkPage() ) { - $this->mSelectedTab = 'talk'; - } else { - $this->mSelectedTab = 'subject'; - } - } - } - if ( $extraclass ) { - if ( $this->mSelectedTab == $tab ) { - $s = 'class="selected ' . htmlspecialchars( $extraclass ) . '"'; - } else { - $s = 'class="' . htmlspecialchars( $extraclass ) . '"'; - } - } else { - if ( $this->mSelectedTab == $tab ) { - $s = 'class="selected"'; - } else { - $s = ''; - } - } - return cbt_value( $s, array( 'nonview dynamic', 'title' ) ); - } - - function subject_newclass() { - $title = $this->getSubjectPage(); - $class = $title->exists() ? '' : 'new'; - return cbt_value( $class, 'dynamic' ); - } - - function talk_newclass() { - $title = $this->getTalkPage(); - $class = $title->exists() ? '' : 'new'; - return cbt_value( $class, 'dynamic' ); - } - - function ca_variant( $code, $name, $index, $template ) { - global $wgContLang; - $selected = ($code == $wgContLang->getPreferredVariant()); - $action = $this->getAction(); - $actstr = ''; - if( $action ) - $actstr = 'action=' . $action . '&'; - $s = strtr( $template, array( - '$id' => htmlspecialchars( 'varlang-' . $index ), - '$class' => $selected ? 'class="selected"' : '', - '$text' => $name, - '$href' => htmlspecialchars( $this->mTitle->getLocalUrl( $actstr . 'variant=' . $code ) ) - )); - return cbt_value( $s, 'dynamic' ); - } - - function is_watching() { - return cbt_value( (string)$this->mTitle->userIsWatching(), array( 'dynamic' ) ); - } - - - function personal_urls( $itemTemplate ) { - global $wgShowIPinHeader, $wgContLang; - - # Split this function up into many small functions, to obtain the - # best specificity in the dependencies of each one. The template below - # has no dependencies, so its generation, and any static subfunctions, - # can be optimised away. - $etpl = cbt_escape( $itemTemplate ); - $s = " - {userpage {{$etpl}}} - {mytalk {{$etpl}}} - {preferences {{$etpl}}} - {watchlist {{$etpl}}} - {mycontris {{$etpl}}} - {logout {{$etpl}}} - "; - - if ( $wgShowIPinHeader ) { - $s .= " - {anonuserpage {{$etpl}}} - {anontalk {{$etpl}}} - {anonlogin {{$etpl}}} - "; - } else { - $s .= "{login {{$etpl}}}\n"; - } - // No dependencies - return cbt_value( $s, array(), true /*this is a template*/ ); - } - - function userpage( $itemTemplate ) { - global $wgUser; - if ( $this->isLoggedIn() ) { - $userPage = $this->getUserPageTitle(); - $s = $this->makeTemplateLink( $itemTemplate, 'userpage', $userPage, $wgUser->getName() ); - } else { - $s = ''; - } - return cbt_value( $s, 'user' ); - } - - function mytalk( $itemTemplate ) { - global $wgUser; - if ( $this->isLoggedIn() ) { - $userPage = $this->getUserPageTitle(); - $talkPage = $userPage->getTalkPage(); - $s = $this->makeTemplateLink( $itemTemplate, 'mytalk', $talkPage, wfMsg('mytalk') ); - } else { - $s = ''; - } - return cbt_value( $s, 'user' ); - } - - function preferences( $itemTemplate ) { - if ( $this->isLoggedIn() ) { - $s = $this->makeSpecialTemplateLink( $itemTemplate, 'preferences', - 'Preferences', wfMsg( 'preferences' ) ); - } else { - $s = ''; - } - return cbt_value( $s, array( 'loggedin', 'lang' ) ); - } - - function watchlist( $itemTemplate ) { - if ( $this->isLoggedIn() ) { - $s = $this->makeSpecialTemplateLink( $itemTemplate, 'watchlist', - 'Watchlist', wfMsg( 'watchlist' ) ); - } else { - $s = ''; - } - return cbt_value( $s, array( 'loggedin', 'lang' ) ); - } - - function mycontris( $itemTemplate ) { - if ( $this->isLoggedIn() ) { - global $wgUser; - $s = $this->makeSpecialTemplateLink( $itemTemplate, 'mycontris', - "Contributions/" . $wgUser->getTitleKey(), wfMsg('mycontris') ); - } else { - $s = ''; - } - return cbt_value( $s, 'user' ); - } - - function logout( $itemTemplate ) { - if ( $this->isLoggedIn() ) { - $s = $this->makeSpecialTemplateLink( $itemTemplate, 'logout', - 'Userlogout', wfMsg( 'userlogout' ), - $this->mTitle->getNamespace() === NS_SPECIAL && $this->mTitle->getText() === 'Preferences' - ? '' : "returnto=" . $this->mTitle->getPrefixedURL() ); - } else { - $s = ''; - } - return cbt_value( $s, 'loggedin dynamic' ); - } - - function anonuserpage( $itemTemplate ) { - if ( $this->isLoggedIn() ) { - $s = ''; - } else { - global $wgUser; - $userPage = $this->getUserPageTitle(); - $s = $this->makeTemplateLink( $itemTemplate, 'userpage', $userPage, $wgUser->getName() ); - } - return cbt_value( $s, '!loggedin dynamic' ); - } - - function anontalk( $itemTemplate ) { - if ( $this->isLoggedIn() ) { - $s = ''; - } else { - $userPage = $this->getUserPageTitle(); - $talkPage = $userPage->getTalkPage(); - $s = $this->makeTemplateLink( $itemTemplate, 'mytalk', $talkPage, wfMsg('anontalk') ); - } - return cbt_value( $s, '!loggedin dynamic' ); - } - - function anonlogin( $itemTemplate ) { - if ( $this->isLoggedIn() ) { - $s = ''; - } else { - $s = $this->makeSpecialTemplateLink( $itemTemplate, 'anonlogin', 'Userlogin', - wfMsg( 'userlogin' ), 'returnto=' . urlencode( $this->getThisPDBK() ) ); - } - return cbt_value( $s, '!loggedin dynamic' ); - } - - function login( $itemTemplate ) { - if ( $this->isLoggedIn() ) { - $s = ''; - } else { - $s = $this->makeSpecialTemplateLink( $itemTemplate, 'login', 'Userlogin', - wfMsg( 'userlogin' ), 'returnto=' . urlencode( $this->getThisPDBK() ) ); - } - return cbt_value( $s, '!loggedin dynamic' ); - } - - function logopath() { return $GLOBALS['wgLogo']; } - function mainpage() { return self::makeMainPageUrl(); } - - function sidebar( $startSection, $endSection, $innerTpl ) { - $s = ''; - $lines = explode( "\n", wfMsgForContent( 'sidebar' ) ); - $firstSection = true; - foreach ($lines as $line) { - if (strpos($line, '*') !== 0) - continue; - if (strpos($line, '**') !== 0) { - $bar = trim($line, '* '); - $name = wfMsg( $bar ); - if (wfEmptyMsg($bar, $name)) { - $name = $bar; - } - if ( $firstSection ) { - $firstSection = false; - } else { - $s .= $endSection; - } - $s .= strtr( $startSection, - array( - '$bar' => htmlspecialchars( $bar ), - '$barname' => $name - ) ); - } else { - if (strpos($line, '|') !== false) { // sanity check - $line = explode( '|' , trim($line, '* '), 2 ); - $link = wfMsgForContent( $line[0] ); - if ($link == '-') - continue; - if (wfEmptyMsg($line[1], $text = wfMsg($line[1]))) - $text = $line[1]; - if (wfEmptyMsg($line[0], $link)) - $link = $line[0]; - $href = self::makeInternalOrExternalUrl( $link ); - - $s .= strtr( $innerTpl, - array( - '$text' => htmlspecialchars( $text ), - '$href' => htmlspecialchars( $href ), - '$id' => htmlspecialchars( 'n-' . strtr($line[1], ' ', '-') ), - '$classactive' => '' - ) ); - } else { continue; } - } - } - if ( !$firstSection ) { - $s .= $endSection; - } - - // Depends on user language only - return cbt_value( $s, 'lang' ); - } - - function searchaction() { - // Static link - return $this->getSearchLink(); - } - - function search() { - global $wgRequest; - return cbt_value( trim( $this->getSearch() ), 'special dynamic' ); - } - - function notspecialpage() { - return cbt_value( $this->mTitle->getNamespace() != NS_SPECIAL, 'special' ); - } - - function nav_whatlinkshere() { - return cbt_value( $this->makeSpecialParamUrl('Whatlinkshere' ), array(), true ); - } - - function article_exists() { - return cbt_value( (string)($this->mTitle->getArticleId() !== 0), 'title' ); - } - - function nav_recentchangeslinked() { - return cbt_value( $this->makeSpecialParamUrl('Recentchangeslinked' ), array(), true ); - } - - function feeds( $itemTemplate = '' ) { - if ( !$this->mOut->isSyndicated() ) { - $feeds = ''; - } elseif ( $itemTemplate == '' ) { - // boolean only required - $feeds = 'true'; - } else { - $feeds = ''; - global $wgFeedClasses, $wgRequest; - foreach( $wgFeedClasses as $format => $class ) { - $feeds .= strtr( $itemTemplate, - array( - '$key' => htmlspecialchars( $format ), - '$text' => $format, - '$href' => $wgRequest->appendQuery( "feed=$format" ) - ) ); - } - } - return cbt_value( $feeds, 'special dynamic' ); - } - - function is_userpage() { - list( $id, $ip ) = $this->getUserPageIdIp(); - return cbt_value( (string)($id || $ip), 'title' ); - } - - function is_ns_mediawiki() { - return cbt_value( (string)$this->mTitle->getNamespace() == NS_MEDIAWIKI, 'title' ); - } - - function is_loggedin() { - global $wgUser; - return cbt_value( (string)($wgUser->isLoggedIn()), 'loggedin' ); - } - - function nav_contributions() { - $url = $this->makeSpecialParamUrl( 'Contributions', '', '{title_userurl}' ); - return cbt_value( $url, array(), true ); - } - - function is_allowed( $right ) { - global $wgUser; - return cbt_value( (string)$wgUser->isAllowed( $right ), 'user' ); - } - - function nav_blockip() { - $url = $this->makeSpecialParamUrl( 'Blockip', '', '{title_userurl}' ); - return cbt_value( $url, array(), true ); - } - - function nav_emailuser() { - global $wgEnableEmail, $wgEnableUserEmail, $wgUser; - if ( !$wgEnableEmail || !$wgEnableUserEmail ) return ''; - - $url = $this->makeSpecialParamUrl( 'Emailuser', '', '{title_userurl}' ); - return cbt_value( $url, array(), true ); - } - - function nav_upload() { - global $wgEnableUploads, $wgUploadNavigationUrl; - if ( !$wgEnableUploads ) { - return ''; - } elseif ( $wgUploadNavigationUrl ) { - return $wgUploadNavigationUrl; - } else { - return self::makeSpecialUrl('Upload'); - } - } - - function nav_specialpages() { - return self::makeSpecialUrl('Specialpages'); - } - - function nav_print() { - global $wgRequest, $wgArticle; - $action = $this->getAction(); - $url = ''; - if( $this->mTitle->getNamespace() !== NS_SPECIAL - && ($action == '' || $action == 'view' || $action == 'purge' ) ) - { - $revid = $wgArticle->getLatest(); - if ( $revid != 0 ) { - $url = $wgRequest->appendQuery( 'printable=yes' ); - } - } - return cbt_value( $url, array( 'nonview dynamic', 'title' ) ); - } - - function nav_permalink() { - $url = (string)$this->getPermalink(); - return cbt_value( $url, 'dynamic' ); - } - - function nav_trackbacklink() { - global $wgUseTrackbacks; - if ( !$wgUseTrackbacks ) return ''; - - return cbt_value( $this->mTitle->trackbackURL(), 'title' ); - } - - function is_permalink() { - return cbt_value( (string)($this->getPermalink() === false), 'nonview dynamic' ); - } - - function toolboxend() { - // This is where the MonoBookTemplateToolboxEnd hook went in the old skin - return ''; - } - - function language_urls( $outer, $inner ) { - global $wgHideInterlanguageLinks, $wgOut, $wgContLang; - if ( $wgHideInterlanguageLinks ) return ''; - - $links = $wgOut->getLanguageLinks(); - $s = ''; - if ( count( $links ) ) { - foreach( $links as $l ) { - $tmp = explode( ':', $l, 2 ); - $nt = Title::newFromText( $l ); - $s .= strtr( $inner, - array( - '$class' => htmlspecialchars( 'interwiki-' . $tmp[0] ), - '$href' => htmlspecialchars( $nt->getFullURL() ), - '$text' => ($wgContLang->getLanguageName( $nt->getInterwiki() ) != ''? - $wgContLang->getLanguageName( $nt->getInterwiki() ) : $l ), - ) - ); - } - $s = str_replace( '$body', $s, $outer ); - } - return cbt_value( $s, 'dynamic' ); - } - - function poweredbyico() { return $this->getPoweredBy(); } - function copyrightico() { return $this->getCopyrightIcon(); } - - function lastmod() { - global $wgMaxCredits; - if ( $wgMaxCredits ) return ''; - - if ( !isset( $this->mLastmod ) ) { - if ( $this->isCurrentArticleView() ) { - $this->mLastmod = $this->lastModified(); - } else { - $this->mLastmod = ''; - } - } - return cbt_value( $this->mLastmod, 'dynamic' ); - } - - function viewcount() { - global $wgDisableCounters; - if ( $wgDisableCounters ) return ''; - - global $wgLang, $wgArticle; - if ( is_object( $wgArticle ) ) { - $viewcount = $wgLang->formatNum( $wgArticle->getCount() ); - if ( $viewcount ) { - $viewcount = wfMsg( "viewcount", $viewcount ); - } else { - $viewcount = ''; - } - } else { - $viewcount = ''; - } - return cbt_value( $viewcount, 'dynamic' ); - } - - function numberofwatchingusers() { - global $wgPageShowWatchingUsers; - if ( !$wgPageShowWatchingUsers ) return ''; - - $dbr = wfGetDB( DB_SLAVE ); - extract( $dbr->tableNames( 'watchlist' ) ); - $sql = "SELECT COUNT(*) AS n FROM $watchlist - WHERE wl_title='" . $dbr->strencode($this->mTitle->getDBkey()) . - "' AND wl_namespace=" . $this->mTitle->getNamespace() ; - $res = $dbr->query( $sql, 'SkinTemplate::outputPage'); - $row = $dbr->fetchObject( $res ); - $num = $row->n; - if ($num > 0) { - $s = wfMsg('number_of_watching_users_pageview', $num); - } else { - $s = ''; - } - return cbt_value( $s, 'dynamic' ); - } - - function credits() { - global $wgMaxCredits; - if ( !$wgMaxCredits ) return ''; - - if ( $this->isCurrentArticleView() ) { - require_once("Credits.php"); - global $wgArticle, $wgShowCreditsIfMax; - $credits = getCredits($wgArticle, $wgMaxCredits, $wgShowCreditsIfMax); - } else { - $credits = ''; - } - return cbt_value( $credits, 'view dynamic' ); - } - - function normalcopyright() { - return $this->getCopyright( 'normal' ); - } - - function historycopyright() { - return $this->getCopyright( 'history' ); - } - - function is_currentview() { - global $wgRequest; - return cbt_value( (string)$this->isCurrentArticleView(), 'view' ); - } - - function usehistorycopyright() { - global $wgRequest; - if ( wfMsgForContent( 'history_copyright' ) == '-' ) return ''; - - $oldid = $this->getOldId(); - $diff = $this->getDiff(); - $use = (string)(!is_null( $oldid ) && is_null( $diff )); - return cbt_value( $use, 'nonview dynamic' ); - } - - function privacy() { - return cbt_value( $this->privacyLink(), 'lang' ); - } - function about() { - return cbt_value( $this->aboutLink(), 'lang' ); - } - function disclaimer() { - return cbt_value( $this->disclaimerLink(), 'lang' ); - } - function tagline() { - # A reference to this tag existed in the old MonoBook.php, but the - # template data wasn't set anywhere - return ''; - } - function reporttime() { - return cbt_value( $this->mOut->reportTime(), 'dynamic' ); - } - - function msg( $name ) { - return cbt_value( wfMsg( $name ), 'lang' ); - } - - function fallbackmsg( $name, $fallback ) { - $text = wfMsg( $name ); - if ( wfEmptyMsg( $name, $text ) ) { - $text = $fallback; - } - return cbt_value( $text, 'lang' ); - } - - /****************************************************** - * Utility functions * - ******************************************************/ - - /** Return true if this request is a valid, secure CSS preview */ - function isCssPreview() { - if ( !isset( $this->mCssPreview ) ) { - global $wgRequest, $wgAllowUserCss, $wgUser; - $this->mCssPreview = - $wgAllowUserCss && - $wgUser->isLoggedIn() && - $this->mTitle->isCssSubpage() && - $this->userCanPreview( $this->getAction() ); - } - return $this->mCssPreview; - } - - /** Return true if this request is a valid, secure JS preview */ - function isJsPreview() { - if ( !isset( $this->mJsPreview ) ) { - global $wgRequest, $wgAllowUserJs, $wgUser; - $this->mJsPreview = - $wgAllowUserJs && - $wgUser->isLoggedIn() && - $this->mTitle->isJsSubpage() && - $this->userCanPreview( $this->getAction() ); - } - return $this->mJsPreview; - } - - /** Get the title of the $wgUser's user page */ - function getUserPageTitle() { - if ( !isset( $this->mUserPageTitle ) ) { - global $wgUser; - $this->mUserPageTitle = $wgUser->getUserPage(); - } - return $this->mUserPageTitle; - } - - /** Get the text of the user page title */ - function getUserPageText() { - if ( !isset( $this->mUserPageText ) ) { - $userPage = $this->getUserPageTitle(); - $this->mUserPageText = $userPage->getPrefixedText(); - } - return $this->mUserPageText; - } - - /** Make an HTML element for a stylesheet link */ - function makeStylesheetLink( $url ) { - return '"; - } - - /** Make an XHTML element for inline CSS */ - function makeStylesheetCdata( $style ) { - return ""; - } - - /** Get the edit URL for this page */ - function getEditUrl() { - if ( !isset( $this->mEditUrl ) ) { - $this->mEditUrl = $this->mTitle->getLocalUrl( $this->editUrlOptions() ); - } - return $this->mEditUrl; - } - - /** Get the prefixed DB key for this page */ - function getThisPDBK() { - if ( !isset( $this->mThisPDBK ) ) { - $this->mThisPDBK = $this->mTitle->getPrefixedDbKey(); - } - return $this->mThisPDBK; - } - - function getThisTitleUrlForm() { - if ( !isset( $this->mThisTitleUrlForm ) ) { - $this->mThisTitleUrlForm = $this->mTitle->getPrefixedURL(); - } - return $this->mThisTitleUrlForm; - } - - /** - * If the current page is a user page, get the user's ID and IP. Otherwise return array(0,false) - */ - function getUserPageIdIp() { - if ( !isset( $this->mUserPageId ) ) { - if( $this->mTitle->getNamespace() == NS_USER || $this->mTitle->getNamespace() == NS_USER_TALK ) { - $this->mUserPageId = User::idFromName($this->mTitle->getText()); - $this->mUserPageIp = User::isIP($this->mTitle->getText()); - } else { - $this->mUserPageId = 0; - $this->mUserPageIp = false; - } - } - return array( $this->mUserPageId, $this->mUserPageIp ); - } - - /** - * Returns a permalink URL, or false if the current page is already a - * permalink, or blank if a permalink shouldn't be displayed - */ - function getPermalink() { - if ( !isset( $this->mPermalink ) ) { - global $wgRequest, $wgArticle; - $action = $this->getAction(); - $oldid = $this->getOldId(); - $url = ''; - if( $this->mTitle->getNamespace() !== NS_SPECIAL - && $this->mTitle->getArticleId() != 0 - && ($action == '' || $action == 'view' || $action == 'purge' ) ) - { - if ( !$oldid ) { - $revid = $wgArticle->getLatest(); - $url = $this->mTitle->getLocalURL( "oldid=$revid" ); - } else { - $url = false; - } - } else { - $url = ''; - } - } - return $url; - } - - /** - * Returns true if the current page is an article, not a special page, - * and we are viewing a revision, not a diff - */ - function isArticleView() { - global $wgOut, $wgArticle, $wgRequest; - if ( !isset( $this->mIsArticleView ) ) { - $oldid = $this->getOldId(); - $diff = $this->getDiff(); - $this->mIsArticleView = $wgOut->isArticle() and - (!is_null( $oldid ) or is_null( $diff )) and 0 != $wgArticle->getID(); - } - return $this->mIsArticleView; - } - - function isCurrentArticleView() { - if ( !isset( $this->mIsCurrentArticleView ) ) { - global $wgOut, $wgArticle, $wgRequest; - $oldid = $this->getOldId(); - $this->mIsCurrentArticleView = $wgOut->isArticle() && is_null( $oldid ) && 0 != $wgArticle->getID(); - } - return $this->mIsCurrentArticleView; - } - - - /** - * Return true if the current page is editable; if edit section on right - * click should be enabled. - */ - function isEditable() { - global $wgRequest; - $action = $this->getAction(); - return ($this->mTitle->getNamespace() != NS_SPECIAL and !($action == 'edit' or $action == 'submit')); - } - - /** Return true if the user is logged in */ - function isLoggedIn() { - global $wgUser; - return $wgUser->isLoggedIn(); - } - - /** Get the local URL of the current page */ - function getPageUrl() { - if ( !isset( $this->mPageUrl ) ) { - $this->mPageUrl = $this->mTitle->getLocalURL(); - } - return $this->mPageUrl; - } - - /** Make a link to a title using a template */ - function makeTemplateLink( $template, $key, $title, $text ) { - $url = $title->getLocalUrl(); - return strtr( $template, - array( - '$key' => $key, - '$classactive' => ($url == $this->getPageUrl()) ? 'class="active"' : '', - '$class' => $title->getArticleID() == 0 ? 'class="new"' : '', - '$href' => htmlspecialchars( $url ), - '$text' => $text - ) ); - } - - /** Make a link to a URL using a template */ - function makeTemplateLinkUrl( $template, $key, $url, $text ) { - return strtr( $template, - array( - '$key' => $key, - '$classactive' => ($url == $this->getPageUrl()) ? 'class="active"' : '', - '$class' => '', - '$href' => htmlspecialchars( $url ), - '$text' => $text - ) ); - } - - /** Make a link to a special page using a template */ - function makeSpecialTemplateLink( $template, $key, $specialName, $text, $query = '' ) { - $url = self::makeSpecialUrl( $specialName, $query ); - // Ignore the query when comparing - $active = ($this->mTitle->getNamespace() == NS_SPECIAL && $this->mTitle->getDBkey() == $specialName); - return strtr( $template, - array( - '$key' => $key, - '$classactive' => $active ? 'class="active"' : '', - '$class' => '', - '$href' => htmlspecialchars( $url ), - '$text' => $text - ) ); - } - - function loadRequestValues() { - global $wgRequest; - $this->mAction = $wgRequest->getText( 'action' ); - $this->mOldId = $wgRequest->getVal( 'oldid' ); - $this->mDiff = $wgRequest->getVal( 'diff' ); - $this->mSection = $wgRequest->getVal( 'section' ); - $this->mSearch = $wgRequest->getVal( 'search' ); - $this->mRequestValuesLoaded = true; - } - - - - /** Get the action parameter of the request */ - function getAction() { - if ( !isset( $this->mRequestValuesLoaded ) ) { - $this->loadRequestValues(); - } - return $this->mAction; - } - - /** Get the oldid parameter */ - function getOldId() { - if ( !isset( $this->mRequestValuesLoaded ) ) { - $this->loadRequestValues(); - } - return $this->mOldId; - } - - /** Get the diff parameter */ - function getDiff() { - if ( !isset( $this->mRequestValuesLoaded ) ) { - $this->loadRequestValues(); - } - return $this->mDiff; - } - - function getSection() { - if ( !isset( $this->mRequestValuesLoaded ) ) { - $this->loadRequestValues(); - } - return $this->mSection; - } - - function getSearch() { - if ( !isset( $this->mRequestValuesLoaded ) ) { - $this->loadRequestValues(); - } - return $this->mSearch; - } - - /** Make a special page URL of the form [[Special:Somepage/{title_urlform}]] */ - function makeSpecialParamUrl( $name, $query = '', $param = '{title_urlform}' ) { - // Abuse makeTitle's lax validity checking to slip a control character into the URL - $title = Title::makeTitle( NS_SPECIAL, "$name/\x1a" ); - $url = cbt_escape( $title->getLocalURL( $query ) ); - // Now replace it with the parameter - return str_replace( '%1A', $param, $url ); - } - - function getSubjectPage() { - if ( !isset( $this->mSubjectPage ) ) { - $this->mSubjectPage = $this->mTitle->getSubjectPage(); - } - return $this->mSubjectPage; - } - - function getTalkPage() { - if ( !isset( $this->mTalkPage ) ) { - $this->mTalkPage = $this->mTitle->getTalkPage(); - } - return $this->mTalkPage; - } -} - diff --git a/skins/modern/discussionitem_icon.gif b/skins/modern/discussionitem_icon.gif index baec471a..e3ca6d9e 100644 Binary files a/skins/modern/discussionitem_icon.gif and b/skins/modern/discussionitem_icon.gif differ diff --git a/skins/modern/file_icon.gif b/skins/modern/file_icon.gif index 847f6485..69dbeaf7 100644 Binary files a/skins/modern/file_icon.gif and b/skins/modern/file_icon.gif differ diff --git a/skins/modern/link_icon.gif b/skins/modern/link_icon.gif index 815ccb1b..168c1a2f 100644 Binary files a/skins/modern/link_icon.gif and b/skins/modern/link_icon.gif differ diff --git a/skins/modern/lock_icon.gif b/skins/modern/lock_icon.gif index 8a87e283..82844033 100644 Binary files a/skins/modern/lock_icon.gif and b/skins/modern/lock_icon.gif differ diff --git a/skins/modern/mail_icon.gif b/skins/modern/mail_icon.gif index 50a87a9a..cf5680d9 100644 Binary files a/skins/modern/mail_icon.gif and b/skins/modern/mail_icon.gif differ diff --git a/skins/modern/main.css b/skins/modern/main.css index 80ef008c..a25b6b59 100644 --- a/skins/modern/main.css +++ b/skins/modern/main.css @@ -153,7 +153,7 @@ textarea { } #searchInput { - display: block; + width: 85%; margin-left: auto; margin-right: auto; } @@ -368,7 +368,7 @@ h1, h2 { display: none; } -.prefsectiontip { +.htmlform-tip { font-size: x-small; padding: .2em 2em; color: #666; @@ -396,6 +396,10 @@ h1, h2 { color: white; } +#mw-pref-clear { + clear: both; +} + #mw_content a.external, #mw_content a[href ^="gopher://"] { background: url(external.png) center right no-repeat; @@ -531,12 +535,6 @@ img.thumbborder { .hiddenStructure { display: none; } - -#mw_content .plainlinks a { - background: none !important; - padding: 0 !important; -} - .mw-warning { border: 1px solid #aaa; background-color: #f9f9f9; @@ -607,15 +605,10 @@ img.thumbborder { .catlinks { border: solid 1px #bbbbbb; background-color: #f0f0f0; - padding: 0.5em 0.5em 0.5em 0.5em; + padding: 0.1em 0.3em 0.1em 0.3em; margin: 0 0 0 0; } -.catlinks { - margin: 0 0 0 0; - padding: 0 0 0 0; -} - #mw_header h1, #p-personal, #p-cactions { @@ -644,21 +637,6 @@ img.thumbborder { display: none; } -.not-patrolled { - background-color: #ffa; -} -div.patrollink { - font-size: 75%; - text-align: right; -} -span.newpage, span.minor, span.bot { - font-weight: bold; -} -span.unpatrolled { - font-weight: bold; - color: red; -} - .sharedUploadNotice { font-style: italic; } @@ -668,55 +646,6 @@ span.updatedmarker { background-color: #0f0; } -table.gallery { - border: 1px solid #ccc; - margin: 2px; - padding: 2px; - background-color: white; -} - -table.gallery tr { - vertical-align: top; -} - -table.gallery td { - vertical-align: top; - background-color: #f9f9f9; - border: solid 2px white; -} -/* Keep this temporarily so that cached pages will display right */ -table.gallery td.galleryheader { - text-align: center; - font-weight: bold; -} -table.gallery caption { - font-weight: bold; -} - -div.gallerybox { - margin: 2px; -} - -div.gallerybox div.thumb { - text-align: center; - border: 1px solid #ccc; - margin: 2px; -} - -div.gallerytext { - overflow: hidden; - font-size: 94%; - padding: 2px 4px; -} - -span.comment { - font-style: italic; -} - -span.changedby { - font-size: 95%; -} - .previewnote { text-indent: 3em; color: #c00; @@ -749,69 +678,10 @@ span.changedby { text-indent: -2em; } -/* Classes for EXIF data display */ -table.mw_metadata { - font-size: 0.8em; - margin-left: 0.5em; - margin-bottom: 0.5em; - width: 300px; -} - -table.mw_metadata caption { - font-weight: bold; -} - -table.mw_metadata th { - font-weight: normal; -} - -table.mw_metadata td { - padding: 0.1em; -} - -table.mw_metadata { - border: none; - border-collapse: collapse; -} - -table.mw_metadata td, table.mw_metadata th { - text-align: center; - border: 1px solid #aaaaaa; - padding-left: 0.1em; - padding-right: 0.1em; -} - -table.mw_metadata th { - background-color: #f9f9f9; -} - -table.mw_metadata td { - background-color: #fcfcfc; -} - table.collapsed tr.collapsable { display: none; } - -/* filetoc */ -ul#filetoc { - text-align: center; - border: 1px solid #aaaaaa; - background-color: #f9f9f9; - padding: 5px; - font-size: 95%; - margin-bottom: 0.5em; - margin-left: 0; - margin-right: 0; -} - -#filetoc li { - display: inline; - list-style-type: none; - padding-right: 2em; -} - input#wpSummary { width: 80%; } @@ -849,32 +719,6 @@ p.revision_saved { font-weight:bold; } -#mw_trackbacks { - border: solid 1px #bbbbff; - background-color: #eeeeff; - padding: 0.2em; -} - - -/* Allmessages table */ - -#allmessagestable th { - background-color: #b2b2ff; -} - -#allmessagestable tr.orig { - background-color: #ffe2e2; -} - -#allmessagestable tr.new { - background-color: #e2ffe2; -} - -#allmessagestable tr.def { - background-color: #f0f0ff; -} - - /* noarticletext */ div.noarticletext { border: 1px solid #ccc; @@ -934,29 +778,6 @@ table.multipageimage td { text-align: center; } -/** Special:Version */ - -table#sv-ext, table#sv-hooks, table#sv-software { - margin: 1em; - padding:0em; -} - -#sv-ext td, #sv-hooks td, #sv-software td, -#sv-ext th, #sv-hooks th, #sv-software th { - border: 1px solid #A0A0A0; - padding: 0 0.15em 0 0.15em; -} -#sv-ext th, #sv-hooks th, #sv-software th { - background-color: #F0F0F0; - color: black; - padding: 0 0.15em 0 0.15em; -} -tr.sv-space{ - height: 0.8em; - border:none; -} -tr.sv-space td { display: none; } - /* Table pager (e.g. Special:Imagelist) - remove underlines from the navigation link diff --git a/skins/modern/rtl.css b/skins/modern/rtl.css index d2dcacec..72210480 100644 --- a/skins/modern/rtl.css +++ b/skins/modern/rtl.css @@ -79,7 +79,6 @@ input#wpSave, input#wpDiff { } #userlogin { - float: right; margin: 0 0 1em 3em; } /* Convenience links to edit block, delete and protect reasons */ @@ -152,6 +151,11 @@ html > body div#mw_contentholder ul#filetoc { display: block; } +/* Special:Allpages styling */ +td.mw-allpages-nav, p.mw-allpages-nav, td.mw-allpages-alphaindexline { + text-align: left; +} + /* Special:Prefixindex styling */ td#mw-prefixindex-nav-form { text-align: left; diff --git a/skins/monobook/IEMacFixes.css b/skins/monobook/IEMacFixes.css deleted file mode 100644 index f1b05719..00000000 --- a/skins/monobook/IEMacFixes.css +++ /dev/null @@ -1,44 +0,0 @@ -/* IE/Mac only fix stylesheet, imported from main.css */ -#portal-column-content { - margin: 0 0 4.8em 0; - float: none; -} -#portal-column-content #content { - z-index: 0; -} -#portal-column-one { - position: absolute; - top: 0; - left: 0; - z-index: 3; -} -#portal-footer { - margin-left: 12em; -} -/* -#portlet-contentViews { - top: 0.6em !important; - left: 14.5em !important; -} -*/ -#portlet-contentViews li, -#portlet-contentViews .selected { - border: none !important; -} -#portlet-contentViews li a { - border: 1px solid #aaaaaa; - border-bottom: none; -} -#portlet-contentViews li.selected a { - border: 1px solid #fabd23; - border-bottom: none; -} -/* no background images */ -li#personaltools-userpage, -li#personaltools-login/* */ { - background: none; - padding-left: none; -} -#mactest { - color: green; -} diff --git a/skins/monobook/discussionitem_icon.gif b/skins/monobook/discussionitem_icon.gif index baec471a..e3ca6d9e 100644 Binary files a/skins/monobook/discussionitem_icon.gif and b/skins/monobook/discussionitem_icon.gif differ diff --git a/skins/monobook/file_icon.gif b/skins/monobook/file_icon.gif index 847f6485..69dbeaf7 100644 Binary files a/skins/monobook/file_icon.gif and b/skins/monobook/file_icon.gif differ diff --git a/skins/monobook/link_icon.gif b/skins/monobook/link_icon.gif index 815ccb1b..168c1a2f 100644 Binary files a/skins/monobook/link_icon.gif and b/skins/monobook/link_icon.gif differ diff --git a/skins/monobook/lock_icon.gif b/skins/monobook/lock_icon.gif index 8a87e283..f71cd9b8 100644 Binary files a/skins/monobook/lock_icon.gif and b/skins/monobook/lock_icon.gif differ diff --git a/skins/monobook/magnify-clip.png b/skins/monobook/magnify-clip.png index 992aa2e3..ffd7637f 100644 Binary files a/skins/monobook/magnify-clip.png and b/skins/monobook/magnify-clip.png differ diff --git a/skins/monobook/mail_icon.gif b/skins/monobook/mail_icon.gif index 50a87a9a..cf5680d9 100644 Binary files a/skins/monobook/mail_icon.gif and b/skins/monobook/mail_icon.gif differ diff --git a/skins/monobook/main.css b/skins/monobook/main.css index d6a67c1e..727355bb 100644 --- a/skins/monobook/main.css +++ b/skins/monobook/main.css @@ -54,9 +54,6 @@ body { margin: 0; padding: 0; } -.visualClear { - clear: both; -} /* general styles */ @@ -281,43 +278,12 @@ span.subpages { #siteNotice { text-align: center; font-size: 95%; - padding: 0 .9em; + padding: 0 0.9em; } #siteNotice p { margin: 0; padding: 0; } -.success { - color: green; - font-size: larger; -} -.error { - color: red; - font-size: larger; -} -.errorbox, .successbox { - font-size: larger; - border: 2px solid; - padding: .5em 1em; - float: left; - margin-bottom: 2em; - color: #000; -} -.errorbox { - border-color: red; - background-color: #fff2f2; -} -.successbox { - border-color: green; - background-color: #dfd; -} -.errorbox h2, .successbox h2 { - font-size: 1em; - font-weight: bold; - display: inline; - margin: 0 .5em 0 0; - border: none; -} .catlinks { border: 1px solid #aaa; @@ -525,35 +491,34 @@ table.rimage { ** this is css3, the validator doesn't like it when validating as css2 */ #bodyContent a.external, -#bodyContent a[href ^="gopher://"] { +#bodyContent a.external[href ^="gopher://"] { background: url(external.png) center right no-repeat; padding: 0 13px; } .rtl #bodyContent a.external, -.rtl #bodyContent a[href ^="gopher://"] { +.rtl #bodyContent a.external[href ^="gopher://"] { background-image: url(external-rtl.png); } -#bodyContent a[href ^="https://"], +#bodyContent a.external[href ^="https://"], .link-https { background: url(lock_icon.gif) center right no-repeat; padding: 0 16px; } -#bodyContent a[href ^="mailto:"], +#bodyContent a.external[href ^="mailto:"], .link-mailto { background: url(mail_icon.gif) center right no-repeat; padding: 0 18px; } -#bodyContent a[href ^="news://"] { +#bodyContent a.external[href ^="news://"] { background: url(news_icon.png) center right no-repeat; padding: 0 18px; } -#bodyContent a[href ^="ftp://"], +#bodyContent a.external[href ^="ftp://"], .link-ftp { background: url(file_icon.gif) center right no-repeat; padding: 0 18px; } -#bodyContent a[href ^="irc://"], -#bodyContent a.extiw[href ^="irc://"], +#bodyContent a.external[href ^="irc://"], .link-irc { background: url(discussionitem_icon.gif) center right no-repeat; padding: 0 18px; @@ -604,18 +569,10 @@ table.rimage { #bodyContent a.extiw, #bodyContent a.extiw:active { color: #36b; - background: none; - padding: 0; } #bodyContent a.external { color: #36b; } -/* this can be used in the content area to switch off -special external link styling */ -#bodyContent .plainlinks a { - background: none !important; - padding: 0 !important; -} /* ** Structural Elements */ @@ -920,6 +877,14 @@ li#ca-watch, li#ca-unwatch, li#ca-varlang-0, li#ca-print { z-index: 3; } +/* Override text-transform on languages where capitalization is significant */ +.capitalize-all-nouns .portlet h5, +.capitalize-all-nouns .portlet h6, +.capitalize-all-nouns #p-personal ul, +.capitalize-all-nouns #p-cactions ul li a { + text-transform: none; +} + /* TODO: #t-iscite is only used by the Cite extension, come up with some * system which allows extensions to add to this file on the fly */ @@ -956,6 +921,13 @@ li#ca-watch, li#ca-unwatch, li#ca-varlang-0, li#ca-print { height: 1%; } +.mw-htmlform-submit { + font-weight: bold; + padding-left: .3em; + padding-right: .3em; + margin-right: 2em; +} + /* js pref toc */ #preftoc { margin: 0; @@ -1005,10 +977,6 @@ li#ca-watch, li#ca-unwatch, li#ca-varlang-0, li#ca-print { cursor: default; text-decoration: none; } -#prefcontrol { - padding-top: 2em; - clear: both; -} #preferences { margin: 0; border: 1px solid #aaa; @@ -1021,11 +989,7 @@ li#ca-watch, li#ca-unwatch, li#ca-varlang-0, li#ca-print { padding: 0; margin: 0; } -.prefsection fieldset { - border: 1px solid #aaa; - float: left; - margin-right: 2em; -} + .prefsection legend { font-weight: bold; } @@ -1035,16 +999,11 @@ li#ca-watch, li#ca-unwatch, li#ca-varlang-0, li#ca-print { .mainLegend { display: none; } -div.prefsectiontip { +td.htmlform-tip { font-size: x-small; padding: .2em 2em; color: #666; } -.btnSavePrefs { - font-weight: bold; - padding-left: .3em; - padding-right: .3em; -} .preferences-login { clear: both; @@ -1162,20 +1121,9 @@ div#userloginForm .captcha { display: none; } -.not-patrolled { - background-color: #ffa; -} + div.patrollink { clear: both; - font-size: 75%; - text-align: right; -} -span.newpage, span.minor, span.bot { - font-weight: bold; -} -span.unpatrolled { - font-weight: bold; - color: red; } .sharedUploadNotice { @@ -1187,66 +1135,14 @@ span.updatedmarker { background-color: #0f0; } -table.gallery { - border: 1px solid #ccc; - margin: 2px; - padding: 2px; - background-color: white; -} - -table.gallery tr { - vertical-align: top; -} - -table.gallery td { - vertical-align: top; - background-color: #f9f9f9; - border: solid 2px white; -} -/* Keep this temporarily so that cached pages will display right */ -table.gallery td.galleryheader { - text-align: center; - font-weight: bold; -} -table.gallery caption { - font-weight: bold; -} - -div.gallerybox { - margin: 2px; -} - -div.gallerybox div.thumb { - text-align: center; - border: 1px solid #ccc; - margin: 2px; -} - -div.gallerytext { - overflow: hidden; - font-size: 94%; - padding: 2px 4px; -} - -span.comment { - font-style: italic; -} - -span.changedby { - font-size: 95%; -} - .previewnote { - text-indent: 3em; color: #c00; - border-bottom: 1px solid #aaa; - padding-bottom: 1em; margin-bottom: 1em; } .previewnote p { - margin: 0; - padding: 0; + text-indent: 3em; + margin: 0.8em 0; } .editExternally { @@ -1268,69 +1164,6 @@ span.changedby { text-indent: -2em; } -/* Classes for EXIF data display */ -table.mw_metadata { - font-size: 0.8em; - margin-left: 0.5em; - margin-bottom: 0.5em; - width: 300px; -} - -table.mw_metadata caption { - font-weight: bold; -} - -table.mw_metadata th { - font-weight: normal; -} - -table.mw_metadata td { - padding: 0.1em; -} - -table.mw_metadata { - border: none; - border-collapse: collapse; -} - -table.mw_metadata td, table.mw_metadata th { - text-align: center; - border: 1px solid #aaaaaa; - padding-left: 0.1em; - padding-right: 0.1em; -} - -table.mw_metadata th { - background-color: #f9f9f9; -} - -table.mw_metadata td { - background-color: #fcfcfc; -} - -table.collapsed tr.collapsable { - display: none; -} - - -/* filetoc */ -ul#filetoc { - text-align: center; - border: 1px solid #aaaaaa; - background-color: #f9f9f9; - padding: 5px; - font-size: 95%; - margin-bottom: 0.5em; - margin-left: 0; - margin-right: 0; -} - -#filetoc li { - display: inline; - list-style-type: none; - padding-right: 2em; -} - input#wpSummary { width: 80%; } @@ -1368,32 +1201,6 @@ p.revision_saved { font-weight:bold; } -#mw_trackbacks { - border: solid 1px #bbbbff; - background-color: #eeeeff; - padding: 0.2em; -} - - -/* Allmessages table */ - -#allmessagestable th { - background-color: #b2b2ff; -} - -#allmessagestable tr.orig { - background-color: #ffe2e2; -} - -#allmessagestable tr.new { - background-color: #e2ffe2; -} - -#allmessagestable tr.def { - background-color: #f0f0ff; -} - - /* noarticletext */ div.noarticletext { border: 1px solid #ccc; @@ -1457,53 +1264,6 @@ table.multipageimage td { text-align: center; } -/** Special:Version */ - -table#sv-ext, table#sv-hooks, table#sv-software { - margin: 1em; - padding:0em; -} - -#sv-ext td, #sv-hooks td, #sv-software td, -#sv-ext th, #sv-hooks th, #sv-software th { - border: 1px solid #A0A0A0; - padding: 0 0.15em 0 0.15em; -} -#sv-ext th, #sv-hooks th, #sv-software th { - background-color: #F0F0F0; - color: black; - padding: 0 0.15em 0 0.15em; -} -tr.sv-space{ - height: 0.8em; - border:none; -} -tr.sv-space td { display: none; } - -/* - Table pager (e.g. Special:Imagelist) - - remove underlines from the navigation link - - collapse borders - - set the borders to outsets (similar to Special:Allmessages) - - remove line wrapping for all td and th, set background color - - restore line wrapping for the last two table cells (description and size) -*/ -.TablePager { min-width: 80%; } -.TablePager_nav a { text-decoration: none; } -.TablePager { border-collapse: collapse; } -.TablePager, .TablePager td, .TablePager th { - border: 1px solid #aaaaaa; - padding: 0 0.15em 0 0.15em; -} -.TablePager th { background-color: #eeeeff } -.TablePager td { background-color: #ffffff } -.TablePager tr:hover td { background-color: #eeeeff } - -.imagelist td, .imagelist th { white-space: nowrap } -.imagelist .TablePager_col_links { background-color: #eeeeff } -.imagelist .TablePager_col_img_description { white-space: normal } -.imagelist th.TablePager_sort { background-color: #ccccff } - .templatesUsed { margin-top: 1.5em; } .mw-summary-preview { @@ -1537,24 +1297,12 @@ div.mw-lag-warn-high { font-size: 90%; } -/** Special:Search stuff */ -div#mw-search-interwiki-caption { - text-align: center; - font-weight: bold; - font-size: 95%; -} - -.mw-search-interwiki-project { - font-size: 97%; - text-align: left; - padding-left: 0.2em; - padding-right: 0.15em; - padding-bottom: 0.2em; - padding-top: 0.15em; - background: #cae8ff; -} - /* God-damned hack for the crappy layout */ .os-suggest { font-size: 127%; } + +/* Sometimes people don't want personal tools to be lowercase! */ +.no-text-transform { + text-transform: none; +} diff --git a/skins/monobook/rtl.css b/skins/monobook/rtl.css index 9b8e4f44..b9bf43c0 100644 --- a/skins/monobook/rtl.css +++ b/skins/monobook/rtl.css @@ -211,7 +211,6 @@ input#wpSave, input#wpDiff { } #userlogin { - float: right; margin: 0 0 1em 3em; } /* Convenience links to edit block, delete and protect reasons */ @@ -228,20 +227,25 @@ table.filehistory th { text-align: right; } +/* Special:Allpages styling */ +td.mw-allpages-nav, p.mw-allpages-nav, td.mw-allpages-alphaindexline { + text-align: left; +} + +/* Special:Prefixindex styling */ +td#mw-prefixindex-nav-form { + text-align: left; +} + /** * Lists: * The following lines don't have a visible effect on non-Gecko browsers * They fix a problem ith Gecko browsers rendering lists to the right of * left-floated objects in an RTL layout. */ -html > body div#bodyContent ul { +html > body div#article ul { display: table; } html > body div#bodyContent ul#filetoc { display: block; } -/* Special:Prefixindex styling */ -td#mw-prefixindex-nav-form { - text-align: left; -} - diff --git a/skins/monobook/user.gif b/skins/monobook/user.gif index c9c9ab96..34b4839d 100644 Binary files a/skins/monobook/user.gif and b/skins/monobook/user.gif differ diff --git a/skins/monobook/video.png b/skins/monobook/video.png index 38103dac..fadc4c9b 100644 Binary files a/skins/monobook/video.png and b/skins/monobook/video.png differ diff --git a/skins/monobook/wiki.png b/skins/monobook/wiki.png index 69fce988..44389389 100644 Binary files a/skins/monobook/wiki.png and b/skins/monobook/wiki.png differ diff --git a/skins/simple/discussionitem_icon.gif b/skins/simple/discussionitem_icon.gif index baec471a..e3ca6d9e 100644 Binary files a/skins/simple/discussionitem_icon.gif and b/skins/simple/discussionitem_icon.gif differ diff --git a/skins/simple/file_icon.gif b/skins/simple/file_icon.gif index 847f6485..69dbeaf7 100644 Binary files a/skins/simple/file_icon.gif and b/skins/simple/file_icon.gif differ diff --git a/skins/simple/link_icon.gif b/skins/simple/link_icon.gif index 815ccb1b..168c1a2f 100644 Binary files a/skins/simple/link_icon.gif and b/skins/simple/link_icon.gif differ diff --git a/skins/simple/lock_icon.gif b/skins/simple/lock_icon.gif index 8a87e283..82844033 100644 Binary files a/skins/simple/lock_icon.gif and b/skins/simple/lock_icon.gif differ diff --git a/skins/simple/mail_icon.gif b/skins/simple/mail_icon.gif index 50a87a9a..cf5680d9 100644 Binary files a/skins/simple/mail_icon.gif and b/skins/simple/mail_icon.gif differ diff --git a/skins/simple/main.css b/skins/simple/main.css index 6ba47e0d..525c1473 100644 --- a/skins/simple/main.css +++ b/skins/simple/main.css @@ -281,13 +281,13 @@ div.thumb { margin-bottom: 0.5em; width: auto; } -div.thumb div { +div.thumbinner { padding: 3px !important; text-align: center; overflow: hidden; } -div.thumb div div.thumbcaption { +html .thumbcaption { border: none; text-align: left; line-height: 1.4; @@ -365,12 +365,7 @@ div.printfooter { #preftoc a:active { display: block; } -#prefcontrol { - clear: both; - float: left; - margin-top: 1em; -} -div.prefsectiontip { +div.htmlform-tip { font-size: 95%; margin-top: 1em; } diff --git a/skins/simple/rtl.css b/skins/simple/rtl.css index 53b3dc0c..a5a2b59f 100644 --- a/skins/simple/rtl.css +++ b/skins/simple/rtl.css @@ -148,7 +148,6 @@ input#wpSave, input#wpDiff { } #userlogin { - float: right; margin: 0 0 1em 3em; } /* Convenience links to edit block, delete and protect reasons */ @@ -174,6 +173,11 @@ table.filehistory th { html > body div#bodyContent ul { display: table; } + +/* Special:Allpages styling */ +td.mw-allpages-nav, p.mw-allpages-nav, td.mw-allpages-alphaindexline { + text-align: left; + /* Special:Prefixindex styling */ td#mw-prefixindex-nav-form { text-align: left; diff --git a/skins/vector/Makefile b/skins/vector/Makefile new file mode 100644 index 00000000..74e36c45 --- /dev/null +++ b/skins/vector/Makefile @@ -0,0 +1,18 @@ +# +# Handy makefile to build the RTL variant with cssjanus +# + +all: main-rtl.css + +main-rtl.css: main-ltr.css cssjanus/cssjanus.py + python cssjanus/cssjanus.py --swap_ltr_rtl_in_url < main-ltr.css > main-rtl.css + +# SVN version is broken; checking in our own. +#cssjanus/cssjanus.py: +# svn co http://cssjanus.googlecode.com/svn/trunk cssjanus + +#distclean: clean +# rm -rf cssjanus + +clean: + rm -f main-rtl.css diff --git a/skins/vector/csshover.htc b/skins/vector/csshover.htc new file mode 100644 index 00000000..a88fa08d --- /dev/null +++ b/skins/vector/csshover.htc @@ -0,0 +1,262 @@ + + \ No newline at end of file diff --git a/skins/vector/cssjanus/COPYING b/skins/vector/cssjanus/COPYING new file mode 100644 index 00000000..3f2c8953 --- /dev/null +++ b/skins/vector/cssjanus/COPYING @@ -0,0 +1,13 @@ + Copyright 2008 Google Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/skins/vector/cssjanus/LICENSE b/skins/vector/cssjanus/LICENSE new file mode 100644 index 00000000..d6456956 --- /dev/null +++ b/skins/vector/cssjanus/LICENSE @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/skins/vector/cssjanus/README b/skins/vector/cssjanus/README new file mode 100644 index 00000000..9b922156 --- /dev/null +++ b/skins/vector/cssjanus/README @@ -0,0 +1,91 @@ +=CSSJanus= + +_Flips CSS from LTR to an RTL orienation and vice-versa_ + +Author: `Lindsey Simon ` + +==Introduction== + +CSSJanus is CSS parser utility designed to aid the conversion of a website's +layout from left-to-right(LTR) to right-to-left(RTL). The script was born out of +a need to convert CSS for RTL languages when tables are not being used for layout (since tables will automatically reorder TD's in RTL). +CSSJanus will change most of the obvious CSS property names and their values as +well as some not-so-obvious ones (cursor, background-position %, etc...). +The script is designed to offer flexibility to account for cases when you do +not want to change certain rules which exist to account for bidirectional text +display bugs, as well as situations where you may or may not want to flip annotations inside of the background url string. +Note that you can disable CSSJanus from running on an entire class or any +rule within a class by prepending a /* @noflip */ comment before the rule(s) +you want CSSJanus to ignore. + +CSSJanus itself is not always enough to make a website that works in a LTR +language context work in a RTL language all the way, but it is a start. + +==Getting the code== + +View the trunk at: + + http://cssjanus.googlecode.com/svn/trunk/ + +Check out the latest development version anonymously with: + +{{{ + $ svn checkout http://cssjanus.googlecode.com/svn/trunk/ cssjanus +}}} + +==Using== + +Usage: + ./cssjanus.py < file.css > file-rtl.css +Flags: + --swap_left_right_in_url: Fixes "left"/"right" string within urls. + Ex: ./cssjanus.py --swap_left_right_in_url < file.css > file_rtl.css + --swap_ltr_rtl_in_url: Fixes "ltr"/"rtl" string within urls. + Ex: ./cssjanus.py --swap_ltr_rtl_in_url < file.css > file_rtl.css + +If you'd like to make use of the webapp version of cssjanus, you'll need to +download the Google App Engine SDK + http://code.google.com/appengine/downloads.html +and also drop a "django" directory into this directory, with the latest svn +from django. You should be good to go with that setup. Please let me know +otherwise. + +==Bugs, Patches== + +Patches and bug reports are welcome, just please keep the style +consistent with the original source. If you find a bug, please include a diff +of cssjanus_test.py with the bug included as a new unit test which fails. It +will make understanding and fixing the bug easier. + +==Todo== + +* Include some helpers for some typical bidi text solutions? +* Aural CSS (azimuth) swapping? + +==Contributors== + +Additional thanks to Mike Samuel for his work on csslex.py, Andy Perelson for +his help coding and reviewing, Stephen Zabel for his help with i18n and my sanity, +and to Eric Meyer for his thoughtful input. +Thanks to Junyu Wang for the Chinese translation. +Thanks to Masashi Kawashima for the Japanese translation. +Thanks to Taaryk Taar and Tariq Al-Omaireeni for an updated Arabic translation. +Thanks to Jens Meiert for the German translation. + +==License== + +{{{ + Copyright 2008 Google Inc. All Rights Reserved. + + Licensed under the Apache License, Version 2.0 (the 'License'); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an 'AS IS' BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +}}} diff --git a/skins/vector/cssjanus/cssjanus.py b/skins/vector/cssjanus/cssjanus.py new file mode 100644 index 00000000..dd14bd58 --- /dev/null +++ b/skins/vector/cssjanus/cssjanus.py @@ -0,0 +1,574 @@ +#!/usr/bin/python +# +# Copyright 2008 Google Inc. All Rights Reserved. + +"""Converts a LeftToRight Cascading Style Sheet into a RightToLeft one. + + This is a utility script for replacing "left" oriented things in a CSS file + like float, padding, margin with "right" oriented values. + It also does the opposite. + The goal is to be able to conditionally serve one large, cat'd, compiled CSS + file appropriate for LeftToRight oriented languages and RightToLeft ones. + This utility will hopefully help your structural layout done in CSS in + terms of its RTL compatibility. It will not help with some of the more + complicated bidirectional text issues. +""" + +__author__ = 'elsigh@google.com (Lindsey Simon)' +__version__ = '0.1' + +import logging +import re +import sys +import getopt +import os + +import csslex + +logging.getLogger().setLevel(logging.INFO) + +# Global for the command line flags. +SWAP_LTR_RTL_IN_URL_DEFAULT = False +SWAP_LEFT_RIGHT_IN_URL_DEFAULT = False +FLAGS = {'swap_ltr_rtl_in_url': SWAP_LTR_RTL_IN_URL_DEFAULT, + 'swap_left_right_in_url': SWAP_LEFT_RIGHT_IN_URL_DEFAULT} + +# Generic token delimiter character. +TOKEN_DELIMITER = '~' + +# This is a temporary match token we use when swapping strings. +TMP_TOKEN = '%sTMP%s' % (TOKEN_DELIMITER, TOKEN_DELIMITER) + +# Token to be used for joining lines. +TOKEN_LINES = '%sJ%s' % (TOKEN_DELIMITER, TOKEN_DELIMITER) + +# Global constant text strings for CSS value matches. +LTR = 'ltr' +RTL = 'rtl' +LEFT = 'left' +RIGHT = 'right' + +# This is a lookbehind match to ensure that we don't replace instances +# of our string token (left, rtl, etc...) if there's a letter in front of it. +# Specifically, this prevents replacements like 'background: url(bright.png)'. +LOOKBEHIND_NOT_LETTER = r'(?)*?{)' % + (csslex.NMCHAR, TOKEN_LINES, csslex.SPACE)) + + +# These two lookaheads are to test whether or not we are within a +# background: url(HERE) situation. +# Ref: http://www.w3.org/TR/CSS21/syndata.html#uri +VALID_AFTER_URI_CHARS = r'[\'\"]?%s' % csslex.WHITESPACE +LOOKAHEAD_NOT_CLOSING_PAREN = r'(?!%s?%s\))' % (csslex.URL_CHARS, + VALID_AFTER_URI_CHARS) +LOOKAHEAD_FOR_CLOSING_PAREN = r'(?=%s?%s\))' % (csslex.URL_CHARS, + VALID_AFTER_URI_CHARS) + +# Compile a regex to swap left and right values in 4 part notations. +# We need to match negatives and decimal numeric values. +# ex. 'margin: .25em -2px 3px 0' becomes 'margin: .25em 0 3px -2px'. +POSSIBLY_NEGATIVE_QUANTITY = r'((?:-?%s)|(?:inherit|auto))' % csslex.QUANTITY +POSSIBLY_NEGATIVE_QUANTITY_SPACE = r'%s%s%s' % (POSSIBLY_NEGATIVE_QUANTITY, + csslex.SPACE, + csslex.WHITESPACE) +FOUR_NOTATION_QUANTITY_RE = re.compile(r'%s%s%s%s' % + (POSSIBLY_NEGATIVE_QUANTITY_SPACE, + POSSIBLY_NEGATIVE_QUANTITY_SPACE, + POSSIBLY_NEGATIVE_QUANTITY_SPACE, + POSSIBLY_NEGATIVE_QUANTITY), + re.I) +COLOR = r'(%s|%s)' % (csslex.NAME, csslex.HASH) +COLOR_SPACE = r'%s%s' % (COLOR, csslex.SPACE) +FOUR_NOTATION_COLOR_RE = re.compile(r'(-color%s:%s)%s%s%s(%s)' % + (csslex.WHITESPACE, + csslex.WHITESPACE, + COLOR_SPACE, + COLOR_SPACE, + COLOR_SPACE, + COLOR), + re.I) + +# Compile the cursor resize regexes +CURSOR_EAST_RE = re.compile(LOOKBEHIND_NOT_LETTER + '([ns]?)e-resize') +CURSOR_WEST_RE = re.compile(LOOKBEHIND_NOT_LETTER + '([ns]?)w-resize') + +# Matches the condition where we need to replace the horizontal component +# of a background-position value when expressed in horizontal percentage. +# Had to make two regexes because in the case of position-x there is only +# one quantity, and otherwise we don't want to match and change cases with only +# one quantity. +BG_HORIZONTAL_PERCENTAGE_RE = re.compile(r'background(-position)?(%s:%s)' + '([^%%]*?)(%s)%%' + '(%s(?:%s|%s))' % (csslex.WHITESPACE, + csslex.WHITESPACE, + csslex.NUM, + csslex.WHITESPACE, + csslex.QUANTITY, + csslex.IDENT)) + +BG_HORIZONTAL_PERCENTAGE_X_RE = re.compile(r'background-position-x(%s:%s)' + '(%s)%%' % (csslex.WHITESPACE, + csslex.WHITESPACE, + csslex.NUM)) + +# Matches the opening of a body selector. +BODY_SELECTOR = r'body%s{%s' % (csslex.WHITESPACE, csslex.WHITESPACE) + +# Matches anything up until the closing of a selector. +CHARS_WITHIN_SELECTOR = r'[^\}]*?' + +# Matches the direction property in a selector. +DIRECTION_RE = r'direction%s:%s' % (csslex.WHITESPACE, csslex.WHITESPACE) + +# These allow us to swap "ltr" with "rtl" and vice versa ONLY within the +# body selector and on the same line. +BODY_DIRECTION_LTR_RE = re.compile(r'(%s)(%s)(%s)(ltr)' % + (BODY_SELECTOR, CHARS_WITHIN_SELECTOR, + DIRECTION_RE), + re.I) +BODY_DIRECTION_RTL_RE = re.compile(r'(%s)(%s)(%s)(rtl)' % + (BODY_SELECTOR, CHARS_WITHIN_SELECTOR, + DIRECTION_RE), + re.I) + + +# Allows us to swap "direction:ltr" with "direction:rtl" and +# vice versa anywhere in a line. +DIRECTION_LTR_RE = re.compile(r'%s(ltr)' % DIRECTION_RE) +DIRECTION_RTL_RE = re.compile(r'%s(rtl)' % DIRECTION_RE) + +# We want to be able to switch left with right and vice versa anywhere +# we encounter left/right strings, EXCEPT inside the background:url(). The next +# two regexes are for that purpose. We have alternate IN_URL versions of the +# regexes compiled in case the user passes the flag that they do +# actually want to have left and right swapped inside of background:urls. +LEFT_RE = re.compile('%s(%s)%s%s' % (LOOKBEHIND_NOT_LETTER, + LEFT, + LOOKAHEAD_NOT_CLOSING_PAREN, + LOOKAHEAD_NOT_OPEN_BRACE), + re.I) +RIGHT_RE = re.compile('%s(%s)%s%s' % (LOOKBEHIND_NOT_LETTER, + RIGHT, + LOOKAHEAD_NOT_CLOSING_PAREN, + LOOKAHEAD_NOT_OPEN_BRACE), + re.I) +LEFT_IN_URL_RE = re.compile('%s(%s)%s' % (LOOKBEHIND_NOT_LETTER, + LEFT, + LOOKAHEAD_FOR_CLOSING_PAREN), + re.I) +RIGHT_IN_URL_RE = re.compile('%s(%s)%s' % (LOOKBEHIND_NOT_LETTER, + RIGHT, + LOOKAHEAD_FOR_CLOSING_PAREN), + re.I) +LTR_IN_URL_RE = re.compile('%s(%s)%s' % (LOOKBEHIND_NOT_LETTER, + LTR, + LOOKAHEAD_FOR_CLOSING_PAREN), + re.I) +RTL_IN_URL_RE = re.compile('%s(%s)%s' % (LOOKBEHIND_NOT_LETTER, + RTL, + LOOKAHEAD_FOR_CLOSING_PAREN), + re.I) + +COMMENT_RE = re.compile('(%s)' % csslex.COMMENT, re.I) + +NOFLIP_TOKEN = r'\@noflip' +# The NOFLIP_TOKEN inside of a comment. For now, this requires that comments +# be in the input, which means users of a css compiler would have to run +# this script first if they want this functionality. +NOFLIP_ANNOTATION = r'/\*%s%s%s\*/' % (csslex.WHITESPACE, + NOFLIP_TOKEN, + csslex. WHITESPACE) + +# After a NOFLIP_ANNOTATION, and within a class selector, we want to be able +# to set aside a single rule not to be flipped. We can do this by matching +# our NOFLIP annotation and then using a lookahead to make sure there is not +# an opening brace before the match. +NOFLIP_SINGLE_RE = re.compile(r'(%s%s[^;}]+;?)' % (NOFLIP_ANNOTATION, + LOOKAHEAD_NOT_OPEN_BRACE), + re.I) + +# After a NOFLIP_ANNOTATION, we want to grab anything up until the next } which +# means the entire following class block. This will prevent all of its +# declarations from being flipped. +NOFLIP_CLASS_RE = re.compile(r'(%s%s})' % (NOFLIP_ANNOTATION, + CHARS_WITHIN_SELECTOR), + re.I) + + +class Tokenizer: + """Replaces any CSS comments with string tokens and vice versa.""" + + def __init__(self, token_re, token_string): + """Constructor for the Tokenizer. + + Args: + token_re: A regex for the string to be replace by a token. + token_string: The string to put between token delimiters when tokenizing. + """ + logging.debug('Tokenizer::init token_string=%s' % token_string) + self.token_re = token_re + self.token_string = token_string + self.originals = [] + + def Tokenize(self, line): + """Replaces any string matching token_re in line with string tokens. + + By passing a function as an argument to the re.sub line below, we bypass + the usual rule where re.sub will only replace the left-most occurrence of + a match by calling the passed in function for each occurrence. + + Args: + line: A line to replace token_re matches in. + + Returns: + line: A line with token_re matches tokenized. + """ + line = self.token_re.sub(self.TokenizeMatches, line) + logging.debug('Tokenizer::Tokenize returns: %s' % line) + return line + + def DeTokenize(self, line): + """Replaces tokens with the original string. + + Args: + line: A line with tokens. + + Returns: + line with any tokens replaced by the original string. + """ + + # Put all of the comments back in by their comment token. + for i, original in enumerate(self.originals): + token = '%s%s_%s%s' % (TOKEN_DELIMITER, self.token_string, i + 1, + TOKEN_DELIMITER) + line = line.replace(token, original) + logging.debug('Tokenizer::DeTokenize i:%s w/%s' % (i, token)) + logging.debug('Tokenizer::DeTokenize returns: %s' % line) + return line + + def TokenizeMatches(self, m): + """Replaces matches with tokens and stores the originals. + + Args: + m: A match object. + + Returns: + A string token which replaces the CSS comment. + """ + logging.debug('Tokenizer::TokenizeMatches %s' % m.group(1)) + self.originals.append(m.group(1)) + return '%s%s_%s%s' % (TOKEN_DELIMITER, + self.token_string, + len(self.originals), + TOKEN_DELIMITER) + + +def FixBodyDirectionLtrAndRtl(line): + """Replaces ltr with rtl and vice versa ONLY in the body direction. + + Args: + line: A string to replace instances of ltr with rtl. + Returns: + line with direction: ltr and direction: rtl swapped only in body selector. + line = FixBodyDirectionLtrAndRtl('body { direction:ltr }') + line will now be 'body { direction:rtl }'. + """ + + line = BODY_DIRECTION_LTR_RE.sub('\\1\\2\\3%s' % TMP_TOKEN, line) + line = BODY_DIRECTION_RTL_RE.sub('\\1\\2\\3%s' % LTR, line) + line = line.replace(TMP_TOKEN, RTL) + logging.debug('FixBodyDirectionLtrAndRtl returns: %s' % line) + return line + + +def FixLeftAndRight(line): + """Replaces left with right and vice versa in line. + + Args: + line: A string in which to perform the replacement. + + Returns: + line with left and right swapped. For example: + line = FixLeftAndRight('padding-left: 2px; margin-right: 1px;') + line will now be 'padding-right: 2px; margin-left: 1px;'. + """ + + line = LEFT_RE.sub(TMP_TOKEN, line) + line = RIGHT_RE.sub(LEFT, line) + line = line.replace(TMP_TOKEN, RIGHT) + logging.debug('FixLeftAndRight returns: %s' % line) + return line + + +def FixLeftAndRightInUrl(line): + """Replaces left with right and vice versa ONLY within background urls. + + Args: + line: A string in which to replace left with right and vice versa. + + Returns: + line with left and right swapped in the url string. For example: + line = FixLeftAndRightInUrl('background:url(right.png)') + line will now be 'background:url(left.png)'. + """ + + line = LEFT_IN_URL_RE.sub(TMP_TOKEN, line) + line = RIGHT_IN_URL_RE.sub(LEFT, line) + line = line.replace(TMP_TOKEN, RIGHT) + logging.debug('FixLeftAndRightInUrl returns: %s' % line) + return line + + +def FixLtrAndRtlInUrl(line): + """Replaces ltr with rtl and vice versa ONLY within background urls. + + Args: + line: A string in which to replace ltr with rtl and vice versa. + + Returns: + line with left and right swapped. For example: + line = FixLtrAndRtlInUrl('background:url(rtl.png)') + line will now be 'background:url(ltr.png)'. + """ + + line = LTR_IN_URL_RE.sub(TMP_TOKEN, line) + line = RTL_IN_URL_RE.sub(LTR, line) + line = line.replace(TMP_TOKEN, RTL) + logging.debug('FixLtrAndRtlInUrl returns: %s' % line) + return line + + +def FixCursorProperties(line): + """Fixes directional CSS cursor properties. + + Args: + line: A string to fix CSS cursor properties in. + + Returns: + line reformatted with the cursor properties substituted. For example: + line = FixCursorProperties('cursor: ne-resize') + line will now be 'cursor: nw-resize'. + """ + + line = CURSOR_EAST_RE.sub('\\1' + TMP_TOKEN, line) + line = CURSOR_WEST_RE.sub('\\1e-resize', line) + line = line.replace(TMP_TOKEN, 'w-resize') + logging.debug('FixCursorProperties returns: %s' % line) + return line + + +def FixFourPartNotation(line): + """Fixes the second and fourth positions in 4 part CSS notation. + + Args: + line: A string to fix 4 part CSS notation in. + + Returns: + line reformatted with the 4 part notations swapped. For example: + line = FixFourPartNotation('padding: 1px 2px 3px 4px') + line will now be 'padding: 1px 4px 3px 2px'. + """ + line = FOUR_NOTATION_QUANTITY_RE.sub('\\1 \\4 \\3 \\2', line) + line = FOUR_NOTATION_COLOR_RE.sub('\\1\\2 \\5 \\4 \\3', line) + logging.debug('FixFourPartNotation returns: %s' % line) + return line + + +def FixBackgroundPosition(line): + """Fixes horizontal background percentage values in line. + + Args: + line: A string to fix horizontal background position values in. + + Returns: + line reformatted with the 4 part notations swapped. + """ + line = BG_HORIZONTAL_PERCENTAGE_RE.sub(CalculateNewBackgroundPosition, line) + line = BG_HORIZONTAL_PERCENTAGE_X_RE.sub(CalculateNewBackgroundPositionX, + line) + logging.debug('FixBackgroundPosition returns: %s' % line) + return line + + +def CalculateNewBackgroundPosition(m): + """Fixes horizontal background-position percentages. + + This function should be used as an argument to re.sub since it needs to + perform replacement specific calculations. + + Args: + m: A match object. + + Returns: + A string with the horizontal background position percentage fixed. + BG_HORIZONTAL_PERCENTAGE_RE.sub(FixBackgroundPosition, + 'background-position: 75% 50%') + will return 'background-position: 25% 50%'. + """ + + # The flipped value is the offset from 100% + new_x = str(100-int(m.group(4))) + + # Since m.group(1) may very well be None type and we need a string.. + if m.group(1): + position_string = m.group(1) + else: + position_string = '' + + return 'background%s%s%s%s%%%s' % (position_string, m.group(2), m.group(3), + new_x, m.group(5)) + + +def CalculateNewBackgroundPositionX(m): + """Fixes percent based background-position-x. + + This function should be used as an argument to re.sub since it needs to + perform replacement specific calculations. + + Args: + m: A match object. + + Returns: + A string with the background-position-x percentage fixed. + BG_HORIZONTAL_PERCENTAGE_X_RE.sub(CalculateNewBackgroundPosition, + 'background-position-x: 75%') + will return 'background-position-x: 25%'. + """ + + # The flipped value is the offset from 100% + new_x = str(100-int(m.group(2))) + + return 'background-position-x%s%s%%' % (m.group(1), new_x) + + +def ChangeLeftToRightToLeft(lines, + swap_ltr_rtl_in_url=None, + swap_left_right_in_url=None): + """Turns lines into a stream and runs the fixing functions against it. + + Args: + lines: An list of CSS lines. + swap_ltr_rtl_in_url: Overrides this flag if param is set. + swap_left_right_in_url: Overrides this flag if param is set. + + Returns: + The same lines, but with left and right fixes. + """ + + global FLAGS + + # Possibly override flags with params. + logging.debug('ChangeLeftToRightToLeft swap_ltr_rtl_in_url=%s, ' + 'swap_left_right_in_url=%s' % (swap_ltr_rtl_in_url, + swap_left_right_in_url)) + if swap_ltr_rtl_in_url is None: + swap_ltr_rtl_in_url = FLAGS['swap_ltr_rtl_in_url'] + if swap_left_right_in_url is None: + swap_left_right_in_url = FLAGS['swap_left_right_in_url'] + + # Turns the array of lines into a single line stream. + logging.debug('LINES COUNT: %s' % len(lines)) + line = TOKEN_LINES.join(lines) + + # Tokenize any single line rules with the /* noflip */ annotation. + noflip_single_tokenizer = Tokenizer(NOFLIP_SINGLE_RE, 'NOFLIP_SINGLE') + line = noflip_single_tokenizer.Tokenize(line) + + # Tokenize any class rules with the /* noflip */ annotation. + noflip_class_tokenizer = Tokenizer(NOFLIP_CLASS_RE, 'NOFLIP_CLASS') + line = noflip_class_tokenizer.Tokenize(line) + + # Tokenize the comments so we can preserve them through the changes. + comment_tokenizer = Tokenizer(COMMENT_RE, 'C') + line = comment_tokenizer.Tokenize(line) + + # Here starteth the various left/right orientation fixes. + line = FixBodyDirectionLtrAndRtl(line) + + if swap_left_right_in_url: + line = FixLeftAndRightInUrl(line) + + if swap_ltr_rtl_in_url: + line = FixLtrAndRtlInUrl(line) + + line = FixLeftAndRight(line) + line = FixCursorProperties(line) + line = FixFourPartNotation(line) + line = FixBackgroundPosition(line) + + # DeTokenize the single line noflips. + line = noflip_single_tokenizer.DeTokenize(line) + + # DeTokenize the class-level noflips. + line = noflip_class_tokenizer.DeTokenize(line) + + # DeTokenize the comments. + line = comment_tokenizer.DeTokenize(line) + + # Rejoin the lines back together. + lines = line.split(TOKEN_LINES) + + return lines + +def usage(): + """Prints out usage information.""" + + print 'Usage:' + print ' ./cssjanus.py < file.css > file-rtl.css' + print 'Flags:' + print ' --swap_left_right_in_url: Fixes "left"/"right" string within urls.' + print ' Ex: ./cssjanus.py --swap_left_right_in_url < file.css > file_rtl.css' + print ' --swap_ltr_rtl_in_url: Fixes "ltr"/"rtl" string within urls.' + print ' Ex: ./cssjanus --swap_ltr_rtl_in_url < file.css > file_rtl.css' + +def setflags(opts): + """Parse the passed in command line arguments and set the FLAGS global. + + Args: + opts: getopt iterable intercepted from argv. + """ + + global FLAGS + + # Parse the arguments. + for opt, arg in opts: + logging.debug('opt: %s, arg: %s' % (opt, arg)) + if opt in ("-h", "--help"): + usage() + sys.exit() + elif opt in ("-d", "--debug"): + logging.getLogger().setLevel(logging.DEBUG) + elif opt == '--swap_ltr_rtl_in_url': + FLAGS['swap_ltr_rtl_in_url'] = True + elif opt == '--swap_left_right_in_url': + FLAGS['swap_left_right_in_url'] = True + + +def main(argv): + """Sends stdin lines to ChangeLeftToRightToLeft and writes to stdout.""" + + # Define the flags. + try: + opts, args = getopt.getopt(argv, 'hd', ['help', 'debug', + 'swap_left_right_in_url', + 'swap_ltr_rtl_in_url']) + except getopt.GetoptError: + usage() + sys.exit(2) + + # Parse and set the flags. + setflags(opts) + + # Call the main routine with all our functionality. + fixed_lines = ChangeLeftToRightToLeft(sys.stdin.readlines()) + sys.stdout.write(''.join(fixed_lines)) + +if __name__ == '__main__': + main(sys.argv[1:]) diff --git a/skins/vector/cssjanus/csslex.py b/skins/vector/cssjanus/csslex.py new file mode 100644 index 00000000..1fc7304e --- /dev/null +++ b/skins/vector/cssjanus/csslex.py @@ -0,0 +1,114 @@ +#!/usr/bin/python +# +# Copyright 2007 Google Inc. All Rights Reserved. + +"""CSS Lexical Grammar rules. + +CSS lexical grammar from http://www.w3.org/TR/CSS21/grammar.html +""" + +__author__ = ['elsigh@google.com (Lindsey Simon)', + 'msamuel@google.com (Mike Samuel)'] + +# public symbols +__all__ = [ "NEWLINE", "HEX", "NON_ASCII", "UNICODE", "ESCAPE", "NMSTART", "NMCHAR", "STRING1", "STRING2", "IDENT", "NAME", "HASH", "NUM", "STRING", "URL", "SPACE", "WHITESPACE", "COMMENT", "QUANTITY", "PUNC" ] + +# The comments below are mostly copied verbatim from the grammar. + +# "@import" {return IMPORT_SYM;} +# "@page" {return PAGE_SYM;} +# "@media" {return MEDIA_SYM;} +# "@charset" {return CHARSET_SYM;} +KEYWORD = r'(?:\@(?:import|page|media|charset))' + +# nl \n|\r\n|\r|\f ; a newline +NEWLINE = r'\n|\r\n|\r|\f' + +# h [0-9a-f] ; a hexadecimal digit +HEX = r'[0-9a-f]' + +# nonascii [\200-\377] +NON_ASCII = r'[\200-\377]' + +# unicode \\{h}{1,6}(\r\n|[ \t\r\n\f])? +UNICODE = r'(?:(?:\\' + HEX + r'{1,6})(?:\r\n|[ \t\r\n\f])?)' + +# escape {unicode}|\\[^\r\n\f0-9a-f] +ESCAPE = r'(?:' + UNICODE + r'|\\[^\r\n\f0-9a-f])' + +# nmstart [_a-z]|{nonascii}|{escape} +NMSTART = r'(?:[_a-z]|' + NON_ASCII + r'|' + ESCAPE + r')' + +# nmchar [_a-z0-9-]|{nonascii}|{escape} +NMCHAR = r'(?:[_a-z0-9-]|' + NON_ASCII + r'|' + ESCAPE + r')' + +# ident -?{nmstart}{nmchar}* +IDENT = r'-?' + NMSTART + NMCHAR + '*' + +# name {nmchar}+ +NAME = NMCHAR + r'+' + +# hash +HASH = r'#' + NAME + +# string1 \"([^\n\r\f\\"]|\\{nl}|{escape})*\" ; "string" +STRING1 = r'"(?:[^\"\\]|\\.)*"' + +# string2 \'([^\n\r\f\\']|\\{nl}|{escape})*\' ; 'string' +STRING2 = r"'(?:[^\'\\]|\\.)*'" + +# string {string1}|{string2} +STRING = '(?:' + STRING1 + r'|' + STRING2 + ')' + +# num [0-9]+|[0-9]*"."[0-9]+ +NUM = r'(?:[0-9]*\.[0-9]+|[0-9]+)' + +# s [ \t\r\n\f] +SPACE = r'[ \t\r\n\f]' + +# w {s}* +WHITESPACE = '(?:' + SPACE + r'*)' + +# url special chars +URL_SPECIAL_CHARS = r'[!#$%&*-~]' + +# url chars ({url_special_chars}|{nonascii}|{escape})* +URL_CHARS = r'(?:%s|%s|%s)*' % (URL_SPECIAL_CHARS, NON_ASCII, ESCAPE) + +# url +URL = r'url\(%s(%s|%s)%s\)' % (WHITESPACE, STRING, URL_CHARS, WHITESPACE) + +# comments +# see http://www.w3.org/TR/CSS21/grammar.html +COMMENT = r'/\*[^*]*\*+([^/*][^*]*\*+)*/' + +# {E}{M} {return EMS;} +# {E}{X} {return EXS;} +# {P}{X} {return LENGTH;} +# {C}{M} {return LENGTH;} +# {M}{M} {return LENGTH;} +# {I}{N} {return LENGTH;} +# {P}{T} {return LENGTH;} +# {P}{C} {return LENGTH;} +# {D}{E}{G} {return ANGLE;} +# {R}{A}{D} {return ANGLE;} +# {G}{R}{A}{D} {return ANGLE;} +# {M}{S} {return TIME;} +# {S} {return TIME;} +# {H}{Z} {return FREQ;} +# {K}{H}{Z} {return FREQ;} +# % {return PERCENTAGE;} +UNIT = r'(?:em|ex|px|cm|mm|in|pt|pc|deg|rad|grad|ms|s|hz|khz|%)' + +# {num}{UNIT|IDENT} {return NUMBER;} +QUANTITY = '%s(?:%s%s|%s)?' % (NUM, WHITESPACE, UNIT, IDENT) + +# "" {return CDC;} +# "~=" {return INCLUDES;} +# "|=" {return DASHMATCH;} +# {w}"{" {return LBRACE;} +# {w}"+" {return PLUS;} +# {w}">" {return GREATER;} +# {w}"," {return COMMA;} +PUNC = r'|~=|\|=|[\{\+>,:;]' diff --git a/skins/vector/experiments/babaco-colors-a.css b/skins/vector/experiments/babaco-colors-a.css new file mode 100644 index 00000000..ce6f67dd --- /dev/null +++ b/skins/vector/experiments/babaco-colors-a.css @@ -0,0 +1,109 @@ +/* Babaco Color Scheme A */ + + +a:visited, +a:visited div.vectorTabs li.selected a:visited span { + color: #260e9c; +} + +html .thumbimage, +#toc, .toc, .mw-warning, div.thumbinner { + border-color: #cccccc; + background-color: #f7f7f7; +} + +/* Framework */ +#mw-page-base { + background-color: inherit !important; + background-image: none !important; +} +body { + background-color: #f9f9f9 !important; + background-image:url(images/page-base-updated.png); +} + +/* Links */ +a { + color: #0066cc; +} +a:visited { + color: #004d99; +} +a:active { + color: #ff6600; +} +a.stub { + color: #56228b; +} +a.new, #p-personal a.new { + color: #a31205 !important; +} +a.new:visited, #p-personal a.new:visited { + color: #a31205; +} + +h1, +h2, +h3, +h4, +h5, +h6 { + border-color:#999999; + font-family:georgia, times, serif; + font-weight:bold; +} +#firstHeading { + font-size:1.5em; +} +h2 .editsection, +.portal h5{ + font-family:sans-serif; + font-weight:normal; + +} +#toc h2, .toc h2 { + font-family:sans-serif; + font-weight:normal; +} +body #mw-panel div.portal div.body { + background-image:url(images/new-portal-break-ltr.png); +} +body.rtl #mw-panel div.portal div.body { + background-image:url(images/new-portal-break-rtl.png); +} +body div.vectorTabs li a, div.vectorTabs li a span{ + color:#4d4d4d; +} +body div.vectorTabs li.selected a, +body div.vectorTabs li.selected a span, +body div.vectorTabs li.selected a:visited +body div.vectorTabs li.selected a:visited span { + color: #ff9900 !important; + font-weight:bold; +} +div.vectorTabs li.new a, +div.vectorTabs li.new a span, +div.vectorTabs li.new a:visited, +div.vectorTabs li.new a:visited span { + color:#a31205; +} +#toc, +.toc, +.mw-warning, +div.gallerybox div.thumb, +table.gallery, +#preferences fieldset.prefsection fieldset, +#preferences, +html .thumbimage, +.usermessage, +img.thumbborder, +div.thumbinner{ + border: 1px solid #cccccc; + background-color: #f7f7f7; +} +#mw-panel div.portal h5 { + font-weight:bold; + margin-bottom:0; + padding-bottom:0.05em; + color:#000000; +} diff --git a/skins/vector/experiments/babaco-colors-b.css b/skins/vector/experiments/babaco-colors-b.css new file mode 100644 index 00000000..227e197c --- /dev/null +++ b/skins/vector/experiments/babaco-colors-b.css @@ -0,0 +1,67 @@ +/* Babaco Color Scheme A */ + + +html .thumbimage, +#toc, .toc, .mw-warning, div.thumbinner { + border-color: #cccccc; + background-color: #f7f7f7; +} + +/* Framework */ +#mw-page-base { + background-color: inherit !important; + background-image: none !important; +} +body { + background-color: #f9f9f9 !important; + background-image:url(images/page-base-updated.png); +} +/* Links */ +a { + color: #003cb3; +} +a.stub { + color: #772233; +} +a.new, #p-personal a.new { + color: #a31205 !important; +} +{ + color: #260e9c; +} +a:visited, +a:visited div.vectorTabs li.selected a:visited span, +a.new:visited, +#p-personal a.new:visited { + color: #260e9c; +} +h1, +h2, +h3, +h4, +h5, +h6 { + border-color:#999999; +} + +div.vectorTabs li.new a, +div.vectorTabs li.new a span, +div.vectorTabs li.new a:visited, +div.vectorTabs li.new a:visited span { + color:#a31205; +} + +#toc, +.toc, +.mw-warning, +div.gallerybox div.thumb, +table.gallery, +#preferences fieldset.prefsection fieldset, +#preferences, +html .thumbimage, +.usermessage, +img.thumbborder, +div.thumbinner{ + border: 1px solid #cccccc; + background-color: #f7f7f7; +} diff --git a/skins/vector/experiments/babaco-colors-c.css b/skins/vector/experiments/babaco-colors-c.css new file mode 100644 index 00000000..d2dabf7d --- /dev/null +++ b/skins/vector/experiments/babaco-colors-c.css @@ -0,0 +1,91 @@ +/* Babaco Color Scheme C */ + +/* ridding ourselves of the gradient */ +#mw-page-base { + background-color: inherit !important; + background-image: none !important; +} + +a:visited, +a:visited div.vectorTabs li.selected a:visited span { + color: #260e9c; +} + +html .thumbimage, +#toc, .toc, .mw-warning, div.thumbinner { + border-color: #cccccc; + background-color: #f7f7f7; +} + +/* Framework */ +body { + background-color: #f9f9f9 !important; + background-image:url(images/page-base-updated.png); +} + +/* Links */ +a { + color: #0066cc; +} +a:visited { + color: #004d99; +} +a:active { + color: #ff6600; +} +a.stub { + color: #56228b; +} +a.new, #p-personal a.new { + color: #a31205 !important; +} +a.new:visited, #p-personal a.new:visited { + color: #a31205; +} + +#firstHeading { + font-size:1.5em; +} +h2 .editsection, +.portal h5 { + font-weight:normal; +} +#toc h2, .toc h2 { + font-weight:normal; +} +body #mw-panel div.portal div.body { + background-image:url(images/new-portal-break-ltr.png); +} + +div.vectorTabs li.new a, +div.vectorTabs li.new a span, +div.vectorTabs li.new a:visited, +div.vectorTabs li.new a:visited span { + color:#a31205; +} +#toc, +.toc, +.mw-warning, +div.gallerybox div.thumb, +table.gallery, +#preferences fieldset.prefsection fieldset, +#preferences, +html .thumbimage, +.usermessage, +img.thumbborder, +div.thumbinner { + border: 1px solid #cccccc; + background-color: #f7f7f7; +} +#mw-panel div.portal h5 { + font-weight:bold; + margin-bottom:0; + padding-bottom:0.05em; + color:#000000; +} +div.vectorTabs li.selected a, +div.vectorTabs li.selected a span, +div.vectorTabs li.selected a:visited +div.vectorTabs li.selected a:visited span { + color: #333333 !important; +} \ No newline at end of file diff --git a/skins/vector/experiments/images/new-border.png b/skins/vector/experiments/images/new-border.png new file mode 100644 index 00000000..735324ef Binary files /dev/null and b/skins/vector/experiments/images/new-border.png differ diff --git a/skins/vector/experiments/images/new-portal-break-ltr.png b/skins/vector/experiments/images/new-portal-break-ltr.png new file mode 100644 index 00000000..cd8f3b15 Binary files /dev/null and b/skins/vector/experiments/images/new-portal-break-ltr.png differ diff --git a/skins/vector/experiments/images/new-portal-break-rtl.png b/skins/vector/experiments/images/new-portal-break-rtl.png new file mode 100644 index 00000000..45c5b2f9 Binary files /dev/null and b/skins/vector/experiments/images/new-portal-break-rtl.png differ diff --git a/skins/vector/experiments/images/page-base-fade.png b/skins/vector/experiments/images/page-base-fade.png new file mode 100644 index 00000000..dc631823 Binary files /dev/null and b/skins/vector/experiments/images/page-base-fade.png differ diff --git a/skins/vector/experiments/images/page-base-updated.png b/skins/vector/experiments/images/page-base-updated.png new file mode 100644 index 00000000..54ffeb00 Binary files /dev/null and b/skins/vector/experiments/images/page-base-updated.png differ diff --git a/skins/vector/experiments/images/tab-active-first.png b/skins/vector/experiments/images/tab-active-first.png new file mode 100644 index 00000000..e4c39c42 Binary files /dev/null and b/skins/vector/experiments/images/tab-active-first.png differ diff --git a/skins/vector/experiments/images/tab-active-last.png b/skins/vector/experiments/images/tab-active-last.png new file mode 100644 index 00000000..a96f3916 Binary files /dev/null and b/skins/vector/experiments/images/tab-active-last.png differ diff --git a/skins/vector/experiments/images/tab-fade.png b/skins/vector/experiments/images/tab-fade.png new file mode 100644 index 00000000..1eb0e23b Binary files /dev/null and b/skins/vector/experiments/images/tab-fade.png differ diff --git a/skins/vector/experiments/images/tab-first.png b/skins/vector/experiments/images/tab-first.png new file mode 100644 index 00000000..439b713f Binary files /dev/null and b/skins/vector/experiments/images/tab-first.png differ diff --git a/skins/vector/experiments/images/tab-last.png b/skins/vector/experiments/images/tab-last.png new file mode 100644 index 00000000..08e283dd Binary files /dev/null and b/skins/vector/experiments/images/tab-last.png differ diff --git a/skins/vector/experiments/images/tab-new-fade.png b/skins/vector/experiments/images/tab-new-fade.png new file mode 100644 index 00000000..44925505 Binary files /dev/null and b/skins/vector/experiments/images/tab-new-fade.png differ diff --git a/skins/vector/experiments/new-tabs.css b/skins/vector/experiments/new-tabs.css new file mode 100644 index 00000000..e3850e8e --- /dev/null +++ b/skins/vector/experiments/new-tabs.css @@ -0,0 +1,322 @@ +/* new border color */ +#content { + background-image: url(images/new-border.png); +} + +#footer { + background-image: url(images/new-border.png); +} + body div#left-navigation, + body div#right-navigation { + top:3.2em; + } + body div#right-navigation { + margin-top:3.2em; + } + body #p-search form, + body #p-search input, + body #simpleSearch { + margin-top:0; + } + body div#p-cactions { + margin-top:0; + } + /* Namespaces and Views */ + /* @noflip */ + div.vectorTabs { + float: left; + } + body div.vectorTabs { + background-image: none; + padding-left: 0; + } + /* @noflip */ + div.vectorTabs ul { + float: left; + } + div.vectorTabs ul { + height: 100%; + list-style: none; + background-image:none; + margin: 0; + padding: 0; + } + /* @noflip */ + div.vectorTabs ul li { + float: left; + } + /* OVERRIDDEN BY COMPLIANT BROWSERS */ + body div.vectorTabs ul li { + line-height: 1em; + display: inline-block; + height: 2em; + margin: 0 1px 0 0; + padding: 0; + background:none; + overflow:hidden; + white-space:nowrap; + } + /* IGNORED BY IE6 */ + div.vectorTabs ul > li { + display: block; + } + body div.vectorTabs li.selected { + background-image: none; + border:none; + } + /* OVERRIDDEN BY COMPLIANT BROWSERS */ + body div.vectorTabs li a { + border-top:1px solid #cccccc; + border-left:1px solid #cccccc; + border-right:1px solid #cccccc; + display: inline-block; + height: 1.7em; + padding-left: 0.6em; + padding-right: 0.6em; + background-image:url(images/tab-fade.png); + background-position:bottom left; + background-repeat:repeat-x; + background-color:#ffffff; + } + body div.vectorTabs li.new a{ + background-image:url(images/tab-new-fade.png); + + } + div.vectorTabs li a, + div.vectorTabs li a span { + cursor: pointer; + } + div.vectorTabs li a span { + font-size: 0.8em; + } + /* IGNORED BY IE6 */ + div.vectorTabs li > a { + display: block; + } + /* OVERRIDDEN BY COMPLIANT BROWSERS */ + body div.vectorTabs a span { + display: inline-block; + padding-top: 0.5em; + } + /* IGNORED BY IE6 */ + /* @noflip */ + div.vectorTabs a > span { + float: left; + display: block; + } + body div.vectorTabs li.last { + background-image: url(images/tab-last.png); + background-repeat:no-repeat; + background-position:top right; + border:none; + } + body div.vectorTabs li.last a { + margin-right:7px; + padding-left:0.4em; + padding-right:0; + border-left:1px solid #cccccc; + border-top:1px solid #cccccc; + border-right:none; + background-image:url(images/tab-fade.png); + background-position:top left; + background-repeat:repeat-x; + } + body div.vectorTabs li.first { + background-image: url(images/tab-first.png); + background-repeat:no-repeat; + background-position:top left; + border:none; + } + body div.vectorTabs li.first a { + margin-left:7px; + padding-left:0em; + padding-right:0.4em; + border-right:1px solid #cccccc; + border-top:1px solid #cccccc; + background-image:url(images/tab-fade.png); + background-position:top left; + background-repeat:repeat-x; + } + + div.vectorTabs li.selected a, + div.vectorTabs li.selected a span, + div.vectorTabs li.selected a:visited + div.vectorTabs li.selected a:visited span { + color: #be5900 !important; + text-decoration: none; + } + + body div.vectorTabs li.selected a { + border-top:1px solid #6cc8f3; + border-right:1px solid #6cc8f3; + border-left:1px solid #6cc8f3; + background-color:#fff; + height:1.75em; + background-image:none; + } + body div.vectorTabs li.selected.first { + background-image: url(images/tab-active-first.png); + background-repeat:no-repeat; + background-position:top left; + } + body div.vectorTabs li.selected.first a { + margin-left:7px; + padding-right:0.6em; + padding-left:0.4em; + border-left:none; + } + body div.vectorTabs li.selected.last { + background-image: url(images/tab-active-last.png); + background-repeat:no-repeat; + background-position:top right; + } + body div.vectorTabs li.selected.last a { + margin-right:7px; + padding-left:0.6em; + padding-right:0.4em; + border-right:none; + } + + /* Variants and Actions */ + /* @noflip */ + div.vectorMenu { + background-image:url(images/tab-fade.png); + background-position:bottom left; + background-repeat:repeat-x; + border-top:1px solid #cccccc; + border-left:1px solid #cccccc; + border-right:1px solid #cccccc; + } + body.rtl div.vectorMenu { + direction: rtl; + } + /* @noflip */ + body #mw-head div.vectorMenu h5 { + background-image: url(../images/arrow-down-icon.png); + background-position: center center; + background-repeat: no-repeat; + padding-left: 0; + margin-left: 0px; + } + /* OVERRIDDEN BY COMPLIANT BROWSERS */ + body div.vectorMenu h5 a { + display: inline-block; + width: 24px; + height:1.5em; + background-image: none !important; + + } + /* IGNORED BY IE6 */ + div.vectorMenu h5 > a { + display: block; + } + div.vectorMenu div.menu { + position: relative; + left:1px; + display: none; + clear: both; + text-align: left; + } + /* OVERRIDDEN BY COMPLIANT BROWSERS */ + body.rtl div.vectorMenu div.menu { + margin-right: 24px; + } + /* IGNORED BY IE6 */ + body.rtl div.vectorMenu > div.menu { + margin-right: auto; + } + /* Fixes old versions of FireFox */ + body.rtl div.vectorMenu > div.menu, + x:-moz-any-link { + margin-right: 24px; + } + div.vectorMenu:hover div.menu { + display: block; + } + div.vectorMenu ul { + position: absolute; + background-color: white; + border: solid 1px silver; + border-top-width: 0; + list-style: none; + list-style-image: none; + list-style-type: none; + padding: 0; + margin: 0; + margin-left: -1px; + text-align: left; + } + /* Fixes old versions of FireFox */ + div.vectorMenu ul, + x:-moz-any-link { + min-width: 5em; + } + /* Returns things back to normal in modern versions of FireFox */ + div.vectorMenu ul, + x:-moz-any-link, + x:default { + min-width: 0; + } + div.vectorMenu li { + padding: 0; + margin: 0; + text-align: left; + line-height: 1em; + } + /* OVERRIDDEN BY COMPLIANT BROWSERS */ + div.vectorMenu li a { + display: inline-block; + padding: 0.5em; + white-space: nowrap; + } + /* IGNORED BY IE6 */ + div.vectorMenu li > a { + display: block; + } + div.vectorMenu li a { + color: #0645ad; + cursor: pointer; + font-size: 0.8em; + } + div.vectorMenu li.selected a, + div.vectorMenu li.selected a:visited { + color: #333333; + text-decoration: none; + } +#ca-unwatch.icon, +#ca-watch.icon { + background-color:#ffffff; + height:1.75em !important; + background-image:url(images/tab-fade.png); + background-position:bottom left; + background-repeat:repeat-x; +} +#ca-unwatch.icon a, +#ca-watch.icon a { + height: 1.7em !important; + border-bottom:none; + background-color:transparent; +} +#ca-watch.icon a, +#ca-unwatch.icon a { + background-repeat:no-repeat; +} +.wikiEditor-ui-tabs { + border: none; + height: 2.15em; +} +.wikiEditor-ui-buttons { + height: 2.15em; +} +.wikiEditor-ui-tabs div { + border: 1px solid silver; + margin-right: 1px; + height: 2.15em; +} +.wikiEditor-ui-tabs div a { + line-height: 2.15em; + background: #FFFFFF url(images/tab-fade.png) repeat-x 0 100%; +} +.wikiEditor-ui-tabs div.current a { + background: #FFFFFF; +} diff --git a/skins/vector/images/arrow-down-icon.png b/skins/vector/images/arrow-down-icon.png new file mode 100644 index 00000000..bf2d4fb4 Binary files /dev/null and b/skins/vector/images/arrow-down-icon.png differ diff --git a/skins/vector/images/audio-icon.png b/skins/vector/images/audio-icon.png new file mode 100644 index 00000000..0f59a2bb Binary files /dev/null and b/skins/vector/images/audio-icon.png differ diff --git a/skins/vector/images/border.png b/skins/vector/images/border.png new file mode 100644 index 00000000..54b47922 Binary files /dev/null and b/skins/vector/images/border.png differ diff --git a/skins/vector/images/bullet-icon.png b/skins/vector/images/bullet-icon.png new file mode 100644 index 00000000..e304b267 Binary files /dev/null and b/skins/vector/images/bullet-icon.png differ diff --git a/skins/vector/images/document-icon.png b/skins/vector/images/document-icon.png new file mode 100644 index 00000000..91dc16f6 Binary files /dev/null and b/skins/vector/images/document-icon.png differ diff --git a/skins/vector/images/edit-icon.png b/skins/vector/images/edit-icon.png new file mode 100644 index 00000000..4a962767 Binary files /dev/null and b/skins/vector/images/edit-icon.png differ diff --git a/skins/vector/images/external-link-ltr-icon.png b/skins/vector/images/external-link-ltr-icon.png new file mode 100644 index 00000000..4b710b03 Binary files /dev/null and b/skins/vector/images/external-link-ltr-icon.png differ diff --git a/skins/vector/images/external-link-rtl-icon.png b/skins/vector/images/external-link-rtl-icon.png new file mode 100644 index 00000000..17df03a3 Binary files /dev/null and b/skins/vector/images/external-link-rtl-icon.png differ diff --git a/skins/vector/images/file-icon.png b/skins/vector/images/file-icon.png new file mode 100644 index 00000000..1261f00c Binary files /dev/null and b/skins/vector/images/file-icon.png differ diff --git a/skins/vector/images/link-icon.png b/skins/vector/images/link-icon.png new file mode 100644 index 00000000..fc77e81d Binary files /dev/null and b/skins/vector/images/link-icon.png differ diff --git a/skins/vector/images/lock-icon.png b/skins/vector/images/lock-icon.png new file mode 100644 index 00000000..9e63807a Binary files /dev/null and b/skins/vector/images/lock-icon.png differ diff --git a/skins/vector/images/magnify-clip.png b/skins/vector/images/magnify-clip.png new file mode 100644 index 00000000..00a9cee1 Binary files /dev/null and b/skins/vector/images/magnify-clip.png differ diff --git a/skins/vector/images/mail-icon.png b/skins/vector/images/mail-icon.png new file mode 100644 index 00000000..50de0781 Binary files /dev/null and b/skins/vector/images/mail-icon.png differ diff --git a/skins/vector/images/news-icon.png b/skins/vector/images/news-icon.png new file mode 100644 index 00000000..8ab49957 Binary files /dev/null and b/skins/vector/images/news-icon.png differ diff --git a/skins/vector/images/page-base.png b/skins/vector/images/page-base.png new file mode 100644 index 00000000..17d02a74 Binary files /dev/null and b/skins/vector/images/page-base.png differ diff --git a/skins/vector/images/page-fade.png b/skins/vector/images/page-fade.png new file mode 100644 index 00000000..815a0486 Binary files /dev/null and b/skins/vector/images/page-fade.png differ diff --git a/skins/vector/images/portal-break-ltr.png b/skins/vector/images/portal-break-ltr.png new file mode 100644 index 00000000..c1823705 Binary files /dev/null and b/skins/vector/images/portal-break-ltr.png differ diff --git a/skins/vector/images/portal-break-rtl.png b/skins/vector/images/portal-break-rtl.png new file mode 100644 index 00000000..a45144c0 Binary files /dev/null and b/skins/vector/images/portal-break-rtl.png differ diff --git a/skins/vector/images/portal-break.png b/skins/vector/images/portal-break.png new file mode 100644 index 00000000..e81b5597 Binary files /dev/null and b/skins/vector/images/portal-break.png differ diff --git a/skins/vector/images/preferences-base.png b/skins/vector/images/preferences-base.png new file mode 100644 index 00000000..adfd70d7 Binary files /dev/null and b/skins/vector/images/preferences-base.png differ diff --git a/skins/vector/images/preferences-break.png b/skins/vector/images/preferences-break.png new file mode 100644 index 00000000..6c5c68c4 Binary files /dev/null and b/skins/vector/images/preferences-break.png differ diff --git a/skins/vector/images/preferences-edge.png b/skins/vector/images/preferences-edge.png new file mode 100644 index 00000000..3da0d099 Binary files /dev/null and b/skins/vector/images/preferences-edge.png differ diff --git a/skins/vector/images/preferences-fade.png b/skins/vector/images/preferences-fade.png new file mode 100644 index 00000000..b4773c5c Binary files /dev/null and b/skins/vector/images/preferences-fade.png differ diff --git a/skins/vector/images/search-fade.png b/skins/vector/images/search-fade.png new file mode 100644 index 00000000..53461d6d Binary files /dev/null and b/skins/vector/images/search-fade.png differ diff --git a/skins/vector/images/search-ltr.png b/skins/vector/images/search-ltr.png new file mode 100644 index 00000000..1db2eb24 Binary files /dev/null and b/skins/vector/images/search-ltr.png differ diff --git a/skins/vector/images/search-rtl.png b/skins/vector/images/search-rtl.png new file mode 100644 index 00000000..c26c8d07 Binary files /dev/null and b/skins/vector/images/search-rtl.png differ diff --git a/skins/vector/images/tab-break.png b/skins/vector/images/tab-break.png new file mode 100644 index 00000000..81155562 Binary files /dev/null and b/skins/vector/images/tab-break.png differ diff --git a/skins/vector/images/tab-current-fade.png b/skins/vector/images/tab-current-fade.png new file mode 100644 index 00000000..c6238d26 Binary files /dev/null and b/skins/vector/images/tab-current-fade.png differ diff --git a/skins/vector/images/tab-normal-fade.png b/skins/vector/images/tab-normal-fade.png new file mode 100644 index 00000000..4a5e3e4a Binary files /dev/null and b/skins/vector/images/tab-normal-fade.png differ diff --git a/skins/vector/images/talk-icon.png b/skins/vector/images/talk-icon.png new file mode 100644 index 00000000..0b80ee91 Binary files /dev/null and b/skins/vector/images/talk-icon.png differ diff --git a/skins/vector/images/user-icon.png b/skins/vector/images/user-icon.png new file mode 100644 index 00000000..ac3d59d5 Binary files /dev/null and b/skins/vector/images/user-icon.png differ diff --git a/skins/vector/images/video-icon.png b/skins/vector/images/video-icon.png new file mode 100644 index 00000000..5e7f4af7 Binary files /dev/null and b/skins/vector/images/video-icon.png differ diff --git a/skins/vector/images/watch-icon-loading.gif b/skins/vector/images/watch-icon-loading.gif new file mode 100644 index 00000000..618c308e Binary files /dev/null and b/skins/vector/images/watch-icon-loading.gif differ diff --git a/skins/vector/images/watch-icons.png b/skins/vector/images/watch-icons.png new file mode 100644 index 00000000..54b2c793 Binary files /dev/null and b/skins/vector/images/watch-icons.png differ diff --git a/skins/vector/main-ltr.css b/skins/vector/main-ltr.css new file mode 100644 index 00000000..78dd1e2b --- /dev/null +++ b/skins/vector/main-ltr.css @@ -0,0 +1,1128 @@ +/* + * main-rtl.css is automatically generated using CSSJanus, a python script for + * creating RTL versions of otherwise LTR stylesheets. + * + * You may download the tool to rebuild this stylesheet + * http://code.google.com/p/cssjanus/ + * + * An online version of this tool can be used at: + * http://cssjanus.commoner.com/ + * + * The following command is used to generate the RTL version of this file + * ./cssjanus.py --swap_ltr_rtl_in_url < main-ltr.css > main-rtl.css + * + * Any rules which should not be flipped should be prepended with @noflip in + * a comment block. + */ +/* Framework */ +html, +body { + height: 100%; + margin: 0; + padding: 0; + font-family: sans-serif; + font-size: 1em; +} +body { + background-color: #f3f3f3; + background-image: url(images/page-base.png); +} +/* Content */ +#content { + margin-left: 10em; + padding: 1em; + background-image: url(images/border.png); + background-position: top left; + background-repeat: repeat-y; + background-color: white; +} +/* Head */ +#mw-page-base { + height: 5em; + background-color: white; + background-image: url(images/page-fade.png); + background-position: bottom left; + background-repeat: repeat-x; +} +#mw-head-base { + margin-top: -5em; + margin-left: 10em; + height: 5em; + background-image: url(images/border.png); + background-position: bottom left; + background-repeat: repeat-x; +} +#mw-head { + position: absolute; + top: 0; + right: 0; + width: 100%; +} +#mw-head h5 { + margin: 0; + padding: 0; +} + /* Hide empty portlets */ + div.emptyPortlet { + display: none; + } + /* Personal */ + #p-personal { + position: absolute; + top: 0; + margin-left: 10em; + right: 0.75em; + } + #p-personal h5 { + display: none; + } + #p-personal ul { + list-style: none; + margin: 0; + padding: 0; + } + /* @noflip */ + #p-personal li { + line-height: 1.125em; + float: left; + } + #p-personal li { + margin-left: 0.75em; + margin-top: 0.5em; + font-size: 0.75em; + } + /* Navigation Containers */ + #left-navigation { + position: absolute; + left: 10em; + top: 2.5em; + } + #right-navigation { + float: right; + margin-top: 2.5em; + } + /* Navigation Labels */ + div.vectorTabs h5, + div.vectorMenu h5 span { + display: none; + } + /* Namespaces and Views */ + /* @noflip */ + div.vectorTabs { + float: left; + } + div.vectorTabs { + background-image: url(images/tab-break.png); + background-position: bottom left; + background-repeat: no-repeat; + padding-left: 1px; + } + /* @noflip */ + div.vectorTabs ul { + float: left; + } + div.vectorTabs ul { + height: 100%; + list-style: none; + margin: 0; + padding: 0; + } + /* @noflip */ + div.vectorTabs ul li { + float: left; + } + /* OVERRIDDEN BY COMPLIANT BROWSERS */ + div.vectorTabs ul li { + line-height: 1.125em; + display: inline-block; + height: 100%; + margin: 0; + padding: 0; + background-color: #f3f3f3; + background-image: url(images/tab-normal-fade.png); + background-position: bottom left; + background-repeat: repeat-x; + white-space:nowrap; + } + /* IGNORED BY IE6 */ + div.vectorTabs ul > li { + display: block; + } + div.vectorTabs li.selected { + background-image: url(images/tab-current-fade.png); + } + /* OVERRIDDEN BY COMPLIANT BROWSERS */ + div.vectorTabs li a { + display: inline-block; + height: 2.5em; + padding-left: 0.4em; + padding-right: 0.4em; + background-image: url(images/tab-break.png); + background-position: bottom right; + background-repeat: no-repeat; + } + div.vectorTabs li a, + div.vectorTabs li a span { + color: #0645ad; + cursor: pointer; + } + div.vectorTabs li a span { + font-size: 0.8em; + } + /* IGNORED BY IE6 */ + div.vectorTabs li > a { + display: block; + } + /* OVERRIDDEN BY COMPLIANT BROWSERS */ + div.vectorTabs a span { + display: inline-block; + padding-top: 1.25em; + } + /* IGNORED BY IE6 */ + /* @noflip */ + div.vectorTabs a > span { + float: left; + display: block; + } + div.vectorTabs li.selected a, + div.vectorTabs li.selected a span, + div.vectorTabs li.selected a:visited + div.vectorTabs li.selected a:visited span { + color: #333333; + text-decoration: none; + } + div.vectorTabs li.new a, + div.vectorTabs li.new a span, + div.vectorTabs li.new a:visited, + div.vectorTabs li.new a:visited span { + color: #a55858; + } + /* Variants and Actions */ + /* @noflip */ + div.vectorMenu { + direction: ltr; + float: left; + background-image: url(images/arrow-down-icon.png); + background-position: center center; + background-repeat: no-repeat; + } + /* @noflip */ + body.rtl div.vectorMenu { + direction: rtl; + } + /* OVERRIDDEN BY COMPLIANT BROWSERS */ + /* @noflip */ + #mw-head div.vectorMenu h5 { + float: left; + background-image: url(images/tab-break.png); + background-repeat: no-repeat; + } + /* IGNORED BY IE6 */ + #mw-head div.vectorMenu > h5 { + background-image: none; + } + #mw-head div.vectorMenu h5 { + background-position: bottom left; + margin-left: -1px; + } + /* OVERRIDDEN BY COMPLIANT BROWSERS */ + /* @noflip */ + div.vectorMenu h5 a { + display: inline-block; + width: 24px; + height: 2.5em; + text-decoration: none; + background-image: url(images/tab-break.png); + background-repeat: no-repeat; + } + div.vectorMenu h5 a{ + background-position: bottom right; + } + /* IGNORED BY IE6 */ + div.vectorMenu h5 > a { + display: block; + } + div.vectorMenu div.menu { + position: relative; + display: none; + clear: both; + text-align: left; + } + /* OVERRIDDEN BY COMPLIANT BROWSERS */ + /* @noflip */ + body.rtl div.vectorMenu div.menu { + margin-left: 24px; + } + /* IGNORED BY IE6 */ + /* @noflip */ + body.rtl div.vectorMenu > div.menu { + margin-left: auto; + } + /* Fixes old versions of FireFox */ + /* @noflip */ + body.rtl div.vectorMenu > div.menu, + x:-moz-any-link { + margin-left: 23px; + } + div.vectorMenu:hover div.menu { + display: block; + } + div.vectorMenu ul { + position: absolute; + background-color: white; + border: solid 1px silver; + border-top-width: 0; + list-style: none; + list-style-image: none; + list-style-type: none; + padding: 0; + margin: 0; + margin-left: -1px; + text-align: left; + } + /* Fixes old versions of FireFox */ + div.vectorMenu ul, + x:-moz-any-link { + min-width: 5em; + } + /* Returns things back to normal in modern versions of FireFox */ + div.vectorMenu ul, + x:-moz-any-link, + x:default { + min-width: 0; + } + div.vectorMenu li { + padding: 0; + margin: 0; + text-align: left; + line-height: 1em; + } + /* OVERRIDDEN BY COMPLIANT BROWSERS */ + div.vectorMenu li a { + display: inline-block; + padding: 0.5em; + white-space: nowrap; + } + /* IGNORED BY IE6 */ + div.vectorMenu li > a { + display: block; + } + div.vectorMenu li a { + color: #0645ad; + cursor: pointer; + font-size: 0.8em; + } + div.vectorMenu li.selected a, + div.vectorMenu li.selected a:visited { + color: #333333; + text-decoration: none; + } + /* Search */ + #p-search h5 { + display: none; + } + /* @noflip */ + #p-search { + float: left; + } + #p-search { + margin-right: 0.5em; + margin-left: 0.5em; + } + #p-search form, + #p-search input { + margin: 0; + margin-top: 0.4em; + } + #simpleSearch { + margin-top: 0.5em; + position: relative; + border: solid 1px #AAAAAA; + background-color: white; + background-image: url(images/search-fade.png); + background-position: top left; + background-repeat: repeat-x; + } + #simpleSearch label { + font-size: 0.8em; + top: 0.25em; + } + #simpleSearch input#searchInput { + margin: 0; + border-width: 0; + padding: 0.25em; + line-height: 1em; + font-size: 0.8em; + width: 9em; + background-color: transparent; + } + /* OVERRIDDEN BY COMPLIANT BROWSERS */ + #simpleSearch button#searchButton { + margin: 0; + padding: 0; + width: 1.75em; + height: 1.5em; + border: none; + cursor: pointer; + background-color: transparent; + background-image: url(images/search-ltr.png); + background-position: center center; + background-repeat: no-repeat; + } + /* IGNORED BY IE6 */ + #simpleSearch > button#searchButton { + height: 100%; + } + .suggestions-special .special-label { + font-size: 0.8em; + color: gray; + } + .suggestions-special .special-query { + color: black; + font-style: italic; + } + .suggestions-special .special-hover { + background-color: silver; + } +/* Panel */ +#mw-panel { + position: absolute; + top: 160px; + padding-top: 1em; + width: 10em; + left: 0; +} + #mw-panel div.portal { + padding-bottom: 1.5em; + } + #mw-panel div.portal h5 { + font-weight: normal; + color: #444444; + padding: 0.25em; + padding-top: 0; + padding-left: 1.75em; + cursor: default; + border: none; + font-size: 0.75em; + } + #mw-panel div.portal div.body { + margin: 0; + padding-top: 0.5em; + margin-left: 1.25em; + background-image: url(images/portal-break.png); + background-repeat: no-repeat; + background-position: top left; + } + #mw-panel div.portal div.body ul { + list-style: none; + list-style-image: none; + list-style-type: none; + padding: 0; + margin: 0; + } + #mw-panel div.portal div.body ul li { + line-height: 1.125em; + padding: 0; + padding-bottom: 0.5em; + margin: 0; + overflow: hidden; + font-size: 0.75em; + } + #mw-panel div.portal div.body ul li a { + color: #0645ad; + } + #mw-panel div.portal div.body ul li a:visited { + color: #0b0080; + } +/* Footer */ +#footer { + margin-left: 10em; + margin-top: 0; + padding: 0.75em; + background-image: url(images/border.png); + background-position: top left; + background-repeat: repeat-x; +} +#footer ul { + list-style: none; + list-style-image: none; + list-style-type: none; + margin: 0; + padding: 0; +} +#footer ul li { + margin: 0; + padding: 0; + padding-top: 0.5em; + padding-bottom: 0.5em; + color: #333333; + font-size: 0.7em; +} +#footer #footer-icons { + float: right; +} +/* @noflip */ +body.ltr #footer #footer-places { + float: left; +} +#footer #footer-info li { + line-height: 1.4em; +} +#footer #footer-icons li { + float: left; + margin-left: 0.5em; + line-height: 2em; +} +#footer #footer-places li { + float: left; + margin-right: 1em; + line-height: 2em; +} +/* Logo */ +#p-logo { + position: absolute; + top: -160px; + left: 0; + width: 10em; + height: 160px; +} +#p-logo a { + display: block; + width: 10em; + height: 160px; + background-repeat: no-repeat; + background-position: center center; + text-decoration: none; +} + +/* + * + * The following code is highly modified from monobook. It would be nice if the + * preftoc id was more human readable like preferences-toc for instance, + * howerver this would require backporting the other skins. + */ + +/* Preferences */ +#preftoc { + /* Tabs */ + width: 100%; + float: left; + clear: both; + margin: 0 !important; + padding: 0 !important; + background-image: url(images/preferences-break.png); + background-position: bottom left; + background-repeat: no-repeat; +} + #preftoc li { + /* Tab */ + float: left; + margin: 0; + padding: 0; + padding-right: 1px; + height: 2.25em; + white-space: nowrap; + list-style-type: none; + list-style-image: none; + background-image: url(images/preferences-break.png); + background-position: bottom right; + background-repeat: no-repeat; + } + /* IGNORED BY IE6 */ + #preftoc li:first-child { + margin-left: 1px; + } + #preftoc a, + #preftoc a:active { + display: inline-block; + position: relative; + color: #0645ad; + padding: 0.5em; + text-decoration: none; + background-image: none; + font-size: 0.9em; + } + #preftoc a:hover { + text-decoration: underline; + } + #preftoc li.selected a { + background-image: url(images/preferences-fade.png); + background-position: bottom; + background-repeat: repeat-x; + color: #333333; + text-decoration: none; + } +#preferences { + float: left; + width: 100%; + margin: 0; + margin-top: -2px; + clear: both; + border: solid 1px #cccccc; + background-color: #f9f9f9; + background-image: url(images/preferences-base.png); +} +#preferences fieldset.prefsection { + border: none; + padding: 0; + margin: 1em; +} +#preferences fieldset.prefsection fieldset { + border: none; + border-top: solid 1px #cccccc; +} +#preferences legend { + color: #666666; +} +#preferences fieldset.prefsection legend.mainLegend { + display: none; +} +#preferences td { + padding-left: 0.5em; + padding-right: 0.5em; +} +#preferences td.htmlform-tip { + font-size: x-small; + padding: .2em 2em; + color: #666666; +} +#preferences div.mw-prefs-buttons { + padding: 1em; +} +#preferences div.mw-prefs-buttons input { + margin-right: 0.25em; +} + +/* + * Styles for the user login and create account forms + */ +#userlogin, #userloginForm { + border: solid 1px #cccccc; + padding: 1.2em; + margin: .5em; + float: left; +} + +#userlogin { + min-width: 20em; + max-width: 90%; + width: 40em; +} + +/* + * + * The following code is slightly modified from monobook + * + */ +#content { + line-height: 1.5em; +} +#bodyContent { + font-size: 0.8em; +} +/* Links */ +a { + text-decoration: none; + color: #0645ad; + background: none; +} +a:visited { + color: #0b0080; +} +a:active { + color: #faa700; +} +a:hover { + text-decoration: underline; +} +a.stub { + color: #772233; +} +a.new, #p-personal a.new { + color: #ba0000; +} +a.new:visited, #p-personal a.new:visited { + color: #a55858; +} + +/* Inline Elements */ +img { + border: none; + vertical-align: middle; +} +hr { + height: 1px; + color: #aaa; + background-color: #aaa; + border: 0; + margin: .2em 0 .2em 0; +} + +/* Structural Elements */ +h1, +h2, +h3, +h4, +h5, +h6 { + color: black; + background: none; + font-weight: normal; + margin: 0; + padding-top: .5em; + padding-bottom: .17em; + border-bottom: 1px solid #aaa; + width: auto; +} +h1 { font-size: 188%; } +h1 .editsection { font-size: 53%; } +h2 { font-size: 150%; } +h2 .editsection { font-size: 67%; } +h3, +h4, +h5, +h6 { + border-bottom: none; + font-weight: bold; +} +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; } +h6 { font-size: 80%; } +h6 .editsection { font-size: 125%; font-weight: normal; } +p { + margin: .4em 0 .5em 0; + line-height: 1.5em; +} + p img { + margin: 0; + } +abbr, +acronym, +.explain { + border-bottom: 1px dotted black; + color: black; + background: none; + cursor: help; +} +q { + font-family: Times, "Times New Roman", serif; + font-style: italic; +} +/* Disabled for now +blockquote { + font-family: Times, "Times New Roman", serif; + font-style: italic; +}*/ +code { + background-color: #f9f9f9; +} +pre { + padding: 1em; + border: 1px dashed #2f6fab; + color: black; + background-color: #f9f9f9; + line-height: 1.1em; +} +ul { + line-height: 1.5em; + list-style-type: square; + margin: .3em 0 0 1.5em; + padding: 0; + list-style-image: url(images/bullet-icon.png); +} +ol { + line-height: 1.5em; + margin: .3em 0 0 3.2em; + padding: 0; + list-style-image: none; +} +li { + margin-bottom: .1em; +} +dt { + font-weight: bold; + margin-bottom: .1em; +} +dl { + margin-top: .2em; + margin-bottom: .5em; +} +dd { + line-height: 1.5em; + margin-left: 2em; + margin-bottom: .1em; +} +/* Tables */ +table { + font-size: 100%; + color: black; + /* we don't want the bottom borders of

    s to be visible through + * floated tables */ + background-color: white; +} +fieldset table { + /* but keep table layouts in forms clean... */ + background: none; +} +/* Forms */ +fieldset { + border: 1px solid #2f6fab; + margin: 1em 0 1em 0; + padding: 0 1em 1em; + line-height: 1.5em; +} + fieldset.nested { + margin: 0 0 0.5em 0; + padding: 0 0.5em 0.5em; + } +legend { + padding: .5em; + font-size: 95%; +} +form { + border: none; + margin: 0; +} +textarea { + width: 100%; + padding: .1em; +} +select { + vertical-align: top; +} +/* Table of Contents */ +#toc, +.toc, +.mw-warning { + border: 1px solid #aaa; + background-color: #f9f9f9; + padding: 5px; + font-size: 95%; +} +#toc h2, +.toc h2 { + display: inline; + border: none; + padding: 0; + font-size: 100%; + font-weight: bold; +} +#toc #toctitle, +.toc #toctitle, +#toc .toctitle, +.toc .toctitle { + text-align: center; +} +#toc ul, +.toc ul { + list-style-type: none; + list-style-image: none; + margin-left: 0; + padding-left: 0; + text-align: left; +} +#toc ul ul, +.toc ul ul { + margin: 0 0 0 2em; +} +#toc .toctoggle, +.toc .toctoggle { + font-size: 94%; +} +/* Images */ +div.floatright, table.floatright { + clear: right; + float: right; + position: relative; + margin: 0 0 .5em .5em; + border: 0; +} +div.floatright p { font-style: italic; } +div.floatleft, table.floatleft { + float: left; + clear: left; + position: relative; + margin: 0 .5em .5em 0; + border: 0; +} +div.floatleft p { font-style: italic; } +/* Thumbnails */ +div.thumb { + margin-bottom: .5em; + border-style: solid; + border-color: white; + width: auto; + background-color: transparent; +} +div.thumbinner { + border: 1px solid #ccc; + padding: 3px !important; + background-color: #f9f9f9; + font-size: 94%; + text-align: center; + overflow: hidden; +} +html .thumbimage { + border: 1px solid #ccc; +} +html .thumbcaption { + border: none; + text-align: left; + line-height: 1.4em; + padding: 3px !important; + font-size: 94%; +} +div.magnify { + float: right; + border: none !important; + background: none !important; +} +div.magnify a, div.magnify img { + display: block; + border: none !important; + background: none !important; +} +div.tright { + clear: right; + float: right; + border-width: .5em 0 .8em 1.4em; +} +div.tleft { + float: left; + clear: left; + margin-right: .5em; + border-width: .5em 1.4em .8em 0; +} +img.thumbborder { + border: 1px solid #dddddd; +} +.hiddenStructure { + display: none; +} +/* Warning */ +.mw-warning { + margin-left: 50px; + margin-right: 50px; + text-align: center; +} +/* User Message */ +.usermessage { + background-color: #ffce7b; + border: 1px solid #ffa500; + color: black; + font-weight: bold; + margin: 2em 0 1em; + padding: .5em 1em; + vertical-align: middle; +} +/* Site Notice */ +#siteNotice { + text-align: center; + font-size: 0.8em; + margin: 0; +} + #siteNotice div, + #siteNotice p { + margin: 0; + padding: 0; + margin-bottom: 0.9em; + } +/* Categories */ +.catlinks { + border: 1px solid #aaa; + background-color: #f9f9f9; + padding: 5px; + margin-top: 1em; + clear: both; +} +/* Sub-navigation */ +#siteSub { + display: none; +} +#jump-to-nav { + display: none; +} +#contentSub, #contentSub2 { + font-size: 84%; + line-height: 1.2em; + margin: 0 0 1.4em 1em; + color: #7d7d7d; + width: auto; +} +span.subpages { + display: block; +} +/* Emulate Center */ +.center { + width: 100%; + text-align: center; +} +*.center * { + margin-left: auto; + margin-right: auto; +} +/* Small for tables and similar */ +.small, .small * { + font-size: 94%; +} +table.small { + font-size: 100%; +} +/* Edge Cases for Content */ +h1, h2 { + margin-bottom: .6em; +} +h3, h4, h5 { + margin-bottom: .3em; +} +#firstHeading { + padding-top: 0; + margin-top: 0; + padding-top: 0; + margin-bottom: 0.1em; + line-height: 1.2em; + font-size: 1.6em; + padding-bottom: 0; +} +#content a.external, +#content a[href ^="gopher://"] { + background: url(images/external-link-ltr-icon.png) center right no-repeat; + padding: 0 13px 0 0; +} +#content a[href ^="https://"], +.link-https { + background: url(images/lock-icon.png) center right no-repeat; + padding: 0 18px 0 0; +} +#content a[href ^="mailto:"], +.link-mailto { + background: url(images/mail-icon.png) center right no-repeat; + padding: 0 18px 0 0; +} +#content a[href ^="news://"] { + background: url(images/news-icon.png) center right no-repeat; + padding: 0 18px 0 0; +} +#content a[href ^="ftp://"], +.link-ftp { + background: url(images/file-icon.png) center right no-repeat; + padding: 0 18px 0 0; +} +#content a[href ^="irc://"], +#content a.extiw[href ^="irc://"], +.link-irc { + background: url(images/talk-icon.png) center right no-repeat; + padding: 0 18px 0 0; +} +#content a.external[href $=".ogg"], #content a.external[href $=".OGG"], +#content a.external[href $=".mid"], #content a.external[href $=".MID"], +#content a.external[href $=".midi"], #content a.external[href $=".MIDI"], +#content a.external[href $=".mp3"], #content a.external[href $=".MP3"], +#content a.external[href $=".wav"], #content a.external[href $=".WAV"], +#content a.external[href $=".wma"], #content a.external[href $=".WMA"], +.link-audio { + background: url("images/audio-icon.png") center right no-repeat; + padding: 0 18px 0 0; +} +#content a.external[href $=".ogm"], #content a.external[href $=".OGM"], +#content a.external[href $=".avi"], #content a.external[href $=".AVI"], +#content a.external[href $=".mpeg"], #content a.external[href $=".MPEG"], +#content a.external[href $=".mpg"], #content a.external[href $=".MPG"], +.link-video { + background: url("images/video-icon.png") center right no-repeat; + padding: 0 18px 0 0; +} +#content a.external[href $=".pdf"], #content a.external[href $=".PDF"], +#content a.external[href *=".pdf#"], #content a.external[href *=".PDF#"], +#content a.external[href *=".pdf?"], #content a.external[href *=".PDF?"], +.link-document { + background: url("images/document-icon.png") center right no-repeat; + padding: 0 18px 0 0; +} +/* Interwiki Styling (Disabled) */ +#content a.extiw, +#content a.extiw:active { + color: #36b; + background: none; + padding: 0; +} +#content a.external { + color: #36b; +} +#content .printfooter { + display: none; +} +/* Icon for Usernames */ +#pt-userpage, +#pt-anonuserpage, +#pt-login { + background: url(images/user-icon.png) left top no-repeat; + padding-left: 15px !important; + text-transform: none; +} + +.toccolours { + border: 1px solid #aaa; + background-color: #f9f9f9; + padding: 5px; + font-size: 95%; +} +#bodyContent { + position: relative; + width: 100%; +} +#mw-js-message { + font-size: 0.8em; +} +div#bodyContent { + line-height: 1.5em; +} + +/* Watch/Unwatch Icon Styling */ +#ca-unwatch.icon, +#ca-watch.icon { + margin-right:1px; +} +#ca-unwatch.icon a, +#ca-watch.icon a { + margin: 0; + padding: 0; + outline: none; + display: block; + width: 26px; + height: 2.5em; +} +#ca-unwatch.icon a { + background-image: url(images/watch-icons.png); + background-position: -43px 60%; +} +#ca-watch.icon a { + background-image: url(images/watch-icons.png); + background-position: 5px 60%; +} +#ca-unwatch.icon a:hover { + background-image: url(images/watch-icons.png); + background-position: -67px 60%; +} +#ca-watch.icon a:hover { + background-image: url(images/watch-icons.png); + background-position: -19px 60%; +} +#ca-unwatch.icon a.loading, +#ca-watch.icon a.loading { + background-image: url(images/watch-icon-loading.gif); + background-position: center 60%; +} +#ca-unwatch.icon a span, +#ca-watch.icon a span { + display: none; +} +div.vectorTabs ul { + background-image:url(images/tab-break.png); + background-position:right bottom; + background-repeat:no-repeat; +} diff --git a/skins/vector/main-rtl.css b/skins/vector/main-rtl.css new file mode 100644 index 00000000..5387289f --- /dev/null +++ b/skins/vector/main-rtl.css @@ -0,0 +1,1128 @@ +/* + * main-rtl.css is automatically generated using CSSJanus, a python script for + * creating RTL versions of otherwise LTR stylesheets. + * + * You may download the tool to rebuild this stylesheet + * http://code.google.com/p/cssjanus/ + * + * An online version of this tool can be used at: + * http://cssjanus.commoner.com/ + * + * The following command is used to generate the RTL version of this file + * ./cssjanus.py --swap_ltr_rtl_in_url < main-ltr.css > main-rtl.css + * + * Any rules which should not be flipped should be prepended with @noflip in + * a comment block. + */ +/* Framework */ +html, +body { + height: 100%; + margin: 0; + padding: 0; + font-family: sans-serif; + font-size: 1em; +} +body { + background-color: #f3f3f3; + background-image: url(images/page-base.png); +} +/* Content */ +#content { + margin-right: 10em; + padding: 1em; + background-image: url(images/border.png); + background-position: top right; + background-repeat: repeat-y; + background-color: white; +} +/* Head */ +#mw-page-base { + height: 5em; + background-color: white; + background-image: url(images/page-fade.png); + background-position: bottom right; + background-repeat: repeat-x; +} +#mw-head-base { + margin-top: -5em; + margin-right: 10em; + height: 5em; + background-image: url(images/border.png); + background-position: bottom right; + background-repeat: repeat-x; +} +#mw-head { + position: absolute; + top: 0; + left: 0; + width: 100%; +} +#mw-head h5 { + margin: 0; + padding: 0; +} + /* Hide empty portlets */ + div.emptyPortlet { + display: none; + } + /* Personal */ + #p-personal { + position: absolute; + top: 0; + margin-right: 10em; + left: 0.75em; + } + #p-personal h5 { + display: none; + } + #p-personal ul { + list-style: none; + margin: 0; + padding: 0; + } + /* @noflip */ + #p-personal li { + line-height: 1.125em; + float: left; + } + #p-personal li { + margin-right: 0.75em; + margin-top: 0.5em; + font-size: 0.75em; + } + /* Navigation Containers */ + #left-navigation { + position: absolute; + right: 10em; + top: 2.5em; + } + #right-navigation { + float: left; + margin-top: 2.5em; + } + /* Navigation Labels */ + div.vectorTabs h5, + div.vectorMenu h5 span { + display: none; + } + /* Namespaces and Views */ + /* @noflip */ + div.vectorTabs { + float: left; + } + div.vectorTabs { + background-image: url(images/tab-break.png); + background-position: bottom right; + background-repeat: no-repeat; + padding-right: 1px; + } + /* @noflip */ + div.vectorTabs ul { + float: left; + } + div.vectorTabs ul { + height: 100%; + list-style: none; + margin: 0; + padding: 0; + } + /* @noflip */ + div.vectorTabs ul li { + float: left; + } + /* OVERRIDDEN BY COMPLIANT BROWSERS */ + div.vectorTabs ul li { + line-height: 1.125em; + display: inline-block; + height: 100%; + margin: 0; + padding: 0; + background-color: #f3f3f3; + background-image: url(images/tab-normal-fade.png); + background-position: bottom right; + background-repeat: repeat-x; + white-space:nowrap; + } + /* IGNORED BY IE6 */ + div.vectorTabs ul > li { + display: block; + } + div.vectorTabs li.selected { + background-image: url(images/tab-current-fade.png); + } + /* OVERRIDDEN BY COMPLIANT BROWSERS */ + div.vectorTabs li a { + display: inline-block; + height: 2.5em; + padding-right: 0.4em; + padding-left: 0.4em; + background-image: url(images/tab-break.png); + background-position: bottom left; + background-repeat: no-repeat; + } + div.vectorTabs li a, + div.vectorTabs li a span { + color: #0645ad; + cursor: pointer; + } + div.vectorTabs li a span { + font-size: 0.8em; + } + /* IGNORED BY IE6 */ + div.vectorTabs li > a { + display: block; + } + /* OVERRIDDEN BY COMPLIANT BROWSERS */ + div.vectorTabs a span { + display: inline-block; + padding-top: 1.25em; + } + /* IGNORED BY IE6 */ + /* @noflip */ + div.vectorTabs a > span { + float: left; + display: block; + } + div.vectorTabs li.selected a, + div.vectorTabs li.selected a span, + div.vectorTabs li.selected a:visited + div.vectorTabs li.selected a:visited span { + color: #333333; + text-decoration: none; + } + div.vectorTabs li.new a, + div.vectorTabs li.new a span, + div.vectorTabs li.new a:visited, + div.vectorTabs li.new a:visited span { + color: #a55858; + } + /* Variants and Actions */ + /* @noflip */ + div.vectorMenu { + direction: ltr; + float: left; + background-image: url(images/arrow-down-icon.png); + background-position: center center; + background-repeat: no-repeat; + } + /* @noflip */ + body.rtl div.vectorMenu { + direction: rtl; + } + /* OVERRIDDEN BY COMPLIANT BROWSERS */ + /* @noflip */ + #mw-head div.vectorMenu h5 { + float: left; + background-image: url(images/tab-break.png); + background-repeat: no-repeat; + } + /* IGNORED BY IE6 */ + #mw-head div.vectorMenu > h5 { + background-image: none; + } + #mw-head div.vectorMenu h5 { + background-position: bottom right; + margin-right: -1px; + } + /* OVERRIDDEN BY COMPLIANT BROWSERS */ + /* @noflip */ + div.vectorMenu h5 a { + display: inline-block; + width: 24px; + height: 2.5em; + text-decoration: none; + background-image: url(images/tab-break.png); + background-repeat: no-repeat; + } + div.vectorMenu h5 a{ + background-position: bottom left; + } + /* IGNORED BY IE6 */ + div.vectorMenu h5 > a { + display: block; + } + div.vectorMenu div.menu { + position: relative; + display: none; + clear: both; + text-align: right; + } + /* OVERRIDDEN BY COMPLIANT BROWSERS */ + /* @noflip */ + body.rtl div.vectorMenu div.menu { + margin-left: 24px; + } + /* IGNORED BY IE6 */ + /* @noflip */ + body.rtl div.vectorMenu > div.menu { + margin-left: auto; + } + /* Fixes old versions of FireFox */ + /* @noflip */ + body.rtl div.vectorMenu > div.menu, + x:-moz-any-link { + margin-left: 23px; + } + div.vectorMenu:hover div.menu { + display: block; + } + div.vectorMenu ul { + position: absolute; + background-color: white; + border: solid 1px silver; + border-top-width: 0; + list-style: none; + list-style-image: none; + list-style-type: none; + padding: 0; + margin: 0; + margin-right: -1px; + text-align: right; + } + /* Fixes old versions of FireFox */ + div.vectorMenu ul, + x:-moz-any-link { + min-width: 5em; + } + /* Returns things back to normal in modern versions of FireFox */ + div.vectorMenu ul, + x:-moz-any-link, + x:default { + min-width: 0; + } + div.vectorMenu li { + padding: 0; + margin: 0; + text-align: right; + line-height: 1em; + } + /* OVERRIDDEN BY COMPLIANT BROWSERS */ + div.vectorMenu li a { + display: inline-block; + padding: 0.5em; + white-space: nowrap; + } + /* IGNORED BY IE6 */ + div.vectorMenu li > a { + display: block; + } + div.vectorMenu li a { + color: #0645ad; + cursor: pointer; + font-size: 0.8em; + } + div.vectorMenu li.selected a, + div.vectorMenu li.selected a:visited { + color: #333333; + text-decoration: none; + } + /* Search */ + #p-search h5 { + display: none; + } + /* @noflip */ + #p-search { + float: left; + } + #p-search { + margin-left: 0.5em; + margin-right: 0.5em; + } + #p-search form, + #p-search input { + margin: 0; + margin-top: 0.4em; + } + #simpleSearch { + margin-top: 0.5em; + position: relative; + border: solid 1px #AAAAAA; + background-color: white; + background-image: url(images/search-fade.png); + background-position: top right; + background-repeat: repeat-x; + } + #simpleSearch label { + font-size: 0.8em; + top: 0.25em; + } + #simpleSearch input#searchInput { + margin: 0; + border-width: 0; + padding: 0.25em; + line-height: 1em; + font-size: 0.8em; + width: 9em; + background-color: transparent; + } + /* OVERRIDDEN BY COMPLIANT BROWSERS */ + #simpleSearch button#searchButton { + margin: 0; + padding: 0; + width: 1.75em; + height: 1.5em; + border: none; + cursor: pointer; + background-color: transparent; + background-image: url(images/search-rtl.png); + background-position: center center; + background-repeat: no-repeat; + } + /* IGNORED BY IE6 */ + #simpleSearch > button#searchButton { + height: 100%; + } + .suggestions-special .special-label { + font-size: 0.8em; + color: gray; + } + .suggestions-special .special-query { + color: black; + font-style: italic; + } + .suggestions-special .special-hover { + background-color: silver; + } +/* Panel */ +#mw-panel { + position: absolute; + top: 160px; + padding-top: 1em; + width: 10em; + right: 0; +} + #mw-panel div.portal { + padding-bottom: 1.5em; + } + #mw-panel div.portal h5 { + font-weight: normal; + color: #444444; + padding: 0.25em; + padding-top: 0; + padding-right: 1.75em; + cursor: default; + border: none; + font-size: 0.75em; + } + #mw-panel div.portal div.body { + margin: 0; + padding-top: 0.5em; + margin-right: 1.25em; + background-image: url(images/portal-break.png); + background-repeat: no-repeat; + background-position: top right; + } + #mw-panel div.portal div.body ul { + list-style: none; + list-style-image: none; + list-style-type: none; + padding: 0; + margin: 0; + } + #mw-panel div.portal div.body ul li { + line-height: 1.125em; + padding: 0; + padding-bottom: 0.5em; + margin: 0; + overflow: hidden; + font-size: 0.75em; + } + #mw-panel div.portal div.body ul li a { + color: #0645ad; + } + #mw-panel div.portal div.body ul li a:visited { + color: #0b0080; + } +/* Footer */ +#footer { + margin-right: 10em; + margin-top: 0; + padding: 0.75em; + background-image: url(images/border.png); + background-position: top right; + background-repeat: repeat-x; +} +#footer ul { + list-style: none; + list-style-image: none; + list-style-type: none; + margin: 0; + padding: 0; +} +#footer ul li { + margin: 0; + padding: 0; + padding-top: 0.5em; + padding-bottom: 0.5em; + color: #333333; + font-size: 0.7em; +} +#footer #footer-icons { + float: left; +} +/* @noflip */ +body.ltr #footer #footer-places { + float: left; +} +#footer #footer-info li { + line-height: 1.4em; +} +#footer #footer-icons li { + float: right; + margin-right: 0.5em; + line-height: 2em; +} +#footer #footer-places li { + float: right; + margin-left: 1em; + line-height: 2em; +} +/* Logo */ +#p-logo { + position: absolute; + top: -160px; + right: 0; + width: 10em; + height: 160px; +} +#p-logo a { + display: block; + width: 10em; + height: 160px; + background-repeat: no-repeat; + background-position: center center; + text-decoration: none; +} + +/* + * + * The following code is highly modified from monobook. It would be nice if the + * preftoc id was more human readable like preferences-toc for instance, + * howerver this would require backporting the other skins. + */ + +/* Preferences */ +#preftoc { + /* Tabs */ + width: 100%; + float: right; + clear: both; + margin: 0 !important; + padding: 0 !important; + background-image: url(images/preferences-break.png); + background-position: bottom right; + background-repeat: no-repeat; +} + #preftoc li { + /* Tab */ + float: right; + margin: 0; + padding: 0; + padding-left: 1px; + height: 2.25em; + white-space: nowrap; + list-style-type: none; + list-style-image: none; + background-image: url(images/preferences-break.png); + background-position: bottom left; + background-repeat: no-repeat; + } + /* IGNORED BY IE6 */ + #preftoc li:first-child { + margin-right: 1px; + } + #preftoc a, + #preftoc a:active { + display: inline-block; + position: relative; + color: #0645ad; + padding: 0.5em; + text-decoration: none; + background-image: none; + font-size: 0.9em; + } + #preftoc a:hover { + text-decoration: underline; + } + #preftoc li.selected a { + background-image: url(images/preferences-fade.png); + background-position: bottom; + background-repeat: repeat-x; + color: #333333; + text-decoration: none; + } +#preferences { + float: right; + width: 100%; + margin: 0; + margin-top: -2px; + clear: both; + border: solid 1px #cccccc; + background-color: #f9f9f9; + background-image: url(images/preferences-base.png); +} +#preferences fieldset.prefsection { + border: none; + padding: 0; + margin: 1em; +} +#preferences fieldset.prefsection fieldset { + border: none; + border-top: solid 1px #cccccc; +} +#preferences legend { + color: #666666; +} +#preferences fieldset.prefsection legend.mainLegend { + display: none; +} +#preferences td { + padding-right: 0.5em; + padding-left: 0.5em; +} +#preferences td.htmlform-tip { + font-size: x-small; + padding: .2em 2em; + color: #666666; +} +#preferences div.mw-prefs-buttons { + padding: 1em; +} +#preferences div.mw-prefs-buttons input { + margin-left: 0.25em; +} + +/* + * Styles for the user login and create account forms + */ +#userlogin, #userloginForm { + border: solid 1px #cccccc; + padding: 1.2em; + margin: .5em; + float: right; +} + +#userlogin { + min-width: 20em; + max-width: 90%; + width: 40em; +} + +/* + * + * The following code is slightly modified from monobook + * + */ +#content { + line-height: 1.5em; +} +#bodyContent { + font-size: 0.8em; +} +/* Links */ +a { + text-decoration: none; + color: #0645ad; + background: none; +} +a:visited { + color: #0b0080; +} +a:active { + color: #faa700; +} +a:hover { + text-decoration: underline; +} +a.stub { + color: #772233; +} +a.new, #p-personal a.new { + color: #ba0000; +} +a.new:visited, #p-personal a.new:visited { + color: #a55858; +} + +/* Inline Elements */ +img { + border: none; + vertical-align: middle; +} +hr { + height: 1px; + color: #aaa; + background-color: #aaa; + border: 0; + margin: .2em 0 .2em 0; +} + +/* Structural Elements */ +h1, +h2, +h3, +h4, +h5, +h6 { + color: black; + background: none; + font-weight: normal; + margin: 0; + padding-top: .5em; + padding-bottom: .17em; + border-bottom: 1px solid #aaa; + width: auto; +} +h1 { font-size: 188%; } +h1 .editsection { font-size: 53%; } +h2 { font-size: 150%; } +h2 .editsection { font-size: 67%; } +h3, +h4, +h5, +h6 { + border-bottom: none; + font-weight: bold; +} +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; } +h6 { font-size: 80%; } +h6 .editsection { font-size: 125%; font-weight: normal; } +p { + margin: .4em 0 .5em 0; + line-height: 1.5em; +} + p img { + margin: 0; + } +abbr, +acronym, +.explain { + border-bottom: 1px dotted black; + color: black; + background: none; + cursor: help; +} +q { + font-family: Times, "Times New Roman", serif; + font-style: italic; +} +/* Disabled for now +blockquote { + font-family: Times, "Times New Roman", serif; + font-style: italic; +}*/ +code { + background-color: #f9f9f9; +} +pre { + padding: 1em; + border: 1px dashed #2f6fab; + color: black; + background-color: #f9f9f9; + line-height: 1.1em; +} +ul { + line-height: 1.5em; + list-style-type: square; + margin: .3em 1.5em 0 0; + padding: 0; + list-style-image: url(images/bullet-icon.png); +} +ol { + line-height: 1.5em; + margin: .3em 3.2em 0 0; + padding: 0; + list-style-image: none; +} +li { + margin-bottom: .1em; +} +dt { + font-weight: bold; + margin-bottom: .1em; +} +dl { + margin-top: .2em; + margin-bottom: .5em; +} +dd { + line-height: 1.5em; + margin-right: 2em; + margin-bottom: .1em; +} +/* Tables */ +table { + font-size: 100%; + color: black; + /* we don't want the bottom borders of

    s to be visible through + * floated tables */ + background-color: white; +} +fieldset table { + /* but keep table layouts in forms clean... */ + background: none; +} +/* Forms */ +fieldset { + border: 1px solid #2f6fab; + margin: 1em 0 1em 0; + padding: 0 1em 1em; + line-height: 1.5em; +} + fieldset.nested { + margin: 0 0 0.5em 0; + padding: 0 0.5em 0.5em; + } +legend { + padding: .5em; + font-size: 95%; +} +form { + border: none; + margin: 0; +} +textarea { + width: 100%; + padding: .1em; +} +select { + vertical-align: top; +} +/* Table of Contents */ +#toc, +.toc, +.mw-warning { + border: 1px solid #aaa; + background-color: #f9f9f9; + padding: 5px; + font-size: 95%; +} +#toc h2, +.toc h2 { + display: inline; + border: none; + padding: 0; + font-size: 100%; + font-weight: bold; +} +#toc #toctitle, +.toc #toctitle, +#toc .toctitle, +.toc .toctitle { + text-align: center; +} +#toc ul, +.toc ul { + list-style-type: none; + list-style-image: none; + margin-right: 0; + padding-right: 0; + text-align: right; +} +#toc ul ul, +.toc ul ul { + margin: 0 2em 0 0; +} +#toc .toctoggle, +.toc .toctoggle { + font-size: 94%; +} +/* Images */ +div.floatright, table.floatright { + clear: left; + float: left; + position: relative; + margin: 0 .5em .5em 0; + border: 0; +} +div.floatright p { font-style: italic; } +div.floatleft, table.floatleft { + float: right; + clear: right; + position: relative; + margin: 0 0 .5em .5em; + border: 0; +} +div.floatleft p { font-style: italic; } +/* Thumbnails */ +div.thumb { + margin-bottom: .5em; + border-style: solid; + border-color: white; + width: auto; + background-color: transparent; +} +div.thumbinner { + border: 1px solid #ccc; + padding: 3px !important; + background-color: #f9f9f9; + font-size: 94%; + text-align: center; + overflow: hidden; +} +html .thumbimage { + border: 1px solid #ccc; +} +html .thumbcaption { + border: none; + text-align: right; + line-height: 1.4em; + padding: 3px !important; + font-size: 94%; +} +div.magnify { + float: left; + border: none !important; + background: none !important; +} +div.magnify a, div.magnify img { + display: block; + border: none !important; + background: none !important; +} +div.tright { + clear: left; + float: left; + border-width: .5em 1.4em .8em 0; +} +div.tleft { + float: right; + clear: right; + margin-left: .5em; + border-width: .5em 0 .8em 1.4em; +} +img.thumbborder { + border: 1px solid #dddddd; +} +.hiddenStructure { + display: none; +} +/* Warning */ +.mw-warning { + margin-right: 50px; + margin-left: 50px; + text-align: center; +} +/* User Message */ +.usermessage { + background-color: #ffce7b; + border: 1px solid #ffa500; + color: black; + font-weight: bold; + margin: 2em 0 1em; + padding: .5em 1em; + vertical-align: middle; +} +/* Site Notice */ +#siteNotice { + text-align: center; + font-size: 0.8em; + margin: 0; +} + #siteNotice div, + #siteNotice p { + margin: 0; + padding: 0; + margin-bottom: 0.9em; + } +/* Categories */ +.catlinks { + border: 1px solid #aaa; + background-color: #f9f9f9; + padding: 5px; + margin-top: 1em; + clear: both; +} +/* Sub-navigation */ +#siteSub { + display: none; +} +#jump-to-nav { + display: none; +} +#contentSub, #contentSub2 { + font-size: 84%; + line-height: 1.2em; + margin: 0 1em 1.4em 0; + color: #7d7d7d; + width: auto; +} +span.subpages { + display: block; +} +/* Emulate Center */ +.center { + width: 100%; + text-align: center; +} +*.center * { + margin-right: auto; + margin-left: auto; +} +/* Small for tables and similar */ +.small, .small * { + font-size: 94%; +} +table.small { + font-size: 100%; +} +/* Edge Cases for Content */ +h1, h2 { + margin-bottom: .6em; +} +h3, h4, h5 { + margin-bottom: .3em; +} +#firstHeading { + padding-top: 0; + margin-top: 0; + padding-top: 0; + margin-bottom: 0.1em; + line-height: 1.2em; + font-size: 1.6em; + padding-bottom: 0; +} +#content a.external, +#content a[href ^="gopher://"] { + background: url(images/external-link-rtl-icon.png) center left no-repeat; + padding: 0 0 0 13px; +} +#content a[href ^="https://"], +.link-https { + background: url(images/lock-icon.png) center left no-repeat; + padding: 0 0 0 18px; +} +#content a[href ^="mailto:"], +.link-mailto { + background: url(images/mail-icon.png) center left no-repeat; + padding: 0 0 0 18px; +} +#content a[href ^="news://"] { + background: url(images/news-icon.png) center left no-repeat; + padding: 0 0 0 18px; +} +#content a[href ^="ftp://"], +.link-ftp { + background: url(images/file-icon.png) center left no-repeat; + padding: 0 0 0 18px; +} +#content a[href ^="irc://"], +#content a.extiw[href ^="irc://"], +.link-irc { + background: url(images/talk-icon.png) center left no-repeat; + padding: 0 0 0 18px; +} +#content a.external[href $=".ogg"], #content a.external[href $=".OGG"], +#content a.external[href $=".mid"], #content a.external[href $=".MID"], +#content a.external[href $=".midi"], #content a.external[href $=".MIDI"], +#content a.external[href $=".mp3"], #content a.external[href $=".MP3"], +#content a.external[href $=".wav"], #content a.external[href $=".WAV"], +#content a.external[href $=".wma"], #content a.external[href $=".WMA"], +.link-audio { + background: url("images/audio-icon.png") center left no-repeat; + padding: 0 0 0 18px; +} +#content a.external[href $=".ogm"], #content a.external[href $=".OGM"], +#content a.external[href $=".avi"], #content a.external[href $=".AVI"], +#content a.external[href $=".mpeg"], #content a.external[href $=".MPEG"], +#content a.external[href $=".mpg"], #content a.external[href $=".MPG"], +.link-video { + background: url("images/video-icon.png") center left no-repeat; + padding: 0 0 0 18px; +} +#content a.external[href $=".pdf"], #content a.external[href $=".PDF"], +#content a.external[href *=".pdf#"], #content a.external[href *=".PDF#"], +#content a.external[href *=".pdf?"], #content a.external[href *=".PDF?"], +.link-document { + background: url("images/document-icon.png") center left no-repeat; + padding: 0 0 0 18px; +} +/* Interwiki Styling (Disabled) */ +#content a.extiw, +#content a.extiw:active { + color: #36b; + background: none; + padding: 0; +} +#content a.external { + color: #36b; +} +#content .printfooter { + display: none; +} +/* Icon for Usernames */ +#pt-userpage, +#pt-anonuserpage, +#pt-login { + background: url(images/user-icon.png) right top no-repeat; + padding-right: 15px !important; + text-transform: none; +} + +.toccolours { + border: 1px solid #aaa; + background-color: #f9f9f9; + padding: 5px; + font-size: 95%; +} +#bodyContent { + position: relative; + width: 100%; +} +#mw-js-message { + font-size: 0.8em; +} +div#bodyContent { + line-height: 1.5em; +} + +/* Watch/Unwatch Icon Styling */ +#ca-unwatch.icon, +#ca-watch.icon { + margin-left:1px; +} +#ca-unwatch.icon a, +#ca-watch.icon a { + margin: 0; + padding: 0; + outline: none; + display: block; + width: 26px; + height: 2.5em; +} +#ca-unwatch.icon a { + background-image: url(images/watch-icons.png); + background-position: -43px 60%; +} +#ca-watch.icon a { + background-image: url(images/watch-icons.png); + background-position: 5px 60%; +} +#ca-unwatch.icon a:hover { + background-image: url(images/watch-icons.png); + background-position: -67px 60%; +} +#ca-watch.icon a:hover { + background-image: url(images/watch-icons.png); + background-position: -19px 60%; +} +#ca-unwatch.icon a.loading, +#ca-watch.icon a.loading { + background-image: url(images/watch-icon-loading.gif); + background-position: center 60%; +} +#ca-unwatch.icon a span, +#ca-watch.icon a span { + display: none; +} +div.vectorTabs ul { + background-image:url(images/tab-break.png); + background-position:left bottom; + background-repeat:no-repeat; +} diff --git a/skins/vector/wiki-indexed.png b/skins/vector/wiki-indexed.png new file mode 100644 index 00000000..189a2ae3 Binary files /dev/null and b/skins/vector/wiki-indexed.png differ diff --git a/skins/vector/wiki.png b/skins/vector/wiki.png new file mode 100644 index 00000000..2463b521 Binary files /dev/null and b/skins/vector/wiki.png differ -- cgit v1.2.3-54-g00ecf