Try another approach.
authorJason Stephenson <jason@sigio.com>
Mon, 17 Dec 2018 16:33:29 +0000 (11:33 -0500)
committerJason Stephenson <jason@sigio.com>
Mon, 17 Dec 2018 16:33:29 +0000 (11:33 -0500)
Open-ILS/web/js/ui/default/staff/cat/volcopy/app.js

index b99672c..a4212e0 100644 (file)
@@ -489,7 +489,7 @@ function(egCore , $q) {
                     '<input id="{{callNumber.id()}}_{{copy.id()}}"'+
                     ' eg-enter="nextBarcode(copy.id())" class="form-control"'+
                     ' type="text" ng-model="barcode" ng-change="updateBarcode()"'+
-                    ' autofocus/>'+
+                    ' focus-me="{{focusBarcode}}"/>'+
                     '<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>'+
@@ -506,6 +506,7 @@ function(egCore , $q) {
                 $scope.empty_barcode = false;
                 $scope.duplicate_barcode_string = window.duplicate_barcode_string;
                 $scope.empty_barcode_string = window.empty_barcode_string;
+                $scope.focusBarcode = (!$scop.copy) ? true : false;
 
                 if (!$scope.copy.barcode()) $scope.copy.empty_barcode = true;