From 7a92840435f3ed7563eb938288f8f1ca94914b5e Mon Sep 17 00:00:00 2001 From: Roan Kattouw Date: Mon, 28 Sep 2009 10:09:12 +0000 Subject: [PATCH] Coding style cleanup for r56924; also copypaste main-ltr.css modifications to main-rtl.css; will rebuild later --- skins/common/ajaxwatch.js | 68 +++++++++++++++++++-------------------- skins/vector/main-ltr.css | 48 +++++++++++++-------------- skins/vector/main-rtl.css | 49 +++++++++++++++++++++++++++- 3 files changed, 106 insertions(+), 59 deletions(-) diff --git a/skins/common/ajaxwatch.js b/skins/common/ajaxwatch.js index 2e1db0d5a2..ff9d7851aa 100644 --- a/skins/common/ajaxwatch.js +++ b/skins/common/ajaxwatch.js @@ -24,29 +24,29 @@ 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].firstChild.src = wgAjaxWatch.imgBasePath +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].firstChild.src = wgAjaxWatch.imgBasePath + "/common/images/spinner.gif"; - } else if( newText==wgAjaxWatch.watchMsg ) { - wgAjaxWatch.watchLinks[i].firstChild.src = wgAjaxWatch.imgBasePath + } else if( newText==wgAjaxWatch.watchMsg ) { + wgAjaxWatch.watchLinks[i].firstChild.src = wgAjaxWatch.imgBasePath + "/vector/images/watch_off.gif"; - } else if( newText==wgAjaxWatch.unwatchMsg ) { - wgAjaxWatch.watchLinks[i].firstChild.src = wgAjaxWatch.imgBasePath + } else if( newText==wgAjaxWatch.unwatchMsg ) { + wgAjaxWatch.watchLinks[i].firstChild.src = wgAjaxWatch.imgBasePath + "/vector/images/watch_on.gif"; - } - } - } else{ - for ( i = 0; i < wgAjaxWatch.watchLinks.length; i++ ) { - changeText( wgAjaxWatch.watchLinks[i], newText ); - } - } + } + } + } else { + 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 ); akeytt(newId); // update tooltips for Monobook @@ -153,25 +153,25 @@ wgAjaxWatch.onLoad = function() { } // If we're using the icon, add rollover affects - try{ - if( el1.firstChild.firstChild.tagName.match( /img/i ) ) { + try { + if( el1.firstChild.firstChild.tagName.match( /img/i ) ) { wgAjaxWatch.iconMode = true; - wgAjaxWatch.imgBasePath = el1.firstChild.firstChild.src + wgAjaxWatch.imgBasePath = el1.firstChild.firstChild.src .replace( /\/vector\/images\/watch_(off|on).gif/, "" ); - el1.firstChild.onmouseover = function( e ) { - if ( !wgAjaxWatch.inprogress ) - this.firstChild.src = wgAjaxWatch.imgBasePath - + "/vector/images/watch_over.gif"; - } - el1.firstChild.onmouseout = function( e ) { - if ( !wgAjaxWatch.inprogress ) - this.firstChild.src = wgAjaxWatch.imgBasePath - + "/vector/images/watch_" + ( wgAjaxWatch.watching ? - "on.gif" : "off.gif" ); - } - } + el1.firstChild.onmouseover = function( e ) { + if ( !wgAjaxWatch.inprogress ) + this.firstChild.src = wgAjaxWatch.imgBasePath + + "/vector/images/watch_over.gif"; + } + el1.firstChild.onmouseout = function( e ) { + if ( !wgAjaxWatch.inprogress ) + this.firstChild.src = wgAjaxWatch.imgBasePath + + "/vector/images/watch_" + ( wgAjaxWatch.watching ? + "on.gif" : "off.gif" ); + } + } } catch( e ) { - // not using the icon + // not using the icon } diff --git a/skins/vector/main-ltr.css b/skins/vector/main-ltr.css index 2b27cfd12a..a450c65541 100644 --- a/skins/vector/main-ltr.css +++ b/skins/vector/main-ltr.css @@ -1054,48 +1054,48 @@ div#bodyContent { /* Babaco color scheme */ /* Still working on this. Needs incorporated above once it's closer to final */ -body{ - background-color:#f9f9f9; - color:#000000; +body { + background-color: #f9f9f9; + color: #000000; } -a{ - color:#003cb3; +a { + color: #003cb3; } -a.new{ - color:#990000; +a.new { + color: #990000; } a:visited, div.vectorTabs li.selected a:visited div.vectorTabs li.selected a:visited span { - color:#260e9c; + color: #260e9c; } html .thumbimage, -#toc, .toc, .mw-warning, div.thumbinner{ - border-color:#c0c0c0; - background-color:#f0f0f0; +#toc, .toc, .mw-warning, div.thumbinner { + border-color: #c0c0c0; + background-color: #f0f0f0; } -h1, h2, h3, h4, h5, h6{ - border-color:#8d8d8d; +h1, h2, h3, h4, h5, h6 { + border-color: #8d8d8d; } /* Watch/Unwatch Icon Styling */ #ca-unwatch, -#ca-watch{ - background-image:none; - background-color:#ffffff; +#ca-watch { + background-image: none; + background-color: #ffffff; } #ca-unwatch a, -#ca-watch a{ - outline:none; +#ca-watch a { + outline: none; } #ca-unwatch a img, -#ca-watch a img{ - padding-top:1.35em; - display:block; - font-size:0.8em; - max-height:14px; - max-width:14px; +#ca-watch a img { + padding-top: 1.35em; + display: block; + font-size: 0.8em; + max-height: 14px; + max-width: 14px; } \ No newline at end of file diff --git a/skins/vector/main-rtl.css b/skins/vector/main-rtl.css index 69b3de21fb..5594f6ef7c 100644 --- a/skins/vector/main-rtl.css +++ b/skins/vector/main-rtl.css @@ -1049,4 +1049,51 @@ div#bodyContent { line-height: 1.5em; } - \ No newline at end of file + +/* 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, +#ca-watch { + background-image: none; + background-color: #ffffff; +} +#ca-unwatch a, +#ca-watch a { + outline: none; +} +#ca-unwatch a img, +#ca-watch a img { + padding-top: 1.35em; + display: block; + font-size: 0.8em; + max-height: 14px; + max-width: 14px; +} \ No newline at end of file -- 2.20.1