Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
embl.org
vf-core-mirror
Commits
30251a11
Unverified
Commit
30251a11
authored
Dec 09, 2021
by
Ken Hawkins
Committed by
GitHub
Dec 09, 2021
Browse files
enhancement: banner-black-bar (#1735)
Support inserting embl-notifications after EBI black bar.
parent
a41f6b3e
Pipeline
#221745
passed with stages
in 10 minutes and 20 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
6 deletions
+16
-6
components/embl-notifications/CHANGELOG.md
components/embl-notifications/CHANGELOG.md
+4
-0
components/embl-notifications/embl-notifications.js
components/embl-notifications/embl-notifications.js
+12
-6
No files found.
components/embl-notifications/CHANGELOG.md
View file @
30251a11
### 1.2.0
*
Support inserting after EBI black bar.
### 1.1.1
*
Remove use of long deprecated
`vf-banner--phase`
variant and replace with
`vf-banner--alert vf-banner--info`
.
...
...
components/embl-notifications/embl-notifications.js
View file @
30251a11
...
...
@@ -66,13 +66,19 @@ function emblNotificationsInject(message) {
if
(
target
.
length
>
0
)
{
target
[
0
].
parentNode
.
insertBefore
(
output
,
target
[
0
].
nextSibling
);
}
else
{
// if no vf-header, show at vf-body
// @thought: we might instead make this show as "top"
let
target
=
document
.
getElementsByClassName
(
"
vf-body
"
);
// if no vf-header, perhaps there's a masthead-black-bar?
let
target
=
document
.
getElementsByClassName
(
"
masthead-black-bar
"
);
if
(
target
.
length
>
0
)
{
// output.classList.add('vf-u-grid--reset');
target
[
0
].
prepend
(
output
);
}
// if still no success, we soft fail
target
[
0
].
parentNode
.
insertBefore
(
output
,
target
[
0
].
nextSibling
);
}
else
{
// if no vf-header, show at vf-body
// @thought: we might instead make this show as "top"
let
target
=
document
.
getElementsByClassName
(
"
vf-body
"
);
if
(
target
.
length
>
0
)
{
// output.classList.add('vf-u-grid--reset');
target
[
0
].
prepend
(
output
);
}
// if still no success, we soft fail
}
}
}
else
if
(
message
.
field_notification_position
==
"
top
"
)
{
...
...
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