LP1716473 Copy editor hide disabled defaults
[evergreen-equinox.git] / Open-ILS / web / js / ui / default / staff / cat / volcopy / app.js
index 20c8257..0a85f4c 100644 (file)
@@ -1173,6 +1173,19 @@ function($scope , $q , $window , $routeParams , $location , $timeout , egCore ,
         statcat_filter: undefined
     };
 
+    // Returns true if we are editing multiple copies and at least
+    // one field contains multiple values.
+    $scope.hasMulti = function() {
+        var keys = Object.keys($scope.working.MultiMap);
+        // for-loop for shortcut exit
+        for (var i = 0; i < keys.length; i++) {
+            if ($scope.working.MultiMap[keys[i]].length > 1) {
+                return true;
+            }
+        }
+        return false;
+    }
+
     $scope.copyAlertUpdate = function (alerts) {
         if (!$scope.in_item_select &&
             $scope.workingGridControls &&