Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
vidjil
vidjil
Commits
8b35f74c
Commit
8b35f74c
authored
Jan 13, 2021
by
marc duez
Browse files
com.js : flash popup can display a link to a db page
needed to display server notification with link
parent
2f0c0667
Changes
1
Show whitespace changes
Inline
Side-by-side
browser/js/com.js
View file @
8b35f74c
...
...
@@ -149,7 +149,7 @@ Com.prototype = {
if
(
typeof
obj
.
msg
!=
"
undefined
"
)
text
+=
obj
.
msg
switch
(
obj
.
type
)
{
case
"
flash
"
:
this
.
flash
(
text
,
obj
.
priority
)
this
.
flash
(
text
,
obj
.
priority
,
obj
.
call
)
break
;
case
"
popup
"
:
this
.
popupMsg
(
text
)
...
...
@@ -195,8 +195,6 @@ Com.prototype = {
document
.
body
.
appendChild
(
this
.
log_container
);
document
.
body
.
appendChild
(
this
.
popup_container
);
this
.
div_dataBox
=
document
.
createElement
(
"
div
"
);
this
.
div_dataBox
.
className
=
"
modal data-container
"
;
...
...
@@ -220,9 +218,10 @@ Com.prototype = {
* @param {string} str - message to display
* @param {integr} priority
* */
flash
:
function
(
str
,
priority
){
flash
:
function
(
str
,
priority
,
call
){
priority
=
typeof
priority
!==
'
undefined
'
?
priority
:
0
;
if
(
priority
>=
this
.
min_priority
){
var
div
=
jQuery
(
'
<div/>
'
,
{
'
text
'
:
str
,
...
...
@@ -232,6 +231,24 @@ Com.prototype = {
}).
appendTo
(
this
.
flash_container
)
.
slideDown
(
200
);
if
(
call
){
var
div2
=
jQuery
(
'
<div/>
'
).
appendTo
(
div
);
jQuery
(
'
<div/>
'
,
{
'
text
'
:
"
see details
"
,
'
class
'
:
"
button
"
,
'
click
'
:
function
(){
db
.
call
(
call
.
path
,
call
.
args
);
}
}).
appendTo
(
div2
);
if
(
priority
>=
this
.
ERROR
){
jQuery
(
'
<div/>
'
,
{
'
text
'
:
"
dismiss
"
,
'
class
'
:
"
button
"
,
'
click
'
:
function
(){
$
(
this
).
fadeOut
(
25
,
function
()
{
$
(
this
).
remove
();}
);}
}).
appendTo
(
div2
);
}
}
if
(
priority
<
this
.
ERROR
){
setTimeout
(
function
(){
div
.
fadeOut
(
'
slow
'
,
function
()
{
div
.
remove
();});
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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