Fix bug where `getPrecision` was undefined

- Reorder the Javascript code
- Ensure that we never call `getPrecision` on a string ("")
Merge pull request #2 from sealevelresearch/fix-undefined-function-bug

Fix bug where `getPrecision` was undefined
Make tide level a numeric input field

Improve the experience on mobile by making the tide levels input box
numeric.

Note Android numeric keypads only have a "next" button which is
equivalent to "tab". Therefore we need another form element 1) so that
the keypad disappears and 2) so that "next" doesn't jump up to the
location bar.

https://www.pivotaltracker.com/story/show/74506964

[Delivers #74506964]
Merge pull request #3 from sealevelresearch/numeric-input-form

Make tide level a numeric input field