codeforamerica/trails-mobile — pull request #126 by anselmbradford (2014-05-12 09:55:15+00:00)
Title: Fixes #114 - animates closing of trail details

- Changes how trail details animates by utilizing the `top` property
and `calc()` notation to reduce the number of variables in the
setTrailViewOffset() method.
- Performs CSS cleanup around trail details elements by removing unnecessary properties.
- Performs HTML cleanup by removing unneeded nesting and assigning IDs
to elements that are retrieved by JS.
- Migrates some HTML elements around the trail details to semantic
elements so the nesting of elements is easier to see in the source HTML.
- Adds methods to controller for toggling trail details, and
consolidates code around toggling the trail details. Also, creates
variables for DOM elements that were looked up repeatedly.

Of note, the trail details page is no longer hidden with ng-show; it’s
simply moved out of view. This is to accommodate animating it out of
view when the view changes to the map view. It’s at a 3000 z-index, so
anything that should appear on top of it should be greater than
z-index:3000.