x-team/remember — pull request #71 by miphe (2014-09-24 18:57:36+00:00)
Title: Shortcuts

This PR introduces shortcuts to the app.

Pressing n will expand writing panel, focus `textarea`, preparing for writing.
Pressing Shift+Enter will save current entry (or simulate a save, for now).

There's also a bit of refactoring here which was needed to accomplish most of this. All in all, the front end is in a bit of a better shape now.

Using `ng-include` to partialize the index.html layout was a good idea, but resulted in a very troublesome `$scope` management. Since the templates are so small having the markup directly in index.html is totally fine for now.

There's a new library called `angular-hotkeys` introduced. You'll need to run `npm install`.

To make the n shortcut behavior feel a bit better, I also added some jQuery extensions for focusing elements and searching for the end of value in an element, would be annoying to press n and then still have to click at the end of your entry to continue writing.