Merge "Add keyboard shortcut for 'clear' button"

This commit is contained in:
jenkins-bot 2013-07-30 00:51:19 +00:00 committed by Gerrit Code Review
commit 40e712985c
4 changed files with 9 additions and 3 deletions

View file

@ -174,7 +174,7 @@ ve.init.mw.ViewPageTarget.static.toolbarTools = [
]; ];
ve.init.mw.ViewPageTarget.static.surfaceCommands = [ ve.init.mw.ViewPageTarget.static.surfaceCommands = [
'bold', 'italic', 'mwLink', 'undo', 'redo', 'indent', 'outdent' 'bold', 'italic', 'mwLink', 'undo', 'redo', 'indent', 'outdent', 'clear'
]; ];
// TODO: Accessibility tooltips and logical tab order for prevButton and closeButton. // TODO: Accessibility tooltips and logical tab order for prevButton and closeButton.

View file

@ -39,7 +39,7 @@ ve.ui.MWMediaEditDialog.static.toolbarTools = [
]; ];
ve.ui.MWMediaEditDialog.static.surfaceCommands = [ ve.ui.MWMediaEditDialog.static.surfaceCommands = [
'bold', 'italic', 'mwLink', 'undo', 'redo' 'bold', 'italic', 'mwLink', 'undo', 'redo', 'clear'
]; ];
/* Methods */ /* Methods */

View file

@ -39,7 +39,7 @@ ve.ui.MWReferenceDialog.static.toolbarTools = [
]; ];
ve.ui.MWReferenceDialog.static.surfaceCommands = [ ve.ui.MWReferenceDialog.static.surfaceCommands = [
'bold', 'italic', 'mwLink', 'undo', 'redo' 'bold', 'italic', 'mwLink', 'undo', 'redo', 'clear'
]; ];
/* Methods */ /* Methods */

View file

@ -60,3 +60,9 @@ ve.ui.ClearButtonTool.prototype.onUpdateState = function ( nodes, full, partial
/* Registration */ /* Registration */
ve.ui.toolFactory.register( 'clear', ve.ui.ClearButtonTool ); ve.ui.toolFactory.register( 'clear', ve.ui.ClearButtonTool );
ve.ui.commandRegistry.register( 'clear', 'annotation', 'clearAll' );
ve.ui.triggerRegistry.register(
'clear', { 'mac': new ve.ui.Trigger( 'cmd+\\' ), 'pc': new ve.ui.Trigger( 'ctrl+\\' ) }
);