hudmol/archivesspace — pull request #332 by payten (2013-03-18 04:35:41+00:00)
Title: Enhanced sidebar in fontend forms

Hi guys - I've spent a little time improving the sidebar behaviour after some comments in the last user testing round. There were definitely some issues with the active sidebar item bouncing around. Another issues raised was being able to navigate quickly to "the 2nd note on the page" - so I've also had a go at aiding access to sub records via new subrecord links in the sidebar.

In summary:

* Add sidebar nav for subrecords - little circle links that allow quick scrolling to each sub record on the page. If a subrecord has errors, the circle is marked red.

* Add an nav item for errors that allows quick navigation to the top of the form to view errors

* Ensure the affix offsets are updated as subrecords are added/removed. The bootstrap scrollspy plugin only sets the affix offsets upon page load, so any changes to the page (new or removed sub records) leave these offsets inaccurate. To fix, we now refresh these offsets whenever a new sub record is added or removed.

* Also had to patch the bootstrap scrollspy plugin so these offsets are calculated correctly. They incorrectly took the page scroll offset into account.