LP#1747963 Fix "trim list" feature in web client user/rsteed/lp1747963_checkin_trim_list_fix
authorRemington Steed <rjs7@calvin.edu>
Wed, 7 Feb 2018 19:41:47 +0000 (14:41 -0500)
committerRemington Steed <rjs7@calvin.edu>
Wed, 7 Feb 2018 21:18:04 +0000 (16:18 -0500)
commit2496e4ef4d9001ab626c7320257c184192d10aaf
tree7bd415fa58ec8d474d79a499d40ff74f66627481
parentf6555251add7c9ca4c4b66858f34aaa6414142ee
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>
Open-ILS/web/js/ui/default/staff/circ/checkin/app.js