These modules provide the logic for working with the modal templates provided by dcp-client.
To maximize flexibility, they each export a config
property which states the id
of the
modal and a list of required ids which this logic depends on. If a suitable modal is found
in the page, instead of loading our template modals, we'll simply attach the logic to the
provided html.
- Guides:
Methods
# async alert(message, message, options)
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
message |
string | The text which will be alerted. |
||
message |
Object | An instanceof Error whose message will be alerted, and stack trace made available. |
||
options |
Object | |||
submit |
string |
<optional> |
"OK" | Text on the submit button. |
title |
string |
<optional> |
"" | Text in the title area. |
onClose |
function |
<optional> |
Override default onClose behavior. An instance of |
If modal is closed without the form being submitted (submitting the form closes the modal).
# async confirm(message, options) → {boolean}
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
message |
string | The text which will be alerted. |
||
options |
Object | |||
positive |
string |
<optional> |
"OK" | Text label of 'positive' button. |
negative |
string |
<optional> |
"Cancel" | Text label of 'negative' button. |
title |
string |
<optional> |
"" | Text in the title area. |
onClose |
function |
<optional> |
Override default onClose behavior. An instance of |
If modal is closed without the form being submitted (submitting the form closes the modal).
True if the 'positive' button was selected, false if the negative button was.
# async getKeystoreFile(options, onCloseopt) → {string}
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
options |
Object | From |
|
name |
string | The name of the keystore type (wallet.get => 'default' and wallet.getId => 'id'). |
|
contextId |
string | An optional, user-defined identifier used for caching keystores.
See |
|
jobName |
string | A user-defined job property provided to identify this job. |
|
onClose |
function |
<optional> |
Override default onClose behavior. An instance of |
If modal is closed without the form being submitted (submitting the form closes the modal).
contents of Keystore file