LP#1747963 Fix "trim list" feature in web client
authorRemington Steed <rjs7@calvin.edu>
Wed, 7 Feb 2018 19:41:47 +0000 (14:41 -0500)
committerBill Erickson <berickxx@gmail.com>
Wed, 21 Mar 2018 15:04:58 +0000 (11:04 -0400)
commite285e4baa9fd39f9acb1b5fc722cd3736ec696e9
treea234c33f9257339e5cab6e6312c1f59e659500a3
parentdcb1bc27741ffeb7303a657af02a772a52c0cb2f
LP#1747963 Fix "trim list" feature in web client

The use of splice() here caused buggy behavior and seemed to be a typo,
so I tried using slice() instead. But that still didn't work correctly.
The list stopped adding items after it reached 21 total, so scanning a
new barcode didn't add it to the list but only refreshed the list.

Instead, this commit sets the length of the array to 20, which shortens
the array as described in the MDN documentation for Array.length. Now it
behaves like it did in the XUL client.

Signed-off-by: Remington Steed <rjs7@calvin.edu>
Signed-off-by: Cesar Velez <cesar.velez@equinoxinitiative.org>
Signed-off-by: Bill Erickson <berickxx@gmail.com>
Open-ILS/web/js/ui/default/staff/circ/checkin/app.js