Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Extends the jQuery UI Dialog widget to add maximize and restore functionality.
branch: master

This branch is 1 commit ahead of flamewave:master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
demo
GPL-LICENSE.txt
MIT-LICENSE.txt
changelog.txt
jquery-ui-dialog-maximize-min.css
jquery-ui-dialog-maximize-min.js
jquery-ui-dialog-maximize.css
jquery-ui-dialog-maximize.js
readme.md

readme.md

jQuery Amplified UI Dialog Maximize Extension

For jQuery UI Dialog
Version 1.1

Copyright 2012, Tony Kramer
Dual licensed under the MIT or GPL Version 2 licenses.
GPL License
MIT License

For documentation and for the latest version, see:
https://github.com/flamewave/jquery-ui-dialog-maximize

Description

This is an extension for the jQuery UI Dialog widget that adds the ability to maximize and restore the dialog.

Dependencies

  • jQuery (1.4.2 and up)
  • jQuery-ui (1.8.5 and up - core, widget, dialog)

Use

$("#dialog").dialog({ maximize: true });
<div id="dialog">My Dialog Content</div>

API Documentation

Available Options

(and their default values)
The following options are added to the existing options of the dialog widget:

  • maximize: false
    Indicates if the dialog should support being maximized.

  • openMaximized: false
    Indicates if the dialog should be opened maximized.

  • maximizeFx: { easing: null, duration: "normal", complete: null }
    Animation options for when the dialog is maximized.

    • effect - Name of jQuery animation.
    • duration - Animation duration/speed.
    • callback - A function to call once the animation is complete.
  • restoreFx: { easing: null, duration: 'normal', complete: null }
    Animation options for when the dialog is restored.

    • effect - Name of jQuery animation.
    • duration - Animation duration/speed.
    • callback - A function to call once the animation is complete.

Events

The following events are added to the existing events of the dialog widget:

  • maximized
    Raised when the dialog is maximized.

  • restored
    Raised when the dialog is restored.

Methods

The following methods are added to the existing methods of the dialog widget:

  • maximize()
    Maximizes the dialog. Chainable.

  • restore()
    Restores the dialog to it's original size if it is currently maximized. Chainable.

  • isMaximized()
    Gets a value indicating if the dialog is currently maximized.

Globalization

There is a globalization object defined that can be used to set default globalization options so that they do not need to be specified for every instance of the dialog widget. They are as follows:

$.ui.dialog.maximizeExtension.globalization = {
    // Tooltip of the maximize button.
    textMaximize: "Maximize",

    // Tooltip of the restore button.
    textRestore: "Restore"
}
Something went wrong with that request. Please try again.