Skip to content
This repository has been archived by the owner on Jun 26, 2020. It is now read-only.

Commit

Permalink
Added MessagService.js and bower.json
Browse files Browse the repository at this point in the history
  • Loading branch information
Robin-Manuel Thiel committed Jul 6, 2015
1 parent c4bb633 commit 02bc074
Show file tree
Hide file tree
Showing 2 changed files with 69 additions and 0 deletions.
45 changes: 45 additions & 0 deletions MessageService.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
angular.module("Symanto.Message", []);

var message = angular.module("Symanto.Message");

message.service("MessageService", function() {

var success = function(message) {
$.notify({
message: message,
icon: "glyphicon glyphicon-ok-sign"
}, {
type: 'success'
});

console.log("SUCCESS: " + message);
};

var warning = function(message) {
$.notify({
message: message,
icon: "glyphicon glyphicon-alert"
}, {
type: 'warning'
});

console.log("WARNING: " + message);
};

var error = function(message) {
$.notify({
message: message,
icon: "glyphicon glyphicon-remove-sign"
}, {
type: 'danger'
});

console.log("ERROR: " + message);
};

return {
"success": success,
"warning": warning,
"error": error
};
});
24 changes: 24 additions & 0 deletions bower.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"name": "symanto-angular-messageservice",
"version": "0.0.1",
"homepage": "https://github.com/Symanto/Angular-MessageService",
"authors": [
"Robin-Manuel Thiel <[email protected]>"
],
"main": "MessageService.js",
"keywords": [
"angular",
"symanto"
],
"license": "MIT",
"ignore": [
"**/.*",
"node_modules",
"bower_components",
"test",
"tests"
],
"dependencies": {
"remarkable-bootstrap-notify": "~3.1.3"
}
}

0 comments on commit 02bc074

Please sign in to comment.