mirror of
https://gerrit.wikimedia.org/r/mediawiki/skins/MinervaNeue
synced 2024-11-28 08:00:32 +00:00
Merge "Merge skins.minerva.scripts.top and skins.minerva.mainMenu into scripts"
This commit is contained in:
commit
4bf79bd6df
|
@ -143,9 +143,6 @@ class MinervaHooks {
|
|||
'skins.minerva.mainMenu.icons',
|
||||
'skins.minerva.mainMenu.styles',
|
||||
] );
|
||||
$out->addModules( [
|
||||
'skins.minerva.mainMenu'
|
||||
] );
|
||||
break;
|
||||
case 'Userlogin':
|
||||
case 'CreateAccount':
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -1389,7 +1389,6 @@ class SkinMinerva extends SkinTemplate {
|
|||
$modules['minerva'] = array_merge(
|
||||
$this->getContextSpecificModules(),
|
||||
[
|
||||
'skins.minerva.scripts.top',
|
||||
'skins.minerva.scripts'
|
||||
]
|
||||
);
|
||||
|
|
|
@ -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' ),
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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 ) );
|
|
@ -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 ) );
|
|
@ -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.
|
||||
*/
|
|
@ -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
|
||||
|
|
38
skin.json
38
skin.json
|
@ -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": [
|
||||
|
|
Loading…
Reference in a new issue