From cae28bece1b125d8cb3ce8dd2bda0a74e1e55279 Mon Sep 17 00:00:00 2001 From: Roan Kattouw Date: Wed, 30 Sep 2009 17:58:16 +0000 Subject: [PATCH] Revert r56924 (new watch icon and color changes for Vector) and followups r57006, r57012, r57013, r57030, r57034, r57036, r57117: we don't want this in trunk right now, moving it to its own branch --- includes/DefaultSettings.php | 11 +--- skins/Vector.php | 39 +++++++----- skins/common/ajaxwatch.js | 39 +++--------- skins/vector/images/watch-icon-loading.gif | Bin 840 -> 0 bytes skins/vector/images/watch-icons.png | Bin 1745 -> 0 bytes skins/vector/main-ltr.css | 68 +++++--------------- skins/vector/main-rtl.css | 70 +-------------------- 7 files changed, 51 insertions(+), 176 deletions(-) delete mode 100644 skins/vector/images/watch-icon-loading.gif delete mode 100644 skins/vector/images/watch-icons.png diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php index 466855ea7d..d86f1cbac9 100644 --- a/includes/DefaultSettings.php +++ b/includes/DefaultSettings.php @@ -1606,7 +1606,7 @@ $wgCacheEpoch = '20030516000000'; * to ensure that client-side caches do not keep obsolete copies of global * styles. */ -$wgStyleVersion = '243'; +$wgStyleVersion = '241'; # Server-side caching: @@ -4096,19 +4096,12 @@ $wgEnforceHtmlIds = true; $wgUseTwoButtonsSearchForm = true; /** - * Search form behavior for Vector skin only + * Search form behavior for Vector skin only * true = use an icon search button * false = use Go & Search buttons */ $wgVectorUseSimpleSearch = false; -/** - * Watch and unwatch as an icon rather than a link for Vector skin only - * true = use an icon watch/unwatch button - * false = use watch/unwatch text link - */ -$wgVectorUseIconWatch = false; - /** * Preprocessor caching threshold */ diff --git a/skins/Vector.php b/skins/Vector.php index e18230e4b0..f65d29ad3f 100644 --- a/skins/Vector.php +++ b/skins/Vector.php @@ -59,8 +59,8 @@ class SkinVector extends SkinTemplate { * @private */ function buildNavigationUrls() { - global $wgContLang, $wgLang, $wgOut, $wgUser, $wgRequest, $wgArticle, $wgStylePath; - global $wgDisableLangConversion, $wgVectorUseIconWatch; + global $wgContLang, $wgLang, $wgOut, $wgUser, $wgRequest, $wgArticle; + global $wgDisableLangConversion; wfProfileIn( __METHOD__ ); @@ -271,6 +271,7 @@ class SkinVector extends SkinTemplate { } } wfProfileOut( __METHOD__ . '-live' ); + /** * The following actions use messages which, if made particular to * the Vector skin, would break the Ajax code which makes this @@ -281,21 +282,29 @@ class SkinVector extends SkinTemplate { * the global versions. */ // Checks if the user is logged in - if ( $this->loggedin ) { - if ( $wgVectorUseIconWatch ) { - $class = 'icon '; - $place = 'views'; + if( $this->loggedin ) { + // Checks if the user is watching this page + if( !$this->mTitle->userIsWatching() ) { + // Adds watch action link + $links['actions']['watch'] = array( + 'class' => + ( $action == 'watch' or $action == 'unwatch' ) ? + 'selected' : false, + 'text' => wfMsg( 'watch' ), + 'href' => $this->mTitle->getLocalUrl( 'action=watch' ) + ); } else { - $class = ''; - $place = 'actions'; + // Adds unwatch action link + $links['actions']['unwatch'] = array( + 'class' => + ($action == 'unwatch' or $action == 'watch') ? + 'selected' : false, + 'text' => wfMsg( 'unwatch' ), + 'href' => $this->mTitle->getLocalUrl( 'action=unwatch' ) + ); } - $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 ) ); @@ -713,7 +722,7 @@ class VectorTemplate extends QuickTemplate {
msg('views') ?>
diff --git a/skins/common/ajaxwatch.js b/skins/common/ajaxwatch.js index f3211edd81..c8d90b8090 100644 --- a/skins/common/ajaxwatch.js +++ b/skins/common/ajaxwatch.js @@ -21,29 +21,16 @@ wgAjaxWatch.watching = false; // currently watching page wgAjaxWatch.inprogress = false; // ajax request in progress wgAjaxWatch.timeoutID = null; // see wgAjaxWatch.ajaxCall wgAjaxWatch.watchLinks = []; // "watch"/"unwatch" links -wgAjaxWatch.iconMode = false; // new icon driven functionality -wgAjaxWatch.imgBasePath = ""; // base img path derived from icons on load -wgAjaxWatch.setLinkText = function( newText ) { - if( wgAjaxWatch.iconMode ) { - for ( i = 0; i < wgAjaxWatch.watchLinks.length; i++ ) { - wgAjaxWatch.watchLinks[i].firstChild.alt = newText; - if ( newText == wgAjaxWatch.watchingMsg || newText == wgAjaxWatch.unwatchingMsg ) { - wgAjaxWatch.watchLinks[i].className += ' loading'; - } else if ( newText == wgAjaxWatch.watchMsg || newText == wgAjaxWatch.unwatchMsg ) { - wgAjaxWatch.watchLinks[i].className = wgAjaxWatch.watchLinks[i].className.replace( /loading/i, '' ); - } - } - } else { - for ( i = 0; i < wgAjaxWatch.watchLinks.length; i++ ) { - changeText( wgAjaxWatch.watchLinks[i], newText ); - } +wgAjaxWatch.setLinkText = function(newText) { + for (i = 0; i < wgAjaxWatch.watchLinks.length; i++) { + changeText(wgAjaxWatch.watchLinks[i], newText); } }; -wgAjaxWatch.setLinkID = function( newId ) { +wgAjaxWatch.setLinkID = function(newId) { // We can only set the first one - wgAjaxWatch.watchLinks[0].parentNode.setAttribute( 'id', newId ); + wgAjaxWatch.watchLinks[0].setAttribute( 'id', newId ); akeytt(newId); // update tooltips for Monobook }; @@ -125,33 +112,27 @@ wgAjaxWatch.processResult = function(request) { wgAjaxWatch.onLoad = function() { // This document structure hardcoding sucks. We should make a class and // toss all this out the window. - var el1 = document.getElementById("ca-unwatch"); var el2 = null; - if ( !el1 ) { + if (!el1) { el1 = document.getElementById("mw-unwatch-link1"); el2 = document.getElementById("mw-unwatch-link2"); } - if( el1 ) { + if(el1) { wgAjaxWatch.watching = true; } else { wgAjaxWatch.watching = false; el1 = document.getElementById("ca-watch"); - if ( !el1 ) { + if (!el1) { el1 = document.getElementById("mw-watch-link1"); el2 = document.getElementById("mw-watch-link2"); } - if( !el1 ) { + if(!el1) { wgAjaxWatch.supported = false; return; } } - - // Detect if the watch/unwatch feature is in icon mode - if ( el1.className.match( /icon/i ) ) { - wgAjaxWatch.iconMode = true; - } - + // The id can be either for the parent (Monobook-based) or the element // itself (non-Monobook) wgAjaxWatch.watchLinks.push( el1.tagName.toLowerCase() == "a" diff --git a/skins/vector/images/watch-icon-loading.gif b/skins/vector/images/watch-icon-loading.gif deleted file mode 100644 index 618c308e0b0a95912a39e2e303523efc2c08facc..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 840 zcmZ?wbhEHb6krfwI3mw*>(;GDj~;#a@Zr;^PcL4)c=P7XwQJXY{P^+h+qZM)&fU3l z=gO5U@7}$8@ZiD4ix*$LdiD43-+TA&{rU6f_wV2T{{6dr`SOh$H-7#4b@S%U=g*&i z{rdIk)2Gj#J^S+I%YQIX{Lk&@8WQa67~pE8XTZ$Jz`&sRlZBI+L7qVe$Obw>fPsNE z`+<62e85DFsKTgOd2^@lSn;^>;6txlk7dj~nl4Z5(3$4pRlQAW4ZiH*%6c z@3c^fT;pia^ykndu9+rczA`}gmblZnN(Os1=s}{nNq|w zCHeSRSY!oxIw@myPb1JhPs*p7jBtY&N7wZtzf34%?Tcs%#2!w z6D!td&JtkY(F_tW$Yp5gba{R8jSJiHNpBh%_!coOyRakRM#Du%p+J#E>`ZdvjFsxb ze1U@8f@}+~R)fB7AJji#2#-{lHFQMN2r957g@f0(_HK z)wMCK+3-+Mnx+5lGsi|J7HOZvlEh4#6NlQ2GhFPZDaBPY$HC1AwP%_Pmnz#yh2!p6#1q9nyC Sqs=DDZmubiyjWh5!5RSd-6zoi diff --git a/skins/vector/images/watch-icons.png b/skins/vector/images/watch-icons.png deleted file mode 100644 index 54b2c793f9c1538dae3764414e5d0e9df1355039..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1745 zcmd^A`BRez6pTl`1s$~&rz)PMjv~~Hij`ue77xk@-mNzpw1@~At%wK4fK-vA89a+8 zm=Kg8R|0_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1U3 zm-=%auDY;twa=*of7=g5Ox)v+oBZf%-h$xuRg^6=0(;+XCb1T5OsiZpnKTwvH9t7` z!>^6CYeA9M?zvlBw^w%Nud3cOU3)mc50?|kQOEirG%PP$8syfWa&4NuueGjHUK_4viDMsC-f_4y{idxL2u}609W!P5sjmMWaocaURO%OPt?<=ZLv^<& z+0V1TE7-WxUwA3?v1b3>)#zKFGe^x{-8vssG6genK8AAn%DpB%N9*}fnDDTO?Zw-U G-}x6_gRL0= diff --git a/skins/vector/main-ltr.css b/skins/vector/main-ltr.css index 507907c152..411ff76efe 100644 --- a/skins/vector/main-ltr.css +++ b/skins/vector/main-ltr.css @@ -24,9 +24,8 @@ body { font-size: 1em; } body { + background-color: #f3f3f3; background-image: url(images/page-base.png); - background-color: #f9f9f9; - color: #000000; } /* Content */ #content { @@ -187,14 +186,14 @@ body { div.vectorTabs li.selected a span, div.vectorTabs li.selected a:visited div.vectorTabs li.selected a:visited span { - color: #be5900; + 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: #990000; + color: #a55858; } /* Variants and Actions */ /* @noflip */ @@ -591,11 +590,11 @@ body { /* Links */ a { text-decoration: none; - color: #003cb3; + color: #0645ad; background: none; } a:visited { - color: #004d99; + color: #0b0080; } a:active { color: #faa700; @@ -607,7 +606,7 @@ a.stub { color: #772233; } a.new, #p-personal a.new { - color: #990000; + color: #ba0000; } a.new:visited, #p-personal a.new:visited { color: #a55858; @@ -639,7 +638,7 @@ h6 { margin: 0; padding-top: .5em; padding-bottom: .17em; - border-bottom: 1px solid #8d8d8d; + border-bottom: 1px solid #aaa; width: auto; } h1 { font-size: 188%; } @@ -766,8 +765,8 @@ select { #toc, .toc, .mw-warning { - border: 1px solid #c0c0c0; - background-color: #f0f0f0; + border: 1px solid #aaa; + background-color: #f9f9f9; padding: 5px; font-size: 95%; } @@ -827,16 +826,15 @@ div.thumb { background-color: transparent; } div.thumbinner { - border: 1px solid #c0c0c0; + border: 1px solid #ccc; padding: 3px !important; - background-color: #f0f0f0; + background-color: #f9f9f9; font-size: 94%; text-align: center; overflow: hidden; } html .thumbimage { - border: 1px solid #c0c0c0; - background-color: #f0f0f0; + border: 1px solid #ccc; } html .thumbcaption { border: none; @@ -956,7 +954,6 @@ h3, h4, h5 { line-height: 1.2em; font-size: 1.6em; padding-bottom: 0; - color:#005780; } #content a.external, #content a[href ^="gopher://"] { @@ -1034,6 +1031,7 @@ h3, h4, h5 { padding-left: 15px !important; text-transform: none; } + .toccolours { border: 1px solid #aaa; background-color: #f9f9f9; @@ -1044,48 +1042,10 @@ h3, h4, h5 { 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 { -} -#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; -} \ No newline at end of file + diff --git a/skins/vector/main-rtl.css b/skins/vector/main-rtl.css index d579023f48..69b3de21fb 100644 --- a/skins/vector/main-rtl.css +++ b/skins/vector/main-rtl.css @@ -1042,7 +1042,6 @@ h3, h4, h5 { position: relative; width: 100%; } - #mw-js-message { font-size: 0.8em; } @@ -1050,71 +1049,4 @@ div#bodyContent { line-height: 1.5em; } - - -/* Babaco color scheme */ -/* Still working on this. Needs incorporated above once it's closer to final */ -body { - background-color: #f9f9f9; - color: #000000; -} -a { - color: #003cb3; -} -a.new { - color: #990000; -} - -a:visited, -div.vectorTabs li.selected a:visited div.vectorTabs li.selected a:visited span { - color: #260e9c; -} - -html .thumbimage, -#toc, .toc, .mw-warning, div.thumbinner { - border-color: #c0c0c0; - background-color: #f0f0f0; -} - -h1, h2, h3, h4, h5, h6 { - border-color: #8d8d8d; -} - -/* Watch/Unwatch Icon Styling */ -#ca-unwatch.icon, -#ca-watch.icon { -} -#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; -} \ No newline at end of file + \ No newline at end of file -- 2.20.1