Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
971a2879
Commit
971a2879
authored
Oct 01, 2020
by
samdbeckham
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adds a catch for non-dismissible alerts
parent
c0fed047
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
0 deletions
+3
-0
app/assets/javascripts/alert_handler.js
app/assets/javascripts/alert_handler.js
+3
-0
No files found.
app/assets/javascripts/alert_handler.js
View file @
971a2879
...
...
@@ -12,6 +12,9 @@ export default function initAlertHandler() {
const
elements
=
document
.
querySelectorAll
(
selector
);
elements
.
forEach
(
element
=>
{
const
button
=
element
.
querySelector
(
DISMISS_LABEL
)
||
element
.
querySelector
(
DISMISS_CLASS
);
if
(
!
button
)
{
return
;
}
button
.
addEventListener
(
'
click
'
,
()
=>
element
.
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