mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-26 15:21:51 +00:00
2ea9437e32
Replaced uses of extendObject with $.extend . Replaced the one use of OO.ui.indexOf with Array.prototype.indexOf because that's what everything else was already using. Change-Id: I63f40989057b8065ec977efafbf68d6e22c8e679
52 lines
859 B
JavaScript
52 lines
859 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.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
|
|
};
|