mirror of
https://gerrit.wikimedia.org/r/mediawiki/skins/Vector.git
synced 2024-11-12 09:21:11 +00:00
89fee04f0b
Drop support for vectorMenu, vectorTabs and vectorMenuCheckbox, body, menu selectors in preference for standard selectors. This change will impact a large amount of user scripts/styles but should not impact any gadgets. These classes were kept around for user scripts and styles however are not needed internally. As we transition to a more maintainable skin menu system, it is time to lose these selectors even though this will cause disruption. Vector now will use the mw-portlet class rather than the vector-menu class in its own CSS styling, however it keeps the other classes to allow differentiation of the different types of menu. Changes to test: Previously the tests assumed all portlets were empty when checking the classes. This is very rare, so its better to check the classes of non-empty portlets, so several tests are updated accordingly to drop the emptyPortlet class. Bug: T262092 Change-Id: I1824335eb47d613c2a4804ec1f1106c0f4c16101
39 lines
1.5 KiB
JavaScript
39 lines
1.5 KiB
JavaScript
/**
|
|
* @external MenuDefinition
|
|
*/
|
|
|
|
import { htmlUserLanguageAttributes } from './utils';
|
|
|
|
/**
|
|
* @type {MenuDefinition}
|
|
*/
|
|
export const pageActionsData = {
|
|
id: 'p-views',
|
|
class: 'vector-menu-tabs',
|
|
label: 'Views',
|
|
'html-user-language-attributes': htmlUserLanguageAttributes,
|
|
'html-items': `<li id="ca-view" class="collapsible selected">
|
|
<a href="/wiki/Main_Page">Read</a>
|
|
</li>
|
|
<li id="ca-viewsource" class="collapsible">
|
|
<a href="/w/index.php?title=Main_Page&action=edit" title="This page is protected.
|
|
You can view its source [⌃⌥e]" accesskey="e">View source</a></li>
|
|
<li id="ca-history" class="collapsible">
|
|
<a href="/w/index.php?title=Main_Page&action=history" title="Past revisions of this page [⌃⌥h]" accesskey="h">View history</a>
|
|
</li>
|
|
<li id="ca-unwatch" class="collapsible icon mw-watchlink"><a href="/w/index.php?title=Main_Page&action=unwatch" data-mw="interface" title="Remove this page from your watchlist [⌃⌥w]" accesskey="w">Unwatch</a></li>
|
|
`
|
|
};
|
|
|
|
/**
|
|
* @type {MenuDefinition}
|
|
*/
|
|
export const namespaceTabsData = {
|
|
id: 'p-namespaces',
|
|
class: 'vector-menu-tabs',
|
|
label: 'Namespaces',
|
|
'html-user-language-attributes': htmlUserLanguageAttributes,
|
|
'html-items': `<li id="ca-nstab-main" class="selected"><a href="/wiki/Main_Page" title="View the content page [⌃⌥c]" accesskey="c">Main page</a></li>
|
|
<li id="ca-talk"><a href="/wiki/Talk:Main_Page" rel="discussion" title="Discussion about the content page [⌃⌥t]" accesskey="t">Talk (3)</a></li>`
|
|
};
|