Fix directionality of ULS CLL and languageselect callouts

when appearing on right side of screen

Languageselect was mostly fixed in 354378, but I forgot the
settings ones, so the triangle just disappears when
switching dialogs currently. This follows up on that and
properly fixes it.

Sidebar callouts now appear toward content regardless of
where they're appearing from, or the language
directionality. Triangles are now consistently alligned to
the top of the callout (same position in languageselect and
compact language links) to avoid issues with it appearing
over a scrollbar.

Sideways callout triangles (carets) are consolidated into a
single rendering approach and mixin across compact language
links and toolbox language selector.

Bug: T161586
Change-Id: I7717e26525ac527ede486796f49083ed40ee7d4f
This commit is contained in:
Isarra
2017-05-20 16:41:33 +00:00
committed by Derk-Jan Hartman
parent fa0ad11222
commit 86c636fd0a
7 changed files with 73 additions and 120 deletions

View File

@@ -350,10 +350,11 @@
uls.$menu.find( '.uls-search-wrapper' ).wrap( $wrap );
uls.$menu.find( '.uls-search-wrapper-wrapper' ).prepend( $back );
uls.$menu.prepend(
$( '<span>' ).addClass( 'caret-before' ),
$( '<span>' ).addClass( 'caret-after' )
);
if ( $( '.uls-settings-trigger' ).offset().left > $( window ).width() / 2 ) {
uls.$menu.removeClass( 'selector-left' ).addClass( 'selector-right' );
} else {
uls.$menu.removeClass( 'selector-right' ).addClass( 'selector-left' );
}
},
onVisible: function () {
var $parent;