Set the position of display settings to match ULS

Bug: 47822
Change-Id: I7b04a831b2c5d7932564a3cdde94be0e233f7a7b
This commit is contained in:
Amir E. Aharoni
2013-05-14 16:44:12 +03:00
committed by Siebrand
parent e9fc82574c
commit 07465bf20c
3 changed files with 45 additions and 3 deletions

View File

@@ -166,6 +166,7 @@
var scrollPosition,
$currentMenu,
ulsHeight, ulsTop, ulsBottom,
correctedPosition,
$languageSettingsTrigger = this.$menu.find( '#display-settings-block' ),
padding = 10,
$window = $( window ),
@@ -180,7 +181,9 @@
this.left = rtlPage ?
ulsTriggerOffset.left - 22 - this.$menu.width() :
ulsTriggerOffset.left + 50;
this.$menu.css( this.position() );
correctedPosition = this.position();
this.$menu.css( correctedPosition );
// Show the Display settings panel:
// We are using the ULS trigger in the sidebar,
@@ -189,7 +192,7 @@
$languageSettingsTrigger.click();
$currentMenu = $( '.uls-menu:visible' );
$currentMenu.css( this.position() );
$currentMenu.css( correctedPosition );
ulsHeight = $currentMenu.height();
ulsTop = $currentMenu.offset().top;
ulsBottom = ulsTop + ulsHeight;
@@ -216,7 +219,6 @@
$currentMenu.find( '.caret-before, .caret-after' ).css( 'top',
$currentMenu.find( '.row' ).height()
);
};
} else if ( anonMode ) {
ulsOptions.onVisible = function () {