When implementing dialog_comment, the modal is always 200px in height - looking for the best way to resize it.

CommentFileSizeAuthor
#6 dialog.maxheight.patch640 byteszroger
#4 dialog.autoHeight.patch1.02 KBzroger

Comments

sirkitree’s picture

Status: Active » Fixed

found this:

    $output[0]['options'] = array(
      'height' => '350px',
    );
moonray’s picture

Status: Fixed » Active

The auto option for height doesn't seem to work.

moonray’s picture

Title: Dialog comment size » Dialog auto-resize not working
zroger’s picture

Status: Active » Needs review
StatusFileSize
new1.02 KB

Try this patch. It adds default options to the dialog_display command that will make sure the dialog is centered and resized if those options aren't passed in.

moonray’s picture

Status: Needs review » Needs work

The patch works to make dialog auto size. Except it sets the size to the height of the content regardless of whether it is larger than the screen size.

The ideal behavior would be that the max-height is limited to either the height of the screen (minus some blank space for aesthetic reasons, or perhaps use a percentage of the height of the screen as a measurement), or the height the content (whichever is shorter).

zroger’s picture

Status: Needs work » Needs review
StatusFileSize
new640 bytes

It seems i already committed the last patch....

Here is a new patch that fixes the oversized content issue.

moonray’s picture

Status: Needs review » Reviewed & tested by the community

brilliant. works like a charm.

zroger’s picture

Status: Reviewed & tested by the community » Fixed

committed

zroger’s picture

Version: 6.x-1.x-dev » 7.x-1.x-dev
Assigned: Unassigned » zroger
Status: Fixed » Needs work

needs port to 7.x

moonray’s picture

Version: 7.x-1.x-dev » 6.x-1.x-dev

After some more testing I find that the auto height functionality breaks the regular width/height settings when I don't want it to automatically resize to the window's height.

devin carlson’s picture

Issue summary: View changes
Status: Needs work » Closed (outdated)

Dialog 6.x is no longer supported.