LP1805856: Open records in new tabs
authorJane Sandberg <sandbej@linnbenton.edu>
Fri, 7 Dec 2018 00:42:49 +0000 (16:42 -0800)
committerGalen Charlton <gmc@equinoxinitiative.org>
Wed, 16 Jan 2019 20:21:13 +0000 (15:21 -0500)
Catalogers have given the feedback that it's very helpful to have
certain records open in a new tab after they perform certain tasks.

This commit opens the relevant records in a new tab in the following
circumstances:
1) Cataloging > Z39.50 > Import > Go to record (previously opened in the
existing tab)
2) Cataloging > Z39.50 > Overlay > Overlay (previously did not open the
overlaid record at all)
3) Cataloging > Record Buckets > Merge (previously opened the lead
record in the existing tab)

Signed-off-by: Jane Sandberg <sandbej@linnbenton.edu>
Signed-off-by: Jason Boyer <JBoyer@library.in.gov>
Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
Open-ILS/web/js/ui/default/staff/cat/bucket/record/app.js
Open-ILS/web/js/ui/default/staff/cat/z3950/app.js

index 4637f00..59a2fac 100644 (file)
@@ -699,8 +699,7 @@ function($scope,  $q , $routeParams,  bucketSvc,  egCore,  $window,
                     args.lead_id,
                     args.records.map(function(val) { return val.id; })
                 ).then(function() {
-                    $window.location.href =
-                        egCore.env.basePath + 'cat/catalog/record/' + args.lead_id;
+                    $window.location.open(egCore.env.basePath + 'cat/catalog/record/' + args.lead_id);
                 });
             });
         });
index 2e67eea..b524797 100644 (file)
@@ -251,9 +251,7 @@ function($scope , $q , $location , $timeout , $window,  egCore , egGridDataProvi
                         egCore.strings.GO_TO_RECORD,
                         egCore.strings.GO_BACK
                     ).result.then(function() {
-                        // NOTE: $location.path('/cat/catalog/record/' + result.id()) did not work
-                        // for some reason
-                        $window.location.href = egCore.env.basePath + 'cat/catalog/record/' + result.id();
+                        $window.open(egCore.env.basePath + 'cat/catalog/record/' + result.id());
                     });
                 }
             }
@@ -452,6 +450,7 @@ function($scope , $q , $location , $timeout , $window,  egCore , egGridDataProvi
                     $scope.local_overlay_target = 0;
                     egCore.hatch.removeLocalItem('eg.cat.marked_overlay_record');
                     console.debug('overlay complete, target removed');
+                    $window.open(egCore.env.basePath + 'cat/catalog/record/' + overlay_target);
                 }
             );            
         });