diff --git a/VisualEditor.php b/VisualEditor.php index 15af055c27..501dd6c1d3 100644 --- a/VisualEditor.php +++ b/VisualEditor.php @@ -1030,7 +1030,7 @@ $wgResourceModules += array( 'targets' => array( 'desktop', 'mobile' ), ), - 'ext.visualEditor.mwreference' => $wgVisualEditorResourceTemplate + array( + 'ext.visualEditor.mwreference.core' => $wgVisualEditorResourceTemplate + array( 'scripts' => array( 'modules/ve-mw/dm/models/ve.dm.MWReferenceModel.js', @@ -1039,7 +1039,24 @@ $wgResourceModules += array( 'modules/ve-mw/ce/nodes/ve.ce.MWReferenceListNode.js', 'modules/ve-mw/ce/nodes/ve.ce.MWReferenceNode.js', + ), + 'styles' => array( + 'modules/ve-mw/ce/styles/nodes/ve.ce.MWReferenceListNode.css', + 'modules/ve-mw/ce/styles/nodes/ve.ce.MWReferenceNode.css', + ), + 'dependencies' => array( + 'ext.visualEditor.mwcore', + ), + 'messages' => array( + 'visualeditor-referencelist-isempty', + 'visualeditor-referencelist-isempty-default', + 'visualeditor-referencelist-missingref', + ), + 'targets' => array( 'desktop', 'mobile' ) + ), + 'ext.visualEditor.mwreference' => $wgVisualEditorResourceTemplate + array( + 'scripts' => array( 'modules/ve-mw/ui/widgets/ve.ui.MWReferenceSearchWidget.js', 'modules/ve-mw/ui/widgets/ve.ui.MWReferenceResultWidget.js', @@ -1051,13 +1068,11 @@ $wgResourceModules += array( 'modules/ve-mw/ui/tools/ve.ui.MWCitationDialogTool.js', ), 'styles' => array( - 'modules/ve-mw/ce/styles/nodes/ve.ce.MWReferenceListNode.css', - 'modules/ve-mw/ce/styles/nodes/ve.ce.MWReferenceNode.css', 'modules/ve-mw/ui/styles/widgets/ve.ui.MWReferenceResultWidget.css', 'modules/ve-mw/ui/styles/widgets/ve.ui.MWReferenceSearchWidget.css', ), 'dependencies' => array( - 'ext.visualEditor.mwcore', + 'ext.visualEditor.mwreference.core', 'ext.visualEditor.mwtransclusion', ), 'messages' => array( @@ -1075,19 +1090,26 @@ $wgResourceModules += array( 'visualeditor-dialogbutton-reference-tooltip', 'visualeditor-dialogbutton-referencelist-tooltip', 'visualeditor-reference-input-placeholder', - 'visualeditor-referencelist-isempty', - 'visualeditor-referencelist-isempty-default', - 'visualeditor-referencelist-missingref', + ), + 'targets' => array( 'desktop', 'mobile' ), + ), + + 'ext.visualEditor.mwtransclusion.core' => $wgVisualEditorResourceTemplate + array( + 'scripts' => array( + 'modules/ve-mw/dm/nodes/ve.dm.MWTransclusionNode.js', + + 'modules/ve-mw/dm/metaitems/ve.dm.MWTransclusionMetaItem.js', + + 'modules/ve-mw/ce/nodes/ve.ce.MWTransclusionNode.js', + ), + 'dependencies' => array( + 'ext.visualEditor.mwcore', ), 'targets' => array( 'desktop', 'mobile' ), ), 'ext.visualEditor.mwtransclusion' => $wgVisualEditorResourceTemplate + array( 'scripts' => array( - 'modules/ve-mw/dm/nodes/ve.dm.MWTransclusionNode.js', - - 'modules/ve-mw/dm/metaitems/ve.dm.MWTransclusionMetaItem.js', - 'modules/ve-mw/dm/models/ve.dm.MWTransclusionModel.js', 'modules/ve-mw/dm/models/ve.dm.MWTransclusionPartModel.js', 'modules/ve-mw/dm/models/ve.dm.MWTransclusionContentModel.js', @@ -1096,8 +1118,6 @@ $wgResourceModules += array( 'modules/ve-mw/dm/models/ve.dm.MWTemplatePlaceholderModel.js', 'modules/ve-mw/dm/models/ve.dm.MWParameterModel.js', - 'modules/ve-mw/ce/nodes/ve.ce.MWTransclusionNode.js', - 'modules/ve-mw/ui/widgets/ve.ui.MWParameterSearchWidget.js', 'modules/ve-mw/ui/widgets/ve.ui.MWParameterResultWidget.js', 'modules/ve-mw/ui/widgets/ve.ui.MWMoreParametersResultWidget.js', @@ -1133,7 +1153,7 @@ $wgResourceModules += array( ), ), 'dependencies' => array( - 'ext.visualEditor.mwcore', + 'ext.visualEditor.mwtransclusion.core', 'mediawiki.jqueryMsg', ), 'messages' => array( diff --git a/modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.js b/modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.js index c07cd9ff3b..9587cba420 100644 --- a/modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.js +++ b/modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.js @@ -71,6 +71,7 @@ ve.init.mw.ViewPageTarget = function VeInitMwViewPageTarget() { 'ext.visualEditor.mwgallery', 'ext.visualEditor.mwimage', 'ext.visualEditor.mwmeta', + 'ext.visualEditor.mwreference', 'ext.visualEditor.mwtransclusion' ); diff --git a/modules/ve-mw/init/ve.init.mw.Target.js b/modules/ve-mw/init/ve.init.mw.Target.js index 0bbb815b86..8d1086f311 100644 --- a/modules/ve-mw/init/ve.init.mw.Target.js +++ b/modules/ve-mw/init/ve.init.mw.Target.js @@ -44,7 +44,8 @@ ve.init.mw.Target = function VeInitMwTarget( $container, pageName, revisionId ) 'ext.visualEditor.mwcore', 'ext.visualEditor.mwlink', 'ext.visualEditor.data', - 'ext.visualEditor.mwreference' + 'ext.visualEditor.mwreference.core', + 'ext.visualEditor.mwtransclusion.core' ] .concat( this.constructor.static.iconModuleStyles ) .concat( conf.pluginModules || [] );