Dialog

(esrith/amos/form/Dialog)

A dialog box is a small window or message box that appears on top of all open windows or other things that are currently displayed on the screen to the user and prompts for a user's response. The user cannot move the dialog box.

Description
new Dialog(params?srcNodeRef?)

Create a new Dialog widget.

Description
creates

Memory storage of all created floating panels.

order

Ordering array of floating panels. This shows how floatng panels are arranged according to their zIndex values.

zIndex

Priority of the floating panel. Higher number has higher priority. Higher priority floating panels will be displayed on top of lower priority floating panels.

Type Description
_styleAttr Object

when you want to set style for other node. you can do this by example... _styleAttr:{ style-property:effected-node } this property was effected where this class was inherited and your widget was called by... var widget = new YourWidget({ style:{ style-property:style-value } }); now effected-node in you widget will have style-property = style-value

active Boolean

If true, this forces the control to enter the active state and classname 'amos-form-active' will be added.

alignment String

Alignment of panel.

animateDuration Number

Animation duration in milliseconds. (Currently not in use)

busy Boolean

If true, this forces the control to enter the busy state and classname 'amos-form-busy' will be added.

closable Boolean

If true, dialog show [x] icon to close itself.

content String | Node

Content of element.

disabled Boolean

If true, any control's events(except change) are not responding. Its content cannot be edited and is excluded when the form is submitted.

draggable Boolean

If true, you can move the panel.

error Boolean

If true, this forces the control to enter the error state and classname 'amos-form-error' will be added.

fadeDuration Number

Fade duration in milliseconds.

footer String | Node

Text of the footer.

groupClass String

Panel group. example: has 3 Panels ,can divide into 2 groups: group one has 1 panel and group two has 2 panels.

iconClass String

Class of icon.

isMaximize Boolean

If true, panel is maximised. It always has opposite value to isMinimise property.

isMinimize Boolean

If true, panel is minimised. It always has opposite value to isMaximise property.

isShow Boolean

If true, the panel is visible.

maxable Boolean

If true, the maximize button is displayed. This button used to enlarge a dialog to its maximum size.

minable Boolean

If true, the minimize button is displayed. This button used to hide a dialog.

modal Boolean

If true, other items on the page will be disabled. Modal dialogs create an overlay below the dialog but above other page elements.

moveable Boolean

If true, you can move the panel.

parentNode Node | String

Node to append panel's element.

readOnly Boolean

If true, the control is read-only and cannot be edited. However, its content, if presents, is included in form submission.

resizable Boolean

If true, panel size can be changed.

showAtCenter Boolean

If true, panel is initially shown at the center of a window.

state String

state of the panel. Valid values are: "normal","minimize" and "maximize". The default value is "normal".

style Object | String

Style of panel.

title String

Text for title of the panel.

viewMode Boolean

If true, the control will show only the displayedValue.

windowResizeDelay Number

delay for safely adjustment the panel.

Return type Description
restore() None

Reset all state and value to default.

resize(size) None

Resize the Panel to specified size.

maximize() None

Enlarge a panel to its maximum size.

minimize() None

Dock a panel to its minimum size.

__baseClassInherit(constructor) None

get className from superclass.

append(node) None

Appends the node as the last child of the node.

bringToTop() None

Move the panel to top.

show(duration) Dojo/Deferred

Show the panel.

hide(duration) Dojo/Deferred

Hide the panel.

adjust() None

Manually adjustment the panel.

Description
hide

The event fires when the hide method is complete.

show

The event fires when the show method is complete.

Constructors Detail
new Dialog(params?srcNodeRef?)

Create a new Dialog widget.

Parameters:
constants Detail
<Dojo/store/Memory>
creates

Memory storage of all created floating panels.

Default: []

<String[]>
order

Ordering array of floating panels. This shows how floatng panels are arranged according to their zIndex values.

Default: []

<Number>
zIndex

Priority of the floating panel. Higher number has higher priority. Higher priority floating panels will be displayed on top of lower priority floating panels.

Default: 900

Properties Detail
<Object>
_styleAttr

