aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorScott González <scott.gonzalez@gmail.com>2009-01-03 15:30:23 +0000
committerScott González <scott.gonzalez@gmail.com>2009-01-03 15:30:23 +0000
commit7467ce3ef1e603ca87fef5f0a8ef81388fa5b92b (patch)
tree7b09f84da16246082cfce46941567739e7ccad93
parent81f9d28d60f813fa7349821f22917e00f807787f (diff)
downloadjquery-ui-7467ce3ef1e603ca87fef5f0a8ef81388fa5b92b.tar.gz
jquery-ui-7467ce3ef1e603ca87fef5f0a8ef81388fa5b92b.zip
Droppable: Fixed #3727: Use this._trigger for all callbacks/events.
-rw-r--r--ui/ui.droppable.js11
1 files changed, 6 insertions, 5 deletions
diff --git a/ui/ui.droppable.js b/ui/ui.droppable.js
index 1860992b3..71f338477 100644
--- a/ui/ui.droppable.js
+++ b/ui/ui.droppable.js
@@ -63,7 +63,7 @@ $.widget("ui.droppable", {
var draggable = $.ui.ddmanager.current;
$.ui.plugin.call(this, 'activate', [event, this.ui(draggable)]);
- if(draggable) this.element.triggerHandler("dropactivate", [event, this.ui(draggable)], this.options.activate);
+ (draggable && this._trigger('activate', event, this.ui(draggable)));
},
@@ -71,7 +71,7 @@ $.widget("ui.droppable", {
var draggable = $.ui.ddmanager.current;
$.ui.plugin.call(this, 'deactivate', [event, this.ui(draggable)]);
- if(draggable) this.element.triggerHandler("dropdeactivate", [event, this.ui(draggable)], this.options.deactivate);
+ (draggable && this._trigger('deactivate', event, this.ui(draggable)));
},
@@ -82,7 +82,7 @@ $.widget("ui.droppable", {
if (this.options.accept.call(this.element,(draggable.currentItem || draggable.element))) {
$.ui.plugin.call(this, 'over', [event, this.ui(draggable)]);
- this.element.triggerHandler("dropover", [event, this.ui(draggable)], this.options.over);
+ this._trigger('over', event, this.ui(draggable));
}
},
@@ -94,7 +94,7 @@ $.widget("ui.droppable", {
if (this.options.accept.call(this.element,(draggable.currentItem || draggable.element))) {
$.ui.plugin.call(this, 'out', [event, this.ui(draggable)]);
- this.element.triggerHandler("dropout", [event, this.ui(draggable)], this.options.out);
+ this._trigger('out', event, this.ui(draggable));
}
},
@@ -115,7 +115,7 @@ $.widget("ui.droppable", {
if(this.options.accept.call(this.element,(draggable.currentItem || draggable.element))) {
$.ui.plugin.call(this, 'drop', [event, this.ui(draggable)]);
- this.element.triggerHandler("drop", [event, this.ui(draggable)], this.options.drop);
+ this._trigger('drop', event, this.ui(draggable));
return this.element;
}
@@ -140,6 +140,7 @@ $.widget("ui.droppable", {
$.extend($.ui.droppable, {
version: "@VERSION",
+ eventPrefix: 'drop',
defaults: {
accept: '*',
activeClass: null,