sugarlabs / sugar-web

Components for Sugar web activities
Apache License 2.0
13 stars 32 forks source link

Add a method to show a alert with the Sugar style #116

Closed godiard closed 9 years ago

godiard commented 9 years ago

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();});

godiard commented 9 years ago

@manuq is nice see you here! ;)