dimagi/commcare-hq — pull request #5038 by esoergel (2014-12-10 22:41:19+00:00)
Title: Add a javascript hook to our message framework

@dimagi/team-commcarehq
This is the javascript analog of messages in Django

Use the function `alert_user` to make a message appear on the page. This accepts two args, message, and emphasis. Emphasis corresponds to bootstrap styling, and can be "success", "error", "info", or "warning"

`alert_user("Awesome job!", "success");`

I'd like a little feedback before merging, if possible. In particular, where should this *actually* live? The bit where I add in the Django messages has to live in this file, but the rest could go elsewhere (although it IS small). Should I be sticking some of this in a `$(...)`?