#ModalDialogBox
This library provides a modal dialog box, overriding the well-known Window.alert() function.
To begin with, you just have to include this lib via a <script>
tag :
<script src="ModalPopupWindow.js" type="text/javascript"></script>
<script type="text/javascript">
alert();
</script>
The main features are :
- Adding and removing buttons
- Customize completely each component (color, background, text, ...)
- Adding special actions to the buttons clicks
- Adding callback functions triggered when the dialog is dismissed
Customizing the ModalDialog is really simple, all you have to do is chain the modification methods, as follows :
alert().setActionBarText("My custom title")
.setContentText("Very interesting content")
.addButton("My Button", "Click me !", myCallBackFunction)
.setContentColor("#949A9C")
I hope this will give you a hand ! It is under the MIT license, so feel free to use it.