hypothesis/h — pull request #1359 by aron (2014-07-29 14:59:48+00:00)
Title: Add directive for providing saving updates to buttons 

This wires up the loading/success button state seen in the pattern library (http://localhost:5000/dev/pattern-library) with a directive.

The idea is that a button is given a an attribute that targets a form.

Update

The controller that handles that form would then trigger events on the scope to notify others of it's current state.

```js
elem.on('submit', function () {
scope.$emit('form-state', 'my-test-form', 'loading');
someService.update().then(function () {
scope.$emit('form-state', 'my-test-form', 'success');
});
});
```

This was primarily added for the account forms so that the user gets some feedback when the form has submitted, after they change their email/password.

@hypothesis/developers please review.