r1197 - trunk/ui
r1197 - trunk/ui
Author: scott.gonzalez
Date: Sun Dec 21 08:54:27 2008
New Revision: 1197
Modified:
trunk/ui/ui.dialog.js
Log:
Dialog: Fixed #3145: Added support for height: 'auto'.
Modified: trunk/ui/ui.dialog.js
==============================================================================
--- trunk/ui/ui.dialog.js (original)
+++ trunk/ui/ui.dialog.js Sun Dec 21 08:54:27 2008
@@ -411,27 +411,31 @@
$.widget.prototype._setData.apply(this, arguments);
},
-
+
_size: function() {
/* If the user has resized the dialog, the .ui-dialog
and .ui-dialog-content
- * divs will both have width and height set
+ * divs will both have width and height set, so we need to reset them
*/
+ var options = this.options;
// reset content sizing
this.element.css({
height: 0,
width: 'auto'
});
-
- // reset the wrapper sizing and determine the height of all of the
- // non-content elements
+
+ // reset wrapper sizing
+ // determine the height of all the non-content elements
var nonContentHeight = this.uiDialog.css({
height: 'auto',
- width: this.options.width
+ width: options.width
})
.height();
-
- this.element.height(this.options.height - nonContentHeight);
+
+ this.element.height(
+ options.height == 'auto'
+ ? 'auto'
+ : options.height - nonContentHeight);
}
});