mirror of
https://github.com/ae-utbm/sith.git
synced 2025-07-09 19:40:19 +00:00
/pedagogy/uv/create use quick notif
This commit is contained in:
@ -38,7 +38,14 @@ $( function() {
|
||||
$("#quick_notif li").click(function () {
|
||||
$(this).hide();
|
||||
})
|
||||
} );
|
||||
});
|
||||
|
||||
function createQuickNotif(msg) {
|
||||
const el = document.createElement('li')
|
||||
el.textContent = msg
|
||||
el.addEventListener('click', () => el.parentNode.removeChild(el))
|
||||
document.getElementById('quick_notif').appendChild(el)
|
||||
}
|
||||
|
||||
function display_notif() {
|
||||
$('#header_notif').toggle().parent().toggleClass("white");
|
||||
@ -52,4 +59,4 @@ function display_notif() {
|
||||
// https://docs.djangoproject.com/en/2.0/ref/csrf/#acquiring-the-token-if-csrf-use-sessions-is-true
|
||||
function getCSRFToken() {
|
||||
return $("[name=csrfmiddlewaretoken]").val();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user