Display Settings - ULS - Display settings navigation
Change-Id: I9d16cbac8f0f897378f769b0b98e48441503fe1a
This commit is contained in:
committed by
Amir E. Aharoni
parent
f3ffe8bead
commit
d67771fa01
@@ -53,24 +53,23 @@
|
||||
return $displaySettings;
|
||||
}
|
||||
|
||||
// Extend the render api of ULS to add display and input settings.
|
||||
$.fn.uls.Constructor.prototype = $.extend( {}, $.fn.uls.Constructor.prototype, {
|
||||
render: function() {
|
||||
var $displaySettings = displaySettings();
|
||||
var that = this;
|
||||
this.$menu.find( "div#settings-block" ).append( $displaySettings );
|
||||
var position = this.position();
|
||||
$displaySettings.languagesettings( {
|
||||
top: position.top,
|
||||
left: position.left
|
||||
} );
|
||||
$displaySettings.on( 'click', function() {
|
||||
that.hide();
|
||||
} );
|
||||
}
|
||||
} );
|
||||
function addDisplaySettings( uls ) {
|
||||
var $displaySettings = displaySettings();
|
||||
uls.$menu.find( "div#settings-block" ).append( $displaySettings );
|
||||
var position = uls.position();
|
||||
$displaySettings.languagesettings( {
|
||||
top: position.top,
|
||||
left: position.left
|
||||
} );
|
||||
$displaySettings.on( 'click', function() {
|
||||
uls.hide();
|
||||
} );
|
||||
}
|
||||
|
||||
$ulsTrigger.uls( {
|
||||
onReady: function ( uls ) {
|
||||
addDisplaySettings( uls );
|
||||
},
|
||||
onSelect: function( language ) {
|
||||
changeLanguage( language );
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user