mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-25 14:56:20 +00:00
ec912dc2d1
ve.ui.Widget.css * Adjust menu up a few pixels to match other uses of ve.ui.MenuWidget (the format drop down) ve.ui.LinkInspector.js * Moved the form value initialization to a timeout that fires well after the animation of the inspector - this is only important because the first element has a menu that pops up and the menu was rendering in the wrong location ve.ui.Frame.js * Added reference to frame within this.$$ by passing it to get$$ ve.ui.Inspector.js * Removed auto-focus on open from inspector base class - this will be done in a more specific and controlled way instead ve.ui.js * Added optional frame argument to get$$ so that it's easy to get the frame from any $$ that's bound to an iframe document ve.ui.Window.js * Removed duplicate static member assignments * Added auto-focus on the window's frame before calling onOpen * Added auto-blur of anything focused within the iframe after calling onClose ve.ui.MWLinkTargetInputWidget.js * Auto-highlight the selected item when populating a menu so that pressing enter always keeps the currently selected item selected ve.ui.TextInputMenuWidget.js * Take the frame's position into account when positioning a menu below an input Change-Id: I334f7db29af6b821bcfc8dc3c0ccba2636d4d9b1
34 lines
884 B
JavaScript
34 lines
884 B
JavaScript
/*!
|
|
* VisualEditor UserInterface namespace.
|
|
*
|
|
* @copyright 2011-2013 VisualEditor Team and others; see AUTHORS.txt
|
|
* @license The MIT License (MIT); see LICENSE.txt
|
|
*/
|
|
|
|
/**
|
|
* Namespace for all VisualEditor UserInterface classes, static methods and static properties.
|
|
* @class
|
|
* @singleton
|
|
*/
|
|
ve.ui = {
|
|
//'inspectorFactory': Initialized in ve.ui.InspectorFactory.js
|
|
//'toolFactory': Initialized in ve.ui.ToolFactory.js
|
|
};
|
|
|
|
/**
|
|
* Gets a jQuery function within a specific document.
|
|
*
|
|
* @param {jQuery|HTMLDocument} context Context to bind the function to
|
|
* @param {ve.ui.Frame} [frame] Frame of the document context
|
|
* @returns {Function} Bound jQuery function
|
|
*/
|
|
ve.ui.get$$ = function ( context, frame ) {
|
|
function $$( selector ) {
|
|
return $( selector, context instanceof jQuery ? context.context : context );
|
|
}
|
|
if ( frame ) {
|
|
$$.frame = frame;
|
|
}
|
|
return $$;
|
|
};
|