r2152 - trunk/ui

r2152 - trunk/ui


Author: rdworth
Date: Sat Feb 28 13:21:45 2009
New Revision: 2152
Modified:
trunk/ui/ui.dialog.js
Log:
Dailog: fixed #4254 - Dialog: undocumented dragHelper and resizeHelper
options should be removed
Modified: trunk/ui/ui.dialog.js
==============================================================================
--- trunk/ui/ui.dialog.js    (original)
+++ trunk/ui/ui.dialog.js    Sat Feb 28 13:21:45 2009
@@ -293,7 +293,8 @@
    _makeDraggable: function() {
        var self = this,
-            options = this.options;
+            options = this.options,
+            heightBeforeDrag;
        this.uiDialog.draggable({
            cancel: '.ui-dialog-content',
@@ -301,12 +302,15 @@
            handle: '.ui-dialog-titlebar',
            containment: 'document',
            start: function() {
+                heightBeforeDrag = options.height;
+                $(this).height($(this).height()).addClass("ui-dialog-dragging");
                (options.dragStart && options.dragStart.apply(self.element[0],
arguments));
            },
            drag: function() {
                (options.drag && options.drag.apply(self.element[0], arguments));
            },
            stop: function() {
+                $(this).removeClass("ui-dialog-dragging").height(heightBeforeDrag);
                (options.dragStop && options.dragStop.apply(self.element[0],
arguments));
                $.ui.dialog.overlay.resize();
            }
@@ -330,6 +334,7 @@
            minWidth: options.minWidth,
            minHeight: options.minHeight,
            start: function() {
+                $(this).addClass("ui-dialog-resizing");
                (options.resizeStart && options.resizeStart.apply(self.element[0],
arguments));
            },
            resize: function() {
@@ -337,6 +342,7 @@
            },
            handles: resizeHandles,
            stop: function() {
+                $(this).removeClass("ui-dialog-resizing");
                (options.resizeStop && options.resizeStop.apply(self.element[0],
arguments));
                $.ui.dialog.overlay.resize();
            }