From 3e400639f1b6c8d948980507c37a45df1a79cba3 Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Mon, 17 Sep 2012 14:50:36 -0400 Subject: [PATCH] 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 Signed-off-by: Kathy Lussier --- Open-ILS/src/templates/acq/picklist/view.tt2 | 1 + Open-ILS/src/templates/acq/po/view.tt2 | 1 + Open-ILS/src/templates/acq/search/unified.tt2 | 1 + Open-ILS/web/js/ui/default/acq/common/li_table.js | 3 +++ 4 files changed, 6 insertions(+) diff --git a/Open-ILS/src/templates/acq/picklist/view.tt2 b/Open-ILS/src/templates/acq/picklist/view.tt2 index 65af63b653..5d4d2c264c 100644 --- a/Open-ILS/src/templates/acq/picklist/view.tt2 +++ b/Open-ILS/src/templates/acq/picklist/view.tt2 @@ -2,6 +2,7 @@ [% ctx.page_title = 'Selection List' %]
+
Selection list
diff --git a/Open-ILS/src/templates/acq/po/view.tt2 b/Open-ILS/src/templates/acq/po/view.tt2 index afa2edc178..1baf68a7b4 100644 --- a/Open-ILS/src/templates/acq/po/view.tt2 +++ b/Open-ILS/src/templates/acq/po/view.tt2 @@ -1,6 +1,7 @@ [% WRAPPER 'base.tt2' %] [% ctx.page_title = "Purchase Order" %]
+
diff --git a/Open-ILS/src/templates/acq/search/unified.tt2 b/Open-ILS/src/templates/acq/search/unified.tt2 index 41b3a6018e..0a7259dce4 100644 --- a/Open-ILS/src/templates/acq/search/unified.tt2 +++ b/Open-ILS/src/templates/acq/search/unified.tt2 @@ -6,6 +6,7 @@