Set the position of display settings to match ULS
Bug: 47822 Change-Id: I7b04a831b2c5d7932564a3cdde94be0e233f7a7b
This commit is contained in:
committed by
Siebrand
parent
e9fc82574c
commit
07465bf20c
@@ -318,6 +318,18 @@
|
||||
.data( 'i18n', 'ext-uls-input-settings-ui-language' )
|
||||
.i18n();
|
||||
},
|
||||
onVisible: function () {
|
||||
var $parent = $( '#language-settings-dialog' );
|
||||
|
||||
// Re-position the element according to the window that called it
|
||||
this.top = $parent.css( 'top' );
|
||||
this.left = $parent.css( 'left' );
|
||||
this.$menu.css( this.position() );
|
||||
|
||||
this.$menu.find( '.caret-before, .caret-after' ).css( 'top',
|
||||
this.$menu.find( '.row' ).height()
|
||||
);
|
||||
},
|
||||
onSelect: function ( langCode ) {
|
||||
inputSettings.enableApplyButton();
|
||||
inputSettings.imeLanguage = langCode;
|
||||
@@ -329,6 +341,13 @@
|
||||
lazyload: false
|
||||
} );
|
||||
|
||||
if ( mw.config.get( 'wgULSPosition' ) === 'interlanguage' ) {
|
||||
$moreLanguagesButton.data( 'uls' ).$menu.prepend(
|
||||
$( '<span>' ).addClass( 'caret-before' ),
|
||||
$( '<span>' ).addClass( 'caret-after' )
|
||||
);
|
||||
}
|
||||
|
||||
$moreLanguagesButton.on( 'click', function () {
|
||||
inputSettings.$parent.hide();
|
||||
} );
|
||||
|
||||
Reference in New Issue
Block a user