From 863e9ea11b3f1528fbc7ccbab24716aadb7a351f Mon Sep 17 00:00:00 2001 From: Mike Rylander Date: Tue, 8 Sep 2015 12:38:24 -0400 Subject: [PATCH] webstaff: Add support for the fast-add copy status org setting Signed-off-by: Mike Rylander Signed-off-by: Galen Charlton Signed-off-by: Jason Stephenson --- Open-ILS/web/js/ui/default/staff/cat/volcopy/app.js | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 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 235a37a01e..27a2d360a5 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 @@ -823,6 +823,7 @@ function($scope , $q , $window , $routeParams , $location , $timeout , egCore , }); $scope.workingGridControls = {}; + $scope.add_vols_copies = false; egNet.request( 'open-ils.actor', @@ -841,6 +842,7 @@ function($scope , $q , $window , $routeParams , $location , $timeout , egCore , if (data.raw && data.raw.length) { $scope.dirty = true; + $scope.add_vols_copies = true; /* data.raw data structure looks like this: * [{ @@ -897,8 +899,18 @@ function($scope , $q , $window , $routeParams , $location , $timeout , egCore , } }).then( function() { - $scope.data = itemSvc; - $scope.workingGridDataProvider.refresh(); + if ($scope.add_vols_copies) { + egCore.org.settings([ + 'cat.default_copy_status_fast' + ]).then(function(set) { + $scope.fast_ccs = set['cat.default_copy_status_fast'] || 0; + $scope.data = itemSvc; + angular.forEach($scope.data.copies, function (cp) { + cp.status($scope.fast_ccs); + }); + $scope.workingGridDataProvider.refresh(); + }); + } }); $scope.focusNextFirst = function(prev_lib) { -- 2.11.0