Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Made it compatible with the changed Position API of jQuery UI 1.9 . #115

Closed
wants to merge 1 commit into from

3 participants

lephyrius Felix Nagel Mikhail Samojlov
lephyrius

http://blog.jqueryui.com/2010/12/position-api-redesign/
This is the changed Position API for jQuery UI 1.9 .

Felix Nagel
Owner

Sorry about the long waiting time, but I had an surgery and was not able to work on the selectmenu widget the last few weeks.
This will be very useful when updating to the latest jQuery / UI version. Thanks for your contribution!

Mikhail Samojlov

it works, please merge!..

Felix Nagel
Owner

This will be integrated when 1.9 is officially released.

Please take a look at the new built from scratch version of Selectmenu which uses 1.9 and UI menu: #140

Felix Nagel
Owner

Did somebody test the latest version?

Felix Nagel
Owner

jQuery 1.9 will not be integrated in this version of Selectmenu. Use the new, built from scratch version instead: see #140

Felix Nagel fnagel closed this
Felix Nagel
Owner

Reopened as the new Selectmenu version will be released with jQuery UI 1.10.

Felix Nagel fnagel referenced this pull request
Closed

jQuery UI 1.9 compatibility #273

Felix Nagel
Owner

I am not able to reopen this pull request. I will test this when working on jQuery UI 1.9 compatibility. Please send a new pull request if possible. Sorry for the circumstances.

Felix Nagel
Owner

I've updated to jQuery 1.9.2, please test and give feedback!

Felix Nagel
Owner

Any feedback on this issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
Showing with 9 additions and 4 deletions.
  1. +9 −4 ui/jquery.ui.selectmenu.js
13 ui/jquery.ui.selectmenu.js
View
@@ -762,12 +762,18 @@ $.widget("ui.selectmenu", {
},
_refreshPosition: function() {
- var o = this.options;
+ var o = this.options, _my = o.positionOptions.my, split_my = _my.split(' ');
// if its a native pop-up we need to calculate the position of the selected li
if (o.style == "popup" && !o.positionOptions.offset) {
var selected = this._selectedOptionLi();
- var _offset = "0 -" + (selected.outerHeight() + selected.offset().top - this.list.offset().top);
+ _my = split_my[0] + " " + split_my[1] + '-' + (selected.outerHeight() + selected.offset().top - this.list.offset().top);
+ } else if (o.positionOptions.offset !== null) {
+ var off = o.positionOptions.offset.split(' ');
+ var off_x = parseInt(off[0]);
+ var off_y = parseInt(off[1]);
+ _my = split_my[0] + ((off_x <= 0)?'':'+') + off_x + " " + split_my[1] + ((off_y <= 0)?'':'+') + off_y;
}
+
this.list
.css({
zIndex: this.element.zIndex()
@@ -775,9 +781,8 @@ $.widget("ui.selectmenu", {
.position({
// set options for position plugin
of: o.positionOptions.of || this.newelement,
- my: o.positionOptions.my,
+ my: _my,
at: o.positionOptions.at,
- offset: o.positionOptions.offset || _offset
});
}
});
Something went wrong with that request. Please try again.