aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorScott González <scott.gonzalez@gmail.com>2009-01-03 05:48:46 +0000
committerScott González <scott.gonzalez@gmail.com>2009-01-03 05:48:46 +0000
commit7fa669beb05f87d95c94f013d345559dde7c2b0a (patch)
tree2a5b62ed0464af234c417fcda092cd2652b87e3c
parentf65478c620bfea25ce2f80356c8cd66600e2edca (diff)
downloadjquery-ui-7fa669beb05f87d95c94f013d345559dde7c2b0a.tar.gz
jquery-ui-7fa669beb05f87d95c94f013d345559dde7c2b0a.zip
Selectable: Fixed #3729: Use this._trigger for all callbacks.
-rw-r--r--ui/ui.selectable.js32
1 files changed, 16 insertions, 16 deletions
diff --git a/ui/ui.selectable.js b/ui/ui.selectable.js
index 2a2583c0c..4d7633cfd 100644
--- a/ui/ui.selectable.js
+++ b/ui/ui.selectable.js
@@ -74,10 +74,10 @@ $.widget("ui.selectable", $.extend({}, $.ui.mouse, {
this.selectees = $(options.filter, this.element[0]);
// selectable START callback
- this.element.triggerHandler("selectablestart", [event, {
+ this._trigger("start", event, {
"selectable": this.element[0],
"options": options
- }], options.start);
+ });
$('body').append(this.helper);
// position helper (lasso)
@@ -103,11 +103,11 @@ $.widget("ui.selectable", $.extend({}, $.ui.mouse, {
selectee.$element.addClass('ui-unselecting');
selectee.unselecting = true;
// selectable UNSELECTING callback
- self.element.triggerHandler("selectableunselecting", [event, {
+ self._trigger("unselecting", event, {
selectable: self.element[0],
unselecting: selectee.element,
options: options
- }], options.unselecting);
+ });
}
});
@@ -158,11 +158,11 @@ $.widget("ui.selectable", $.extend({}, $.ui.mouse, {
selectee.$element.addClass('ui-selecting');
selectee.selecting = true;
// selectable SELECTING callback
- self.element.triggerHandler("selectableselecting", [event, {
+ self._trigger("selecting", event, {
selectable: self.element[0],
selecting: selectee.element,
options: options
- }], options.selecting);
+ });
}
} else {
// UNSELECT
@@ -180,11 +180,11 @@ $.widget("ui.selectable", $.extend({}, $.ui.mouse, {
selectee.unselecting = true;
}
// selectable UNSELECTING callback
- self.element.triggerHandler("selectableunselecting", [event, {
+ self._trigger("unselecting", event, {
selectable: self.element[0],
unselecting: selectee.element,
options: options
- }], options.unselecting);
+ });
}
}
if (selectee.selected) {
@@ -195,11 +195,11 @@ $.widget("ui.selectable", $.extend({}, $.ui.mouse, {
selectee.$element.addClass('ui-unselecting');
selectee.unselecting = true;
// selectable UNSELECTING callback
- self.element.triggerHandler("selectableunselecting", [event, {
+ self._trigger("unselecting", event, {
selectable: self.element[0],
unselecting: selectee.element,
options: options
- }], options.unselecting);
+ });
}
}
}
@@ -220,11 +220,11 @@ $.widget("ui.selectable", $.extend({}, $.ui.mouse, {
selectee.$element.removeClass('ui-unselecting');
selectee.unselecting = false;
selectee.startselected = false;
- self.element.triggerHandler("selectableunselected", [event, {
+ self._trigger("unselected", event, {
selectable: self.element[0],
unselected: selectee.element,
options: options
- }], options.unselected);
+ });
});
$('.ui-selecting', this.element[0]).each(function() {
var selectee = $.data(this, "selectable-item");
@@ -232,16 +232,16 @@ $.widget("ui.selectable", $.extend({}, $.ui.mouse, {
selectee.selecting = false;
selectee.selected = true;
selectee.startselected = true;
- self.element.triggerHandler("selectableselected", [event, {
+ self._trigger("selected", event, {
selectable: self.element[0],
selected: selectee.element,
options: options
- }], options.selected);
+ });
});
- this.element.triggerHandler("selectablestop", [event, {
+ this._trigger("stop", event, {
selectable: self.element[0],
options: this.options
- }], this.options.stop);
+ });
this.helper.remove();