An alerting system for use in XPage applications that utilize Bootstrap & jQuery. If your application uses FontAwesome then icons can be incorporated into the alerts.
- Add bootalert.js to your project and make sure it's included as a page resource or as part of your theme.
- Copy the source of ccBootAlert into a new custom control.
- Add the custom control to any XPages where you need to generate alerts.
- Repeat for the the other custom controls included if you want to utilize their functionality in your application.
bootAlert.js | Contains all of the client side code that interacts with each custom control below. |
ccBootAlert | A custom control that contains the markup and server side hooks to the alerting system. |
ccModalClientSideConfirm | A custom control that contains a Bootstrap modal with a Yes and No button. |
ccPopupOverlay | A custom control that provides an overlay for the screen to communicate to the user there is an action taking place. |
alert |
string | This value should be the classname used in the configuration of the ccBootAlert custom control |
o |
object | Can be configured with the following properties: |
title |
string | Appears as bolded text. Used to convey the alert summary. |
body |
string | Appears as normal text. Used to convey the alert detail. |
alertType |
string | This value determines the color scheme of the alert based on the Bootstrap classes. Valid values are warning , danger , success , info , and default . |
alertIcon |
string | If FontAwesome is available as a resource, a FA icon class can be specified here. FA sizing icons can be added as well. For example fa-check-circle-o fa-lg |
growl |
boolean | If set to true , the alert will pop up in the right hand corner. |
autoClose |
boolean | If set to true , the alert will auto hide after a specified amount of time. Default is false . |
closeInterval |
number | Determines how long (in ms) an alert will be visible before auto closing. Default is 3000 and autoClose must be set to true . |
clickToClose |
boolean | If set to true , then clicking any portion of the alert will close it. If set to false , the alert can only be manually closed by clicking the x in the top right corner. Defaults to true |