LP1803584: Fix Clear button in template editor
authorJason Boyer <jboyer@library.in.gov>
Thu, 15 Nov 2018 18:45:44 +0000 (13:45 -0500)
committerGalen Charlton <gmc@equinoxinitiative.org>
Sat, 3 Aug 2019 16:08:42 +0000 (12:08 -0400)
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 <jboyer@library.in.gov>
Signed-off-by: Beth Willis <willis@noblenet.org>
Signed-off-by: Bill Erickson <berickxx@gmail.com>
Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
Open-ILS/web/js/ui/default/staff/cat/volcopy/app.js

index 79dbf81..5f87703 100644 (file)
@@ -2567,8 +2567,6 @@ function($scope , $q , $window , $routeParams , $location , $timeout , egCore ,
 
                 $scope.clearWorking = function () {
                     angular.forEach($scope.working, function (v,k,o) {
-                        if (k != 'MultiMap') $scope.working.MultiMap[k] = [];
-                        $scope.working.MultiMap[k] = [];
                         if (!angular.isObject(v)) {
                             if (typeof v != 'undefined')
                                 $scope.working[k] = undefined;