2014-02-13 13:29:29 +00:00
|
|
|
/*!
|
|
|
|
* VisualEditor UserInterface MWCommandHelpDialog class.
|
|
|
|
*
|
2015-01-08 23:54:03 +00:00
|
|
|
* @copyright 2011-2015 VisualEditor Team and others; see AUTHORS.txt
|
2014-02-13 13:29:29 +00:00
|
|
|
* @license The MIT License (MIT); see LICENSE.txt
|
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Dialog listing all command keyboard shortcuts.
|
|
|
|
*
|
|
|
|
* @class
|
|
|
|
* @extends ve.ui.CommandHelpDialog
|
|
|
|
*
|
|
|
|
* @constructor
|
|
|
|
* @param {Object} [config] Configuration options
|
|
|
|
*/
|
2014-08-21 00:50:54 +00:00
|
|
|
ve.ui.MWCommandHelpDialog = function VeUiMWCommandHelpDialog( config ) {
|
2014-02-13 13:29:29 +00:00
|
|
|
// Parent constructor
|
2014-08-21 00:50:54 +00:00
|
|
|
ve.ui.MWCommandHelpDialog.super.call( this, config );
|
2014-02-13 13:29:29 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
/* Inheritance */
|
|
|
|
|
|
|
|
OO.inheritClass( ve.ui.MWCommandHelpDialog, ve.ui.CommandHelpDialog );
|
|
|
|
|
2015-11-03 11:20:36 +00:00
|
|
|
/* Static properties */
|
|
|
|
|
|
|
|
ve.ui.MWCommandHelpDialog.static.commandGroups = ve.extendObject( ve.ui.CommandHelpDialog.static.commandGroups, {
|
|
|
|
insert: {
|
2015-11-05 10:11:35 +00:00
|
|
|
title: OO.ui.deferMsg( 'visualeditor-shortcuts-insert' ),
|
2015-11-03 11:20:36 +00:00
|
|
|
promote: [],
|
|
|
|
demote: []
|
|
|
|
}
|
|
|
|
} );
|
|
|
|
|
2015-10-23 17:21:11 +00:00
|
|
|
/* Registration */
|
2014-02-13 13:29:29 +00:00
|
|
|
|
2015-10-23 17:21:11 +00:00
|
|
|
ve.ui.windowFactory.register( ve.ui.MWCommandHelpDialog );
|
|
|
|
|
|
|
|
( function () {
|
2015-11-03 10:57:26 +00:00
|
|
|
var accessKeyPrefix = $.fn.updateTooltipAccessKeys.getAccessKeyPrefix().toUpperCase().replace( /-/g, ' + ' ),
|
2014-02-13 13:29:29 +00:00
|
|
|
save = ve.msg( 'accesskey-save' );
|
|
|
|
|
|
|
|
if ( save !== '-' && save !== '' ) {
|
2015-11-04 17:46:45 +00:00
|
|
|
ve.ui.commandHelpRegistry.register( 'other', 'save', {
|
2015-10-23 17:21:11 +00:00
|
|
|
shortcuts: [ accessKeyPrefix + save.toUpperCase() ],
|
2015-11-05 10:11:35 +00:00
|
|
|
label: OO.ui.deferMsg( 'visualeditor-savedialog-label-save' ),
|
2015-10-23 17:21:11 +00:00
|
|
|
demote: true
|
|
|
|
} );
|
2014-02-13 13:29:29 +00:00
|
|
|
}
|
2015-10-23 17:21:11 +00:00
|
|
|
} )();
|