Side navigation
Ticket #2922: ui.draggable.js.patch
File ui.draggable.js.patch, 0.7 KB (added by ivan, May 22, 2008 12:54PM UTC)
--- a/ui/ui.draggable.js
+++ b/ui/ui.draggable.js
@@ -210,10 +210,11 @@
stop: function(e) {
//If we are using droppables, inform the manager about the drop
+
if ($.ui.ddmanager && !this.options.dropBehaviour)
- $.ui.ddmanager.drop(this, e);
+ var dropped = $.ui.ddmanager.drop(this, e);
- if(this.options.revert) this.revert();
+ if(this.options.revert || (this.options.revertInvalid && !dropped)) this.revert();
else {
this.propagate("stop", e);
this.clear();
Download in other formats:
Original Format
File ui.draggable.js.patch, 0.7 KB (added by ivan, May 22, 2008 12:54PM UTC)
--- a/ui/ui.draggable.js
+++ b/ui/ui.draggable.js
@@ -210,10 +210,11 @@
stop: function(e) {
//If we are using droppables, inform the manager about the drop
+
if ($.ui.ddmanager && !this.options.dropBehaviour)
- $.ui.ddmanager.drop(this, e);
+ var dropped = $.ui.ddmanager.drop(this, e);
- if(this.options.revert) this.revert();
+ if(this.options.revert || (this.options.revertInvalid && !dropped)) this.revert();
else {
this.propagate("stop", e);
this.clear();