mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-28 16:20:52 +00:00
Merge "CollabTarget: Minimise dependencies, and make toolbar tweaks"
This commit is contained in:
commit
2bc46f93d3
|
@ -431,12 +431,27 @@
|
|||
"scripts": [
|
||||
"modules/ve-mw-collab/ve.init.mw.CollabTarget.js"
|
||||
],
|
||||
"styles": [
|
||||
"modules/ve-mw/init/styles/ve.init.mw.ArticleTarget.css",
|
||||
"modules/ve-mw/init/styles/ve.init.mw.DesktopArticleTarget.css"
|
||||
],
|
||||
"skinStyles": {
|
||||
"vector": [
|
||||
"modules/ve-mw/init/styles/ve.init.mw.DesktopArticleTarget-vector.css"
|
||||
],
|
||||
"apex": [
|
||||
"modules/ve-mw/init/styles/ve.init.mw.DesktopArticleTarget-apex.css"
|
||||
],
|
||||
"monobook": [
|
||||
"modules/ve-mw/init/styles/ve.init.mw.DesktopArticleTarget-monobook.css"
|
||||
]
|
||||
},
|
||||
"dependencies": [
|
||||
"ext.visualEditor.base",
|
||||
"ext.visualEditor.mediawiki",
|
||||
"ext.visualEditor.core.desktop",
|
||||
"ext.visualEditor.mwextensions.desktop",
|
||||
"ext.visualEditor.desktopArticleTarget"
|
||||
"ext.visualEditor.desktopTarget"
|
||||
]
|
||||
},
|
||||
"ext.visualEditor.collabTarget.init": {
|
||||
|
|
|
@ -48,6 +48,14 @@ ve.init.mw.CollabTarget.static.name = 'collab';
|
|||
ve.init.mw.CollabTarget.static.trackingName = 'collab';
|
||||
|
||||
ve.init.mw.CollabTarget.static.actionGroups = [
|
||||
{ include: [ 'help' ] },
|
||||
{
|
||||
type: 'list',
|
||||
icon: 'menu',
|
||||
indicator: null,
|
||||
title: ve.msg( 'visualeditor-pagemenu-tooltip' ),
|
||||
include: [ 'changeDirectionality', 'findAndReplace' ]
|
||||
},
|
||||
{ include: [ 'authorList' ] }
|
||||
];
|
||||
|
||||
|
@ -85,19 +93,19 @@ ve.init.mw.CollabTarget.prototype.attachToolbar = function () {
|
|||
've-init-mw-desktopArticleTarget-toolbar ve-init-mw-desktopArticleTarget-toolbar-open ve-init-mw-desktopArticleTarget-toolbar-opened'
|
||||
);
|
||||
this.$element.prepend( this.toolbar.$element );
|
||||
this.toolbar.initialize();
|
||||
};
|
||||
|
||||
/**
|
||||
* @inheritdoc
|
||||
*/
|
||||
ve.init.mw.CollabTarget.prototype.setSurface = function ( surface ) {
|
||||
var synchronizer, surfaceView, toolbar;
|
||||
var synchronizer, surfaceView;
|
||||
|
||||
if ( surface !== this.surface ) {
|
||||
this.$editableContent.after( surface.$element );
|
||||
|
||||
surfaceView = surface.getView();
|
||||
toolbar = this.getToolbar();
|
||||
|
||||
synchronizer = new ve.dm.SurfaceSynchronizer(
|
||||
surface.getModel(),
|
||||
|
@ -105,7 +113,6 @@ ve.init.mw.CollabTarget.prototype.setSurface = function ( surface ) {
|
|||
{ server: this.rebaserUrl }
|
||||
);
|
||||
|
||||
toolbar.initialize();
|
||||
surfaceView.setSynchronizer( synchronizer );
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue