diff --git a/InvenTree/static/script/notification.js b/InvenTree/static/script/notification.js new file mode 100644 index 0000000000..58f1bfa3a1 --- /dev/null +++ b/InvenTree/static/script/notification.js @@ -0,0 +1,8 @@ +function showAlert(target, message, timeout=5000) { + + $(target).find(".alert-msg").html(message); + $(target).show(); + $(target).delay(timeout).slideUp(200, function() { + $(this).alert(close); + }); +} \ No newline at end of file diff --git a/InvenTree/templates/base.html b/InvenTree/templates/base.html index 1ba7605ab4..5681010605 100644 --- a/InvenTree/templates/base.html +++ b/InvenTree/templates/base.html @@ -39,6 +39,7 @@ InvenTree {% endblock %} +{% include 'notification.html' %} @@ -48,6 +49,7 @@ InvenTree + {% block js_load %} {% endblock %} diff --git a/InvenTree/templates/notification.html b/InvenTree/templates/notification.html new file mode 100644 index 0000000000..2b91006404 --- /dev/null +++ b/InvenTree/templates/notification.html @@ -0,0 +1,16 @@ +