%META:TOPICPARENT{name="OATDOCIndex"}%
---+ dialog.js
Simple wrapper for OK/Cancel dialog, that can contain any data.
%TOC%
---++ Objects
---+++ OAT.Dialog(title, contentDiv, optObj)
Creates a dialog window with title of title, puts contentDiv into it. Various options specify its appearance and behavior:
* *width* - in pixels,0 = auto
* *height* - in pixels, 0 = auto
* *modal* - 1/0
* *zIndex* - default 1000
* *onshow* - callback to be performed when dialog is shown
* *onhide* - callback to be performed when dialog is hidden
* *buttons* - 1/0, whether to show OK/Cancel buttons
---++ Methods
---+++ OAT.Dialog::show()
Shows the dialog.
---+++ OAT.Dialog::hide()
Hides the dialog.
---++ Properties
---+++ OAT.Dialog::ok
Callback to be performed when user clicks 'OK' button.
---+++ OAT.Dialog::cancel
Callback to be performed when user clicks 'Cancel' button.
---++ Example
var d = new OAT.Dialog("dialog", div, {modal:1, buttons:1});
d.show();
CategoryDocumentation CategoryOAT CategoryOpenSource