From: Adam Miller Date: Tue, 13 Jul 2010 22:31:46 +0000 (+0000) Subject: Epic bug fix. Changing the markup structure of Vectors tabs and related watch/unwatch... X-Git-Tag: 1.31.0-rc.0~36154 X-Git-Url: http://git.cyclocoop.org//%27%40script%40/%27?a=commitdiff_plain;h=15054db9b856c54235b9490fca3b18f62815b522;p=lhc%2Fweb%2Fwiklou.git Epic bug fix. Changing the markup structure of Vectors tabs and related watch/unwatch code to address bug 23490 --- diff --git a/skins/Vector.php b/skins/Vector.php index 2a7c7c5332..36926511fa 100644 --- a/skins/Vector.php +++ b/skins/Vector.php @@ -695,7 +695,7 @@ class VectorTemplate extends QuickTemplate {
msg('namespaces') ?>
html('userlangattributes') ?>> data['namespace_urls'] as $key => $link ): ?> -
  • >>
  • +
  • >>
  • @@ -730,7 +730,7 @@ class VectorTemplate extends QuickTemplate {
    msg('views') ?>
    html('userlangattributes') ?>> data['view_urls'] as $key => $link ): ?> - >>' : ''.htmlspecialchars( $link['text'] ).'') ?> + >>' : htmlspecialchars( $link['text'] ) ) ?> diff --git a/skins/common/ajaxwatch.js b/skins/common/ajaxwatch.js index b5bae1dcaa..f88fb89209 100644 --- a/skins/common/ajaxwatch.js +++ b/skins/common/ajaxwatch.js @@ -73,7 +73,7 @@ $j(document).ready( function(){ $links.each( function(){ var $link = $j(this); $link - .data( 'icon', $link.parent().hasClass( 'icon' ) ) + .data( 'icon', $link.parents( 'li' ).hasClass( 'icon' ) ) .data( 'action', $link.attr( 'href' ).match( /[\?\&]action=unwatch/i ) ? 'unwatch' : 'watch' ); var title = $link.attr( 'href' ).match( /[\?\&]title=(.*?)&/i )[1]; $link.data( 'target', decodeURIComponent( title ).replace( /_/g, ' ' ) ); @@ -117,8 +117,8 @@ $j(document).ready( function(){ $link.data( 'action', otheraction ); wgAjaxWatch.setLinkText( $link, otheraction ); $link.attr( 'href', $link.attr('href').replace( '/&action='+action+'/', '&action='+otheraction ) ); - if( $link.parent().attr('id') == 'ca-'+action ){ - $link.parent().attr( 'id', 'ca-'+otheraction ); + if( $link.parents( 'li' ).attr('id') == 'ca-'+action ){ + $link.parents( 'li' ).attr( 'id', 'ca-'+otheraction ); } }; return false; diff --git a/skins/vector/main-ltr.css b/skins/vector/main-ltr.css index ac7b308772..fdb899e1c6 100644 --- a/skins/vector/main-ltr.css +++ b/skins/vector/main-ltr.css @@ -158,19 +158,18 @@ div#mw-head h5 { /* OVERRIDDEN BY COMPLIANT BROWSERS */ div.vectorTabs li a { display: inline-block; - height: 2.5em; - padding-left: 0.4em; - padding-right: 0.4em; + height: 1.9em; + padding-left: 0.5em; + padding-right: 0.5em; background-image: url(images/tab-break.png?1); background-position: bottom right; background-repeat: no-repeat; } - div.vectorTabs li a, - div.vectorTabs li a span { + div.vectorTabs li a{ color: #0645ad; cursor: pointer; } - div.vectorTabs li a span { + div.vectorTabs li a { font-size: 0.8em; } /* IGNORED BY IE6 */ @@ -178,27 +177,23 @@ div#mw-head h5 { display: block; } /* OVERRIDDEN BY COMPLIANT BROWSERS */ - div.vectorTabs a span { + div.vectorTabs span a { display: inline-block; padding-top: 1.25em; } /* IGNORED BY IE6 */ /* @noflip */ - div.vectorTabs a > span { + div.vectorTabs span > a { 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 { + div.vectorTabs li.selected a:visited{ 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 { + div.vectorTabs li.new a:visited{ color: #a55858; } /* Variants and Actions */ @@ -1104,7 +1099,8 @@ div#bodyContent { outline: none; display: block; width: 26px; - height: 2.5em; + height: 3.1em; + text-indent: -9999px; } #ca-unwatch.icon a { background-image: url(images/watch-icons.png?1); diff --git a/skins/vector/main-rtl.css b/skins/vector/main-rtl.css index d3bccaadc9..3f4904b3a2 100644 --- a/skins/vector/main-rtl.css +++ b/skins/vector/main-rtl.css @@ -158,19 +158,18 @@ div#mw-head h5 { /* OVERRIDDEN BY COMPLIANT BROWSERS */ div.vectorTabs li a { display: inline-block; - height: 2.5em; - padding-right: 0.4em; - padding-left: 0.4em; + height: 1.9em; + padding-right: 0.5em; + padding-left: 0.5em; background-image: url(images/tab-break.png?1); background-position: bottom left; background-repeat: no-repeat; } - div.vectorTabs li a, - div.vectorTabs li a span { + div.vectorTabs li a{ color: #0645ad; cursor: pointer; } - div.vectorTabs li a span { + div.vectorTabs li a { font-size: 0.8em; } /* IGNORED BY IE6 */ @@ -178,27 +177,23 @@ div#mw-head h5 { display: block; } /* OVERRIDDEN BY COMPLIANT BROWSERS */ - div.vectorTabs a span { + div.vectorTabs span a { display: inline-block; padding-top: 1.25em; } /* IGNORED BY IE6 */ /* @noflip */ - div.vectorTabs a > span { + div.vectorTabs span > a { 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 { + div.vectorTabs li.selected a:visited{ 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 { + div.vectorTabs li.new a:visited{ color: #a55858; } /* Variants and Actions */ @@ -1104,7 +1099,8 @@ div#bodyContent { outline: none; display: block; width: 26px; - height: 2.5em; + height: 3.1em; + text-indent: -9999px; } #ca-unwatch.icon a { background-image: url(images/watch-icons.png?1);