JBAS-1850 Reset lineitem selection every page
authorBill Erickson <berickxx@gmail.com>
Mon, 28 Aug 2017 21:35:23 +0000 (17:35 -0400)
committerBill Erickson <berickxx@gmail.com>
Thu, 21 Mar 2019 19:46:23 +0000 (15:46 -0400)
Clear the list of selected lineitems with every lineitem list page
(selection list, PO, etc.).  This prevents an error where lineitems from
a different selection list would be selected for inclusion in a new PO,
leading the undefined JS errors referencing nonexisting lineitems.

Signed-off-by: Bill Erickson <berickxx@gmail.com>
Open-ILS/web/js/ui/default/acq/common/li_table.js

index e90c724..363372d 100644 (file)
@@ -30,11 +30,9 @@ if (openils.XUL.localStorage) {
     checkBoxStorage = localStorage;
 }
 
-if (window.location.toString().indexOf('picklist/view/') < 0) {
-    // only tracking selection of multiple pages of
-    // lineitems on the picklist page.
-    checkBoxStorage.removeItem('eg.acq.piclist.selected');
-}
+// JBAS-1850 reset selected lineitems store on each page.
+// Note this does not affect paging within a selection list.
+checkBoxStorage.removeItem('eg.acq.piclist.selected');
 
 if (!localeStrings) {   /* we can do this because javascript doesn't have block scope */
     dojo.requireLocalization('openils.acq', 'acq');