diff options
-rw-r--r-- | ui/ui.droppable.js | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/ui/ui.droppable.js b/ui/ui.droppable.js index ba5c5816f..ab95bb334 100644 --- a/ui/ui.droppable.js +++ b/ui/ui.droppable.js @@ -14,6 +14,19 @@ (function($) { $.widget("ui.droppable", { + + _setData: function(key, value) { + + if(key == 'accept') { + this.options.accept = value && value.constructor == Function ? value : function(d) { + return d.is(accept); + }; + } else { + $.widget.prototype._setData.apply(this, arguments); + } + + }, + _init: function() { var o = this.options, accept = o.accept; |