sugarlabs/sugar-web — pull request #116 by godiard (2014-10-08 14:40:59+00:00)
Title: Add a method to show a alert with the Sugar style

The usage is:
activity.showAlert(title, message, btnLabel, btnCallback);

The last two parametter can be null.
By default btnLabel will be 'Ok' and pressing the button will close the alert.
If btnCallback is not null, the alert will be closed, and the function will
be executed.
Example:
activity.showAlert('ERROR',
'Words should be at least 3 character long', null,
function() {child.focus();});