Base class for modal dialogs
The constructor
Name | Type | Description |
---|---|---|
options | BaseDialogOptions | The options of the dialog |
An array with the HTMLElements that have to be added in the footer of the dialog Can be overloaded in the derived classes
A flag to avoid all dialogs close when using the esc or enter keys
Called after the ok button will be clicked and before the dialog will be closed. Can be overloaded in the derived classes.
Hide the error section of the dialog
Hide the wait section of the dialog and show the okbutton
Cancel button handler. Can be overloaded in the derived classes
Ok button handler. Can be overloaded in the derived classes, but you have always to call super.onOk ( ).
Name | Type | Description |
---|---|---|
returnValue | ??? | A value that will be returned to the onOk handler of the Promise |
Show the error section of the dialog
Name | Type | Description |
---|---|---|
errorText | String | The text to display in the error section |
Show the wait section of the dialog and hide the okbutton
Context menu event listener on the background
Drag over the background event listener
The background HTMLElement of the dialog
Mouseup, mousedown and mousemove event listeners on the background
Touch on the background event listener
Wheel event listener on the background
Cancel button click event listener
The error HTMLElement of the dialog
A flag to avoid all dialogs close when using the esc or enter keys
Keyboard key down event listener
Ok button click event listener
OnError promise function
OnOk promise function
The second button if any
The wait HTMLElement of the dialog
Create the background
Create the background HTMLElement event listeners.
Create the error HTMLElement
Create the dialog footer
Create the HTML for the dialog
Create the dialog wait HTMLElement and animation
The destructor. Remove and set to null the event listeners