KSHSK / WAVED

Web App for Visualizing Environmental Data
Other
5 stars 1 forks source link

Update Source/util/displayMessage.js to display message in banner #119

Closed seanblue closed 10 years ago

seanblue commented 10 years ago

Banner should be displayed at the top of the page and should disappear after a short period of time.

stnguyen09 commented 10 years ago

Should we also extend this to displaying messages in our modal popups? An example would be in https://github.com/KSHSK/WAVED/pull/130 where you go to bind data, but don't select any data and hit bind. As of this comment, we're still using alerts, but ideally we should just have an error show up somewhere inside the dialog.

seanblue commented 10 years ago

@stnguyen09 I had exactly the same thought. Maybe displayMessage could take an optional argument for where to display the message, and if not included it just goes to the top of the page.

seanblue commented 10 years ago

Possible toast solution: Where I found it: http://dailyjs.com/2011/01/25/jquery-roundup/ Demo: http://akquinet.github.io/jquery-toastmessage-plugin/demo/demo.html Wiki: https://github.com/akquinet/jquery-toastmessage-plugin/wiki Code: https://github.com/akquinet/jquery-toastmessage-plugin

The only problem from reading the Wiki is that it's limited on where the toast can be displayed, and once set cannot be changed.

seanblue commented 10 years ago

This one can be full width at the top at least, but still may not be able to display in the jQuery dialog (unless we customize it I guess). It's non-jQuery. https://github.com/CodeSeven/toastr http://codeseven.github.io/toastr/demo.html

This person gets points for his example toasts being Princess Bride quotes.