mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-16 19:09:29 +00:00
55b5f30edb
Objectives: * Make the context menu display in the top right corner of the currently focused inspectable node (if there is one) * Prevent clicking on anything to do with the toolbar or popup from doing anything at all, ever Bonus: * While we are using the clever feature in jQuery's on method which allows passing boolean false to cancel the event - may as well do that in ve.ui.Dialog as well Changes: ve.ui.FocusableNode * Add ability to specify the focusable element so that dimensions can be derived from it ve.ce.Surface * Add quotes to object keys ve.ui.MediaDialog * Change association from being MW specific to handling images in general ve.ui.Context * Add embedded styles for context * Add embedded mode, which is triggered when the context is a single focusable node, and the node is large enough to fit the context reasonably ve.ui.Dialog * Inline mousedown handler ve.ui.Toolbar, ve.ui.PopupWidget * Cancel stray mousedown events Change-Id: I4b25d33f64b4bcb8a3ecfd7e9728f54a2d4886f3
51 lines
939 B
CSS
51 lines
939 B
CSS
/*!
|
|
* VisualEditor UserInterface Context styles.
|
|
*
|
|
* @copyright 2011-2013 VisualEditor Team and others; see AUTHORS.txt
|
|
* @license The MIT License (MIT); see LICENSE.txt
|
|
*/
|
|
|
|
.ve-ui-context {
|
|
position: absolute;
|
|
z-index: 2;
|
|
}
|
|
|
|
.ve-ui-context-inspectors, .ve-ui-context-menu {
|
|
position: absolute;
|
|
z-index: 2;
|
|
}
|
|
|
|
.ve-ui-context-menu .ve-ui-toolbar-bar {
|
|
white-space: nowrap;
|
|
border: none;
|
|
background: none;
|
|
}
|
|
|
|
.ve-ui-context-menu .ve-ui-toolbar-group {
|
|
border: none;
|
|
padding: 0.1em;
|
|
}
|
|
|
|
.ve-ui-context-menu .ve-ui-buttonTool,
|
|
.ve-ui-context-menu .ve-ui-buttonTool:hover {
|
|
border: none;
|
|
}
|
|
|
|
.ve-ui-context-menu .ve-ui-buttonTool:active,
|
|
.ve-ui-context-menu .ve-ui-buttonTool-active {
|
|
background-image: none;
|
|
}
|
|
|
|
.ve-ui-context-embed .ve-ui-popupWidget-callout {
|
|
display: none;
|
|
}
|
|
|
|
.ve-ui-context-embed .ve-ui-popupWidget-body {
|
|
margin-top: 0.25em;
|
|
margin-left: -1.3em;
|
|
}
|
|
|
|
.ve-ui-context-embed .ve-ui-context-menu {
|
|
right: 0;
|
|
}
|