jenkins-bot has submitted this change and it was merged. Change subject: Separate module definition for addModuleStyles ......................................................................
Separate module definition for addModuleStyles Follow-up to I7d9e793b4b36a9ca3f5da75480ad89cddf7d5bf8 Fixing the issue of modules that contain both JS and CSS and how they interact with addModuleStyles. Since we don't want the position definition to affect modules when they are added normally (without addModuleStyles), we have to separate them when they have a dual purpose. Depends on Ie4287e17d6f298cc63f42f257b1f67ee36961b77 Bug: T97410 Change-Id: Ibf22aa509d205b4c632d186c8da56a87c5d16099 --- M repo/includes/EntityParserOutputGenerator.php M view/resources/jquery/wikibase/resources.php M view/resources/jquery/wikibase/toolbar/resources.php 3 files changed, 19 insertions(+), 11 deletions(-) Approvals: Gilles: Looks good to me, but someone else must approve Aude: Looks good to me, approved Jeroen De Dauw: Looks good to me, but someone else must approve jenkins-bot: Verified diff --git a/repo/includes/EntityParserOutputGenerator.php b/repo/includes/EntityParserOutputGenerator.php index 84efaa8..5b5c378 100644 --- a/repo/includes/EntityParserOutputGenerator.php +++ b/repo/includes/EntityParserOutputGenerator.php @@ -383,9 +383,9 @@ // make css available for JavaScript-less browsers $parserOutput->addModuleStyles( array( 'wikibase.common', - 'jquery.ui.core', - 'jquery.wikibase.statementview', - 'jquery.wikibase.toolbar', + 'jquery.ui.core.styles', + 'jquery.wikibase.statementview.RankSelector.styles', + 'jquery.wikibase.toolbar.styles', ) ); // make sure required client-side resources will be loaded diff --git a/view/resources/jquery/wikibase/resources.php b/view/resources/jquery/wikibase/resources.php index 4b39988..d49bb6e 100644 --- a/view/resources/jquery/wikibase/resources.php +++ b/view/resources/jquery/wikibase/resources.php @@ -431,13 +431,9 @@ ), 'jquery.wikibase.statementview' => $moduleTemplate + array( - 'position' => 'top', 'scripts' => array( 'jquery.wikibase.statementview.js', 'jquery.wikibase.statementview.RankSelector.js', - ), - 'styles' => array( - 'themes/default/jquery.wikibase.statementview.RankSelector.css', ), 'dependencies' => array( 'jquery.ui.EditableTemplatedWidget', @@ -449,6 +445,7 @@ 'jquery.wikibase.referenceview', 'jquery.wikibase.snakview', 'jquery.wikibase.snaklistview', + 'jquery.wikibase.statementview.RankSelector.styles', 'wikibase.datamodel.Claim', 'wikibase.datamodel.ReferenceList', 'wikibase.datamodel.SnakList', @@ -466,6 +463,13 @@ ), ), + 'jquery.wikibase.statementview.RankSelector.styles' => $moduleTemplate + array( + 'position' => 'top', + 'styles' => array( + 'themes/default/jquery.wikibase.statementview.RankSelector.css', + ), + ), + ); return array_merge( diff --git a/view/resources/jquery/wikibase/toolbar/resources.php b/view/resources/jquery/wikibase/toolbar/resources.php index 2dce035..53f415c 100644 --- a/view/resources/jquery/wikibase/toolbar/resources.php +++ b/view/resources/jquery/wikibase/toolbar/resources.php @@ -91,15 +91,19 @@ ), 'jquery.wikibase.toolbar' => $moduleTemplate + array( - 'position' => 'top', 'scripts' => array( 'jquery.wikibase.toolbar.js', ), - 'styles' => array( - 'themes/default/jquery.wikibase.toolbar.css', - ), 'dependencies' => array( 'jquery.wikibase.toolbaritem', + 'jquery.wikibase.toolbar.styles', + ), + ), + + 'jquery.wikibase.toolbar.styles' => $moduleTemplate + array( + 'position' => 'top', + 'styles' => array( + 'themes/default/jquery.wikibase.toolbar.css', ), ), -- To view, visit https://gerrit.wikimedia.org/r/214619 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ibf22aa509d205b4c632d186c8da56a87c5d16099 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: wmf/1.26wmf6 Gerrit-Owner: Aude <aude.w...@gmail.com> Gerrit-Reviewer: Aude <aude.w...@gmail.com> Gerrit-Reviewer: Gilles <gdu...@wikimedia.org> Gerrit-Reviewer: Hoo man <h...@online.de> Gerrit-Reviewer: Jeroen De Dauw <jeroended...@gmail.com> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits