Side navigation
Ticket #2063: droppable.accept.this.patch
File droppable.accept.this.patch, 0.7 KB (added by m0n5t3r, January 21, 2008 05:00PM UTC)
droppable accept hack
Index: ui.droppable.js
===================================================================
--- ui.droppable.js (revision 4501)
+++ ui.droppable.js (working copy)
@@ -18,9 +18,9 @@
//Prepare the passed options
this.options = $.extend({}, options);
- var o = this.options; var accept = o.accept;
+ var o = this.options; var accept = o.accept; var self = this;
$.extend(o, {
- accept: o.accept && o.accept.constructor == Function ? o.accept : function(d) {
+ accept: o.accept && o.accept.constructor == Function ? function() { return accept.apply(self, arguments); } : function(d) {
return $(d).is(accept);
},
tolerance: o.tolerance || 'intersect'
Download in other formats:
Original Format
File droppable.accept.this.patch, 0.7 KB (added by m0n5t3r, January 21, 2008 05:00PM UTC)
droppable accept hack
Index: ui.droppable.js
===================================================================
--- ui.droppable.js (revision 4501)
+++ ui.droppable.js (working copy)
@@ -18,9 +18,9 @@
//Prepare the passed options
this.options = $.extend({}, options);
- var o = this.options; var accept = o.accept;
+ var o = this.options; var accept = o.accept; var self = this;
$.extend(o, {
- accept: o.accept && o.accept.constructor == Function ? o.accept : function(d) {
+ accept: o.accept && o.accept.constructor == Function ? function() { return accept.apply(self, arguments); } : function(d) {
return $(d).is(accept);
},
tolerance: o.tolerance || 'intersect'