mirror of
https://gerrit.wikimedia.org/r/mediawiki/skins/Vector.git
synced 2024-11-12 09:21:11 +00:00
24055a6752
* Leverage the infrastructure around feature management to handle the page tools pinning and persistence * Make pinnableHeader.js leverage features.js if the data-feature-name attribute is set * Sets tests/.eslintrc.json ecmaVersion to 2018 to enable destructuring in test files. * Adds a isPinned helper method to pinnableElement * Add a logged in requirement so that the pinned feature is disabled for anon users. Bug: T322051 Change-Id: Ib86282216882fa94e37b7088a3f4bd0c1bcf6cd4
13 lines
865 B
Plaintext
13 lines
865 B
Plaintext
<div
|
|
class="vector-pinnable-header {{data-name}}-pinnable-header vector-pinnable-header-{{#is-pinned}}pinned{{/is-pinned}}{{^is-pinned}}unpinned{{/is-pinned}}"
|
|
data-name="{{data-name}}"
|
|
{{#data-feature-name}}data-feature-name="{{.}}"{{/data-feature-name}}
|
|
{{#data-pinnable-element-id}}data-pinnable-element-id="{{.}}"{{/data-pinnable-element-id}}
|
|
{{#data-pinned-container-id}}data-pinned-container-id="{{.}}"{{/data-pinned-container-id}}
|
|
{{#data-unpinned-container-id}}data-unpinned-container-id="{{.}}"{{/data-unpinned-container-id}}
|
|
>
|
|
<{{label-tag-name}} class="vector-pinnable-header-label">{{label}}</{{label-tag-name}}>
|
|
<button class="vector-pinnable-header-toggle-button vector-pinnable-header-pin-button">{{pin-label}}</button>
|
|
<button class="vector-pinnable-header-toggle-button vector-pinnable-header-unpin-button">{{unpin-label}}</button>
|
|
</div>
|