From: Bill Erickson Date: Mon, 30 Mar 2020 20:21:24 +0000 (-0400) Subject: LPXXX AngJS Staff catalog link updates within JS X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=ac45938dc14328318606dd24838ca0b19d4aef0d;p=working%2FEvergreen.git LPXXX AngJS Staff catalog link updates within JS Signed-off-by: Bill Erickson --- diff --git a/Open-ILS/web/js/ui/default/staff/app.js b/Open-ILS/web/js/ui/default/staff/app.js index 672104676a..58afd0664d 100644 --- a/Open-ILS/web/js/ui/default/staff/app.js +++ b/Open-ILS/web/js/ui/default/staff/app.js @@ -166,7 +166,7 @@ function($routeProvider , $locationProvider) { if (!$scope.cat_query) return; if ($event && $event.keyCode != 13) return; // input ng-keypress $window.location.href = - '/eg/staff/cat/catalog/results?query=' + + '/eg2/staff/catalog/search?query=' + encodeURIComponent($scope.cat_query); } }]) diff --git a/Open-ILS/web/js/ui/default/staff/cat/bucket/record/app.js b/Open-ILS/web/js/ui/default/staff/cat/bucket/record/app.js index cdaaaa147b..cd9b9326d4 100644 --- a/Open-ILS/web/js/ui/default/staff/cat/bucket/record/app.js +++ b/Open-ILS/web/js/ui/default/staff/cat/bucket/record/app.js @@ -747,7 +747,7 @@ function($scope, $q , $routeParams, bucketSvc, egCore, $window, args.lead_id, args.records.map(function(val) { return val.id; }) ).then(function() { - $window.open(egCore.env.basePath + 'cat/catalog/record/' + args.lead_id); + $window.open('/eg2/staff/catalog/record/' + args.lead_id); }); }); }); @@ -757,9 +757,7 @@ function($scope, $q , $routeParams, bucketSvc, egCore, $window, // TODO: probably want to set a limit on the number of // new tabs one could choose to open at once angular.forEach(records, function(rec) { - var url = egCore.env.basePath + - 'cat/catalog/record/' + - rec.id; + var url = '/eg2/staff/catalog/record/' + rec.id; $timeout(function() { $window.open(url, '_blank') }); }); } diff --git a/Open-ILS/web/js/ui/default/staff/cat/item/app.js b/Open-ILS/web/js/ui/default/staff/cat/item/app.js index 614db62ecf..f5b911c31a 100644 --- a/Open-ILS/web/js/ui/default/staff/cat/item/app.js +++ b/Open-ILS/web/js/ui/default/staff/cat/item/app.js @@ -91,7 +91,7 @@ function($scope , $q , $window , $location , $timeout , egCore , egNet , egGridD } $scope.show_in_catalog = function() { - window.open('/eg/staff/cat/catalog/record/' + $scope.args.recordId + '/catalog', '_blank'); + window.open('/eg2/staff/catalog/record/' + $scope.args.recordId, '_blank'); } $scope.print_labels = function() { @@ -169,7 +169,7 @@ function($scope , $q , $window , $location , $timeout , egCore , egNet , egGridD } $scope.show_record_holds = function() { - window.open('/eg/staff/cat/catalog/record/' + $scope.args.recordId + '/holds', '_blank'); + window.open('/eg2/staff/catalog/record/' + $scope.args.recordId + '/holds', '_blank'); } $scope.add_item_alerts = function() { @@ -646,7 +646,7 @@ function($scope , $q , $window , $location , $timeout , egCore , egNet , egGridD $scope.showBibHolds = function () { angular.forEach(gatherSelectedRecordIds(), function (r) { - var url = egCore.env.basePath + 'cat/catalog/record/' + r + '/holds'; + var url = '/eg2/staff/catalog/record/' + r + '/holds'; $timeout(function() { $window.open(url, '_blank') }); }); } diff --git a/Open-ILS/web/js/ui/default/staff/cat/z3950/app.js b/Open-ILS/web/js/ui/default/staff/cat/z3950/app.js index 94d68040e7..e2c363c4c3 100644 --- a/Open-ILS/web/js/ui/default/staff/cat/z3950/app.js +++ b/Open-ILS/web/js/ui/default/staff/cat/z3950/app.js @@ -185,8 +185,7 @@ function($scope , $q , $location , $timeout , $window, egCore , egGridDataProvi $scope.showInCatalog = function() { var items = $scope.gridControls.selectedItems(); // relying on cant_showInCatalog to protect us - var url = egCore.env.basePath + - 'cat/catalog/record/' + items[0].tcn(); + var url = '/eg2/staff/catalog/record/' + items[0].tcn(); $timeout(function() { $window.open(url, '_blank') }); }; $scope.cant_showInCatalog = function() { @@ -268,7 +267,7 @@ function($scope , $q , $location , $timeout , $window, egCore , egGridDataProvi egCore.strings.GO_TO_RECORD, egCore.strings.GO_BACK ).result.then(function() { - $window.open(egCore.env.basePath + 'cat/catalog/record/' + result.id()); + $window.open('/eg2/staff/catalog/record/' + result.id()); }); } } @@ -322,7 +321,7 @@ function($scope , $q , $location , $timeout , $window, egCore , egGridDataProvi }] }).result.then(function () { if (recId) { - $window.location.href = egCore.env.basePath + 'cat/catalog/record/' + recId; + $window.location.href = '/eg2/staff/catalog/record/' + recId; } }); } @@ -472,7 +471,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); + $window.open('/eg2/staff/catalog/record/' + overlay_target); } ); }); diff --git a/Open-ILS/web/js/ui/default/staff/circ/checkin/app.js b/Open-ILS/web/js/ui/default/staff/circ/checkin/app.js index 82bd4c8764..eb360c9ff7 100644 --- a/Open-ILS/web/js/ui/default/staff/circ/checkin/app.js +++ b/Open-ILS/web/js/ui/default/staff/circ/checkin/app.js @@ -380,7 +380,7 @@ function($scope , $q , $window , $location , $timeout , egCore , checkinSvc , eg recordIds.push(i.acn.record()); }); angular.forEach(recordIds, function (r) { - var url = egCore.env.basePath + 'cat/catalog/record/' + r + '/holds'; + var url = '/eg2/staff/catalog/record/' + r + '/holds'; $timeout(function() { $window.open(url, '_blank') }); }); } diff --git a/Open-ILS/web/js/ui/default/staff/circ/services/holds.js b/Open-ILS/web/js/ui/default/staff/circ/services/holds.js index dcc1d11e6c..28f071fd18 100644 --- a/Open-ILS/web/js/ui/default/staff/circ/services/holds.js +++ b/Open-ILS/web/js/ui/default/staff/circ/services/holds.js @@ -652,10 +652,7 @@ function($window , $location , $timeout , egCore , egHolds , egCirc) { service.show_holds_for_title = function(items) { var focus = items.length == 1; angular.forEach(items, function(item) { - var url = egCore.env.basePath + - 'cat/catalog/record/' + - item.mvr.doc_id() + - '/holds'; + var url = '/eg2/staff/catalog/record/' + item.mvr.doc_id() + '/holds'; $timeout(function() { var x = $window.open(url, '_blank'); if (focus) x.focus() }); }); } @@ -663,10 +660,7 @@ function($window , $location , $timeout , egCore , egHolds , egCirc) { service.show_holds_for_title_wide = function(items) { var focus = items.length == 1; angular.forEach(items, function(item) { - var url = egCore.env.basePath + - 'cat/catalog/record/' + - item.hold.record_id + - '/holds'; + var url = '/eg2/staff/catalog/record/' + item.hold.record_id + '/holds'; $timeout(function() { var x = $window.open(url, '_blank'); if (focus) x.focus() }); }); } diff --git a/Open-ILS/web/js/ui/default/staff/circ/services/item.js b/Open-ILS/web/js/ui/default/staff/circ/services/item.js index 8150f18ea5..d7c43efd0f 100644 --- a/Open-ILS/web/js/ui/default/staff/circ/services/item.js +++ b/Open-ILS/web/js/ui/default/staff/circ/services/item.js @@ -998,7 +998,7 @@ function(egCore , egOrg , egCirc , $uibModal , $q , $timeout , $window , ngToast service.show_in_catalog = function(copy_list){ angular.forEach(copy_list, function(copy){ - window.open('/eg/staff/cat/catalog/record/'+copy['call_number.record.id']+'/catalog', '_blank') + window.open('/eg2/staff/catalog/record/'+copy['call_number.record.id'], '_blank') }); } diff --git a/Open-ILS/web/js/ui/default/staff/services/navbar.js b/Open-ILS/web/js/ui/default/staff/services/navbar.js index f6eeb5540c..8be2de0e7f 100644 --- a/Open-ILS/web/js/ui/default/staff/services/navbar.js +++ b/Open-ILS/web/js/ui/default/staff/services/navbar.js @@ -63,8 +63,8 @@ angular.module('egCoreMod') $scope.retrieveLastRecord = function() { var last_record = egCore.hatch.getLocalItem("eg.cat.last_record_retrieved"); if (last_record) { - $window.location.href = - egCore.env.basePath + 'cat/catalog/record/' + last_record; + $window.location.href = + '/eg2/staff/catalog/record/' + last_record; } }