From: Mike Rylander Date: Mon, 28 Sep 2015 14:41:29 +0000 (-0400) Subject: Special case for egOrgSelector value reading/writing in copy templates X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=5c7ce8e130d7005220da2e443b663e66978c60dc;p=working%2FEvergreen.git Special case for egOrgSelector value reading/writing in copy templates Signed-off-by: Mike Rylander --- 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 9d4d0888ba..31f36b2ae1 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 @@ -846,7 +846,9 @@ function($scope , $q , $window , $routeParams , $location , $timeout , egCore , $scope.applyTemplate = function (n) { angular.forEach($scope.templates[n], function (v,k) { - if (!angular.isObject(v)) { + if (k == 'circ_lib') { + $scope.working[k] = egCore.org.get(v); + } else if (!angular.isObject(v)) { $scope.working[k] = angular.copy(v); } else { angular.forEach(v, function (sv,sk) { @@ -1446,7 +1448,9 @@ function($scope , $q , $window , $routeParams , $location , $timeout , egCore , $scope.applyTemplate = function (n) { angular.forEach($scope.templates[n], function (v,k) { - if (!angular.isObject(v)) { + if (k == 'circ_lib') { + $scope.working[k] = egCore.org.get(v); + } else if (!angular.isObject(v)) { $scope.working[k] = angular.copy(v); } else { angular.forEach(v, function (sv,sk) { @@ -1621,7 +1625,6 @@ function($scope , $q , $window , $routeParams , $location , $timeout , egCore , }); createSimpleUpdateWatcher('age_protect'); - createSimpleUpdateWatcher('circ_lib'); createSimpleUpdateWatcher('circulate'); createSimpleUpdateWatcher('holdable'); createSimpleUpdateWatcher('fine_level');