This class allows the client-side script to execute the code on the server-side using Script Includes. it is used to simply create branded notifications.
property {string} title - Main header of notification
{string} bodyHeader - Header of text body
{string} bodyText - Main text area
{string} comment - Comment wraps in area with grey background, also becomes italic
{array} buttons - Array of buttons (better generate via addButton())
Supposed initialising with specified title @param {string} title - Main header of notification
*/
This method sets header of text body of email notification * @param {string} bodyHeader - Header of text body
Parameter(s):
Name | Type | Mandatory | Default value |
---|---|---|---|
paramName | String | Y | N |
Sets main text body of email notification @param {string} bodyText - Main text body
Sets comment of email notification (after wraps in an area with a grey background, also becomes italic) @param {string} comment - Comment text
@returns {string} Main header of notification
* @returns {string} Header of text body
@returns {string} Main text body
@returns {string} Comment text
@returns {string} Comment text
Add button to array of buttons
* @param {string} text - Button text
* @param {string} url - Url for button action
* @param {string} color - string in HEX format (e.g. default #E31450 - corporate red)
* @param {array} buttonArray - Array of buttons, that will be modified in that method
* @returns {array} base array buttons plus new one
Removes the last added button
Removes all added buttons
Internal method for input type validation
* @param {string} propertyName - Name of property to validate
* @param {any} input - Given input from 'Set' methods
* @param {string} propertyTitle - Title of property for error text
*/
- returns HTML template based on set properties
Creates HTML template for email notification getting properties from class object
* @returns {string} HTML Template