LP1752968: Autofocus the barcode input on the holdings editor. user/sandbergja/lp1752968_autofocus_barcode_in_holdings_editor
authorJane Sandberg <sandbej@linnbenton.edu>
Fri, 9 Nov 2018 00:01:57 +0000 (16:01 -0800)
committerJane Sandberg <sandbej@linnbenton.edu>
Fri, 9 Nov 2018 00:01:57 +0000 (16:01 -0800)
To test:
1) Do a catalog search and click on one of the records.
2) Click "Add Holdings"
3) Note that there is no focus in the barcode field.
4) Apply this commit.
5) Repeat steps 1-2.  Note that there is now focus in the
barcode field.

Signed-off-by: Jane Sandberg <sandbej@linnbenton.edu>
Open-ILS/web/js/ui/default/staff/cat/volcopy/app.js

index 0928b7c..2b46ffd 100644 (file)
@@ -488,7 +488,7 @@ function(egCore , $q) {
                 '<div class="col-xs-5" ng-class="{'+"'has-error'"+':barcode_has_error}">'+
                     '<input id="{{callNumber.id()}}_{{copy.id()}}"'+
                     ' eg-enter="nextBarcode(copy.id())" class="form-control"'+
-                    ' type="text" ng-model="barcode" ng-change="updateBarcode()"/>'+
+                    ' type="text" ng-model="barcode" ng-change="updateBarcode()" autofocus />'+
                     '<div class="label label-danger" ng-if="duplicate_barcode">{{duplicate_barcode_string}}</div>'+
                     '<div class="label label-danger" ng-if="empty_barcode">{{empty_barcode_string}}</div>'+
                 '</div>'+