Matmarex has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/71780


Change subject: Remove unnecessary h5 selectors
......................................................................

Remove unnecessary h5 selectors

They were only here for backwards-compatibility due to HTML caching
(see bug 42452).

Change-Id: If1c65d5df8434f06607da99d2380e7b53dfb02e5
---
M modules/ext.vector.collapsibleNav.css
M modules/ext.vector.collapsibleNav.js
2 files changed, 12 insertions(+), 22 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Vector 
refs/changes/80/71780/1

diff --git a/modules/ext.vector.collapsibleNav.css 
b/modules/ext.vector.collapsibleNav.css
index f3df584..5b98b01 100644
--- a/modules/ext.vector.collapsibleNav.css
+++ b/modules/ext.vector.collapsibleNav.css
@@ -1,7 +1,5 @@
 /**
  * Stylesheet for collapsible nav
- * NOTE: Please remove all the h5 selectors at some point as they are only for
- *   backwards-compatibility due to html caching. --2012-11-28
  */
 
 #mw-panel.collapsible-nav .portal {
@@ -11,8 +9,7 @@
        margin: -11px 9px 10px 11px;
 }
 
-#mw-panel.collapsible-nav .portal h3,
-#mw-panel.collapsible-nav .portal h5 {
+#mw-panel.collapsible-nav .portal h3 {
        color: #4D4D4D;
        font-weight: normal;
        /* @embed */
@@ -27,14 +24,12 @@
        margin-bottom: 0;
 }
 
-#mw-panel.collapsible-nav .portal h3:hover,
-#mw-panel.collapsible-nav .portal h5:hover {
+#mw-panel.collapsible-nav .portal h3:hover {
        cursor: pointer;
        text-decoration: none;
 }
 
-#mw-panel.collapsible-nav .portal h3 a,
-#mw-panel.collapsible-nav .portal h5 a {
+#mw-panel.collapsible-nav .portal h3 a {
        color: #4D4D4D;
        text-decoration: none;
 }
@@ -50,8 +45,7 @@
 }
 
 /* First */
-#mw-panel.collapsible-nav .portal.first h3,
-#mw-panel.collapsible-nav .portal.first h5 {
+#mw-panel.collapsible-nav .portal.first h3 {
        display: none;
 }
 
@@ -66,8 +60,7 @@
        display: block;
 }
 
-#mw-panel.collapsible-nav .portal.persistent h3,
-#mw-panel.collapsible-nav .portal.persistent h5 {
+#mw-panel.collapsible-nav .portal.persistent h3 {
        background: none !important;
        padding-left: 0.7em;
        cursor: default;
@@ -79,8 +72,7 @@
 
 /* Collapsed */
 
-#mw-panel.collapsible-nav .portal.collapsed h3,
-#mw-panel.collapsible-nav .portal.collapsed h5 {
+#mw-panel.collapsible-nav .portal.collapsed h3 {
        color: #0645AD;
        /* @embed */
        background: url(images/closed-ltr.png) left center no-repeat;
@@ -93,12 +85,10 @@
        margin-bottom: 0;
 }
 
-#mw-panel.collapsible-nav .portal.collapsed h3 a,
-#mw-panel.collapsible-nav .portal.collapsed h5 a {
+#mw-panel.collapsible-nav .portal.collapsed h3 a {
        color: #0645AD;
 }
 
-#mw-panel.collapsible-nav .portal.collapsed h3:hover,
-#mw-panel.collapsible-nav .portal.collapsed h5:hover {
+#mw-panel.collapsible-nav .portal.collapsed h3:hover {
        text-decoration: underline;
 }
diff --git a/modules/ext.vector.collapsibleNav.js 
b/modules/ext.vector.collapsibleNav.js
index 91ccb0d..49d8a15 100644
--- a/modules/ext.vector.collapsibleNav.js
+++ b/modules/ext.vector.collapsibleNav.js
@@ -194,7 +194,7 @@
                                var id = $(this).attr( 'id' ),
                                        state = $.cookie( 'vector-nav-' + id );
                                // Add anchor tag to heading for better 
accessibility
-                               $( this ).find( 'h3, h5' ).wrapInner( $( '<a 
href="#"></a>' ).click( false ) );
+                               $( this ).find( 'h3' ).wrapInner( $( '<a 
href="#"></a>' ).click( false ) );
                                // In the case that we are not showing the new 
version, let's show the languages by default
                                if (
                                        state === 'true' ||
@@ -220,7 +220,7 @@
 
                /* Tab Indexing */
 
-               $headings = $( '#mw-panel > .portal:not(.persistent) > h3, 
#mw-panel > .portal:not(.persistent) > h5' );
+               $headings = $( '#mw-panel > .portal:not(.persistent) > h3' );
 
                // Get the highest tab index
                tabIndex = $( document ).lastTabIndex() + 1;
@@ -235,13 +235,13 @@
 
                // Toggle the selected menu's class and expand or collapse the 
menu
                $( '#mw-panel' )
-                       .delegate( '.portal:not(.persistent) > h3, 
.portal:not(.persistent) > h5', 'keydown', function ( e ) {
+                       .delegate( '.portal:not(.persistent) > h3', 'keydown', 
function ( e ) {
                                // Make the space and enter keys act as a click
                                if ( e.which === 13 /* Enter */ || e.which === 
32 /* Space */ ) {
                                        toggle( $(this) );
                                }
                        } )
-                       .delegate( '.portal:not(.persistent) > h3, 
.portal:not(.persistent) > h5', 'mousedown', function ( e ) {
+                       .delegate( '.portal:not(.persistent) > h3', 
'mousedown', function ( e ) {
                                if ( e.which !== 3 ) { // Right mouse click
                                        toggle( $(this) );
                                        $(this).blur();

-- 
To view, visit https://gerrit.wikimedia.org/r/71780
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: If1c65d5df8434f06607da99d2380e7b53dfb02e5
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Vector
Gerrit-Branch: master
Gerrit-Owner: Matmarex <matma....@gmail.com>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to