From c03b51c9ebc309d2752fc1dd3e1258becdbc17fc Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Mon, 12 Jun 2017 17:33:52 -0400 Subject: [PATCH] JBAS-673 Post 2.9 multi-page repairs Only attempt to render copy details for lineitems that are part of the currently displayed page of lineitems. Alt fix for LP#1208613. To ease debugging and eventual support by the browser client, use the borwser's localStorage object when not in XUL mode. Signed-off-by: Bill Erickson --- Open-ILS/web/js/ui/default/acq/common/li_table.js | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/Open-ILS/web/js/ui/default/acq/common/li_table.js b/Open-ILS/web/js/ui/default/acq/common/li_table.js index a50eb98093..e90c724da0 100644 --- a/Open-ILS/web/js/ui/default/acq/common/li_table.js +++ b/Open-ILS/web/js/ui/default/acq/common/li_table.js @@ -22,7 +22,13 @@ dojo.require('openils.CGI'); // KCLS: used for tracking selected lineitems that are // not visibible in the current page of lineitems. // Stores a JSON hash of lineitem ID's -var checkBoxStorage = openils.XUL.localStorage(); +var checkBoxStorage; +if (openils.XUL.localStorage) { + checkBoxStorage = openils.XUL.localStorage(); +} else { + // use browser localStorage outside of the XUL interface. + checkBoxStorage = localStorage; +} if (window.location.toString().indexOf('picklist/view/') < 0) { // only tracking selection of multiple pages of @@ -1900,6 +1906,12 @@ function AcqLiTable() { var containerRow = dojo.byId('acq-inline-copies-row-' + liId); var liRow = dojo.query('[li=' + liId + ']')[0]; + // KCLS JBAS-673 / Alternate fix for LP#1208613 + // liCache contains lineitems from multiple pages. If liRow + // is null, it's from a different page. Avoid any attempts to + // draw its copy details (since they won't be visible). + if (!liRow) return; + if (!containerRow) { // build the inline copies container row and add it to -- 2.11.0