Implement language-selection-method event

Change-Id: If2d207f8a221c8f2a560b1399ad69a3032b2064b
This commit is contained in:
Amir E. Aharoni
2013-08-19 10:56:22 +03:00
committed by Nikerabbit
parent e5891b83b5
commit a3bca89a42
5 changed files with 52 additions and 4 deletions

View File

@@ -295,12 +295,18 @@
);
},
onVisible: function () {
var $parent;
mw.uls.addEventLoggingTriggers();
if ( !displaySettings.$parent.$window.hasClass( 'callout' ) ) {
// callout menus will have position rules. others use
// default position
return;
}
var $parent = $( '#language-settings-dialog' );
$parent = $( '#language-settings-dialog' );
// Re-position the element according to the window that called it
if ( parseInt( $parent.css( 'left' ), 10 ) ) {
this.$menu.css( 'left', $parent.css( 'left' ) );