2013-12-20 23:25:24 +00:00
|
|
|
/*!
|
2014-11-23 18:04:00 +00:00
|
|
|
* VisualEditor MediaWiki CommandRegistry registrations.
|
2013-12-20 23:25:24 +00:00
|
|
|
*
|
2015-01-08 23:54:03 +00:00
|
|
|
* @copyright 2011-2015 VisualEditor Team and others; see AUTHORS.txt
|
2013-12-20 23:25:24 +00:00
|
|
|
* @license The MIT License (MIT); see LICENSE.txt
|
|
|
|
*/
|
|
|
|
|
|
|
|
/* MW Command Registrations */
|
|
|
|
|
2014-05-31 04:47:08 +00:00
|
|
|
ve.ui.commandRegistry.register(
|
2014-11-04 22:10:28 +00:00
|
|
|
new ve.ui.Command(
|
|
|
|
'link', 'mwlink', 'open', { supportedSelections: ['linear'] }
|
|
|
|
)
|
2014-05-31 04:47:08 +00:00
|
|
|
);
|
2013-12-20 23:25:24 +00:00
|
|
|
ve.ui.commandRegistry.register(
|
2014-11-04 22:10:28 +00:00
|
|
|
new ve.ui.Command(
|
|
|
|
'gallery', 'window', 'open',
|
|
|
|
{ args: ['gallery'], supportedSelections: ['linear'] }
|
|
|
|
)
|
2013-12-20 23:25:24 +00:00
|
|
|
);
|
|
|
|
ve.ui.commandRegistry.register(
|
2014-11-04 22:10:28 +00:00
|
|
|
new ve.ui.Command(
|
|
|
|
'media', 'window', 'open',
|
|
|
|
{ args: ['media'], supportedSelections: ['linear'] }
|
|
|
|
)
|
2014-04-02 23:29:04 +00:00
|
|
|
);
|
2013-12-20 23:25:24 +00:00
|
|
|
ve.ui.commandRegistry.register(
|
2014-11-04 22:10:28 +00:00
|
|
|
new ve.ui.Command(
|
|
|
|
'referencesList', 'window', 'open',
|
|
|
|
{ args: ['referencesList'], supportedSelections: ['linear'] }
|
|
|
|
)
|
2013-12-20 23:25:24 +00:00
|
|
|
);
|
|
|
|
ve.ui.commandRegistry.register(
|
2014-11-04 22:10:28 +00:00
|
|
|
new ve.ui.Command(
|
|
|
|
'reference', 'window', 'open',
|
|
|
|
{ args: ['reference'], supportedSelections: ['linear'] }
|
|
|
|
)
|
2013-12-20 23:25:24 +00:00
|
|
|
);
|
|
|
|
ve.ui.commandRegistry.register(
|
2014-11-04 22:10:28 +00:00
|
|
|
new ve.ui.Command(
|
|
|
|
'transclusion', 'window', 'open',
|
|
|
|
{ args: ['transclusion'], supportedSelections: ['linear'] }
|
|
|
|
)
|
2013-12-20 23:25:24 +00:00
|
|
|
);
|
|
|
|
ve.ui.commandRegistry.register(
|
2014-11-04 22:10:28 +00:00
|
|
|
new ve.ui.Command(
|
|
|
|
'alienExtension', 'window', 'open',
|
|
|
|
{ args: ['alienExtension'], supportedSelections: ['linear'] }
|
|
|
|
)
|
2013-12-20 23:25:24 +00:00
|
|
|
);
|
2014-04-02 23:29:04 +00:00
|
|
|
ve.ui.commandRegistry.register(
|
2014-11-04 22:10:28 +00:00
|
|
|
new ve.ui.Command(
|
|
|
|
'meta', 'window', 'open',
|
|
|
|
{ args: ['meta'] }
|
|
|
|
)
|
2014-04-02 23:29:04 +00:00
|
|
|
);
|
|
|
|
ve.ui.commandRegistry.register(
|
2014-11-04 22:10:28 +00:00
|
|
|
new ve.ui.Command(
|
|
|
|
'meta/settings', 'window', 'open',
|
|
|
|
{ args: [ 'meta', { page: 'settings' } ] }
|
|
|
|
)
|
2014-04-02 23:29:04 +00:00
|
|
|
);
|
|
|
|
ve.ui.commandRegistry.register(
|
2014-11-04 22:10:28 +00:00
|
|
|
new ve.ui.Command(
|
|
|
|
'meta/advanced', 'window', 'open',
|
|
|
|
{ args: [ 'meta', { page: 'advancedSettings' } ] }
|
|
|
|
)
|
2014-04-02 23:29:04 +00:00
|
|
|
);
|
|
|
|
ve.ui.commandRegistry.register(
|
2014-11-04 22:10:28 +00:00
|
|
|
new ve.ui.Command(
|
|
|
|
'meta/categories', 'window', 'open',
|
|
|
|
{ args: [ 'meta', { page: 'categories' } ] }
|
|
|
|
)
|
2014-04-02 23:29:04 +00:00
|
|
|
);
|
|
|
|
ve.ui.commandRegistry.register(
|
2014-11-04 22:10:28 +00:00
|
|
|
new ve.ui.Command(
|
|
|
|
'meta/languages', 'window', 'open',
|
|
|
|
{ args: [ 'meta', { page: 'languages' } ] }
|
|
|
|
)
|
2014-04-02 23:29:04 +00:00
|
|
|
);
|
|
|
|
ve.ui.commandRegistry.register(
|
2014-11-04 22:10:28 +00:00
|
|
|
new ve.ui.Command(
|
|
|
|
'heading1', 'format', 'convert',
|
|
|
|
{ args: [ 'mwHeading', { level: 1 } ], supportedSelections: ['linear'] }
|
|
|
|
)
|
2014-04-02 23:29:04 +00:00
|
|
|
);
|
|
|
|
ve.ui.commandRegistry.register(
|
2014-11-04 22:10:28 +00:00
|
|
|
new ve.ui.Command(
|
|
|
|
'heading2', 'format', 'convert',
|
|
|
|
{ args: [ 'mwHeading', { level: 2 } ], supportedSelections: ['linear'] }
|
|
|
|
)
|
2014-04-02 23:29:04 +00:00
|
|
|
);
|
|
|
|
ve.ui.commandRegistry.register(
|
2014-11-04 22:10:28 +00:00
|
|
|
new ve.ui.Command(
|
|
|
|
'heading3', 'format', 'convert',
|
|
|
|
{ args: [ 'mwHeading', { level: 3 } ], supportedSelections: ['linear'] }
|
|
|
|
)
|
2014-04-02 23:29:04 +00:00
|
|
|
);
|
|
|
|
ve.ui.commandRegistry.register(
|
2014-11-04 22:10:28 +00:00
|
|
|
new ve.ui.Command(
|
|
|
|
'heading4', 'format', 'convert',
|
|
|
|
{ args: [ 'mwHeading', { level: 4 } ], supportedSelections: ['linear'] }
|
|
|
|
)
|
2014-04-02 23:29:04 +00:00
|
|
|
);
|
|
|
|
ve.ui.commandRegistry.register(
|
2014-11-04 22:10:28 +00:00
|
|
|
new ve.ui.Command(
|
|
|
|
'heading5', 'format', 'convert',
|
|
|
|
{ args: [ 'mwHeading', { level: 5 } ], supportedSelections: ['linear'] }
|
|
|
|
)
|
2014-04-02 23:29:04 +00:00
|
|
|
);
|
|
|
|
ve.ui.commandRegistry.register(
|
2014-11-04 22:10:28 +00:00
|
|
|
new ve.ui.Command(
|
|
|
|
'heading6', 'format', 'convert',
|
|
|
|
{ args: [ 'mwHeading', { level: 6 } ], supportedSelections: ['linear'] }
|
|
|
|
)
|
2014-04-02 23:29:04 +00:00
|
|
|
);
|
|
|
|
ve.ui.commandRegistry.register(
|
2014-11-04 22:10:28 +00:00
|
|
|
new ve.ui.Command(
|
|
|
|
'preformatted', 'format', 'convert',
|
|
|
|
{ args: [ 'mwPreformatted' ], supportedSelections: ['linear'] }
|
|
|
|
)
|
2014-04-02 23:29:04 +00:00
|
|
|
);
|
2014-10-27 14:26:47 +00:00
|
|
|
ve.ui.commandRegistry.register(
|
2014-11-04 22:10:28 +00:00
|
|
|
new ve.ui.Command( 'insertTable', 'table', 'create',
|
|
|
|
{
|
|
|
|
args: [ {
|
|
|
|
header: true,
|
|
|
|
rows: 3,
|
|
|
|
cols: 4,
|
|
|
|
type: 'mwTable',
|
|
|
|
attributes: { wikitable: true }
|
|
|
|
} ],
|
|
|
|
supportedSelections: ['linear']
|
|
|
|
}
|
|
|
|
)
|
2014-10-27 14:26:47 +00:00
|
|
|
);
|