From: Jason Boyer Date: Thu, 15 Nov 2018 18:45:44 +0000 (-0500) Subject: LP1803584: Fix Clear button in template editor X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=refs%2Fheads%2Fuser%2Fdpearl%2Flp1803584-copy-edit-template-clear-signoff;p=working%2FEvergreen.git LP1803584: Fix Clear button in template editor There are multiple controllers in staff/cat/volcopy/ and 2 of them have a clearWorking() function. The template editor controller is referencing $scope.MultiMap[] which will never exist in the template editor, while the actual item editor controller clearWorking() does not reference $scope.MultiMap[], meaning that clearing multiple items at once would not work as expected. This branch clears up this confusion. Signed-off-by: Jason Boyer Signed-off-by: Beth Willis Signed-off-by: Bill Erickson Signed-off-by: Dan Pearl --- 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 287524cb0d..8bfe70b456 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 @@ -1416,6 +1416,7 @@ function($scope , $q , $window , $routeParams , $location , $timeout , egCore , $scope.clearWorking = function () { angular.forEach($scope.working, function (v,k,o) { + $scope.working.MultiMap[k] = []; if (!angular.isObject(v)) { if (typeof v != 'undefined') $scope.working[k] = undefined; @@ -2565,7 +2566,6 @@ function($scope , $q , $window , $routeParams , $location , $timeout , egCore , $scope.clearWorking = function () { angular.forEach($scope.working, function (v,k,o) { - $scope.working.MultiMap[k] = []; if (!angular.isObject(v)) { if (typeof v != 'undefined') $scope.working[k] = undefined;