Use the same new toolbar for media and reference dialogs

With blocks comment out where they're not wanted.

Bonus: Actually make the pasteSpecial command available in these
contexts.

Bug: 58404
Change-Id: Ic77c252ddc9ae54019b2d86ee5f8a6f4febf4292
This commit is contained in:
James D. Forrester 2013-12-12 11:04:15 -08:00 committed by Jforrester
parent 46c708df2f
commit 00088bbf05
2 changed files with 80 additions and 13 deletions

View file

@ -37,21 +37,51 @@ ve.ui.MWMediaEditDialog.static.titleMessage = 'visualeditor-dialog-media-title';
ve.ui.MWMediaEditDialog.static.icon = 'picture';
ve.ui.MWMediaEditDialog.static.toolbarGroups = [
// History
{ 'include': [ 'undo', 'redo' ] },
{ 'include': [ 'bold', 'italic', 'link', 'clear' ] },
// No formatting
/* {
'type': 'menu',
'include': [ { 'group': 'format' } ],
'promote': [ 'paragraph' ],
'demote': [ 'preformatted', 'heading1' ]
},*/
// Style
{
'type': 'list',
'icon': 'text-style',
'include': [ { 'group': 'textStyle' }, 'clear' ],
'promote': [ 'bold', 'italic' ],
'demote': [ 'strikethrough', 'code', 'underline', 'clear' ]
},
// Link
{ 'include': [ 'link' ] },
// No structure
/* {
'type': 'bar',
'include': [ 'number', 'bullet', 'outdent', 'indent' ]
},*/
// Insert
{
'include': '*',
'exclude': [
{ 'group': 'format' },
{ 'group': 'structure' },
'referenceList'
]
'exclude': [ { 'group': 'format' }, { 'group': 'structure' }, 'referenceList' ],
'label': 'visualeditor-toolbar-insert',
'demote': [ 'specialcharacter' ]
}
];
ve.ui.MWMediaEditDialog.static.surfaceCommands = [
'undo', 'redo', 'bold', 'italic', 'link', 'clear',
'underline', 'subscript', 'superscript'
'undo',
'redo',
'bold',
'italic',
'link',
'clear',
'underline',
'subscript',
'superscript',
'pasteSpecial'
];
/* Methods */

View file

@ -36,15 +36,52 @@ ve.ui.MWReferenceDialog.static.titleMessage = 'visualeditor-dialog-reference-tit
ve.ui.MWReferenceDialog.static.icon = 'reference';
ve.ui.MWReferenceDialog.static.toolbarGroups = [
// History
{ 'include': [ 'undo', 'redo' ] },
{ 'include': [ 'bold', 'italic', 'link', 'clear' ] },
{ 'include': [ 'number', 'bullet', 'outdent', 'indent' ] },
{ 'include': '*', 'exclude': [ { 'group': 'format' }, 'reference', 'referenceList' ] }
// No formatting
/* {
'type': 'menu',
'include': [ { 'group': 'format' } ],
'promote': [ 'paragraph' ],
'demote': [ 'preformatted', 'heading1' ]
},*/
// Style
{
'type': 'list',
'icon': 'text-style',
'include': [ { 'group': 'textStyle' }, 'clear' ],
'promote': [ 'bold', 'italic' ],
'demote': [ 'strikethrough', 'code', 'underline', 'clear' ]
},
// Link
{ 'include': [ 'link' ] },
// Structure
{
'type': 'bar',
'include': [ 'number', 'bullet', 'outdent', 'indent' ]
},
// Insert
{
'include': '*',
'exclude': [ { 'group': 'format' }, 'reference', 'referenceList' ],
'label': 'visualeditor-toolbar-insert',
'demote': [ 'specialcharacter' ]
}
];
ve.ui.MWReferenceDialog.static.surfaceCommands = [
'undo', 'redo', 'bold', 'italic', 'link', 'clear',
'underline', 'subscript', 'superscript'
'undo',
'redo',
'bold',
'italic',
'link',
'clear',
'underline',
'subscript',
'superscript',
'indent',
'outdent',
'pasteSpecial'
];
/* Methods */