r1380 - in trunk: tests ui
Author: scott.gonzalez
Date: Tue Dec 30 17:12:43 2008
New Revision: 1380
Modified:
trunk/tests/dialog.js
trunk/ui/ui.dialog.js
Log:
Dialog: Fixed #3713: Set default height to auto and default minHeight to
150. Now applying minHeight to the content div instead of only using it
for resizing.
Modified: trunk/tests/dialog.js
==============================================================================
--- trunk/tests/dialog.js (original)
+++ trunk/tests/dialog.js Tue Dec 30 17:12:43 2008
@@ -14,10 +14,10 @@
disabled: false,
dialogClass: undefined,
draggable: true,
- height: 200,
+ height: 'auto',
maxHeight: undefined,
maxWidth: undefined,
- minHeight: 100,
+ minHeight: 150,
minWidth: 150,
modal: false,
overlay: {},
@@ -365,7 +365,7 @@
expect(3);
el = $('<div></div>').dialog();
- equals(dlg().height(), defaults.height, "default height");
+ equals(dlg().height(), defaults.minHeight, "default height");
el.remove();
el = $('<div></div>').dialog({ height: 437 });
Modified: trunk/ui/ui.dialog.js
==============================================================================
--- trunk/ui/ui.dialog.js (original)
+++ trunk/ui/ui.dialog.js Tue Dec 30 17:12:43 2008
@@ -448,10 +448,13 @@
})
.height();
- this.element.height(
- options.height == 'auto'
- ? 'auto'
- : options.height - nonContentHeight);
+ this.element
+ .css({
+ minHeight: options.minHeight - nonContentHeight,
+ height: options.height == 'auto'
+ ? 'auto'
+ : options.height - nonContentHeight
+ });
}
});
@@ -464,8 +467,8 @@
closeOnEscape: true,
closeText: 'close',
draggable: true,
- height: 200,
- minHeight: 100,
+ height: 'auto',
+ minHeight: 150,
minWidth: 150,
modal: false,
overlay: {},