2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-06-15 03:25:42 +00:00

Remove old function

This commit is contained in:
Oliver
2021-11-03 17:59:08 +11:00
parent e7f6268640
commit 4cf6b9bd31

View File

@ -1,18 +1,10 @@
function showAlert(target, message, timeout=5000) {
$(target).find(".alert-msg").html(message);
$(target).show();
$(target).delay(timeout).slideUp(200, function() {
$(this).alert(close);
});
}
function showAlertOrCache(alertType, message, cache, timeout=5000) { function showAlertOrCache(alertType, message, cache, timeout=5000) {
if (cache) { if (cache) {
sessionStorage.setItem("inventree-" + alertType, message); sessionStorage.setItem("inventree-" + alertType, message);
} }
else { else {
showAlert('#' + alertType, message, timeout); showMessage('#' + alertType, message, timeout);
} }
} }
@ -87,12 +79,7 @@ function showMessage(message, options={}) {
$('#alerts').append(html); $('#alerts').append(html);
// Remove the alert automatically after a specified period of time // Remove the alert automatically after a specified period of time
setInterval(function() { $(`#alert-${id}`).delay(timeout).slideUp(200, function() {
$(`#alert-${id}`).animate({ $(this).alert(close);
'opacity': 0.0,
'height': '0px',
}, 250, function() {
$(`#alert-${id}`).remove();
}); });
}, timeout);
} }