mirror of
https://github.com/portainer/portainer.git
synced 2025-07-24 15:59:41 +02:00
Add growl files for notifications
This commit is contained in:
parent
81b1ee8174
commit
b4e8d0b46e
14 changed files with 612 additions and 46 deletions
|
@ -78,9 +78,30 @@ angular.module('dockerui.services', ['ngResource'])
|
|||
})
|
||||
.factory('Messages', function($rootScope) {
|
||||
return {
|
||||
event: 'messageSend',
|
||||
send: function(msg) {
|
||||
$rootScope.$broadcast('messageSend', msg);
|
||||
send: function(title, text) {
|
||||
$.gritter.add({
|
||||
title: title,
|
||||
text: text,
|
||||
time: 2000,
|
||||
before_open: function{
|
||||
if($('.gritter-item-wrapper').length == 3) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
},
|
||||
error: function(title, text) {
|
||||
$.gritter.add({
|
||||
title: title,
|
||||
text: text,
|
||||
time: 6000,
|
||||
before_open: function{
|
||||
if($('.gritter-item-wrapper').length == 4) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue