Options
closable
Use this option to set the dialog closable or unclosable.
If the dialog is closable it will close in case the user clicks on any other element on the page.
Code examples
Initialize the dialog widget with the closable option specified, using object in constructor
$A.newDialog({
closable: false
}).draw();
Initialize the dialog widget with the closable option specified, using method chaining
$A.newDialog().closable(false).draw();
Get or set the closable option, after initialization
var dialog = $A.newDialog().draw();
//Setter
dialog.closable(false); //returns dialog
//Getter
console.log(dialog.closable()); //returns value of closable
content
Default value:
$('<div class="automizy-dialog-content">Content</div>')
The content inside the widget can be any jQuery object, AutomizyJS form or HTML code.
Code examples
Initialize the dialog widget with the content option specified, using object in constructor
$A.newDialog({
content: $('<div class="automizy-dialog-content">Content</div>')
}).draw();
Initialize the dialog widget with the content option specified, using method chaining
$A.newDialog().content($('<div class="automizy-dialog-content">Content</div>')).draw();
Get or set the content option, after initialization
var dialog = $A.newDialog().draw();
//Setter
dialog.content($('<div class="automizy-dialog-content">Content</div>')); //returns dialog
//Getter
console.log(dialog.content()); //returns the content element
hash
Use this method to set the hash tag in the browser url.
Code examples
Initialize the dialog widget with the hash option specified, using object in constructor
$A.newDialog({
hash: "newHash"
}).draw();
Initialize the dialog widget with the hash option specified, using method chaining
$A.newDialog().draw().hash("newHash");
Get or set the hash option, after initialization
var dialog = $A.newDialog().draw();
//Setter
dialog.hash("newHash"); //returns dialog
//Getter
console.log(dialog.hash()); //returns value of hash
minHeight
Use this method to set the minimum height of the dialog box.
Code examples
Initialize the dialog widget with the minHeight option specified, using object in constructor
$A.newDialog({
minHeight: "200px"
}).draw();
Initialize the dialog widget with the minHeight option specified, using method chaining
$A.newDialog().draw().minHeight("200px");
Get or set the minHeight option, after initialization
var dialog = $A.newDialog().draw();
//Setter
dialog.minHeight("200px"); //returns dialog
//Getter
console.log(dialog.minHeight()); //returns value of minHeight
position
Default value:
'center middle'
Use this function to set the position if the dialog widget.
First word of string: Horizontal position. Accepted values: left | center | right
Second word of string: Vertical position. Accepted values: top | middle | bottom
Code examples
Initialize the dialog widget with the position option specified, using object in constructor
var dialog = $A.newDialog({position: 'left bottom'}).draw();
Initialize the dialog widget with the position option specified, using method chaining
var dialog = $A.newDialog().position('left bottom').draw();
Get or set the position option, after initialization
var dialog = $A.newDialog().draw();
//Setter
dialog.position('left bottom'); //returns dialog
//Getter
console.log(dialog.position()); //returns value of position
positionX
positionX determines the distance between the left edge of the dialog widget and the left edge of its containing element in pixels.
Code examples
Initialize the dialog widget with the positionX option specified, using object in constructor
$A.newDialog({
positionX: '100px'
}).draw();
Initialize the dialog widget with the positionX option specified, using method chaining
$A.newDialog().positionX('100px').draw();
Get or set the positionX option, after initialization
var dialog = $A.newDialog().draw();
//Setter
dialog.positionX('100px'); //returns dialog
//Getter
console.log(dialog.positionX()); //returns value of positionX
positionY
positionY determines the distance between the top edge of the dialog widget and the top edge of its containing element in pixels.
Code examples
Initialize the dialog widget with the positionY option specified, using object in constructor
$A.newDialog({
positionY: '100px'
}).draw();
Initialize the dialog widget with the positionY option specified, using method chaining
$A.newDialog().positionY('100px').draw();
Get or set the positionY option, after initialization
var dialog = $A.newDialog().draw();
//Setter
dialog.positionY('100px'); //returns dialog
//Getter
console.log(dialog.positionY()); //returns value of positionY
title
The displayed title in the dialog widget.
Code examples
Initialize the dialog widget with the title option specified, using object in constructor
$A.newDialog({
title: 'MyDialog'
}).draw();
Initialize the dialog widget with the id option specified, using method chaining
$A.newDialog().title('MyDialog').draw();
Get or set the title option, after initialization
var dialog = $A.newDialog().draw();
//Setter
dialog.title('MyDialog'); //returns dialog
//Getter
console.log(dialog.title()); //returns value of title
width
The width of the dialog widget.
Code examples
Initialize the dialog widget with the width option specified, using object in constructor
$A.newDialog({
width: 600
}).draw();
Initialize the dialog widget with the width option specified, using method chaining
$A.newDialog().width(600).draw();
Get or set the width option, after initialization
var dialog = $A.newDialog().draw();
//Setter
dialog.width(600); //returns dialog
//Getter
console.log(dialog.width()); //returns value of width
zIndex
The zIndex property specifies the stack order of an element.
An element with greater stack order is always in front of an element with a lower stack order.
Code examples
Initialize the dialog widget with the zIndex option specified, using object in constructor
$A.newDialog({
zIndex: 3000
}).draw();
Initialize the dialog widget with the zIndex option specified, using method chaining
$A.newDialog().zIndex(3000).draw();
Get or set the zIndex option, after initialization
var dialog = $A.newDialog().draw();
//Setter
dialog.zIndex(3000); //returns dialog
//Getter
console.log(dialog.zIndex()); //returns value of zIndex