mirror of
https://gerrit.wikimedia.org/r/mediawiki/skins/MinervaNeue
synced 2024-11-24 22:25:27 +00:00
Merge "EventLogging modules should be soft dependencies"
This commit is contained in:
commit
67766539f9
|
@ -168,14 +168,19 @@
|
||||||
* @method
|
* @method
|
||||||
*/
|
*/
|
||||||
function logInit( editor ) {
|
function logInit( editor ) {
|
||||||
mw.track( 'mf.schemaEdit', {
|
// If MobileFrontend is not available this will not be possible so
|
||||||
action: 'init',
|
// check first.
|
||||||
type: 'section',
|
mw.loader.using( 'mobile.loggingSchemas.edit' ).done( function () {
|
||||||
mechanism: initMechanism,
|
mw.track( 'mf.schemaEdit', {
|
||||||
editor: editor,
|
action: 'init',
|
||||||
editingSessionId: editorOptions.sessionId
|
type: 'section',
|
||||||
|
mechanism: initMechanism,
|
||||||
|
editor: editor,
|
||||||
|
editingSessionId: editorOptions.sessionId
|
||||||
|
} );
|
||||||
} );
|
} );
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Load source editor
|
* Load source editor
|
||||||
* @private
|
* @private
|
||||||
|
|
|
@ -36,6 +36,8 @@
|
||||||
* attributes on elements.
|
* attributes on elements.
|
||||||
*/
|
*/
|
||||||
enableLogging: function () {
|
enableLogging: function () {
|
||||||
|
// Load the EventLogging module inside MobileFrontend if available
|
||||||
|
mw.loader.using( 'mobile.loggingSchemas.mobileWebMainMenuClickTracking' );
|
||||||
this.$( 'a' ).on( 'click', function () {
|
this.$( 'a' ).on( 'click', function () {
|
||||||
var $link = $( this ),
|
var $link = $( this ),
|
||||||
eventName = $link.data( 'event-name' );
|
eventName = $link.data( 'event-name' );
|
||||||
|
|
|
@ -233,8 +233,7 @@
|
||||||
"dependencies": [
|
"dependencies": [
|
||||||
"skins.minerva.mainMenu.icons",
|
"skins.minerva.mainMenu.icons",
|
||||||
"skins.minerva.mainMenu.styles",
|
"skins.minerva.mainMenu.styles",
|
||||||
"mobile.startup",
|
"mobile.startup"
|
||||||
"mobile.loggingSchemas.mobileWebMainMenuClickTracking"
|
|
||||||
],
|
],
|
||||||
"position": "bottom",
|
"position": "bottom",
|
||||||
"templates": {
|
"templates": {
|
||||||
|
@ -360,8 +359,7 @@
|
||||||
"mediawiki.ui.input",
|
"mediawiki.ui.input",
|
||||||
"mobile.startup",
|
"mobile.startup",
|
||||||
"skins.minerva.toggling",
|
"skins.minerva.toggling",
|
||||||
"mediawiki.jqueryMsg",
|
"mediawiki.jqueryMsg"
|
||||||
"mobile.loggingSchemas.edit"
|
|
||||||
],
|
],
|
||||||
"messages": {
|
"messages": {
|
||||||
"0": "mobile-frontend-editor-disabled",
|
"0": "mobile-frontend-editor-disabled",
|
||||||
|
|
Loading…
Reference in a new issue