Use a function.
authorJason Stephenson <jason@sigio.com>
Mon, 17 Dec 2018 16:41:18 +0000 (11:41 -0500)
committerJason Stephenson <jason@sigio.com>
Mon, 17 Dec 2018 16:41:18 +0000 (11:41 -0500)
Open-ILS/web/js/ui/default/staff/cat/volcopy/app.js

index 79747f3..6172c66 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()"'+
-                    ' focus-me="{{focusBarcode}}"/>'+
+                    ' 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,10 +506,14 @@ 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 = (!$scope.copy) ? true : false;
+
 
                 if (!$scope.copy.barcode()) $scope.copy.empty_barcode = true;
 
+                $scope.focusBarcode() {
+                    return $scope.copy.empty_barcode;
+                }
+
                 $scope.nextBarcode = function (i) {
                     $scope.focusNext(i, $scope.barcode);
                 }