webstaff work log: fix opening new windows
authorGalen Charlton <gmc@esilibrary.com>
Wed, 4 May 2016 19:04:23 +0000 (15:04 -0400)
committerGalen Charlton <gmc@esilibrary.com>
Wed, 4 May 2016 19:04:23 +0000 (15:04 -0400)
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Open-ILS/web/js/ui/default/staff/admin/workstation/log.js

index b9fe1db..4f8ec28 100644 (file)
@@ -18,8 +18,8 @@ angular.module('egWorkLogApp',
 })
 
 .controller('WorkLogCtrl',
-       ['$scope','$q','$routeParams','$window','$location','$timeout','egCore','egGridDataProvider','egWorkLog',
-function($scope , $q , $routeParams , $window , $location , $timeout , egCore , egGridDataProvider , egWorkLog ) {
+       ['$scope','$q','$routeParams','$window','$timeout','egCore','egGridDataProvider','egWorkLog',
+function($scope , $q , $routeParams , $window , $timeout , egCore , egGridDataProvider , egWorkLog ) {
 
     var work_log_entries = [];
     var patron_log_entries = [];
@@ -34,9 +34,7 @@ function($scope , $q , $routeParams , $window , $location , $timeout , egCore ,
         if (!angular.isArray(log_entries)) log_entries = [log_entries];
         angular.forEach(log_entries, function(log_entry) {
             $window.open(
-                $location.path(
-                    '/cat/item/' + log_entry.item_id
-                ).absUrl(),
+                egCore.env.basePath + '/cat/item/' + log_entry.item_id,
                 '_blank'
             ).focus();
         });
@@ -51,9 +49,8 @@ function($scope , $q , $routeParams , $window , $location , $timeout , egCore ,
         if (!angular.isArray(log_entries)) log_entries = [log_entries];
         angular.forEach(log_entries, function(log_entry) {
             $window.open(
-                $location.path(
-                    '/circ/patron/' + log_entry.patron_id + '/checkout'
-                ).absUrl(),
+                egCore.env.basePath +
+                '/circ/patron/' + log_entry.patron_id + '/checkout',
                 '_blank'
             ).focus();
         });