mirror of
https://github.com/jquery/jquery-ui.git
synced 2024-11-21 11:04:24 +00:00
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.
This commit is contained in:
parent
95441ed80f
commit
2789fca8af
@ -14,10 +14,10 @@ var defaults = {
|
|||||||
disabled: false,
|
disabled: false,
|
||||||
dialogClass: undefined,
|
dialogClass: undefined,
|
||||||
draggable: true,
|
draggable: true,
|
||||||
height: 200,
|
height: 'auto',
|
||||||
maxHeight: undefined,
|
maxHeight: undefined,
|
||||||
maxWidth: undefined,
|
maxWidth: undefined,
|
||||||
minHeight: 100,
|
minHeight: 150,
|
||||||
minWidth: 150,
|
minWidth: 150,
|
||||||
modal: false,
|
modal: false,
|
||||||
overlay: {},
|
overlay: {},
|
||||||
@ -365,7 +365,7 @@ test("height", function() {
|
|||||||
expect(3);
|
expect(3);
|
||||||
|
|
||||||
el = $('<div></div>').dialog();
|
el = $('<div></div>').dialog();
|
||||||
equals(dlg().height(), defaults.height, "default height");
|
equals(dlg().height(), defaults.minHeight, "default height");
|
||||||
el.remove();
|
el.remove();
|
||||||
|
|
||||||
el = $('<div></div>').dialog({ height: 437 });
|
el = $('<div></div>').dialog({ height: 437 });
|
||||||
|
@ -448,10 +448,13 @@ $.widget("ui.dialog", {
|
|||||||
})
|
})
|
||||||
.height();
|
.height();
|
||||||
|
|
||||||
this.element.height(
|
this.element
|
||||||
options.height == 'auto'
|
.css({
|
||||||
? 'auto'
|
minHeight: options.minHeight - nonContentHeight,
|
||||||
: options.height - nonContentHeight);
|
height: options.height == 'auto'
|
||||||
|
? 'auto'
|
||||||
|
: options.height - nonContentHeight
|
||||||
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -464,8 +467,8 @@ $.extend($.ui.dialog, {
|
|||||||
closeOnEscape: true,
|
closeOnEscape: true,
|
||||||
closeText: 'close',
|
closeText: 'close',
|
||||||
draggable: true,
|
draggable: true,
|
||||||
height: 200,
|
height: 'auto',
|
||||||
minHeight: 100,
|
minHeight: 150,
|
||||||
minWidth: 150,
|
minWidth: 150,
|
||||||
modal: false,
|
modal: false,
|
||||||
overlay: {},
|
overlay: {},
|
||||||
|
Loading…
Reference in New Issue
Block a user