mirror of
https://gitlab.com/TheGamecraft/c-cms.git
synced 2026-04-23 11:29:10 -04:00
Add Material Design for Public and Admin
This commit is contained in:
34
public/js/notify.js
vendored
Normal file
34
public/js/notify.js
vendored
Normal file
@@ -0,0 +1,34 @@
|
||||
function showNotification(type,msg,from, align){
|
||||
|
||||
switch (type) {
|
||||
case 'success':
|
||||
var icon = 'check_circle'
|
||||
break;
|
||||
|
||||
case 'error':
|
||||
var icon = 'error'
|
||||
type = 'danger'
|
||||
break;
|
||||
|
||||
case 'warning':
|
||||
var icon = 'warning'
|
||||
break;
|
||||
|
||||
default:
|
||||
var icon = "bug_report"
|
||||
break;
|
||||
}
|
||||
|
||||
$.notify({
|
||||
icon: icon,
|
||||
message: msg
|
||||
|
||||
},{
|
||||
type: type,
|
||||
timer: 2500,
|
||||
placement: {
|
||||
from: from,
|
||||
align: align
|
||||
}
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user