Epic bug fix. Changing the markup structure of Vectors tabs and related watch/unwatch...
authorAdam Miller <adam@users.mediawiki.org>
Tue, 13 Jul 2010 22:31:46 +0000 (22:31 +0000)
committerAdam Miller <adam@users.mediawiki.org>
Tue, 13 Jul 2010 22:31:46 +0000 (22:31 +0000)
skins/Vector.php
skins/common/ajaxwatch.js
skins/vector/main-ltr.css
skins/vector/main-rtl.css

index 2a7c7c5..3692651 100644 (file)
@@ -695,7 +695,7 @@ class VectorTemplate extends QuickTemplate {
        <h5><?php $this->msg('namespaces') ?></h5>
        <ul<?php $this->html('userlangattributes') ?>>
                <?php foreach ($this->data['namespace_urls'] as $key => $link ): ?>
-                       <li <?php echo $link['attributes'] ?>><a href="<?php echo htmlspecialchars( $link['href'] ) ?>" <?php echo $link['key'] ?>><span><?php echo htmlspecialchars( $link['text'] ) ?></span></a></li>
+                       <li <?php echo $link['attributes'] ?>><span><a href="<?php echo htmlspecialchars( $link['href'] ) ?>" <?php echo $link['key'] ?>><?php echo htmlspecialchars( $link['text'] ) ?></a></span></li>
                <?php endforeach; ?>
        </ul>
 </div>
@@ -730,7 +730,7 @@ class VectorTemplate extends QuickTemplate {
        <h5><?php $this->msg('views') ?></h5>
        <ul<?php $this->html('userlangattributes') ?>>
                <?php foreach ( $this->data['view_urls'] as $key => $link ): ?>
-                       <li<?php echo $link['attributes'] ?>><a href="<?php echo htmlspecialchars( $link['href'] ) ?>" <?php echo $link['key'] ?>><?php echo (array_key_exists('img',$link) ?  '<img src="'.$link['img'].'" alt="'.$link['text'].'" />' : '<span>'.htmlspecialchars( $link['text'] ).'</span>') ?></a></li>
+                       <li<?php echo $link['attributes'] ?>><span><a href="<?php echo htmlspecialchars( $link['href'] ) ?>" <?php echo $link['key'] ?>><?php echo (array_key_exists('img',$link) ?  '<img src="'.$link['img'].'" alt="'.$link['text'].'" />' : htmlspecialchars( $link['text'] ) ) ?></a></span></li>
                <?php endforeach; ?>
        </ul>
 </div>
index b5bae1d..f88fb89 100644 (file)
@@ -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;
index ac7b308..fdb899e 100644 (file)
@@ -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);
index d3bccaa..3f4904b 100644 (file)
@@ -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);