Florianschmidtwelzow has uploaded a new change for review. https://gerrit.wikimedia.org/r/181403
Change subject: Don't add VisualEditor related modules if VE isn't installed ...................................................................... Don't add VisualEditor related modules if VE isn't installed Bug: T85007 Change-Id: I9943957b50c0d9bfb93c346078b75bc6a0237248 --- M includes/Resources.php 1 file changed, 36 insertions(+), 26 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend refs/changes/03/181403/1 diff --git a/includes/Resources.php b/includes/Resources.php index 24e61e5..a8e0504 100644 --- a/includes/Resources.php +++ b/includes/Resources.php @@ -347,32 +347,6 @@ ), ), - 'mobile.editor.ve' => $wgMFResourceBoilerplate + array( - 'dependencies' => array( - 'ext.visualEditor.mobileViewTarget', - 'mobile.stable', - 'mobile.templates', - 'mobile.editor.common', - 'mobile.overlays', - ), - 'styles' => array( - 'less/modules/editor/VisualEditorOverlay.less', - ), - 'scripts' => array( - 'javascripts/modules/editor/VisualEditorOverlay.js', - ), - 'templates' => array( - 'contentVE.hogan' => 'templates/modules/editor/contentVE.hogan', - ), - 'messages' => array( - 'mobile-frontend-page-edit-summary', - 'mobile-frontend-editor-editing', - ), - 'targets' => array( - 'mobile', - ), - ), - 'mobile.editor.overlay' => $wgMFResourceFileModuleBoilerplate + array( 'dependencies' => array( 'mobile.editor.common', @@ -1082,6 +1056,37 @@ ) ); /** + * Mobile VisualEditor related modules + */ +$wgMobileVEModules = array( + 'mobile.editor.ve' => $wgMFResourceBoilerplate + array( + 'dependencies' => array( + 'ext.visualEditor.mobileViewTarget', + 'mobile.stable', + 'mobile.templates', + 'mobile.editor.common', + 'mobile.overlays', + ), + 'styles' => array( + 'less/modules/editor/VisualEditorOverlay.less', + ), + 'scripts' => array( + 'javascripts/modules/editor/VisualEditorOverlay.js', + ), + 'templates' => array( + 'contentVE.hogan' => 'templates/modules/editor/contentVE.hogan', + ), + 'messages' => array( + 'mobile-frontend-page-edit-summary', + 'mobile-frontend-editor-editing', + ), + 'targets' => array( + 'mobile', + ), + ), +); + +/** * Special page modules * @todo FIXME: Remove the need for these by making more reusable CSS * @@ -1372,6 +1377,11 @@ $wgResourceModules = array_merge( $wgResourceModules, $wgMinervaStyleModules ); $wgResourceModules = array_merge( $wgResourceModules, $wgMinervaBootstrapModules ); +// add VisualEditor related modules only, if VisualEditor seems to be installed - T85007 +if ( class_exists( 'VisualEditorHooks' ) ) { + $wgResourceModules = array_merge( $wgResourceModules, $wgMobileVEModules ); +} + // Module customizations $wgResourceModuleSkinStyles['minerva'] = $wgMFResourceBoilerplate + array( 'mediawiki.skinning.content.parsoid' => array(), -- To view, visit https://gerrit.wikimedia.org/r/181403 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I9943957b50c0d9bfb93c346078b75bc6a0237248 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/MobileFrontend Gerrit-Branch: master Gerrit-Owner: Florianschmidtwelzow <florian.schmidt.wel...@t-online.de> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits