spazproject / Spaz-Enyo

A version of Spaz targeted for tablet devices
http://getspaz.com
Other
45 stars 10 forks source link

Disable controls and show spinner when posting #47

Closed funkatron closed 13 years ago

funkatron commented 13 years ago

When we send, we need to:

nguarracino commented 13 years ago

Any preference on how we should display an error? We could just show a banner, or we could do something more obtrusive like an error popup.

funkatron commented 13 years ago

I'm working up a simple notification lib that will help. coming very shortly.

nguarracino commented 13 years ago

Awesome, that looks great. I think this can be closed then.

funkatron commented 13 years ago

Can we disable all other controls as well? It looks like you can still edit the message while it sends, and that can actually re-enable the send button. We should disable all controls, except the close panel [x]

nguarracino commented 13 years ago

The change I just committed should do what we want, except that RichText.setDisabled(true) doesn't seem to work. I've posted a question on the forums to see if it's a bug.

nguarracino commented 13 years ago

I heard back on the forum and unfortunately, RichText controls cannot be disabled at the moment. This latest change attempts to work around that by throwing out any keydown events if the control is disabled. So you can still focus the control but you can't enter any characters so the Send button stays disabled.

willhoney7 commented 13 years ago

We could have an "onFocus" listener that blurs focus. I'm going to play with it and see if that works better.

willhoney7 commented 13 years ago

I just committed that change. Should work pretty well.