Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Using '+' sign will not maintain ordering of list #94

Open
wants to merge 1 commit into from

2 participants

@jeremychan

If you use the + sign to add element from the available list, the order of the submitted fields will not be maintained. This commit will fix it.

@jeremychan

To maintain the ordering when using the "+" sign to add element

@set-killer

Thank you jeremychan,

This fix is a live saver :)
I don't know why this is not joined with the master.

btw: this also fixes the ordering of the elements on doubleClick event.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Aug 5, 2011
  1. @jeremychan
This page is out of date. Refresh to see the latest.
Showing with 3 additions and 1 deletion.
  1. +3 −1 js/ui.multiselect.js
View
4 js/ui.multiselect.js 100755 → 100644
@@ -174,7 +174,9 @@ $.widget("ui.multiselect", {
return clone;
},
_setSelected: function(item, selected) {
- item.data('optionLink').attr('selected', selected);
+ var addedNode = item.data('optionLink').attr('selected', selected);
+ var parent = addedNode.parent();
+ addedNode.detach().appendTo (parent);
if (selected) {
var selectedItem = this._cloneWithData(item);
Something went wrong with that request. Please try again.