LP#1862235 - Create MARC Record - focus on item add and call number
authorJosh Stompro <stompro@stompro.org>
Mon, 10 Feb 2020 16:15:02 +0000 (10:15 -0600)
committerJosh Stompro <stompro@stompro.org>
Mon, 10 Feb 2020 16:15:02 +0000 (10:15 -0600)
commitda4b0b9f3f90618eec2f02d641ae691497f9dd27
treeb6f8b93fa945d0dc26a84c0b7568dd7e159b6366
parent3d42d6cba931af3fefb3ccdc6164381c0f7b9937
LP#1862235 - Create MARC Record - focus on item add and call number

This change sets the focus on the "Add Item" checkbox when the marc editor
is opened with fast item add enabled.  This allows the user to just press space
to enable Add item.

When the add item checkbox is enabled, the focus is moved to the call number field.

This adds a directive to app.js called focusOnShow that makes it easy
to mark an element to have focus when it becomes visible when using ng-show.

I had to add in a bit of redundancy in t_marcedit.tt2, the Add Item checkbox
needs to have it's own ng-show directive for the focus-on-show to work.

Signed-off-by: Josh Stompro <stompro@stompro.org>
Open-ILS/src/templates/staff/cat/share/t_marcedit.tt2
Open-ILS/web/js/ui/default/staff/cat/catalog/app.js