From e2b5e2a1bb40e78ced7de672c943dc3b852a796c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartosz=20Dziewo=C5=84ski?= Date: Thu, 15 Jun 2023 20:06:21 +0000 Subject: [PATCH] Revert "Targets: Use align:'after' instead of actionGroups" This reverts commit 45a60e3fb203d8a8cd22a6dfeff4ab492bfb172f. Bug: T339292 Change-Id: Ifefdf36370ff0de87218f390e5e21d2800a81ebd --- modules/ve-mw-collab/ve.init.mw.CollabTarget.js | 15 ++++++--------- .../ve-mw-collab/ve.init.mw.MobileCollabTarget.js | 2 ++ .../targets/ve.init.mw.DesktopArticleTarget.js | 9 ++------- 3 files changed, 10 insertions(+), 16 deletions(-) diff --git a/modules/ve-mw-collab/ve.init.mw.CollabTarget.js b/modules/ve-mw-collab/ve.init.mw.CollabTarget.js index 84d2548eeb..678355b833 100644 --- a/modules/ve-mw-collab/ve.init.mw.CollabTarget.js +++ b/modules/ve-mw-collab/ve.init.mw.CollabTarget.js @@ -66,15 +66,17 @@ ve.init.mw.CollabTarget.static.toolbarGroups.splice( 4, 0, { ve.init.mw.CollabTarget.static.toolbarGroups = ve.init.mw.CollabTarget.static.toolbarGroups.filter( function ( group ) { return group.name !== 'reference'; } ); -ve.init.mw.CollabTarget.static.toolbarGroups.push( + +ve.init.mw.CollabTarget.static.importRules = ve.copy( ve.init.mw.CollabTarget.static.importRules ); +ve.init.mw.CollabTarget.static.importRules.external.blacklist[ 'link/mwExternal' ] = false; + +ve.init.mw.CollabTarget.static.actionGroups = [ { name: 'help', - align: 'after', include: [ 'help' ] }, { name: 'pageMenu', - align: 'after', type: 'list', icon: 'menu', indicator: null, @@ -85,18 +87,13 @@ ve.init.mw.CollabTarget.static.toolbarGroups.push( }, { name: 'authorList', - align: 'after', include: [ 'authorList' ] }, { name: 'export', - align: 'after', include: [ 'export' ] } -); - -ve.init.mw.CollabTarget.static.importRules = ve.copy( ve.init.mw.CollabTarget.static.importRules ); -ve.init.mw.CollabTarget.static.importRules.external.blacklist[ 'link/mwExternal' ] = false; +]; /* Methods */ diff --git a/modules/ve-mw-collab/ve.init.mw.MobileCollabTarget.js b/modules/ve-mw-collab/ve.init.mw.MobileCollabTarget.js index 8a7620f34b..c741861f35 100644 --- a/modules/ve-mw-collab/ve.init.mw.MobileCollabTarget.js +++ b/modules/ve-mw-collab/ve.init.mw.MobileCollabTarget.js @@ -89,6 +89,8 @@ ve.init.mw.MobileCollabTarget.static.toolbarGroups = [ } ]; +ve.init.mw.MobileCollabTarget.static.actionGroups = []; + /* Methods */ /** diff --git a/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.js b/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.js index 76127a3b8a..378a78d92c 100644 --- a/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.js +++ b/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.js @@ -88,16 +88,13 @@ OO.inheritClass( ve.init.mw.DesktopArticleTarget, ve.init.mw.ArticleTarget ); /* Static Properties */ -ve.init.mw.DesktopArticleTarget.static.toolbarGroups = ve.copy( ve.init.mw.DesktopArticleTarget.static.toolbarGroups ); -ve.init.mw.DesktopArticleTarget.static.toolbarGroups.push( +ve.init.mw.DesktopArticleTarget.static.actionGroups = [ { name: 'help', - align: 'after', include: [ 'help', 'notices' ] }, { name: 'pageMenu', - align: 'after', type: 'list', icon: 'menu', indicator: null, @@ -108,7 +105,6 @@ ve.init.mw.DesktopArticleTarget.static.toolbarGroups.push( }, { name: 'editMode', - align: 'after', type: 'list', icon: 'edit', title: ve.msg( 'visualeditor-mweditmode-tooltip' ), @@ -118,11 +114,10 @@ ve.init.mw.DesktopArticleTarget.static.toolbarGroups.push( }, { name: 'save', - align: 'after', type: 'bar', include: [ 'showSave' ] } -); +]; /** * Compatibility map used with jQuery.client to decide if a browser should