Class ModalBaseDialog extends BaseDialog

Base class for modal dialogs

Source : file dialogs/baseDialog/ModalBaseDialog.js at line 43

Constructor

new ModalBaseDialog ( options )

The constructor

Source : file dialogs/baseDialog/ModalBaseDialog.js at line 343

Parameters

Name Type Description
options BaseDialogOptions

The options of the dialog

Public getters and setters

readonly get footerHTMLElements : Array of HTMLElement

An array with the HTMLElements that have to be added in the footer of the dialog Can be overloaded in the derived classes

Source : file dialogs/baseDialog/ModalBaseDialog.js at line 443

get keyboardELEnabled : Boolean

A flag to avoid all dialogs close when using the esc or enter keys

Source : file dialogs/baseDialog/ModalBaseDialog.js at line 450

set keyboardELEnabled

Source : file dialogs/baseDialog/ModalBaseDialog.js at line 452

Public methods

canClose ( )

Called after the ok button will be clicked and before the dialog will be closed. Can be overloaded in the derived classes.

Source : file dialogs/baseDialog/ModalBaseDialog.js at line 380

Returns

True when the dialog can be closed (all data in the dialog are valid), false otherwise.
Type : Boolean

hideError ( )

Hide the error section of the dialog

Source : file dialogs/baseDialog/ModalBaseDialog.js at line 432

hideWait ( )

Hide the wait section of the dialog and show the okbutton

Source : file dialogs/baseDialog/ModalBaseDialog.js at line 412

onCancel ( )

Cancel button handler. Can be overloaded in the derived classes

Source : file dialogs/baseDialog/ModalBaseDialog.js at line 368

onOk ( returnValue )

Ok button handler. Can be overloaded in the derived classes, but you have always to call super.onOk ( ).

Source : file dialogs/baseDialog/ModalBaseDialog.js at line 389

Parameters

Name Type Description
returnValue ???

A value that will be returned to the onOk handler of the Promise

show ( )

Show the dialog

Source : file dialogs/baseDialog/ModalBaseDialog.js at line 352

showError ( errorText )

Show the error section of the dialog

Source : file dialogs/baseDialog/ModalBaseDialog.js at line 422

Parameters

Name Type Description
errorText String

The text to display in the error section

showWait ( )

Show the wait section of the dialog and hide the okbutton

Source : file dialogs/baseDialog/ModalBaseDialog.js at line 403

Private properties

#backgroundContextMenuEL : BackgroundContextMenuEL

Context menu event listener on the background

Source : file dialogs/baseDialog/ModalBaseDialog.js at line 155

#backgroundDragOverEL : BackgroundDragOverEL

Drag over the background event listener

Source : file dialogs/baseDialog/ModalBaseDialog.js at line 127

#backgroundHTMLElement : HTMLElement

The background HTMLElement of the dialog

Source : file dialogs/baseDialog/ModalBaseDialog.js at line 50

#backgroundMouseEL : BackgroundMouseEL

Mouseup, mousedown and mousemove event listeners on the background

Source : file dialogs/baseDialog/ModalBaseDialog.js at line 141

#backgroundTouchEL : BackgroundTouchEL

Touch on the background event listener

Source : file dialogs/baseDialog/ModalBaseDialog.js at line 134

#backgroundWheelEL : BackgroundWheelEL

Wheel event listener on the background

Source : file dialogs/baseDialog/ModalBaseDialog.js at line 148

#cancelButtonClickEL : CancelButtonClickEL

Cancel button click event listener

Source : file dialogs/baseDialog/ModalBaseDialog.js at line 99

#errorHTMLElement : HTMLElement

The error HTMLElement of the dialog

Source : file dialogs/baseDialog/ModalBaseDialog.js at line 57

#keyboardELEnabled : Boolean

A flag to avoid all dialogs close when using the esc or enter keys

Source : file dialogs/baseDialog/ModalBaseDialog.js at line 71

#modalDialogKeyboardKeydownEL : ModalDialogKeyboardKeydownEL

Keyboard key down event listener

Source : file dialogs/baseDialog/ModalBaseDialog.js at line 120

#okButton : HTMLElement

The ok button

Source : file dialogs/baseDialog/ModalBaseDialog.js at line 78

#okButtonClickEL : OkButtonClickEL

Ok button click event listener

Source : file dialogs/baseDialog/ModalBaseDialog.js at line 92

#onPromiseErrorFunction : Function

OnError promise function

Source : file dialogs/baseDialog/ModalBaseDialog.js at line 113

#onPromiseOkFunction : Function

OnOk promise function

Source : file dialogs/baseDialog/ModalBaseDialog.js at line 106

#secondButton : null or HTMLElement

The second button if any

Source : file dialogs/baseDialog/ModalBaseDialog.js at line 85

#waitHTMLElement : HTMLElement

The wait HTMLElement of the dialog

Source : file dialogs/baseDialog/ModalBaseDialog.js at line 64

Private methods

#createBackgroundHTMLElement ( )

Create the background

Source : file dialogs/baseDialog/ModalBaseDialog.js at line 161

#createBackgroundHTMLElementEL ( )

Create the background HTMLElement event listeners.

Source : file dialogs/baseDialog/ModalBaseDialog.js at line 171

#createErrorHTMLElement ( )

Create the error HTMLElement

Source : file dialogs/baseDialog/ModalBaseDialog.js at line 197

#createFooterHTMLElement ( )

Create the dialog footer

Source : file dialogs/baseDialog/ModalBaseDialog.js at line 236

#createHTML ( )

Create the HTML for the dialog

Source : file dialogs/baseDialog/ModalBaseDialog.js at line 281

#createWaitHTMLElement ( )

Create the dialog wait HTMLElement and animation

Source : file dialogs/baseDialog/ModalBaseDialog.js at line 211

#destructor ( )

The destructor. Remove and set to null the event listeners

Source : file dialogs/baseDialog/ModalBaseDialog.js at line 293

#show ( onOk, onError )

Build and show the dialog

Source : file dialogs/baseDialog/ModalBaseDialog.js at line 333

Parameters

Name Type Description
onOk Function

The onOk Promise handler

onError Function

The onError Promise handler