Fix positioning of input/display settings for new language selector
Unrelated behavior change: ULS language selection dialog is hidden while display or input settings is open. Also simplified dead code in addDisplaySettings. Bug: T276248 Change-Id: Ia91a2b83e7ad4072016649230e2376b0793cbbff
This commit is contained in:
committed by
Nikerabbit
parent
ffc9c20fdb
commit
8c835588f2
@@ -174,12 +174,16 @@
|
||||
},
|
||||
|
||||
position: function () {
|
||||
if ( this.options.onPosition ) {
|
||||
return this.options.onPosition.call( this );
|
||||
}
|
||||
|
||||
this.top = this.top || this.$element.offset().top + this.$element.outerHeight();
|
||||
this.left = this.left || '25%';
|
||||
this.$window.css( {
|
||||
return {
|
||||
top: this.top,
|
||||
left: this.left
|
||||
} );
|
||||
};
|
||||
},
|
||||
|
||||
i18n: function () {
|
||||
@@ -187,7 +191,7 @@
|
||||
},
|
||||
|
||||
show: function () {
|
||||
this.position();
|
||||
this.$window.css( this.position() );
|
||||
|
||||
if ( !this.initialized ) {
|
||||
this.render();
|
||||
@@ -311,9 +315,10 @@
|
||||
template: windowTemplate,
|
||||
defaultModule: false, // Name of the default module
|
||||
onClose: null, // An onClose event handler.
|
||||
top: null, // Top position of this window
|
||||
left: null, // Left position of this window
|
||||
onVisible: null // A callback that runs after the ULS panel becomes visible
|
||||
top: null, // DEPRECATED: Top position of this window
|
||||
left: null, // DEPRECATED: Left position of this window
|
||||
onVisible: null, // A callback that runs after the ULS panel becomes visible
|
||||
onPosition: null // A callback that allows positioning the dialog
|
||||
};
|
||||
|
||||
$.fn.languagesettings.Constructor = LanguageSettings;
|
||||
|
||||
Reference in New Issue
Block a user