diff options
author | Paul Bakaus <paul.bakaus@googlemail.com> | 2008-05-29 12:37:32 +0000 |
---|---|---|
committer | Paul Bakaus <paul.bakaus@googlemail.com> | 2008-05-29 12:37:32 +0000 |
commit | 2d6b7469cb81844ecf102db37a388e4cea77ef0f (patch) | |
tree | 0e1d56d52632fc5530fe5a96bce9fa8642416031 /ui/source/ui.draggable.js | |
parent | aba9f3253192bb4763650f16e9d2ed66092d6aac (diff) | |
download | jquery-ui-2d6b7469cb81844ecf102db37a388e4cea77ef0f.tar.gz jquery-ui-2d6b7469cb81844ecf102db37a388e4cea77ef0f.zip |
sortable: connecting draggables to a sortable and dropping them on the sortable now also triggers a "receive" event, where the sender will be the original draggable. Moving out of the sortable while dragging a connected draggable will not trigger the stop/update events anymore.
Diffstat (limited to 'ui/source/ui.draggable.js')
-rw-r--r-- | ui/source/ui.draggable.js | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/ui/source/ui.draggable.js b/ui/source/ui.draggable.js index 9131d9e40..7ef5f84e6 100644 --- a/ui/source/ui.draggable.js +++ b/ui/source/ui.draggable.js @@ -456,6 +456,10 @@ this.instance.cancelHelperRemoval = false; //Remove it in the sortable instance (so sortable plugins like revert still work)
if(this.shouldRevert) this.instance.options.revert = true; //revert here
this.instance.mouseStop(e);
+
+ //Also propagate receive event, since the sortable is actually receiving a element
+ this.instance.element.triggerHandler("sortreceive", [e, $.extend(this.instance.ui(), { sender: inst.element })], this.instance.options["receive"]);
+
this.instance.options.helper = "original";
}
});
@@ -514,7 +518,7 @@ this.instance.isOver = 0;
this.instance.cancelHelperRemoval = true;
this.instance.options.revert = false; //No revert here
- this.instance.mouseStop(e);
+ this.instance.mouseStop(e, true);
this.instance.options.helper = "original";
//Now we remove our currentItem, the list group clone again, and the placeholder, and animate the helper back to it's original size
|