Remove disabling of max-len rule and fix violations
Change-Id: I39ec2e572e569a05c11929dd17241653abf954ef
This commit is contained in:
committed by
jenkins-bot
parent
4dc988f6b9
commit
e93e1bc845
@@ -6,8 +6,5 @@
|
|||||||
"globals": {
|
"globals": {
|
||||||
"mw": false,
|
"mw": false,
|
||||||
"OO": false
|
"OO": false
|
||||||
},
|
|
||||||
"rules": {
|
|
||||||
"max-len": 0
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -655,19 +655,17 @@
|
|||||||
* modules.
|
* modules.
|
||||||
*/
|
*/
|
||||||
apply: function () {
|
apply: function () {
|
||||||
var displaySettings = this;
|
if ( !this.dirty ) {
|
||||||
|
|
||||||
if ( !displaySettings.dirty ) {
|
|
||||||
// No changes to save in this module.
|
// No changes to save in this module.
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
displaySettings.$parent.setBusy( true );
|
this.$parent.setBusy( true );
|
||||||
// Save the preferences
|
// Save the preferences
|
||||||
mw.webfonts.preferences.save( function ( result ) {
|
mw.webfonts.preferences.save( function ( result ) {
|
||||||
var newWebfontsEnable, oldWebfontsEnable, webfontsEvent,
|
var newWebfontsEnable, oldWebfontsEnable, webfontsEvent,
|
||||||
newRegistry = mw.webfonts.preferences.registry,
|
newRegistry = mw.webfonts.preferences.registry,
|
||||||
oldRegistry = displaySettings.savedRegistry.registry,
|
oldRegistry = this.savedRegistry.registry,
|
||||||
newFonts = newRegistry.fonts || {},
|
newFonts = newRegistry.fonts || {},
|
||||||
oldFonts = oldRegistry.fonts || {};
|
oldFonts = oldRegistry.fonts || {};
|
||||||
|
|
||||||
@@ -684,25 +682,25 @@
|
|||||||
mw.hook( webfontsEvent ).fire( 'displaysettings' );
|
mw.hook( webfontsEvent ).fire( 'displaysettings' );
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( newFonts[ displaySettings.uiLanguage ] !== oldFonts[ displaySettings.uiLanguage ] ) {
|
if ( newFonts[ this.uiLanguage ] !== oldFonts[ this.uiLanguage ] ) {
|
||||||
mw.hook( 'mw.uls.font.change' ).fire(
|
mw.hook( 'mw.uls.font.change' ).fire(
|
||||||
'interface', displaySettings.uiLanguage, newFonts[ displaySettings.uiLanguage ]
|
'interface', this.uiLanguage, newFonts[ this.uiLanguage ]
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( newFonts[ displaySettings.contentLanguage ] !== oldFonts[ displaySettings.contentLanguage ] ) {
|
if ( newFonts[ this.contentLanguage ] !== oldFonts[ this.contentLanguage ] ) {
|
||||||
mw.hook( 'mw.uls.font.change' ).fire(
|
mw.hook( 'mw.uls.font.change' ).fire(
|
||||||
'content', displaySettings.contentLanguage, newFonts[ displaySettings.contentLanguage ]
|
'content', this.contentLanguage, newFonts[ this.contentLanguage ]
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
// closure for not losing the scope
|
// closure for not losing the scope
|
||||||
displaySettings.onSave( result );
|
this.onSave( result );
|
||||||
displaySettings.dirty = false;
|
this.dirty = false;
|
||||||
// Update the back-up preferences for the case of canceling
|
// Update the back-up preferences for the case of canceling
|
||||||
displaySettings.savedRegistry = $.extend( true, {}, mw.webfonts.preferences );
|
this.savedRegistry = $.extend( true, {}, mw.webfonts.preferences );
|
||||||
displaySettings.$parent.setBusy( false );
|
this.$parent.setBusy( false );
|
||||||
} );
|
}.bind( this ) );
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -272,7 +272,10 @@
|
|||||||
if ( !languagesettings.shown ) {
|
if ( !languagesettings.shown ) {
|
||||||
mw.hook( 'mw.uls.settings.open' ).fire( eventParams && eventParams.source || 'interlanguage' );
|
mw.hook( 'mw.uls.settings.open' ).fire( eventParams && eventParams.source || 'interlanguage' );
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// Initialize the Language settings window
|
// Initialize the Language settings window
|
||||||
languageSettingsOptions = {
|
languageSettingsOptions = {
|
||||||
defaultModule: 'display',
|
defaultModule: 'display',
|
||||||
@@ -312,7 +315,6 @@
|
|||||||
} );
|
} );
|
||||||
|
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
}
|
|
||||||
};
|
};
|
||||||
} else if ( anonMode ) {
|
} else if ( anonMode ) {
|
||||||
clickHandler = function ( e, eventParams ) {
|
clickHandler = function ( e, eventParams ) {
|
||||||
|
|||||||
Reference in New Issue
Block a user