mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-12-11 22:16:15 +00:00
ced2a8aa59
* Generate the edit tabs and the section edit links in PHP, with a fallback in JS for cases where we don't have them yet due to caching. But only change things if VE is enabled, and have the JS correct the state if the wrong cached HTML comes through. * Make the order of the tabs/links and the messages to use as captions configurable * Make the edit tabs and section edit links always be present in the page (regardless of namespace, user prefs, etc.) but be hidden and have JS unhide them (using html.ve-available) if appropriate * Add appendix messages so we can do a superscript "beta" even in places where we can't use HTML in the message VisualEditor.php: * Add new hook registrations * Remove edit link caption messages from the init init module because they're now added dynamically in VisualEditor.hooks.php * Add a noscript CSS module so we can hide some things in JS-less environments * Remove $wgVisualEditorTabLayout and replace it with $wgVisualEditorPosition * Add config vars for link captions, with null causing us to use the default caption * Add config vars for link caption appendices. Too many config vars but we'll clean that up later VisualEditor.hooks.php: * Dynamically add tab messages to the init init module * Remove unused globals in onBeforePageDisplay() * Add noscript CSS module * Add a SkinTemplateNavigation hook that changes and reorders the edit tabs as appropriate * Add a DoEditSectionLink hook that overwrites the edit section links * Export the new config variables to JS VisualEditor.i18n.php: * Add beta appendix message * Add a message for the default VE edit section link ve.init.mw.ViewPageTarget.init.css: * Remove the animation on the edit section links * Darken the color of the brackets and the pipe from #ccc to #555 * Style the beta message to be superscript-like (but not real <sup> to avoid moving the baseline) ve.init.mw.ViewPageTarget.noscript.css: * Hide the VE edit tab, the pipe and the VE edit section link initally unless and until JS unhides ve.init.mw.ViewPageTarget.init.js: * Toggle .ve-not-available / .ve-available * Edit tabs ** Only generate the the edit tabs if they're not already there from PHP ** Rewrite the edit tab generation to mirror what's being done in PHP * Section edit links ** Same as for edit tabs ** Also add mw-visualeditor-expanded to pad the brackets ve.init.mw.ViewPageTarget.js: * #ca-ve-edit is now always the VE tab (and #ca-edit always the edit source tab) so update the .selected behavior accordingly Change-Id: Idcb15faea7fabe5fe7578b1508079969b27d2469
48 lines
1.1 KiB
CSS
48 lines
1.1 KiB
CSS
/*!
|
|
* VisualEditor MediaWiki ViewPageTarget init styles.
|
|
*
|
|
* @copyright 2011-2013 VisualEditor Team and others; see AUTHORS.txt
|
|
* @license The MIT License (MIT); see LICENSE.txt
|
|
*/
|
|
|
|
/* Section edit links */
|
|
|
|
.mw-editsection {
|
|
white-space: nowrap;
|
|
padding-right: 0.25em;
|
|
/* bidi isolation: */
|
|
unicode-bidi: -moz-isolate;
|
|
unicode-bidi: -webkit-isolate;
|
|
unicode-bidi: isolate;
|
|
}
|
|
|
|
.mw-editsection-divider {
|
|
color: #555;
|
|
}
|
|
|
|
/* @noflip */
|
|
.mw-content-ltr .mw-editsection-expanded .mw-editsection-bracket:first-of-type,
|
|
.mw-content-rtl .mw-editsection-expanded .mw-editsection-bracket:not(:first-of-type) {
|
|
margin-left: -0.25em;
|
|
margin-right: 0.25em;
|
|
color: #555;
|
|
}
|
|
|
|
/* @noflip */
|
|
.mw-content-rtl .mw-editsection-expanded .mw-editsection-bracket:first-of-type,
|
|
.mw-content-ltr .mw-editsection-expanded .mw-editsection-bracket:not(:first-of-type) {
|
|
margin-right: -0.25em;
|
|
margin-left: 0.25em;
|
|
color: #555;
|
|
}
|
|
|
|
.ve-tabmessage-appendix {
|
|
font-size: 0.7em;
|
|
vertical-align: top;
|
|
line-height: 1.43em;
|
|
padding-left: 0.5em;
|
|
/* Use !important to override div.vectorTabs span */
|
|
background-image: none !important;
|
|
display: inline !important;
|
|
}
|