Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
typo3
qfq
Commits
fd682483
Commit
fd682483
authored
Aug 14, 2017
by
bbaer
Browse files
Added constant NO_TIMEOUT
parent
664ace96
Changes
1
Hide whitespace changes
Inline
Side-by-side
javascript/src/Alert.js
View file @
fd682483
...
...
@@ -72,7 +72,7 @@ var QfqNS = QfqNS || {};
* @param {string} options.message message to be displayed
* @param {string} [options.type] type of message, can be `"info"`, `"warning"`, or `"error"`. Default is `"info"`.
* @param {number} [options.timeout] timeout in milliseconds. If timeout is less than or equal to 0, the alert
* won't timeout and stay open until dismissed by the user. Default `
0
`.
* won't timeout and stay open until dismissed by the user. Default `
n.Alert.constants.NO_TIMEOUT
`.
* @param {boolean} [options.modal] whether or not alert is modal, i.e. prevent clicks anywhere but the dialog.
* Default is `false`.
* @param {object[]} options.buttons what buttons to display on alert. If empty array is provided, no buttons are
...
...
@@ -92,14 +92,14 @@ var QfqNS = QfqNS || {};
this
.
buttons
=
arguments
[
2
]
||
[];
this
.
modal
=
false
;
// this.timeout < 1 means forever
this
.
timeout
=
0
;
this
.
timeout
=
n
.
Alert
.
constants
.
NO_TIMEOUT
;
}
else
{
// new style
this
.
message
=
options
.
message
||
"
MESSAGE
"
;
this
.
messageType
=
options
.
type
||
"
info
"
;
this
.
buttons
=
options
.
buttons
||
[];
this
.
modal
=
options
.
modal
||
false
;
this
.
timeout
=
options
.
timeout
||
0
;
this
.
timeout
=
options
.
timeout
||
n
.
Alert
.
constants
.
NO_TIMEOUT
;
}
this
.
$alertDiv
=
null
;
...
...
@@ -117,7 +117,8 @@ var QfqNS = QfqNS || {};
n
.
Alert
.
constants
=
{
alertContainerId
:
"
qfqAlertContainer
"
,
alertContainerSelector
:
"
#qfqAlertContainer
"
,
jQueryAlertRemoveEventName
:
"
qfqalert.remove:
"
jQueryAlertRemoveEventName
:
"
qfqalert.remove:
"
,
NO_TIMEOUT
:
0
};
/**
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment