mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-23 22:13:34 +00:00
Merge mobile and desktop save buttons
Use toolbar groups where appropriate. Change-Id: If4e0d157f04ba741ed4cf891e4183fe351d537b8
This commit is contained in:
parent
2a1076e295
commit
4f90ce2594
|
@ -476,15 +476,15 @@ ve.init.mw.MobileArticleTarget.prototype.setupToolbar = function ( surface ) {
|
|||
name: 'editMode',
|
||||
type: 'list',
|
||||
icon: 'edit',
|
||||
title: OO.ui.deferMsg( 'visualeditor-mweditmode-tooltip' ),
|
||||
label: OO.ui.deferMsg( 'visualeditor-mweditmode-tooltip' ),
|
||||
title: ve.msg( 'visualeditor-mweditmode-tooltip' ),
|
||||
label: ve.msg( 'visualeditor-mweditmode-tooltip' ),
|
||||
invisibleLabel: true,
|
||||
include: [ 'editModeVisual', 'editModeSource' ]
|
||||
include: [ { group: 'editMode' } ]
|
||||
},
|
||||
{
|
||||
name: 'save',
|
||||
type: 'bar',
|
||||
include: [ 'showMobileSave' ]
|
||||
include: [ 'showSave' ]
|
||||
}
|
||||
]
|
||||
);
|
||||
|
@ -532,17 +532,3 @@ ve.init.mw.MobileArticleTarget.prototype.done = function () {
|
|||
/* Registration */
|
||||
|
||||
ve.init.mw.targetFactory.register( ve.init.mw.MobileArticleTarget );
|
||||
|
||||
/**
|
||||
* Mobile save tool
|
||||
*/
|
||||
ve.ui.MWMobileSaveTool = function VeUiMWMobileSaveTool() {
|
||||
// Parent Constructor
|
||||
ve.ui.MWMobileSaveTool.super.apply( this, arguments );
|
||||
};
|
||||
OO.inheritClass( ve.ui.MWMobileSaveTool, ve.ui.MWSaveTool );
|
||||
ve.ui.MWMobileSaveTool.static.name = 'showMobileSave';
|
||||
ve.ui.MWMobileSaveTool.static.icon = 'next';
|
||||
ve.ui.MWMobileSaveTool.static.displayBothIconAndLabel = false;
|
||||
|
||||
ve.ui.toolFactory.register( ve.ui.MWMobileSaveTool );
|
||||
|
|
|
@ -44,6 +44,11 @@ ve.ui.MWSaveTool.static.group = 'save';
|
|||
ve.ui.MWSaveTool.static.fallbackIcon = 'next';
|
||||
ve.ui.MWSaveTool.static.commandName = 'showSave';
|
||||
ve.ui.MWSaveTool.static.autoAddToCatchall = false;
|
||||
if ( OO.ui.isMobile() ) {
|
||||
// TODO: Have the mobile target build an icon-only version automatically.
|
||||
ve.ui.MWSaveTool.static.icon = 'next';
|
||||
ve.ui.MWSaveTool.static.displayBothIconAndLabel = false;
|
||||
}
|
||||
|
||||
/* Methods */
|
||||
|
||||
|
|
Loading…
Reference in a new issue