mirror of
https://github.com/inventree/InvenTree.git
synced 2025-07-02 11:40:58 +00:00
Added dismissable notifications
- Bootstrap alert - Can close manually - Also set to disappear after configurable time
This commit is contained in:
8
InvenTree/static/script/notification.js
Normal file
8
InvenTree/static/script/notification.js
Normal file
@ -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);
|
||||
});
|
||||
}
|
Reference in New Issue
Block a user