LPXXX AngJS Staff catalog link updates within JS user/berick/lpxxx-ang-staff-cat-default
authorBill Erickson <berickxx@gmail.com>
Mon, 30 Mar 2020 20:21:24 +0000 (16:21 -0400)
committerBill Erickson <berickxx@gmail.com>
Mon, 30 Mar 2020 20:21:24 +0000 (16:21 -0400)
Signed-off-by: Bill Erickson <berickxx@gmail.com>
Open-ILS/web/js/ui/default/staff/app.js
Open-ILS/web/js/ui/default/staff/cat/bucket/record/app.js
Open-ILS/web/js/ui/default/staff/cat/item/app.js
Open-ILS/web/js/ui/default/staff/cat/z3950/app.js
Open-ILS/web/js/ui/default/staff/circ/checkin/app.js
Open-ILS/web/js/ui/default/staff/circ/services/holds.js
Open-ILS/web/js/ui/default/staff/circ/services/item.js
Open-ILS/web/js/ui/default/staff/services/navbar.js

index 6721046..58afd06 100644 (file)
@@ -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);
     }
 }])
index cdaaaa1..cd9b932 100644 (file)
@@ -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') });
         });
     }
index 614db62..f5b911c 100644 (file)
@@ -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') });
         });
     }
index 94d6804..e2c363c 100644 (file)
@@ -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);
                 }
             );            
         });
index 82bd4c8..eb360c9 100644 (file)
@@ -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') });
         });
     }
index dcc1d11..28f071f 100644 (file)
@@ -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() });
         });
     }
index 8150f18..d7c43ef 100644 (file)
@@ -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')
         });
     }
 
index f6eeb55..8be2de0 100644 (file)
@@ -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;
                     }
                 }