diff options
author | Scott González <scott.gonzalez@gmail.com> | 2009-07-10 20:00:06 +0000 |
---|---|---|
committer | Scott González <scott.gonzalez@gmail.com> | 2009-07-10 20:00:06 +0000 |
commit | 2ebc73e2b74556466bb36e2f37abf6488bf5f9bc (patch) | |
tree | 41d4fafb129de9280b5f37333e09d9a033f57656 /ui/ui.dialog.js | |
parent | e1550390b13e82a5b0e54457641f75b9643901b7 (diff) | |
download | jquery-ui-2ebc73e2b74556466bb36e2f37abf6488bf5f9bc.tar.gz jquery-ui-2ebc73e2b74556466bb36e2f37abf6488bf5f9bc.zip |
Dialog: Use _trigger for drag and resize events instead of executing callbacks directly. Fixed #4629 - Dialog events not being triggered.
Diffstat (limited to 'ui/ui.dialog.js')
-rw-r--r-- | ui/ui.dialog.js | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/ui/ui.dialog.js b/ui/ui.dialog.js index da7c677c1..68cc31420 100644 --- a/ui/ui.dialog.js +++ b/ui/ui.dialog.js @@ -320,17 +320,17 @@ $.widget("ui.dialog", { cancel: '.ui-dialog-content', handle: '.ui-dialog-titlebar', containment: 'document', - start: function() { + start: function(event) { heightBeforeDrag = options.height; $(this).height($(this).height()).addClass("ui-dialog-dragging"); - (options.dragStart && options.dragStart.apply(self.element[0], arguments)); + self._trigger('dragStart', event); }, - drag: function() { - (options.drag && options.drag.apply(self.element[0], arguments)); + drag: function(event) { + self._trigger('drag', event); }, - stop: function() { + stop: function(event) { $(this).removeClass("ui-dialog-dragging").height(heightBeforeDrag); - (options.dragStop && options.dragStop.apply(self.element[0], arguments)); + self._trigger('dragStop', event); $.ui.dialog.overlay.resize(); } }); @@ -351,19 +351,19 @@ $.widget("ui.dialog", { maxHeight: options.maxHeight, minWidth: options.minWidth, minHeight: self._minHeight(), - start: function() { + handles: resizeHandles, + start: function(event) { $(this).addClass("ui-dialog-resizing"); - (options.resizeStart && options.resizeStart.apply(self.element[0], arguments)); + self._trigger('resizeStart', event); }, - resize: function() { - (options.resize && options.resize.apply(self.element[0], arguments)); + resize: function(event) { + self._trigger('resize', event); }, - handles: resizeHandles, - stop: function() { + stop: function(event) { $(this).removeClass("ui-dialog-resizing"); options.height = $(this).height(); options.width = $(this).width(); - (options.resizeStop && options.resizeStop.apply(self.element[0], arguments)); + self._trigger('resizeStop', event); $.ui.dialog.overlay.resize(); } }) |