Position the language settings
* Expose two options: left and top * Make the init script pass that. * Introduce position method in jquery.uls Change-Id: I21f4d956f1ed2c56528731ab09ecc6a89834f796
This commit is contained in:
committed by
Amir E. Aharoni
parent
e0bf84cb15
commit
23393c0e8a
@@ -50,14 +50,23 @@
|
|||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Show the ULS window
|
* Calculate the position of ULS
|
||||||
|
* Returns an object with top and left properties.
|
||||||
|
* @returns {Object}
|
||||||
*/
|
*/
|
||||||
show: function() {
|
position: function() {
|
||||||
var pos = $.extend( {}, this.$element.offset(), {
|
var pos = $.extend( {}, this.$element.offset(), {
|
||||||
height: this.$element[0].offsetHeight
|
height: this.$element[0].offsetHeight
|
||||||
} );
|
} );
|
||||||
|
return {
|
||||||
|
top: pos.top + pos.height,
|
||||||
|
left: '25%'
|
||||||
|
};
|
||||||
|
},
|
||||||
|
show: function() {
|
||||||
|
var pos = this.position();
|
||||||
this.$menu.css( {
|
this.$menu.css( {
|
||||||
top: pos.top + pos.height,
|
top: pos.top,
|
||||||
left: '25%'
|
left: '25%'
|
||||||
} );
|
} );
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user