Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

suppression de jquery du fichier close-alert-box.js #5969

Merged
merged 4 commits into from
Dec 17, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 8 additions & 12 deletions assets/js/close-alert-box.js
Original file line number Diff line number Diff line change
@@ -1,19 +1,15 @@
/* ===== Zeste de Savoir ====================================================
Close alert-boxes
---------------------------------
Author: Alex-D / Alexandre Demode
Author: Alex-D / Alexandre Demode, firm1
========================================================================== */

(function($) {
'use strict'

$('.main').on('click', '.close-alert-box:not(.open-modal)', function(e) {
$(this).parents('.alert-box:first').slideUp(150, function() {
$(this).remove()
})
$(this).parents('.markdown-help:first').slideUp(150, function() {
$(this).remove()
(function() {
window.addEventListener('DOMContentLoaded', function() {
document.addEventListener('click', e => {
if (!e.target.classList.contains('close-alert-box')) return
e.target.parentElement.remove()
e.preventDefault()
})
e.preventDefault()
})
})(jQuery)
})()