tmt.jquery.modalframe

tmt.jquery.modalframe Is a jQuery based widget. It leverages and extends the Dialog widget from UI - jQuery. Its main purpose it to display iframes inside modal dialogs. The dialogs can also be "chained" and are aware of other dialogs available inside the page

In order to use this library you need tmt_jquery_modalframe.js, a UI -jQuery's build that contains that support the Dialog widget (like this one) and jquery.js

Samples

Syntax reference

tmt.jquery.modalframe.open(url, options) Open a modal dialog loading the given url inside it

Available arguments:
  1. url. Path to the page you want to display (required)
  2. options. An object containing name value pairs (optional)

Available options:

  • title. Specifies the title of the dialog. Default to an empty string
  • position. Specifies where the dialog should be displayed. Possible values: center, left, right, top, bottom. Default to "center"
  • height. The height of the dialog, in pixels. Default to 200
  • width. The width of the dialog, in pixels. Default to 300
  • opacity. Amount of opacity to be used for the overlay. Default to 0.5
  • background. Background color used for the overlay. Default to #000000
  • resizable. Specifies whether the dialog will be resizeable. Possible values: true, false. Default to false since currently iframes within resizable dialogs don't work well in FF and Safari (they are fine in IE).
  • onClose. Callback to be trigger as soon as the dialog is closed
  • onOpen. Callback to be trigger as soon as the dialog is opened
tmt.jquery.modalframe.close() Close the topmost dialog, if any
tmt.jquery.modalframe.closeAll() Close all dialogs
tmt.jquery.modalframe.getOpener() Return the opener window object of the topmost dialog
tmt.jquery.modalframe.refreshOpener() Refresh the opener window of the topmost frame
tmt.jquery.modalframe.resize(newWidth, newHeight) Resize the topmost dialog