mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-25 14:56:20 +00:00
d2dfb9ac4f
* Move and rename generic parts of ve.ui to OO.ui * We now have a UI test suite because ve.Element (outside ve.ui) is now part of oojs-ui, so it needs a test suite. * Added to the MW test run (just like we do for unicodejs). * Updated csslint config (also added ve-mw and syntaxhighlight which were missing). oojs-ui still depends on the TriggerRegistry in VE, this is addressed in a follow-up commit. Change-Id: Iec147155c1ddf20b73a4d15d87b8742207032312
56 lines
919 B
JavaScript
56 lines
919 B
JavaScript
/*!
|
|
* ObjectOriented UserInterface namespace.
|
|
*
|
|
* @copyright 2011-2013 OOJS Team and others; see AUTHORS.txt
|
|
* @license The MIT License (MIT); see LICENSE.txt
|
|
*/
|
|
|
|
/**
|
|
* Namespace for all ObjectOriented UserInterface classes, static methods and static properties.
|
|
*
|
|
* @class
|
|
* @singleton
|
|
*/
|
|
OO.ui = {};
|
|
|
|
OO.ui.bind = $.proxy;
|
|
|
|
OO.ui.extendObject = $.extend;
|
|
|
|
OO.ui.indexOf = $.inArray;
|
|
|
|
OO.ui.getUserLanguages = function () {
|
|
return [ 'en' ];
|
|
};
|
|
|
|
/**
|
|
* Get a localized message.
|
|
*
|
|
* @abstract
|
|
* @param {string} key Message key
|
|
* @param {Mixed...} [params] Message parameters
|
|
*/
|
|
OO.ui.msg = function ( key ) {
|
|
return '[' + key + ']';
|
|
};
|
|
|
|
// Add more as you need
|
|
OO.ui.Keys = {
|
|
'UNDEFINED': 0,
|
|
'BACKSPACE': 8,
|
|
'DELETE': 46,
|
|
'LEFT': 37,
|
|
'RIGHT': 39,
|
|
'UP': 38,
|
|
'DOWN': 40,
|
|
'ENTER': 13,
|
|
'END': 35,
|
|
'HOME': 36,
|
|
'TAB': 9,
|
|
'PAGEUP': 33,
|
|
'PAGEDOWN': 34,
|
|
'ESCAPE': 27,
|
|
'SHIFT': 16,
|
|
'SPACE': 32
|
|
};
|