Make anything with class 'uls-settings-trigger' work like ULS trigger
Usecase: Reading problems? click [here]. That [here] can be a ULS trigger to open language settings. Change-Id: I1561f8b782037bfdb418f33097fc8b4c519ef393
This commit is contained in:
@@ -243,7 +243,8 @@
|
|||||||
.attr( 'title', $.i18n( 'ext-uls-language-settings-title' ) );
|
.attr( 'title', $.i18n( 'ext-uls-language-settings-title' ) );
|
||||||
// Append ULS cog to languages section, but make sure it is visible.
|
// Append ULS cog to languages section, but make sure it is visible.
|
||||||
$pLang.show().prepend( $ulsSettingsTrigger );
|
$pLang.show().prepend( $ulsSettingsTrigger );
|
||||||
|
// Take care of any other elements with this class.
|
||||||
|
$ulsSettingsTrigger = $( '.uls-settings-trigger' );
|
||||||
// Remove the dummy link, which was added to make sure that the section appears
|
// Remove the dummy link, which was added to make sure that the section appears
|
||||||
$pLang.find( '.uls-p-lang-dummy' ).remove();
|
$pLang.find( '.uls-p-lang-dummy' ).remove();
|
||||||
|
|
||||||
@@ -289,8 +290,8 @@
|
|||||||
var topRowHeight, caretHeight, caretWidth,
|
var topRowHeight, caretHeight, caretWidth,
|
||||||
$caretBefore = $( '<span>' ).addClass( 'caret-before' ),
|
$caretBefore = $( '<span>' ).addClass( 'caret-before' ),
|
||||||
$caretAfter = $( '<span>' ).addClass( 'caret-after' ),
|
$caretAfter = $( '<span>' ).addClass( 'caret-after' ),
|
||||||
ulsTriggerWidth = $ulsSettingsTrigger.width(),
|
ulsTriggerWidth = this.$element.width(),
|
||||||
ulsTriggerOffset = $ulsSettingsTrigger.offset();
|
ulsTriggerOffset = this.$element.offset();
|
||||||
|
|
||||||
// Add the callout caret triangle
|
// Add the callout caret triangle
|
||||||
// pointing to the trigger icon
|
// pointing to the trigger icon
|
||||||
|
|||||||
Reference in New Issue
Block a user