mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-30 17:14:42 +00:00
Move 'done' tool out of static config
Bug: T206132 Change-Id: I3319fc56209cab303448f7abe1e6334c50100947
This commit is contained in:
parent
3f1626c4f9
commit
e176ecceae
|
@ -61,12 +61,9 @@ ve.init.mw.MobileArticleTarget.static.toolbarGroups = [
|
|||
// Placeholder for reference tools (e.g. Cite and/or Citoid)
|
||||
{
|
||||
name: 'reference'
|
||||
},
|
||||
// Done with editing toolbar
|
||||
{
|
||||
name: 'done',
|
||||
include: [ 'done' ]
|
||||
}
|
||||
// "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.MobileArticleTarget.static.trackingName = 'mobile';
|
||||
|
@ -154,6 +151,17 @@ ve.init.mw.MobileArticleTarget.prototype.setupToolbar = function ( surface ) {
|
|||
// Parent method
|
||||
ve.init.mw.MobileArticleTarget.super.prototype.setupToolbar.call( this, surface );
|
||||
|
||||
this.getToolbar().setup(
|
||||
this.constructor.static.toolbarGroups.concat( [
|
||||
// Done with editing toolbar
|
||||
{
|
||||
name: 'done',
|
||||
include: [ 'done' ]
|
||||
}
|
||||
] ),
|
||||
surface
|
||||
);
|
||||
|
||||
this.toolbar.$element.addClass( 've-init-mw-mobileArticleTarget-toolbar' );
|
||||
// Append the context to the toolbar
|
||||
this.toolbar.$bar.append( surface.getContext().$element );
|
||||
|
@ -305,6 +313,7 @@ ve.ui.MWDoneTool = function VeUiMWDoneTool() {
|
|||
OO.inheritClass( ve.ui.MWDoneTool, ve.ui.Tool );
|
||||
ve.ui.MWDoneTool.static.name = 'done';
|
||||
ve.ui.MWDoneTool.static.group = 'navigation';
|
||||
ve.ui.MWDoneTool.static.group.autoAddToCatchall = false;
|
||||
ve.ui.MWDoneTool.static.icon = 'check';
|
||||
ve.ui.MWDoneTool.static.title =
|
||||
OO.ui.deferMsg( 'visualeditor-donebutton-tooltip' );
|
||||
|
|
Loading…
Reference in a new issue