openDialog
openDialog
Opens the given form as a dialog.
Parameters
formPath(string): The path or ID of the form to show in the dialoglinkArg(any): The argument to pass to the opened form (may be null)callback(function): Callback that receives the result when the dialog closes (may be null)options(object, optional): Dialog options
options entries:
width(number): The dialog width in logical pixelsbarrierColor(string): The background overlay color (for example"#66000000")barrierDismissible(boolean): Whether tapping the background closes it (default false)
Returns: None (void)
openDialog vs openSizedDialog vs openFullDialog
openDialog | openSizedDialog | openFullDialog | |
|---|---|---|---|
| Sizing | Width only, via options | width / height passed directly | Full screen |
| Transition | Default | Default | Zoom transition |
barrierDismissible default | false | false | true (ESC works) |
Example
$form.openDialog("dialogs/confirm", { message: "삭제하시겠습니까?" },
function(result) {
if (result?.confirmed) {
$log.i("확인 선택");
}
},
{ width: 400, barrierDismissible: true }
);
Related
$form.openFullDialog(formPath, linkArg, callback)— full-screen dialog$form.openSizedDialog(formPath, linkArg, width, height, callback, barrierDismissible)— explicitly sized dialog$form.closeDialog(result)— closes the dialog from inside itself