Setting data.accept now works fine (Fixes #3386)

This commit is contained in:
Paul Bakaus 2008-09-15 20:57:41 +00:00
parent 7ba2beb903
commit aed298125d

View File

@ -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;