From 695c0935b328f96ac992bab3d75786dece7e9380 Mon Sep 17 00:00:00 2001 From: Mike Rylander Date: Tue, 18 Aug 2015 17:53:48 -0400 Subject: [PATCH] webstaff: Update all instances of the call number, mainly for copy display Signed-off-by: Mike Rylander Signed-off-by: Galen Charlton Signed-off-by: Jason Stephenson --- .../web/js/ui/default/staff/cat/volcopy/app.js | 28 ++++++++++++++++++---- 1 file changed, 24 insertions(+), 4 deletions(-) diff --git a/Open-ILS/web/js/ui/default/staff/cat/volcopy/app.js b/Open-ILS/web/js/ui/default/staff/cat/volcopy/app.js index 5127c4fdd6..33c19283b8 100644 --- a/Open-ILS/web/js/ui/default/staff/cat/volcopy/app.js +++ b/Open-ILS/web/js/ui/default/staff/cat/volcopy/app.js @@ -279,26 +279,46 @@ function(egCore , $q) { itemSvc.get_suffixes($scope.callNumber.owning_lib()).then(function(list){ $scope.suffix_list = list; }); - $scope.updateSuffix = function () { $scope.callNumber.suffix($scope.suffix); $scope.callNumber.ischanged(1); }; + $scope.updateSuffix = function () { + angular.forEach($scope.copies, function(cp) { + cp.call_number().suffix($scope.suffix); + cp.call_number().ischanged(1); + }); + } $scope.prefix_list = []; itemSvc.get_prefixes($scope.callNumber.owning_lib()).then(function(list){ $scope.prefix_list = list; }); - $scope.updatePrefix = function () { $scope.callNumber.prefix($scope.prefix); $scope.callNumber.ischanged(1); }; + $scope.updatePrefix = function () { + angular.forEach($scope.copies, function(cp) { + cp.call_number().prefix($scope.prefix); + cp.call_number().ischanged(1); + }); + } $scope.classification_list = []; itemSvc.get_classifications().then(function(list){ $scope.classification_list = list; }); - $scope.updateClassification = function () { $scope.callNumber.label_class($scope.classification); $scope.callNumber.ischanged(1); }; + $scope.updateClassification = function () { + angular.forEach($scope.copies, function(cp) { + cp.call_number().label_class($scope.classification); + cp.call_number().ischanged(1); + }); + } $scope.classification = $scope.callNumber.label_class(); $scope.prefix = $scope.callNumber.prefix(); $scope.suffix = $scope.callNumber.suffix(); $scope.label = $scope.callNumber.label(); - $scope.updateLabel = function () { $scope.callNumber.label($scope.label); $scope.callNumber.ischanged(1); }; + $scope.updateLabel = function () { + angular.forEach($scope.copies, function(cp) { + cp.call_number().label($scope.label); + cp.call_number().ischanged(1); + }); + } $scope.copy_count = $scope.copies.length; $scope.orig_copy_count = $scope.copy_count; -- 2.11.0