lp1731370 CSS styling for new items and volumes collab/phasefx/lp1739087_volcopy_x_cn
authorJason Etheridge <jason@EquinoxInitiative.org>
Wed, 12 Sep 2018 12:10:32 +0000 (08:10 -0400)
committerJason Etheridge <jason@EquinoxInitiative.org>
Wed, 12 Sep 2018 12:10:32 +0000 (08:10 -0400)
previous commit just handled volumes, this handles copies

Signed-off-by: Jason Etheridge <jason@EquinoxInitiative.org>
Open-ILS/src/templates/staff/css/cat.css.tt2
Open-ILS/web/js/ui/default/staff/cat/volcopy/app.js

index 6fcb737..cbf66d8 100644 (file)
@@ -199,3 +199,4 @@ grid[name="-none-"] * label { color: black; }
 }
 
 .new-cn { background-color: lightgreen; }
+.new-cp { background-color: lightgreen; }
index 6a3b02e..6080e88 100644 (file)
@@ -470,7 +470,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"'+
@@ -489,10 +489,12 @@ 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;
 
                 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.nextBarcode = function (i) {
                     $scope.focusNext(i, $scope.barcode);