mirror of
https://github.com/hkalexling/Mango.git
synced 2026-05-01 00:00:55 -04:00
Move the JS alert function definition to /js/alert.js and move the alert div to views/layout.ecr
This commit is contained in:
@@ -286,12 +286,3 @@ const buildTable = () => {
|
||||
});
|
||||
$('#selection-controls').removeAttr('hidden');
|
||||
};
|
||||
const alert = (level, text) => {
|
||||
hideAlert();
|
||||
const html = '<div class="uk-alert-' + level + '" uk-alert><a class="uk-alert-close" uk-close></a><p>' + text + '</p></div>';
|
||||
$('#alert').append(html);
|
||||
$("html, body").animate({ scrollTop: 0 });
|
||||
};
|
||||
const hideAlert = () => {
|
||||
$('#alert').empty();
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user