1
0
Fork 0
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:
Michael Crosby 2013-08-08 19:18:51 +00:00
parent 81b1ee8174
commit b4e8d0b46e
14 changed files with 612 additions and 46 deletions

View file

@ -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;
}
}
});
}
};
})