Split mwtransclusion and mwreference into core and non-core modules

Mobile doesn't want the tool+dialog functionality for those yet,
so move them to a separate module and only load the bare bones
for mobile. We did the same with mwimage/mwimage.core.

Change-Id: I9185ce62f458b3de08cbd28f2a41370d2301de9d
This commit is contained in:
Roan Kattouw 2014-07-01 16:50:57 -07:00
parent 3b694967c8
commit da5eacbe2e
3 changed files with 37 additions and 15 deletions

View file

@ -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(

View file

@ -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'
);

View file

@ -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 || [] );