From e7be4f5ba76c70fd4bac3fda726abec7dca1441b Mon Sep 17 00:00:00 2001 From: Roan Kattouw Date: Wed, 19 Mar 2014 19:31:41 -0700 Subject: [PATCH] Minor fixes for VE Math code * Update MWMathInspectorTool for deferMsg refactor * Update ce.MWMathNode to add primaryCommandName Change-Id: I344e3ef498c504d07b1f42954ab44b82ed3c0a50 --- modules/VisualEditor/ve.ce.MWMathNode.js | 3 +++ modules/VisualEditor/ve.ui.MWMathInspectorTool.js | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/modules/VisualEditor/ve.ce.MWMathNode.js b/modules/VisualEditor/ve.ce.MWMathNode.js index bf529dd..d5dd2ed 100644 --- a/modules/VisualEditor/ve.ce.MWMathNode.js +++ b/modules/VisualEditor/ve.ce.MWMathNode.js @@ -29,10 +29,13 @@ ve.ce.MWMathNode = function VeCeMWMathNode( model, config ) { OO.inheritClass( ve.ce.MWMathNode, ve.ce.MWExtensionNode ); + /* Static Properties */ ve.ce.MWMathNode.static.name = 'mwMath'; +ve.ce.MWMathNode.static.primaryCommandName = 'math'; + /* Methods */ /** */ diff --git a/modules/VisualEditor/ve.ui.MWMathInspectorTool.js b/modules/VisualEditor/ve.ui.MWMathInspectorTool.js index 3e1e66a..1cfbc43 100644 --- a/modules/VisualEditor/ve.ui.MWMathInspectorTool.js +++ b/modules/VisualEditor/ve.ui.MWMathInspectorTool.js @@ -23,7 +23,8 @@ OO.inheritClass( ve.ui.MWMathInspectorTool, ve.ui.InspectorTool ); ve.ui.MWMathInspectorTool.static.name = 'math'; ve.ui.MWMathInspectorTool.static.group = 'object'; ve.ui.MWMathInspectorTool.static.icon = 'math'; -ve.ui.MWMathInspectorTool.static.titleMessage = 'math-visualeditor-mwmathinspector-title'; +ve.ui.MWMathInspectorTool.static.title = OO.ui.deferMsg( + 'math-visualeditor-mwmathinspector-title' ); ve.ui.MWMathInspectorTool.static.inspector = 'math'; ve.ui.MWMathInspectorTool.static.modelClasses = [ ve.dm.MWMathNode ]; ve.ui.toolFactory.register( ve.ui.MWMathInspectorTool );