]> git.evergreen-ils.org Git - Evergreen.git/commit
ACQ scroll back to top of lineitem info page
authorBill Erickson <berick@esilibrary.com>
Mon, 17 Sep 2012 18:50:36 +0000 (14:50 -0400)
committerLebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Wed, 17 Oct 2012 01:33:44 +0000 (21:33 -0400)
commit3e400639f1b6c8d948980507c37a45df1a79cba3
treef92ac3c8f8f9023f9cd02489b61bfde0ba073aac
parentc4df2e9ccacb369304dfeca0cfe94286b35d801a
ACQ scroll back to top of lineitem info page

When displaying the lineitem "info" page (li attributes, marc record),
be sure to scroll to the top of the page instead of relying on the
previous scroll location.  In particular, if you last viewed a LI
toward the bottom of the page, returned (causes scroll down), then go
back into the info page, the page will be scrolled to the bottom.

The solution is a little funkier than I'd hoped.  The scroll-to point
has to be a node that is a) within the scrolling dojo div and b). non-
visible when scrollIntoView is called.  Since the top-level
page div may be different, depending on who is loading li_table, we rely
on the caller to place an id=oils-scroll-to-top div in the page for
general top-scrolling.  (Note, also, window.scrollTo does not work when
it's the div and not the full page that needs scrolling).

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Kathy Lussier <klussier@masslnc.org>
Open-ILS/src/templates/acq/picklist/view.tt2
Open-ILS/src/templates/acq/po/view.tt2
Open-ILS/src/templates/acq/search/unified.tt2
Open-ILS/web/js/ui/default/acq/common/li_table.js