Messages Class
Creating floating Panel-nodes which can be shown and hidden.
Copyright (c) 2014 ITSA - https://github.com/itsa New BSD License - http://choosealicense.com/licenses/bsd-3-clause/
Methods
catchErrors
-
catchOrNot
To catch syste-errors into the message system. When set, errors won't appear in the console.
Parameters:
-
catchOrNot
BooleanWhether errors should be catched or not.
message
-
message
-
[options]
Sends a message (emits) and returns a promise. All option-properties will be merged into the promise. (even when not defined in the api)
Parameters:
-
message
StringThe message to be send
-
[options]
Object optionalThe instance that is going to detach the customEvent
-
[emitter='global']
String optionalthe emitter of the message, will be used as emitterName of the customEvent.
-
[icon]
String optionalan icon-name to be used (fe "alert"). The icon-name should be defined by the
icons
-module. -
[level=1]
Number optionalThe level --> 1='message', 2='warn', 3='error', 4='statusmessage'.
-
[header]
String optionalCan be used by a messagehandler to render the header.
-
[footer]
String optionalCan be used by a messagehandler to render the footer.
-
[timeout]
Number optionalWhen specified, the promise will be resolved after this period of time.
-
[stayActive]
Number optionalWhen specified, the promise won't resolved within this period of time.
-
Returns:
prompt
-
message
-
[options]
Sends a prompt-message with an input-element.
Parameters:
-
message
StringThe message to be send
-
[options]
Object optionalThe instance that is going to detach the customEvent
-
[emitter='global']
String optionalthe emitter of the message, will be used as emitterName of the customEvent.
-
[defaultValue]
String optionalinput's default value.
-
[label]
String optionalThe label for the input-element.
-
[placeholder]
String optionalThe placeholder for the input-element.
-
[icon]
String optionalan icon-name to be used (fe "alert"). The icon-name should be defined by the
icons
-module. -
[header]
String optionalCan be used by a messagehandler to render the header.
-
[footer]
String optionalCan be used by a messagehandler to render the footer.
-
[level=1]
Number optionalThe level --> 1='message', 2='warn', 3='error', 4='statusmessage'.
-
[timeout]
Number optionalWhen specified, the promise will be resolved after this period of time.
-
[stayActive]
Number optionalWhen specified, the promise won't resolved within this period of time.
-