when you want to set style for other node. you can do this by example... _styleAttr:{ style-property:effected-node } this property was effected where this class was inherited and your widget was called by... var widget = new YourWidget({ style:{ style-property:style-value } }); now effected-node in you widget will have style-property = style-value

Default value: {}

<Boolean>
active

If true, this forces the control to enter the active state and classname 'amos-form-active' will be added.

Default value: false

<String>
alignment

Alignment of panel.

<Number>
animateDuration

Animation duration in milliseconds. (Currently not in use)

Default value: 300

<Boolean>
busy

If true, this forces the control to enter the busy state and classname 'amos-form-busy' will be added.

Default value: false

<Boolean>
closable

If true, dialog show [x] icon to close itself.

Default value: true

<String | Node>
content

Content of element.

<Boolean>
disabled

If true, any control's events(except change) are not responding. Its content cannot be edited and is excluded when the form is submitted.

Default value: false

<Boolean>
draggable

If true, you can move the panel.

Default value: true

<Boolean>
error

If true, this forces the control to enter the error state and classname 'amos-form-error' will be added.

Default value: false

<Number>
fadeDuration

Fade duration in milliseconds.

Default value: 300

<String>
groupClass

Panel group. example: has 3 Panels ,can divide into 2 groups: group one has 1 panel and group two has 2 panels.

<String>
iconClass

Class of icon.

<Boolean>
isMaximize

If true, panel is maximised. It always has opposite value to isMinimise property.

Default value: false

<Boolean>
isMinimize

If true, panel is minimised. It always has opposite value to isMaximise property.

Default value: false

<Boolean>
isShow

If true, the panel is visible.

Default value: false

<Boolean>
maxable

If true, the maximize button is displayed. This button used to enlarge a dialog to its maximum size.

Default value: true

<Boolean>
minable

If true, the minimize button is displayed. This button used to hide a dialog.

Default value: true

<Boolean>
modal

If true, other items on the page will be disabled. Modal dialogs create an overlay below the dialog but above other page elements.

Default value: false

<Boolean>
moveable
deprecated

Inherited from: esrith/amos/core/_PanelBase.js:427

Deprecated: Use `draggable` instead.

If true, you can move the panel.

Default value: true

<Node | String>
parentNode

Node to append panel's element.

Default value: `domNode.parentNode` or `document.body`

<Boolean>
readOnly

If true, the control is read-only and cannot be edited. However, its content, if presents, is included in form submission.

Default value: false

<Boolean>
resizable

If true, panel size can be changed.

Default value: true

<Boolean>
showAtCenter

If true, panel is initially shown at the center of a window.

Default value: false

<String>
state

state of the panel. Valid values are: "normal","minimize" and "maximize". The default value is "normal".

Default value: normal

<Object | String>
style

Style of panel.

Default value: "width: auto; height: auto; top: 0; left:0; margin: 20px;"

<String>
title

Text for title of the panel.

Default value: "Tin nhắn hệ thống"

<Boolean>
viewMode

If true, the control will show only the displayedValue.

Default value: false

<Number>
windowResizeDelay

delay for safely adjustment the panel.

Default value: 100

Methods Detail
restore
()

Reset all state and value to default.

resize
(
  • size
)

Resize the Panel to specified size.

Parameters
  • <Object> size Required

    size of panel.

maximize
()

Enlarge a panel to its maximum size.

minimize
()

Dock a panel to its minimum size.

__baseClassInherit
(
  • constructor
)

get className from superclass.

Parameters
  • <Object> constructor Required
append
(
  • node
)

Appends the node as the last child of the node.

Parameters
  • <String> node Required

    node which you append

bringToTop
()

Move the panel to top.

<Dojo/Deferred>
show
(
  • duration
)

Show the panel.

Parameters
  • <Number> duration Required

    fade duration

<Dojo/Deferred>
hide
(
  • duration
)

Hide the panel.

Parameters
  • <Number> duration Required

    fade duration

adjust
()

Manually adjustment the panel.

Events Detail
hide

The event fires when the hide method is complete.

Event Payload:
show

The event fires when the show method is complete.

Event Payload: