mirror of
https://gerrit.wikimedia.org/r/mediawiki/skins/Vector.git
synced 2024-12-01 18:57:04 +00:00
a43d522331
* Don't hide language button This code can be removed now T287206 is resolved. Also simplify legacy logic - as the language menu is always a portlet there. Additional changes: * Create LanguageButtonDropdown component to distinguish this code from the LanguageButton in the sticky header. * Fixes a style in LanguageButtonDropdown.less which wasn't accounting for multiple vector-menu-content classes Bug: T320927 Bug: T325017 Change-Id: Ic331684c384c5d57b60b098f23485e44fb75fb8f
32 lines
1.3 KiB
Plaintext
32 lines
1.3 KiB
Plaintext
{{!
|
|
See @typedef MenuDefinition
|
|
}}
|
|
{{! this template must be used with Dropdown/Close to avoid unclosed HTML tags }}
|
|
{{! DO NOT REMOVE vector-menu class. It is used for click tracking in Extension:WikimediaEvents }}
|
|
<div id="{{id}}" class="vector-menu vector-dropdown vector-menu-dropdown{{#class}} {{.}}{{/class}}" {{{html-tooltip}}} {{{html-user-language-attributes}}}>
|
|
{{!
|
|
Dropdown menus use the checkbox hack and require `input` and `label` elements.
|
|
`aria-label` is applied to the `input` which is semantically a button.
|
|
The `label` element is used as a visual button.
|
|
}}
|
|
<input type="checkbox"
|
|
id="{{id}}-checkbox"
|
|
role="button"
|
|
aria-haspopup="true"
|
|
data-event-name="ui.dropdown-{{id}}"
|
|
class="vector-menu-checkbox{{#checkbox-class}} {{.}}{{/checkbox-class}}"
|
|
{{#aria-label}}aria-label="{{.}}"{{/aria-label}}
|
|
{{{html-vector-menu-checkbox-attributes}}}
|
|
/>
|
|
<label
|
|
id="{{id}}-label"
|
|
for="{{id}}-checkbox"
|
|
class="vector-menu-heading{{#heading-class}} {{.}}{{/heading-class}}"
|
|
{{{html-vector-menu-heading-attributes}}}
|
|
>
|
|
{{{html-vector-heading-icon}}}<span class="vector-menu-heading-label">{{label}}</span>
|
|
</label>
|
|
{{! FIXME: Rename this class to vector-dropdown-content. It currently clashes with MenuContents mustache template }}
|
|
<div class="vector-menu-content">
|
|
|