From: Bill Erickson Date: Mon, 28 Aug 2017 21:35:23 +0000 (-0400) Subject: JBAS-1850 Reset lineitem selection every page X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=1747d80b9998f0a27d1b088aa1a7025fc7c0259d;p=working%2FEvergreen.git JBAS-1850 Reset lineitem selection every page 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 --- 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 e90c724da0..363372d72a 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 @@ -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');