Jack Phoenix has uploaded a new change for review. https://gerrit.wikimedia.org/r/161663
Change subject: CSS loading fixes -- swapped addModules() to addModuleStyles() where appropriate ...................................................................... CSS loading fixes -- swapped addModules() to addModuleStyles() where appropriate Change-Id: I69c1d6772082b0c91577047acb9b705ac338b40d --- M Blog.php M BlogHooks.php M SpecialArticleLists.php M SpecialArticlesHome.php M SpecialCreateBlogPost.php 5 files changed, 11 insertions(+), 6 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/BlogPage refs/changes/63/161663/1 diff --git a/Blog.php b/Blog.php index ee5db1a..f83af42 100644 --- a/Blog.php +++ b/Blog.php @@ -49,8 +49,12 @@ ); // Used on Special:CreateBlogPost -$wgResourceModules['ext.blogPage.create'] = $blogResourceTemplate + array( +$wgResourceModules['ext.blogPage.create.css'] = $blogResourceTemplate + array( 'styles' => 'resources/css/CreateBlogPost.css', + 'position' => 'top' +); + +$wgResourceModules['ext.blogPage.create.js'] = $blogResourceTemplate + array( 'scripts' => 'resources/js/CreateBlogPost.js', // 'dependencies' => 'mediawiki.action.edit', 'messages' => array( diff --git a/BlogHooks.php b/BlogHooks.php index 5a2073c..5b8eb40 100644 --- a/BlogHooks.php +++ b/BlogHooks.php @@ -30,12 +30,12 @@ $wgHooks['SkinTemplateOutputPageBeforeExec'][] = function( $sk, $tpl ) { $tpl->set( 'catlinks', '' ); return true; - } ; + }; $wgOut->enableClientCache( false ); // Add CSS - $wgOut->addModules( 'ext.blogPage' ); + $wgOut->addModuleStyles( 'ext.blogPage' ); $article = new BlogPage( $title ); } diff --git a/SpecialArticleLists.php b/SpecialArticleLists.php index 0600999..1280a8f 100644 --- a/SpecialArticleLists.php +++ b/SpecialArticleLists.php @@ -35,7 +35,7 @@ // @todo FIXME: this should be loaded when including the special page, // too, but if ( $this->including() ) does nothing, prolly because of // the parser cache - $out->addModules( 'ext.blogPage.articlesHome' ); + $out->addModuleStyles( 'ext.blogPage.articlesHome' ); $imgPath = $wgExtensionAssetsPath . '/BlogPage/images/'; diff --git a/SpecialArticlesHome.php b/SpecialArticlesHome.php index 14fba28..a196c09 100644 --- a/SpecialArticlesHome.php +++ b/SpecialArticlesHome.php @@ -31,7 +31,7 @@ $out = $this->getOutput(); // Add CSS - $out->addModules( 'ext.blogPage.articlesHome' ); + $out->addModuleStyles( 'ext.blogPage.articlesHome' ); if ( !$type ) { $type = 'popular'; diff --git a/SpecialCreateBlogPost.php b/SpecialCreateBlogPost.php index f678189..a69aca3 100644 --- a/SpecialCreateBlogPost.php +++ b/SpecialCreateBlogPost.php @@ -51,7 +51,8 @@ $this->setHeaders(); // Add CSS & JS - $out->addModules( 'ext.blogPage.create' ); + $out->addModuleStyles( 'ext.blogPage.create.css' ); + $out->addModules( 'ext.blogPage.create.js' ); // If the request was POSTed, we haven't submitted a request yet AND // we have a title, create the page...otherwise just display the -- To view, visit https://gerrit.wikimedia.org/r/161663 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I69c1d6772082b0c91577047acb9b705ac338b40d Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/BlogPage Gerrit-Branch: master Gerrit-Owner: Jack Phoenix <j...@countervandalism.net> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits