Snap to grid when dragging accessories... but only works on Chrome somehow!

I don't know what's going on with Firefox...
Add Firefox compatibility for snap to grid

Ran into browser compatibility issues for events, but solved now. Works
on Webkit browsers + Firefox.
Compute grid size based on percentage of layout image

This way we get more consistent snap to grid for various window sizes.
Update on hardware schematics for Arduino shield

Final version will probably be a Beaglebone shield rather than Arduino,
but Arduino is so simple for testing...
Manage uncouplers

"Uncouplers" are special tracks for uncoupling cars. The layout details
view can now configure an accessory to be an uncoupler, and attribute both
address and port to the uncoupler. This way the same address can manage two
uncoupler accessories and no I/O is wasted.
Avoid moving accessories outside of layout area.

Constrain coordinates to within the layout area only.
Manage a log book for locomotives

In the loco edit menu, you can now add/remove/edit logbook entries to keep
track of maintenance tasks. Very simple logbook, nothing fancy.

Note: I used backbone collections to manage the logbook entries, a bit different
from what i have been doing with accessories and controllers so far. No major
added interest, this method also means that we need to delete logbook entries
manually whenever a locomotive is deleted. An alternative would be to manage a logbook
as an attribute of locomotives directly using a Backbone nested attributes plugin. Not
tested yet.
Make accessory layout responsive

The nice draggable display of accessories does not work on phone/tablet screens
because the screen is too small. On those screens, just display the accessories
under the layout. Pure CSS selectors required, that's it.
Responsive design part 2

Missed two files in last commit, typical.
Big bugfix on hardware controller schematics and board.

The 33880 pinout was reversed on my schematics...
Test Arduino sketch for MC33880 testing.

Works fine, using two MC33880 in highside/lowside config. Prototype
full controller software updated to MC33880 support too. Not tested.

Cosmetic fixes on schematics.
Final hardware version (Arduino shield) firmware working

No current measurement yet though.
Update on board layout for Arduino shield.

Better layout, added component names.
Diagnostics view in web app

Now that the harware can run power on tests and detect whether an accessory
is connected or not, created a diags screen in the web app to display this.
Update loco details view
Diagnostics screen works now!

Complete board diagnostics, including port open circuit detection.