This repository has been archived by the owner on Jun 26, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added MessagService.js and bower.json
- Loading branch information
Robin-Manuel Thiel
committed
Jul 6, 2015
1 parent
c4bb633
commit 02bc074
Showing
2 changed files
with
69 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
}; | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" | ||
} | ||
} |