From aed298125decb717e4b2b7527386997bde45cc50 Mon Sep 17 00:00:00 2001 From: Paul Bakaus Date: Mon, 15 Sep 2008 20:57:41 +0000 Subject: Setting data.accept now works fine (Fixes #3386) --- ui/ui.droppable.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'ui/ui.droppable.js') 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; -- cgit v1.2.3