Refactor command action

Also fix an issue with SC.WYSIWYGStyleView if that pull request is
merge:
https://github.com/sproutcore/sproutcore/commit/824c838c66f62b6c0d19eac0
9998c9cbe3021f64