-
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.
#2 c5 notification widget implemented
- Loading branch information
Showing
2 changed files
with
38 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
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,31 @@ | ||
var ht7 = ht7 || {}; | ||
ht7.widgets = ht7.widgets || {}; | ||
|
||
ht7.widgets.c5 = { | ||
notification: { | ||
/** | ||
* Show a concrete5 notification. | ||
* | ||
* @param {string} title The title of the c5 notification. | ||
* @param {string} msg The content of the c5 | ||
* notification. | ||
* @param {string} alertType The kind of the c5 notification. | ||
* Supported types: 'success', | ||
* 'error', null. | ||
*/ | ||
add: function(title, msg, alertType) { | ||
const parameters = { | ||
title: title, | ||
message: msg | ||
}; | ||
|
||
if (alertType === 'success') { | ||
ConcreteAlert.notify(parameters); | ||
} else if (alertType === 'error') { | ||
ConcreteAlert.error(parameters); | ||
} else { | ||
ConcreteAlert.info(parameters); | ||
} | ||
} | ||
} | ||
}; |