lp1731370 CSS styling for new items and volumes
authorJason Etheridge <jason@EquinoxInitiative.org>
Wed, 12 Sep 2018 12:10:32 +0000 (08:10 -0400)
committerGalen Charlton <gmc@equinoxinitiative.org>
Thu, 30 Jul 2020 13:41:52 +0000 (09:41 -0400)
previous commit just handled volumes, this handles copies

Signed-off-by: Jason Etheridge <jason@EquinoxInitiative.org>
Signed-off-by: Elaine Hardy <ehardy@georgialibraries.org>
Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
Open-ILS/src/templates/staff/css/cat.css.tt2
Open-ILS/web/js/ui/default/staff/cat/volcopy/app.js

index 05fe320..ce076d5 100644 (file)
@@ -331,3 +331,4 @@ table.custom-label-table td {
 }
 
 .new-cn { background-color: lightgreen; }
+.new-cp { background-color: lightgreen; }
index db744d3..9898136 100644 (file)
@@ -486,7 +486,7 @@ function(egCore , $q) {
         restrict: 'E',
         replace: true,
         template:
-            '<div class="row">'+
+            '<div class="row" ng-class="{'+"'new-cp'"+':is_new}">'+
                 '<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"'+
@@ -506,11 +506,13 @@ function(egCore , $q) {
                 $scope.barcode_has_error = false;
                 $scope.duplicate_barcode = false;
                 $scope.empty_barcode = false;
+                $scope.is_new = false;
                 $scope.duplicate_barcode_string = window.duplicate_barcode_string;
                 $scope.empty_barcode_string = window.empty_barcode_string;
                 var duplicate_check_count = 0;
 
                 if (!$scope.copy.barcode()) $scope.copy.empty_barcode = true;
+                if ($scope.copy.isnew() || $scope.copy.id() < 0) $scope.copy.is_new = $scope.is_new = true;
 
                 $scope.selectOnFocus = function($event) {
                     if (!$scope.copy.empty_barcode)