Merge "Add bot to createAndPromote.php groups"
[lhc/web/wiklou.git] / resources / jquery.ui / jquery.ui.droppable.js
index 461f5e5..f17c222 100644 (file)
@@ -1,7 +1,7 @@
-/*
- * jQuery UI Droppable 1.8.16
+/*!
+ * jQuery UI Droppable 1.8.24
  *
- * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about)
  * Dual licensed under the MIT or GPL Version 2 licenses.
  * http://jquery.org/license
  *
@@ -147,7 +147,7 @@ $.widget("ui.droppable", {
 });
 
 $.extend($.ui.droppable, {
-       version: "1.8.16"
+       version: "1.8.24"
 });
 
 $.ui.intersect = function(draggable, droppable, toleranceMode) {
@@ -227,7 +227,7 @@ $.ui.ddmanager = {
 
                        if(!this.options) return;
                        if (!this.options.disabled && this.visible && $.ui.intersect(draggable, this, this.options.tolerance))
-                               dropped = dropped || this._drop.call(this, event);
+                               dropped = this._drop.call(this, event) || dropped;
 
                        if (!this.options.disabled && this.visible && this.accept.call(this.element[0],(draggable.currentItem || draggable.element))) {
                                this.isout = 1; this.isover = 0;
@@ -260,7 +260,12 @@ $.ui.ddmanager = {
 
                        var parentInstance;
                        if (this.options.greedy) {
-                               var parent = this.element.parents(':data(droppable):eq(0)');
+                               // find droppable parents with same scope
+                               var scope = this.options.scope;
+                               var parent = this.element.parents(':data(droppable)').filter(function () {
+                                       return $.data(this, 'droppable').options.scope === scope;
+                               });
+
                                if (parent.length) {
                                        parentInstance = $.data(parent[0], 'droppable');
                                        parentInstance.greedyChild = (c == 'isover' ? 1 : 0);