From 7482a039798fb9f71a64562b4a94d05be4db0ff8 Mon Sep 17 00:00:00 2001 From: Galen Charlton Date: Wed, 4 May 2016 15:01:50 -0400 Subject: [PATCH] webstaff: transit list: don't reset form $location.path(foo) is a setter, and should not be used to calculate a URL for opening a new window unless you also want to refresh the source page. Signed-off-by: Galen Charlton --- Open-ILS/web/js/ui/default/staff/circ/transits/list.js | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/Open-ILS/web/js/ui/default/staff/circ/transits/list.js b/Open-ILS/web/js/ui/default/staff/circ/transits/list.js index b3634c42be..9dd066d75e 100644 --- a/Open-ILS/web/js/ui/default/staff/circ/transits/list.js +++ b/Open-ILS/web/js/ui/default/staff/circ/transits/list.js @@ -18,8 +18,8 @@ angular.module('egTransitListApp', }) .controller('TransitListCtrl', - ['$scope','$q','$routeParams','$window','$location','egCore','egTransits','egGridDataProvider', -function($scope , $q , $routeParams , $window , $location , egCore , egTransits , egGridDataProvider) { + ['$scope','$q','$routeParams','$window','egCore','egTransits','egGridDataProvider', +function($scope , $q , $routeParams , $window , egCore , egTransits , egGridDataProvider) { var transits = []; var provider = egGridDataProvider.instance({}); @@ -68,11 +68,10 @@ function($scope , $q , $routeParams , $window , $location , egCore , egTransits if (!angular.isArray(transits)) transits = [transits]; angular.forEach(transits, function(transit) { $window.open( - $location.path( - '/cat/item/' + transit.target_copy().id() - ).absUrl(), + egCore.env.basePath + '/cat/item/' + + transit.target_copy().id(), '_blank' - ).focus(); + ).focus() }); } -- 2.11.0