Merge "Merge skins.minerva.scripts.top and skins.minerva.mainMenu into scripts"

This commit is contained in:
jenkins-bot 2019-02-08 19:10:03 +00:00 committed by Gerrit Code Review
commit 4bf79bd6df
12 changed files with 21 additions and 41 deletions

View file

@ -143,9 +143,6 @@ class MinervaHooks {
'skins.minerva.mainMenu.icons',
'skins.minerva.mainMenu.styles',
] );
$out->addModules( [
'skins.minerva.mainMenu'
] );
break;
case 'Userlogin':
case 'CreateAccount':

View file

@ -216,7 +216,7 @@ class MinervaTemplate extends BaseTemplate {
protected function getMainMenuHtml( $data ) {
if ( $this->isSpecialMobileMenuPage ) {
$templateParser = new TemplateParser(
__DIR__ . '/../../resources/skins.minerva.mainMenu/' );
__DIR__ . '/../../resources/skins.minerva.scripts/menu/' );
return $templateParser->processTemplate( 'menu', $data['menu_data'] );
} else {

View file

@ -1389,7 +1389,6 @@ class SkinMinerva extends SkinTemplate {
$modules['minerva'] = array_merge(
$this->getContextSpecificModules(),
[
'skins.minerva.scripts.top',
'skins.minerva.scripts'
]
);

View file

@ -3,7 +3,7 @@
* with the Toast notifications defined by common/toast.js.
*/
( function ( M ) {
var mainMenu = M.require( 'skins.minerva.scripts.top/mainMenu' ),
var mainMenu = M.require( 'skins.minerva.scripts/mainMenu' ),
router = require( 'mediawiki.router' ),
NotificationBadge = M.require( 'skins.minerva.notifications/NotificationBadge' ),
overlayManager = M.require( 'skins.minerva.scripts/overlayManager' ),

View file

@ -1,7 +1,7 @@
// This initialises EventLogging for main menu and some prominent links in the UI.
// This code should only be loaded on the Minerva skin, it does not apply to other skins.
( function ( M ) {
var mainMenu = M.require( 'skins.minerva.scripts.top/mainMenu' );
var mainMenu = M.require( 'skins.minerva.scripts/mainMenu' );
$( function () {
mainMenu.enableLogging();

View file

@ -1,5 +1,5 @@
( function ( M ) {
var MainMenu = M.require( 'skins.minerva.mainMenu/MainMenu' ),
var MainMenu = M.require( 'skins.minerva.scripts/MainMenu' ),
mainMenu = createMainMenu();
/**
@ -29,5 +29,5 @@
}
} );
M.define( 'skins.minerva.scripts.top/mainMenu', mainMenu );
M.define( 'skins.minerva.scripts/mainMenu', mainMenu );
}( mw.mobileFrontend ) );

View file

@ -18,9 +18,9 @@
OO.mfExtend( MainMenu, View, {
isTemplateMode: true,
template: mw.template.get( 'skins.minerva.mainMenu', 'menu.hogan' ),
template: mw.template.get( 'skins.minerva.scripts', 'menu.hogan' ),
templatePartials: {
menuGroup: mw.template.get( 'skins.minerva.mainMenu', 'menuGroup.hogan' )
menuGroup: mw.template.get( 'skins.minerva.scripts', 'menuGroup.hogan' )
},
/**
@ -130,6 +130,6 @@
}
} );
M.define( 'skins.minerva.mainMenu/MainMenu', MainMenu );
M.define( 'skins.minerva.scripts/MainMenu', MainMenu );
}( mw.mobileFrontend ) );

View file

@ -1,5 +1,5 @@
/**
* This module is loaded by resources/skins.minerva.mainMenu/MainMenu.js
* This module is loaded by resources/skins.minerva.scripts/menu/MainMenu.js
* inside the Minerva skin. It should be moved to Minerva at our earliest possible
* convenience.
*/

View file

@ -7,7 +7,7 @@
*/
( function ( M ) {
var skin = M.require( 'mobile.init/skin' ),
mainMenu = M.require( 'skins.minerva.scripts.top/mainMenu' ),
mainMenu = M.require( 'skins.minerva.scripts/mainMenu' ),
toast = M.require( 'mobile.startup' ).toast;
// Proxy to MobileFrontend defined skin

View file

@ -338,26 +338,6 @@
"resources/skins.minerva.mainMenu.styles/mainmenu.less"
]
},
"skins.minerva.mainMenu": {
"targets": [
"mobile",
"desktop"
],
"dependencies": [
"skins.minerva.icons.images.variants",
"skins.minerva.mainMenu.icons",
"skins.minerva.mainMenu.styles",
"mobile.startup"
],
"templates": {
"menu.hogan": "resources/skins.minerva.mainMenu/menu.mustache",
"menuGroup.hogan": "resources/skins.minerva.mainMenu/menuGroup.mustache"
},
"scripts": [
"resources/skins.minerva.mainMenu/schema.js",
"resources/skins.minerva.mainMenu/MainMenu.js"
]
},
"skins.minerva.loggedin.styles": {
"targets": [
"mobile",
@ -373,15 +353,16 @@
"desktop"
],
"dependencies": [
"skins.minerva.icons.images.variants",
"skins.minerva.mainMenu.icons",
"skins.minerva.mainMenu.styles",
"jquery.cookie",
"mobile.init",
"skins.minerva.icons.images.scripts",
"skins.minerva.scripts.top",
"mediawiki.util",
"mediawiki.router",
"mediawiki.Title",
"mobile.startup",
"skins.minerva.mainMenu",
"mediawiki.user",
"mediawiki.storage",
"mediawiki.experiments"
@ -407,9 +388,14 @@
"resources/skins.minerva.scripts/page-issues/overlay/PageIssuesOverlay.less"
],
"templates": {
"IssueNotice.hogan": "resources/skins.minerva.scripts/page-issues/overlay/IssueNotice.hogan"
"IssueNotice.hogan": "resources/skins.minerva.scripts/page-issues/overlay/IssueNotice.hogan",
"menu.hogan": "resources/skins.minerva.scripts/menu/menu.mustache",
"menuGroup.hogan": "resources/skins.minerva.scripts/menu/menuGroup.mustache"
},
"scripts": [
"resources/skins.minerva.scripts/menu/schema.js",
"resources/skins.minerva.scripts/menu/MainMenu.js",
"resources/skins.minerva.scripts/menu.js",
"resources/skins.minerva.scripts/errorLogging.js",
"resources/skins.minerva.scripts/preInit.js",
"resources/skins.minerva.scripts/downloadPageAction.js",
@ -433,11 +419,9 @@
"desktop"
],
"dependencies": [
"skins.minerva.mainMenu"
"skins.minerva.scripts"
],
"scripts": [
"resources/skins.minerva.scripts.top/init.js"
]
"deprecated": true
},
"skins.minerva.notifications.badge": {
"messages": [