mirror of
https://gerrit.wikimedia.org/r/mediawiki/skins/Vector.git
synced 2024-11-23 15:26:47 +00:00
Remove references to heading in dropdown PHP
Bug: T319358 Change-Id: I9830a4b4b55fdb205c479c09ef807de4f6d68713
This commit is contained in:
parent
3c741a8505
commit
153c6f2668
|
@ -44,9 +44,9 @@ class VectorComponentDropdown implements VectorComponent {
|
|||
return [
|
||||
'id' => $this->id,
|
||||
'label' => $this->label,
|
||||
'heading-class' => $buttonClass . $iconButtonClass,
|
||||
'label-class' => $buttonClass . $iconButtonClass,
|
||||
'icon' => $this->icon,
|
||||
'html-vector-menu-heading-attributes' => '',
|
||||
'html-vector-menu-label-attributes' => '',
|
||||
'html-vector-menu-checkbox-attributes' => '',
|
||||
'class' => $this->class,
|
||||
'html-tooltip' => $this->tooltip,
|
||||
|
|
|
@ -61,18 +61,18 @@ class VectorComponentLanguageDropdown implements VectorComponent {
|
|||
if ( !$isSubjectPage ) {
|
||||
$icon = 'language';
|
||||
$this->class .= ' mw-portlet-lang-icon-only';
|
||||
$headingClass = $buttonClasses . ' cdx-button--icon-only mw-portlet-lang-heading-empty';
|
||||
$labelClass = $buttonClasses . ' cdx-button--icon-only mw-portlet-lang-heading-empty';
|
||||
$checkboxClass = 'mw-interlanguage-selector-empty';
|
||||
} else {
|
||||
$icon = 'language-progressive';
|
||||
$headingClass = $buttonClasses . ' cdx-button--action-progressive'
|
||||
$labelClass = $buttonClasses . ' cdx-button--action-progressive'
|
||||
. ' mw-portlet-lang-heading-' . strval( $this->numLanguages );
|
||||
$checkboxClass = 'mw-interlanguage-selector';
|
||||
}
|
||||
$dropdown = new VectorComponentDropdown( 'p-lang-btn', $this->label, $this->class );
|
||||
$dropdownData = $dropdown->getTemplateData();
|
||||
// override default heading class.
|
||||
$dropdownData['heading-class'] = $headingClass;
|
||||
$dropdownData['label-class'] = $labelClass;
|
||||
// ext.uls.interface attaches click handler to this selector.
|
||||
$dropdownData['checkbox-class'] = $checkboxClass;
|
||||
$dropdownData['icon'] = $icon;
|
||||
|
|
|
@ -36,7 +36,6 @@ class VectorComponentMenu implements VectorComponent, Countable {
|
|||
'label' => '',
|
||||
'html-tooltip' => '',
|
||||
'label-class' => '',
|
||||
'heading-class' => '',
|
||||
'html-before-portal' => '',
|
||||
'html-items' => '',
|
||||
'html-after-portal' => '',
|
||||
|
|
|
@ -25,9 +25,9 @@
|
|||
<label
|
||||
id="{{id}}-label"
|
||||
for="{{id}}-checkbox"
|
||||
class="vector-menu-heading{{#heading-class}} {{.}}{{/heading-class}}"
|
||||
class="vector-menu-heading{{#label-class}} {{.}}{{/label-class}}"
|
||||
aria-hidden="true"
|
||||
{{{html-vector-menu-heading-attributes}}}
|
||||
{{{html-vector-menu-label-attributes}}}
|
||||
>
|
||||
{{#icon}}{{>Icon}}{{/icon}}
|
||||
<span class="vector-menu-heading-label">{{label}}</span>
|
||||
|
|
|
@ -91,8 +91,8 @@ const templateData = {
|
|||
class: 'mw-portlet mw-portlet-sticky-header-toc vector-sticky-header-toc',
|
||||
'html-items': '',
|
||||
'html-vector-menu-checkbox-attributes': 'tabindex="-1"',
|
||||
'html-vector-menu-heading-attributes': 'tabindex="-1"',
|
||||
'heading-class': 'cdx-button cdx-button--weight-quiet cdx-button--icon-only'
|
||||
'html-vector-menu-label-attributes': 'tabindex="-1"',
|
||||
'label-class': 'cdx-button cdx-button--weight-quiet cdx-button--icon-only'
|
||||
},
|
||||
'array-buttons': [ {
|
||||
label: '0 languages',
|
||||
|
|
Loading…
Reference in a new issue