API Docs for: 0.0.1
Show:

Dialog Class

Module: dialog

Defines a dialog-panel to display messages. Every message that fulfills will get the dialog-content as well as the pressed button as return.

Copyright (c) 2014 ITSA - https://github.com/itsa New BSD License - http://choosealicense.com/licenses/bsd-3-clause/

Methods

createContainer

()

Defined in src/dialog/dialog.js:119

Available since 0.0.1

Creates a Panel-instance that will be used to display the messages. Sets instance.model as panel's model and defines model.callback which fulfills the message when a button on the dialog is pressed,

handleMessage

(
  • [delay]
  • [level]
)

Defined in src/dialog/dialog.js:190

Available since 0.0.1

Retrieves the next message from the queue and calls showMessage() if it finds one.

Parameters:

  • [delay] Boolean optional

    if there should be a delay between the previous dialog and the new one

  • [level] Number optional

    to force handling a specific level

isWaiting

() Boolean

Defined in src/dialog/dialog.js:179

Available since 0.0.1

Tells whether dialog is waitin g for new messages and is currently iddle.

Returns:

Boolean:

whether dialog is waitin g for new messages

queueMessage

(
  • e
)

Defined in src/dialog/dialog.js:144

Available since 0.0.1

Processes messages that are emitted by messages-module and add them in the queue.

Parameters:

setupListeners

()

Defined in src/dialog/dialog.js:168

Available since 0.0.1

Defines subscribers to the events: :message, :warn and *:error.

showMessage

(
  • messagePromise
)

Defined in src/dialog/dialog.js:237

Available since 0.0.1

Shows the specified message-promise.

Parameters:

  • messagePromise Promise

    the message to be shown.

Properties

_currentMessageLevel

Number private

Defined in src/dialog/dialog.js:70

Available since 0.0.1

Internal property that tells what message-level is currently active.

Default: 0

errors

Array

Defined in src/dialog/dialog.js:98

Available since 0.0.1

Internal hash all queued message with level=3 (*:error)

Default: []

messages

Array

Defined in src/dialog/dialog.js:80

Available since 0.0.1

Internal hash all queued message with level=1 (*:message)

Default: []

model

Object

Defined in src/dialog/dialog.js:59

Available since 0.0.1

Model that is passed through to the Panel.

Default: { draggable: true }

warnings

Array

Defined in src/dialog/dialog.js:89

Available since 0.0.1

Internal hash all queued message with level=2 (*:warn)

Default: []