mirror of
https://gerrit.wikimedia.org/r/mediawiki/skins/Vector.git
synced 2024-12-04 12:09:30 +00:00
Remove old selectors and JavaScript for dropdown menus
Bug: T168080 Change-Id: I49006314d42a00818464a94412cb63190b59a99b
This commit is contained in:
parent
5db0c43a45
commit
0ee8510ce7
|
@ -167,8 +167,7 @@ div.vectorMenu h3 {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
div.vectorMenu .vectorMenuCheckbox:checked + h3 span:after,
|
div.vectorMenu .vectorMenuCheckbox:checked + h3 span:after {
|
||||||
div.vectorMenu.menuForceShow h3 span:after {
|
|
||||||
transform: scaleY( -1 );
|
transform: scaleY( -1 );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -195,8 +194,7 @@ div.vectorMenu div.menu {
|
||||||
z-index: 2;
|
z-index: 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
div.vectorMenu:hover div.menu,
|
div.vectorMenu:hover div.menu {
|
||||||
div.vectorMenu.menuForceShow div.menu {
|
|
||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
// This is in a separate block, so that browsers supporting :hover but not :checked still apply the rule above
|
// This is in a separate block, so that browsers supporting :hover but not :checked still apply the rule above
|
||||||
|
|
19
vector.js
19
vector.js
|
@ -25,25 +25,6 @@ jQuery( function ( $ ) {
|
||||||
*/
|
*/
|
||||||
$( '#searchInput' ).attr( 'tabindex', $( document ).lastTabIndex() + 1 );
|
$( '#searchInput' ).attr( 'tabindex', $( document ).lastTabIndex() + 1 );
|
||||||
|
|
||||||
/**
|
|
||||||
* Dropdown menu accessibility
|
|
||||||
*/
|
|
||||||
$( 'div.vectorMenu' ).each( function () {
|
|
||||||
var $el = $( this );
|
|
||||||
if ( $el.find( '.vectorMenuCheckbox' ).length ) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
$el.find( '> h3 > span' ).parent()
|
|
||||||
.attr( 'tabindex', '0' )
|
|
||||||
// For accessibility, show the menu when the h3 is clicked (bug 24298/46486)
|
|
||||||
.on( 'click keypress', function ( e ) {
|
|
||||||
if ( e.type === 'click' || e.which === 13 ) {
|
|
||||||
$el.toggleClass( 'menuForceShow' );
|
|
||||||
e.preventDefault();
|
|
||||||
}
|
|
||||||
} );
|
|
||||||
} );
|
|
||||||
|
|
||||||
// Bind callback functions to animate our drop down menu in and out
|
// Bind callback functions to animate our drop down menu in and out
|
||||||
// and then call the collapsibleTabs function on the menu
|
// and then call the collapsibleTabs function on the menu
|
||||||
$tabContainer
|
$tabContainer
|
||||||
|
|
Loading…
Reference in a new issue