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=b9f529a23843f3c78268cb3dd323437311b737c8;p=evergreen%2Fpines.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 --- 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 f23adb38fd..11547dc4c6 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 @@ -1369,6 +1369,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; @@ -2515,7 +2516,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;