mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-24 06:24:08 +00:00
MobileCollabTarget: Cleanup toolbar
Change-Id: I4b2e21ce61cb647ca6a74bdbdd8def614ed41341
This commit is contained in:
parent
3285b7dbe5
commit
47af04b8d9
|
@ -136,10 +136,15 @@ ve.init.mw.targetFactory.register( ve.init.mw.CollabTarget );
|
|||
ve.ui.MWExportTool = function VeUiMWExportTool() {
|
||||
// Parent constructor
|
||||
ve.ui.MWExportTool.super.apply( this, arguments );
|
||||
|
||||
if ( OO.ui.isMobile() ) {
|
||||
this.setIcon( 'upload' );
|
||||
this.setTitle( null );
|
||||
}
|
||||
};
|
||||
OO.inheritClass( ve.ui.MWExportTool, ve.ui.Tool );
|
||||
ve.ui.MWExportTool.static.name = 'export';
|
||||
ve.ui.MWExportTool.static.displayBothIconAndLabel = true;
|
||||
ve.ui.MWExportTool.static.displayBothIconAndLabel = !OO.ui.isMobile();
|
||||
ve.ui.MWExportTool.static.group = 'export';
|
||||
ve.ui.MWExportTool.static.autoAddToCatchall = false;
|
||||
ve.ui.MWExportTool.static.flags = [ 'progressive', 'primary' ];
|
||||
|
|
|
@ -33,10 +33,59 @@ OO.inheritClass( ve.init.mw.MobileCollabTarget, ve.init.mw.CollabTarget );
|
|||
|
||||
/* Static Properties */
|
||||
|
||||
ve.init.mw.MobileCollabTarget.static.toolbarGroups = [
|
||||
// History
|
||||
{
|
||||
name: 'history',
|
||||
include: [ 'undo' ]
|
||||
},
|
||||
// Style
|
||||
{
|
||||
name: 'style',
|
||||
classes: [ 've-test-toolbar-style' ],
|
||||
type: 'list',
|
||||
icon: 'textStyle',
|
||||
title: OO.ui.deferMsg( 'visualeditor-toolbar-style-tooltip' ),
|
||||
include: [ { group: 'textStyle' }, 'language', 'clear' ],
|
||||
forceExpand: [ 'bold', 'italic', 'clear' ],
|
||||
promote: [ 'bold', 'italic' ],
|
||||
demote: [ 'strikethrough', 'code', 'underline', 'language', 'clear' ]
|
||||
},
|
||||
// Link
|
||||
{
|
||||
name: 'link',
|
||||
include: [ 'link' ]
|
||||
},
|
||||
{
|
||||
name: 'commentAnnotation',
|
||||
include: [ 'commentAnnotation' ]
|
||||
},
|
||||
// Placeholder for reference tools (e.g. Cite and/or Citoid)
|
||||
{
|
||||
name: 'reference'
|
||||
},
|
||||
{
|
||||
name: 'insert',
|
||||
header: OO.ui.deferMsg( 'visualeditor-toolbar-insert' ),
|
||||
title: OO.ui.deferMsg( 'visualeditor-toolbar-insert' ),
|
||||
type: 'list',
|
||||
icon: 'add',
|
||||
label: '',
|
||||
include: '*',
|
||||
exclude: [ 'comment', 'indent', 'outdent', { group: 'format' } ]
|
||||
}
|
||||
// "Done" tool is added in setupToolbar as it not part of the
|
||||
// standard config (i.e. shouldn't be inhertied by TargetWidget)
|
||||
];
|
||||
|
||||
ve.init.mw.MobileCollabTarget.static.actionGroups = [
|
||||
{
|
||||
name: 'authorList',
|
||||
include: [ 'authorList' ]
|
||||
},
|
||||
{
|
||||
name: 'export',
|
||||
include: [ 'export' ]
|
||||
}
|
||||
];
|
||||
|
||||
|
|
|
@ -49,7 +49,8 @@ ve.init.mw.MobileArticleTarget.static.toolbarGroups = [
|
|||
// History
|
||||
{
|
||||
name: 'history',
|
||||
include: [ 'undo' ] },
|
||||
include: [ 'undo' ]
|
||||
},
|
||||
// Style
|
||||
{
|
||||
name: 'style',
|
||||
|
|
Loading…
Reference in a new issue