Move styles that only used in JavaScript to JavaScript module

Also rename the style module from 'ext.categoryTree.css' to
'ext.categoryTree.styles'.
Keep the previous module name 'ext.categoryTree.css' for compability to
cached versions.
Also move the files of the module 'ext.categoryTree' into a
subdirectory ext.categoryTree.

Change-Id: Ie5ea28acfb43e33a94ec5824baf4f26d63d8e9e6
This commit is contained in:
Fomafix 2018-12-09 00:12:18 +01:00
parent d48e8cf86c
commit 3cdb4e95f2
5 changed files with 16 additions and 8 deletions

View file

@ -41,7 +41,8 @@
},
"ResourceModules": {
"ext.categoryTree": {
"scripts": "ext.categoryTree.js",
"scripts": "ext.categoryTree/ext.categoryTree.js",
"styles": "ext.categoryTree/ext.categoryTree.css",
"targets": [
"desktop",
"mobile"
@ -64,12 +65,20 @@
"mediawiki.api"
]
},
"ext.categoryTree.css": {
"ext.categoryTree.styles": {
"targets": [
"desktop",
"mobile"
],
"styles": "ext.categoryTree.css"
"styles": "ext.categoryTree.styles.css"
},
"ext.categoryTree.css": {
"deprecated": "Use \"ext.categoryTree.styles\" instead.",
"targets": [
"desktop",
"mobile"
],
"styles": "ext.categoryTree.styles.css"
}
},
"ResourceFileModulePaths": {

View file

@ -251,7 +251,7 @@ class CategoryTree {
*/
public static function setHeaders( $outputPage ) {
# Add the modules
$outputPage->addModuleStyles( 'ext.categoryTree.css' );
$outputPage->addModuleStyles( 'ext.categoryTree.styles' );
$outputPage->addModules( 'ext.categoryTree' );
}

View file

@ -51,10 +51,6 @@
user-select: none;
}
.CategoryTreeToggleHandlerAttached {
cursor: pointer;
}
.CategoryTreeEmptyBullet {
color: #c0c0c0;
}

View file

@ -0,0 +1,3 @@
.CategoryTreeToggleHandlerAttached {
cursor: pointer;
}