From a8184ec17d42c4d102e8e934f5b1531f90da3378 Mon Sep 17 00:00:00 2001 From: Paul-Vincent Roll Date: Sat, 2 Apr 2016 19:12:59 +0200 Subject: [PATCH] Allow welcome_message = false --- modules/default/alert/README.md | 12 ++++++------ modules/default/alert/alert.js | 4 +++- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/modules/default/alert/README.md b/modules/default/alert/README.md index 756859f9..5f1119e8 100644 --- a/modules/default/alert/README.md +++ b/modules/default/alert/README.md @@ -33,16 +33,16 @@ The following properties can be configured: style The style of the notifications.
-
Possible values: growl, attached and bar +
Possible values: growl, attached & bar
Default value: growl effect The 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 +
Possible values for growl style: scale, slide, genie & jelly +
Possible values for attached style: flip & bouncyflip +
Possible values for bar style: slidetop & exploader
Default value: slide @@ -56,7 +56,7 @@ The following properties can be configured: welcome_message Message shown at startup.
-
Possible values: any string +
Possible values: any string & false
Default value: Welcome, start was successfull! @@ -100,7 +100,7 @@ self.sendNotification("SHOW_ALERT", {title: "Hello", message: "This is a test!", type (optional) The type of the alert.
-
Possible values: error, warning, info and success +
Possible values: error, warning, info & success
Default value: none diff --git a/modules/default/alert/alert.js b/modules/default/alert/alert.js index 03e54a75..780dde82 100644 --- a/modules/default/alert/alert.js +++ b/modules/default/alert/alert.js @@ -71,7 +71,9 @@ Module.register('alert',{ } }, start: function() { - this.show_notification(this.config.welcome_message) + if (this.config.welcome_message){ + this.show_notification(this.config.welcome_message) + } Log.info('Starting module: ' + this.name); }