openPopover
openPopover
Opens the given form as a popover. You can anchor it to a widget or center it on screen.
Parameters
formPath(string): The path or ID of the form to show in the popoverlinkArg(any): The argument to pass to the opened form (may be null)callback(function): Callback that receives the result when the popover closes (may be null)options(object, optional): Popover options
options entries:
anchor(string): The widget ID to anchor to (omit to center on screen)placement(string): Placement direction —'bottom-left','bottom-right','top-right','top-left','bottom','top','center'offsetX/offsetY(number): Fine-tuning offset relative to the anchorwidth/height(number): The popover's sizebarrierDismissible(boolean): Whether tapping the background closes it (default true)barrierColor(string): The background colorbarrierPassThrough(boolean): Whether mouse events pass through the backgroundmovable(boolean): Whether the popover can be dragged (use withtitleBarHeight)titleBarHeight(number): Title bar height for a movable popoversnapToEdges(boolean): Whether it snaps to screen edgessnapThreshold(number): The snap threshold
Returns: None (void)
Example
// 위젯에 앵커링
$form.openPopover("menus/orderType", null, function(result) {
$log.i("선택:", result);
}, { anchor: "btn_ordertype", placement: "bottom-left", offsetY: 4 });
// 화면 중앙 고정 크기
$form.openPopover("dialogs/picker", null, null,
{ width: 300, height: 400, barrierDismissible: true });
Related
$form.openHoverPopover(formPath, linkArg, callback, options)— mouse-hover popover$form.closePopover(result)— closes the popover