cantino/huginn — pull request #512 by cantino (2014-09-18 06:27:02+00:00)
Title: Fix schedule reset AKA refactor all the JavaScript!

So, I set out to fix a little bug that was annoying me: when making a new Agent, saving the form with errors would forget your schedule setting, putting it back to the default.

In fixing this, I decided to reorganize all the JavaScript, because it was getting unwieldy.

In this PR:

* JavaScript reorganization
* `components/` contains global features and utilities, broken down by task.
* `pages/` contains JavaScript for specific URLs, registered with `Utils.registerPage`.
* `application.js` only contains requires.
* Fix for the schedule reset bug when creating an Agent with errors.
* Agent options are now reset to Agent default when changing the Agent in the dropdown. *(Do you folks like this?)*

I'd appreciate a few people testing this out, since I could have broken something.