From af1a91ade925ed96daf48e2fe584058813ded08f Mon Sep 17 00:00:00 2001 From: Ed Sanders Date: Tue, 20 Mar 2018 17:19:10 +0000 Subject: [PATCH] Use OOUI 'markup' icon instead of VE's deprecated 'alienextension' Change-Id: Iad1882c20c17792c1339cf9922b9c4c43bf6122b --- includes/SyntaxHighlight.php | 3 ++- .../ve-syntaxhighlight/ve.ui.MWSyntaxHighlightDialogTool.js | 2 +- .../ve-syntaxhighlight/ve.ui.MWSyntaxHighlightInspectorTool.js | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/includes/SyntaxHighlight.php b/includes/SyntaxHighlight.php index bc34998d..076efe1e 100644 --- a/includes/SyntaxHighlight.php +++ b/includes/SyntaxHighlight.php @@ -515,7 +515,7 @@ class SyntaxHighlight { * @param ResourceLoader &$resourceLoader */ public static function onResourceLoaderRegisterModules( &$resourceLoader ) { - if ( ! ExtensionRegistry::getInstance()->isLoaded( 'VisualEditor' ) ) { + if ( !ExtensionRegistry::getInstance()->isLoaded( 'VisualEditor' ) ) { return; } @@ -539,6 +539,7 @@ class SyntaxHighlight { ], 'dependencies' => [ 'ext.visualEditor.mwcore', + 'oojs-ui.styles.icons-editing-advanced' ], 'messages' => [ 'syntaxhighlight-visualeditor-mwsyntaxhighlightinspector-code', diff --git a/modules/ve-syntaxhighlight/ve.ui.MWSyntaxHighlightDialogTool.js b/modules/ve-syntaxhighlight/ve.ui.MWSyntaxHighlightDialogTool.js index dbc75169..e91e35f4 100644 --- a/modules/ve-syntaxhighlight/ve.ui.MWSyntaxHighlightDialogTool.js +++ b/modules/ve-syntaxhighlight/ve.ui.MWSyntaxHighlightDialogTool.js @@ -20,7 +20,7 @@ ve.ui.MWSyntaxHighlightDialogTool = function VeUiMWSyntaxHighlightDialogTool() { OO.inheritClass( ve.ui.MWSyntaxHighlightDialogTool, ve.ui.FragmentWindowTool ); ve.ui.MWSyntaxHighlightDialogTool.static.name = 'syntaxhighlightDialog'; ve.ui.MWSyntaxHighlightDialogTool.static.group = 'object'; -ve.ui.MWSyntaxHighlightDialogTool.static.icon = 'alienextension'; +ve.ui.MWSyntaxHighlightDialogTool.static.icon = 'markup'; ve.ui.MWSyntaxHighlightDialogTool.static.title = OO.ui.deferMsg( 'syntaxhighlight-visualeditor-mwsyntaxhighlightinspector-title' ); ve.ui.MWSyntaxHighlightDialogTool.static.modelClasses = [ ve.dm.MWBlockSyntaxHighlightNode ]; diff --git a/modules/ve-syntaxhighlight/ve.ui.MWSyntaxHighlightInspectorTool.js b/modules/ve-syntaxhighlight/ve.ui.MWSyntaxHighlightInspectorTool.js index 2eb42d6d..47e26f16 100644 --- a/modules/ve-syntaxhighlight/ve.ui.MWSyntaxHighlightInspectorTool.js +++ b/modules/ve-syntaxhighlight/ve.ui.MWSyntaxHighlightInspectorTool.js @@ -20,7 +20,7 @@ ve.ui.MWSyntaxHighlightInspectorTool = function VeUiMWSyntaxHighlightInspectorTo OO.inheritClass( ve.ui.MWSyntaxHighlightInspectorTool, ve.ui.FragmentInspectorTool ); ve.ui.MWSyntaxHighlightInspectorTool.static.name = 'syntaxhighlightInspector'; ve.ui.MWSyntaxHighlightInspectorTool.static.group = 'object'; -ve.ui.MWSyntaxHighlightInspectorTool.static.icon = 'alienextension'; +ve.ui.MWSyntaxHighlightInspectorTool.static.icon = 'markup'; ve.ui.MWSyntaxHighlightInspectorTool.static.title = OO.ui.deferMsg( 'syntaxhighlight-visualeditor-mwsyntaxhighlightinspector-title' ); ve.ui.MWSyntaxHighlightInspectorTool.static.modelClasses = [ ve.dm.MWInlineSyntaxHighlightNode ];