Ticket #2063: uidroppable-pass.ui.to.accept.patch
| File uidroppable-pass.ui.to.accept.patch, 2.4 kB (added by mnichols, 8 months ago) |
|---|
-
ui.droppable.js
68 68 var draggable = $.ui.ddmanager.current; 69 69 if (!draggable || draggable.element == this.element) return; // Bail if draggable and droppable are same element 70 70 71 if (this.options.accept( draggable.element)) {71 if (this.options.accept(this.ui(draggable))) { 72 72 $.ui.plugin.call(this, 'over', [e, this.ui(draggable)]); 73 73 $(this.element).triggerHandler("dropover", [e, this.ui(draggable)], this.options.over); 74 74 } … … 79 79 var draggable = $.ui.ddmanager.current; 80 80 if (!draggable || draggable.element == this.element) return; // Bail if draggable and droppable are same element 81 81 82 if (this.options.accept( draggable.element)) {82 if (this.options.accept(this.ui(draggable))) { 83 83 $.ui.plugin.call(this, 'out', [e, this.ui(draggable)]); 84 84 $(this.element).triggerHandler("dropout", [e, this.ui(draggable)], this.options.out); 85 85 } … … 90 90 var draggable = $.ui.ddmanager.current; 91 91 if (!draggable || draggable.element == this.element) return; // Bail if draggable and droppable are same element 92 92 93 if(this.options.accept( draggable.element)) {93 if(this.options.accept(this.ui(draggable))) { 94 94 $.ui.plugin.call(this, 'drop', [e, this.ui(draggable)]); 95 95 $(this.element).triggerHandler("drop", [e, this.ui(draggable)], this.options.drop); 96 96 } … … 163 163 if(m[i].item.disabled) continue; 164 164 m[i].offset = $(m[i].item.element).offset(); 165 165 166 if (t && m[i].item.options.accept (t.element)) //Activate the droppable if used directly from draggables166 if (t && m[i].item.options.accept.call(m[i].item.options,m[i].item.ui(t))) //Activate the droppable if used directly from draggables 167 167 m[i].item.activate.call(m[i].item, e); 168 168 169 169 } … … 175 175 176 176 if (!this.item.disabled && $.ui.intersect(draggable, this, this.item.options.tolerance)) 177 177 this.item.drop.call(this.item, e); 178 179 if (!this.item.disabled && this.item.options.accept (draggable.element)) {178 179 if (!this.item.disabled && this.item.options.accept.call(this.item,this.item.ui(draggable))) { 180 180 this.out = 1; this.over = 0; 181 181 this.item.deactivate.call(this.item, e); 182 182 }
