diff --git a/modules/default/alert/README.md b/modules/default/alert/README.md index 0451104c..4eb1428a 100644 --- a/modules/default/alert/README.md +++ b/modules/default/alert/README.md @@ -9,36 +9,76 @@ modules: [ { module: 'alert', config: { - // style type: growl|attached|bar - style: "growl", - // effects for the specified style: - // for growl style: scale|slide|genie|jelly - // for attached style: flip|bouncyflip - // for bar style: slidetop|exploader - effect: "slide", - //time a notification is displayed - display_time: 3500, - //shown at startup - welcome_message: "Welcome, start was successfull!" + // The config property is optional. + // See 'Configuration options' for more information. } } ] ``` -##Developer notes + +## Configuration options + +The following properties can be configured: + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
OptionDescription
styleThe style of the notifications.
+
Possible values: growl, attached and bar +
Default value: growl +
effectThe animation effect of the notification style to use.
+
Possible values for growl style: scale, slide, genie and jelly +
Possible values for attached style: flip and bouncyflip +
Possible values for bar style: slidetop and exploader +
Default value: slide +
display_timeTime a notification is displayed.
+
Possible values: any int +
Default value: 3500 +
welcome_messageMessage shown at startup.
+
Possible values: any string +
Default value: Welcome, start was successfull! +
+ + +## Developer notes The `message` and the `title` parameters accept text as well as html. -###Display notification +### Display notification ``` self.sendNotification("SHOW_NOTIFICATION", message); ``` -###Display alert +### Display alert ``` self.sendNotification("SHOW_ALERT", {title: "Hello", message: "This is a test!", type: "success", imageUrl:"url", imageSize: "50x50", timer:1000}); ``` All parameters exept for `title` and `message` are optional. Possible types are `error`, `warning`, `info` and `success`. If you do not use the `timer` parameter, it is your responsibility to manually hide the alert by using `self.sendNotification("HIDE_ALERT");`! -##Open Source Licenses +## Open Source Licenses ###[SweetAlert](http://t4t5.github.io/sweetalert/) The MIT License (MIT)