From: Mike Rylander Date: Thu, 3 Mar 2016 19:12:37 +0000 (-0500) Subject: LP#1570091: webstaff: indicate warning/error conditions in volcopy editor X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=cab4d08a4c946f46ac29b095c58e52cc4237c4af;p=working%2FEvergreen.git LP#1570091: webstaff: indicate warning/error conditions in volcopy editor Indicate when the user has an empty barcode, duplicate barcode, or empty call number label. Signed-off-by: Mike Rylander Signed-off-by: Galen Charlton --- diff --git a/Open-ILS/src/templates/staff/cat/volcopy/t_edit.tt2 b/Open-ILS/src/templates/staff/cat/volcopy/t_edit.tt2 index 9511963acd..e110bbfd43 100644 --- a/Open-ILS/src/templates/staff/cat/volcopy/t_edit.tt2 +++ b/Open-ILS/src/templates/staff/cat/volcopy/t_edit.tt2 @@ -1,4 +1,7 @@
+ + +
'+ '
'+ '
'+ @@ -311,14 +323,27 @@ function(egCore , $q) { function ( $scope , itemSvc , egCore ) { $scope.new_part_id = 0; $scope.barcode_has_error = false; + $scope.duplicate_barcode = false; + $scope.empty_barcode = false; + $scope.duplicate_barcode_string = window.duplicate_barcode_string; + $scope.empty_barcode_string = window.empty_barcode_string; $scope.nextBarcode = function (i) { $scope.focusNext(i, $scope.barcode); } $scope.updateBarcode = function () { - if ($scope.barcode != '') + if ($scope.barcode != '') { + $scope.empty_barcode = false; $scope.barcode_has_error = !Boolean(itemSvc.checkBarcode($scope.barcode)); + if ($scope.copy.isnew()) { + itemSvc.checkDuplicateBarcode($scope.barcode) + .then(function (state) { $scope.duplicate_barcode = state }); + } + } else { + $scope.empty_barcode = true; + } + $scope.copy.barcode($scope.barcode); $scope.copy.ischanged(1); if (itemSvc.currently_generating) @@ -385,7 +410,10 @@ function(egCore , $q) { '
'+ '
'+ + '
'+ + ''+ + '
{{empty_label_string}}
'+ + '
'+ '
'+ '