LP1869898 Make Angular staff catalog default
authorBill Erickson <berickxx@gmail.com>
Fri, 27 Mar 2020 17:17:38 +0000 (13:17 -0400)
committerGalen Charlton <gmc@equinoxinitiative.org>
Thu, 13 Aug 2020 15:16:25 +0000 (11:16 -0400)
Modifies Angular and AngJS templates and AngJS code to use the new
Angular staff catalog as the default catalog for new catalog searches,
record detail links, etc.

The traditional client is left unmodified and remains accessible from
the navigation menus.

Signed-off-by: Bill Erickson <berickxx@gmail.com>
Signed-off-by: Jane Sandberg <sandbej@linnbenton.edu>
Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
34 files changed:
Open-ILS/src/eg2/src/app/staff/cat/vandelay/queue.component.html
Open-ILS/src/eg2/src/app/staff/nav.component.html
Open-ILS/src/eg2/src/app/staff/nav.component.ts
Open-ILS/src/eg2/src/app/staff/splash.component.ts
Open-ILS/src/templates/staff/cat/bucket/copy/t_pending.tt2
Open-ILS/src/templates/staff/cat/bucket/copy/t_view.tt2
Open-ILS/src/templates/staff/cat/bucket/record/t_pending.tt2
Open-ILS/src/templates/staff/cat/bucket/record/t_search.tt2
Open-ILS/src/templates/staff/cat/bucket/record/t_view.tt2
Open-ILS/src/templates/staff/cat/item/t_list.tt2
Open-ILS/src/templates/staff/cat/share/t_record_summary.tt2
Open-ILS/src/templates/staff/cat/share/t_record_summary_slim.tt2
Open-ILS/src/templates/staff/circ/checkin/t_checkin_table.tt2
Open-ILS/src/templates/staff/circ/holds/t_pull_list.tt2
Open-ILS/src/templates/staff/circ/holds/t_shelf_list.tt2
Open-ILS/src/templates/staff/circ/patron/t_bill_history_payments.tt2
Open-ILS/src/templates/staff/circ/patron/t_bill_history_xacts.tt2
Open-ILS/src/templates/staff/circ/patron/t_bills_list.tt2
Open-ILS/src/templates/staff/circ/patron/t_checkout.tt2
Open-ILS/src/templates/staff/circ/patron/t_holds_list.tt2
Open-ILS/src/templates/staff/circ/patron/t_items_out.tt2
Open-ILS/src/templates/staff/circ/patron/t_xact_details.tt2
Open-ILS/src/templates/staff/circ/renew/t_renew.tt2
Open-ILS/src/templates/staff/circ/transits/t_list.tt2
Open-ILS/src/templates/staff/navbar.tt2
Open-ILS/src/templates/staff/serials/t_link_mfhd.tt2
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 b3b39a8..480e554 100644 (file)
   <a *ngIf="queueType=='bib'" routerLink="/staff/catalog/record/{{row.imported_as}}">
     {{row.imported_as}}
   </a>
-  <a *ngIf="queueType=='auth'" href="/eg/staff/cat/catalog/authority/{{row.imported_as}}/marc_edit">
+  <a *ngIf="queueType=='auth'" routerLink="/staff/cat/authority/edit/{{row.imported_as}}">
     {{row.imported_as}}
   </a>
-
 </ng-template>
 
 
index b6641b4..735c77a 100644 (file)
@@ -27,7 +27,7 @@
             <span class="material-icons">assignment</span>
             <span i18n>Search for Items by Barcode</span>
           </a>
-          <a href="/eg/staff/cat/catalog/index" class="dropdown-item"
+          <a class="dropdown-item" routerLink="/staff/catalog"
             egAccessKey keyCtx="navbar" i18n-keySpec i18n-keyDesc
             keySpec="f3" keyDesc="Catalog">
             <span class="material-icons">search</span>
         </a>
         <div class="dropdown-menu" ngbDropdownMenu>
 
-          <a href="/eg/staff/cat/catalog/index" class="dropdown-item"
+          <a class="dropdown-item" routerLink="/staff/catalog/search"
             egAccessKey keyCtx="navbar"i18n-keySpec i18n-keyDesc
             keySpec="f3" keyDesc="Catalog">
             <span class="material-icons">search</span>
             <span i18n>Search the Catalog</span>
           </a>
-          <a *ngIf="showAngularCatalog"
-            class="dropdown-item"
-            routerLink="/staff/catalog/search">
+          <a href="/eg/staff/cat/catalog/index" class="dropdown-item">
             <span class="material-icons">search</span>
-            <span i18n>Staff Catalog (Experimental)</span>
+            <span i18n>Search the Catalog (Traditional)</span>
           </a>
           <a class="dropdown-item" href="/eg/staff/cat/item/search"
             egAccessKey keyCtx="navbar" i18n-keySpec i18n-keyDesc
index 5627f76..6825464 100644 (file)
@@ -104,11 +104,10 @@ export class StaffNavComponent implements OnInit, OnDestroy {
         this.printer.reprintLast();
     }
 
-    // TODO: Point to Angular catalog when the time comes
     retrieveLastRecord() {
         const recId = this.store.getLocalItem('eg.cat.last_record_retrieved');
         if (recId) {
-            window.location.href = '/eg/staff/cat/catalog/record/' + recId;
+            this.router.navigate(['/staff/catalog/record/' + recId]);
         }
     }
 }
index af6b647..6756b65 100644 (file)
@@ -23,17 +23,10 @@ export class StaffSplashComponent implements OnInit {
     searchCatalog(): void {
         if (!this.catSearchQuery) { return; }
 
-        /* Route to angular6 catalog
         this.router.navigate(
             ['/staff/catalog/search'],
             {queryParams: {query : this.catSearchQuery}}
         );
-        */
-
-        // Route to AngularJS / TPAC catalog
-        window.location.href =
-            '/eg/staff/cat/catalog/results?query=' +
-            encodeURIComponent(this.catSearchQuery);
     }
 }
 
index 431d2d4..043cffc 100644 (file)
@@ -54,7 +54,7 @@
 
   <eg-grid-field label="[% l('Title') %]"
     path="call_number.record.simple_record.title" visible>
-    <a target="_self" href="[% ctx.base_path %]/staff/cat/catalog/record/{{item['call_number.record.id']}}">
+    <a href="/eg2/staff/catalog/record/{{item['call_number.record.id']}}">
       {{item['call_number.record.simple_record.title']}}
     </a>
   </eg-grid-field>
index 98bf38b..29dc8a3 100644 (file)
@@ -44,7 +44,7 @@
 
   <eg-grid-field label="[% l('Title') %]"
     path="call_number.record.simple_record.title" visible>
-    <a target="_self" href="[% ctx.base_path %]/staff/cat/catalog/record/{{item['call_number.record.id']}}">
+    <a href="/eg2/staff/catalog/record/{{item['call_number.record.id']}}">
       {{item['call_number.record.simple_record.title']}}
     </a>
   </eg-grid-field>
index b313db9..f636a09 100644 (file)
@@ -18,7 +18,7 @@
     handler="resetPendingList"></eg-grid-action>
 
   <eg-grid-field label="[% l('Title') %]" path="title">
-    <a target="_blank" href="[% ctx.base_path %]/staff/cat/catalog/record/{{item.id}}">
+    <a target="_blank" href="/eg2/staff/catalog/record/{{item.id}}">
     {{item.title}} <span ng-show="item.id" class="glyphicon glyphicon-new-window"></span>
     </a>
   </eg-grid-field>
index c5cfc34..651b361 100644 (file)
@@ -44,7 +44,7 @@
     handler="addToBucket"></eg-grid-action>
 
   <eg-grid-field label="[% l('Title') %]" path="title">
-    <a target="_blank" href="[% ctx.base_path %]/staff/cat/catalog/record/{{item.id}}">
+    <a target="_blank" href="/eg2/staff/catalog/record/{{item.id}}">
     {{item.title}} <span ng-show="item.id" class="glyphicon glyphicon-new-window"></span>
     </a>
   </eg-grid-field>
index a30697c..26cd353 100644 (file)
@@ -35,7 +35,7 @@
   <eg-grid-field path="id" required hidden></eg-grid-field>
 
   <eg-grid-field label="[% l('Title') %]" path="title">
-    <a target="_self" href="[% ctx.base_path %]/staff/cat/catalog/record/{{item.id}}">
+    <a href="/eg2/staff/catalog/record/{{item.id}}">
       {{item.title}}
     </a>
   </eg-grid-field>
index fc9ce49..6d6e08c 100644 (file)
@@ -93,7 +93,7 @@
         {{item['dummy_title']}}
     </span>
     <span ng-hide="item['call_number.record.id'] == -1">
-        <a target="_blank" href="[% ctx.base_path %]/staff/cat/catalog/record/{{item['call_number.record.id']}}">
+        <a target="_blank" href="/eg2/staff/catalog/record/{{item['call_number.record.id']}}">
           {{item['call_number.record.simple_record.title']}} <span ng-show="item['call_number.record.id']" class="glyphicon glyphicon-new-window"></span>
         </a>
     </span>
index c98b087..ce4af2e 100644 (file)
@@ -7,8 +7,7 @@
         </span>
     </div>
     <div ng-if="!noMarcLink" class="flex-cell">
-      <a target="_self" 
-        href="[% ctx.base_path %]/staff/cat/catalog/record/{{record.id()}}/marc_html">
+      <a href="/eg2/staff/catalog/record/{{record.id()}}/marc_html">
         (MARC)
       </a>
     </div>
@@ -30,7 +29,7 @@
   </div>
 </div>
 <div ng-if="record.merged_to()" class="row alert alert-warning">
-  <a href="[% ctx.base_path %]/staff/cat/catalog/record/{{record.merged_to()}}">
+  <a href="/eg2/staff/catalog/record/{{record.merged_to()}}">
     [% l('Record merged to #[_1] on [_2]', 
          '{{record.merged_to()}}',
          '{{record.merge_date() | date:$root.egDateAndTimeFormat}}') 
@@ -41,8 +40,7 @@
   <div class="flex-row">
     <div class="flex-cell strong-text">[% l('Title:') %]</div>
     <div class="flex-cell flex-2">
-      <a target="_self" 
-        href="[% ctx.base_path %]/staff/cat/catalog/record/{{record.id()}}">
+      <a href="/eg2/staff/catalog/record/{{record.id()}}">
         {{rec_display.title}}
       </a>
     </div>
@@ -64,8 +62,7 @@
   <div class="flex-row">
     <div class="flex-cell strong-text">[% l('Title:') %]</div>
     <div class="flex-cell flex-2">
-      <a target="_self" 
-        href="[% ctx.base_path %]/staff/cat/catalog/record/{{record.id()}}">
+      <a href="/eg2/staff/catalog/record/{{record.id()}}">
         {{rec_display.title}}
       </a>
     </div>
index 7095c5d..10719aa 100644 (file)
@@ -7,8 +7,7 @@
         </span>
     </div>
     <div ng-if="!noMarcLink" class="flex-cell flex-2">
-      <a target="_self" 
-        href="[% ctx.base_path %]/staff/cat/catalog/record/{{record.id()}}/marc_html">
+      <a href="/eg2/staff/catalog/record/{{record.id()}}/marc_html">
         (MARC)
       </a>
     </div>
@@ -27,7 +26,7 @@
   </div>
 </div>
 <div ng-if="record.merged_to()" class="row alert alert-warning">
-  <a href="[% ctx.base_path %]/staff/cat/catalog/record/{{record.merged_to()}}">
+  <a href="/eg2/staff/catalog/record/{{record.merged_to()}}">
     [% l('Record merged to #[_1] on [_2]', 
          '{{record.merged_to()}}',
          '{{record.merge_date() | date:$root.egDateAndTimeFormat}}') 
@@ -38,8 +37,7 @@
   <div class="flex-row">
     <div class="flex-cell strong-text">[% l('Title:') %]</div>
     <div class="flex-cell flex-3">
-      <a target="_self" 
-        href="[% ctx.base_path %]/staff/cat/catalog/record/{{record.id()}}">
+      <a href="/eg2/staff/catalog/record/{{record.id()}}">
         {{rec_display.title}}
       </a>
     </div>
@@ -64,8 +62,7 @@
   <div class="flex-row">
     <div class="flex-cell strong-text">[% l('Title:') %]</div>
     <div class="flex-cell flex-3">
-      <a target="_self" 
-        href="[% ctx.base_path %]/staff/cat/catalog/record/{{record.id()}}">
+      <a href="/eg2/staff/catalog/record/{{record.id()}}">
         {{rec_display.title}}
       </a>
     </div>
index 5a27145..19b1d33 100644 (file)
@@ -96,7 +96,7 @@
     path='circ.xact_start'></eg-grid-field>
 
   <eg-grid-field label="[% l('Title') %]" path="title">
-    <a target="_self" href="[% ctx.base_path %]/staff/cat/catalog/record/{{item.record.doc_id()}}">
+    <a href="/eg2/staff/catalog/record/{{item.record.doc_id()}}">
       {{item.title}}
     </a>
   </eg-grid-field>
index 2348f99..eda5f05 100644 (file)
@@ -94,8 +94,7 @@
   <eg-grid-field name="title" 
     path="current_copy.call_number.record.simple_record.title" 
     label="[% l('Title') %]">
-    <a target="_self" 
-      href="[% ctx.base_path %]/staff/cat/catalog/record/{{item.record_id}}">
+    <a href="/eg2/staff/catalog/record/{{item.record_id}}">
       {{item.title}}
     </a>
   </eg-grid-field>
index 22a6e39..bbd8679 100644 (file)
@@ -76,7 +76,7 @@
   <eg-grid-field label="[% l('Post-Clear') %]" path='post_clear'></eg-grid-field>
 
   <eg-grid-field label="[% l('Title') %]" path='hold.title'>
-    <a target="_self" href="[% ctx.base_path %]/staff/cat/catalog/record/{{item.hold.record_id}}">
+    <a href="/eg2/staff/catalog/record/{{item.hold.record_id}}">
       {{item.hold.title}}
     </a>
   </eg-grid-field>
index 5c31297..e21a301 100644 (file)
@@ -21,7 +21,7 @@
     <eg-grid-field path="payment_type" label="Payment Type"></eg-grid-field>
     <eg-grid-field label="[% l('Title') %]" name="title" 
       path="xact.circulation.target_copy.call_number.record.simple_record.title">
-      <a target="_self" href="[% ctx.base_path %]/staff/cat/catalog/record/{{item.record_id}}">{{item.title}}</a>
+      <a href="/eg2/staff/catalog/record/{{item.record_id}}">{{item.title}}</a>
     </eg-grid-field>
 
     <!-- needed for bib link -->
index 4be0ef0..f08b034 100644 (file)
@@ -25,7 +25,7 @@
 
     <eg-grid-field label="[% l('Title') %]" name="title" 
       path="circulation.target_copy.call_number.record.simple_record.title">
-      <a target="_self" href="[% ctx.base_path %]/staff/cat/catalog/record/{{item.record_id}}">{{item.title}}</a>
+      <a href="/eg2/staff/catalog/record/{{item.record_id}}">{{item.title}}</a>
     </eg-grid-field>
 
     <!-- needed for bib link -->
index d622db6..ccd7320 100644 (file)
@@ -74,7 +74,7 @@
 
   <eg-grid-field label="[% l('Title') %]" name="title"
     path='circulation.target_copy.call_number.record.simple_record.title'>
-    <a target="_self" href="[% ctx.base_path %]/staff/cat/catalog/record/{{item.record_id}}">{{item.title}}</a>
+    <a href="/eg2/staff/catalog/record/{{item.record_id}}">{{item.title}}</a>
   </eg-grid-field>
   <!-- fetch the record ID so we can link to it.  hide it by default -->
   <eg-grid-field path="circulation.target_copy.call_number.record.id" 
index 7cbe492..8744e0f 100644 (file)
     path='circ.renewal_remaining'></eg-grid-field>
 
   <eg-grid-field label="[% l('Title') %]" path="title">
-    <a target="_self" href="[% ctx.base_path %]/staff/cat/catalog/record/{{item.acn.record()}}">
+    <a href="/eg2/staff/catalog/record/{{item.acn.record()}}">
       {{item.title}}
     </a>
   </eg-grid-field>
index 961ad03..d2e8d57 100644 (file)
@@ -66,7 +66,7 @@
   <eg-grid-field label="[% l('Pickup Library') %]" path='hold.pickup_lib.shortname'></eg-grid-field>
 
   <eg-grid-field label="[% l('Title') %]" path='mvr.title'>
-    <a target="_self" href="[% ctx.base_path %]/staff/cat/catalog/record/{{item.mvr.doc_id()}}">
+    <a href="/eg2/staff/catalog/record/{{item.mvr.doc_id()}}">
       {{item.mvr.title()}}
     </a>
   </eg-grid-field>
index 37235ed..83f8ece 100644 (file)
@@ -97,7 +97,7 @@
   <eg-grid-field label="[% l('Renewals Remaining') %]" path='renewal_remaining'></eg-grid-field>
   <eg-grid-field label="[% l('Fines Stopped') %]" path='stop_fines'></eg-grid-field>
   <eg-grid-field label="[% l('Title') %]" path="target_copy.call_number.record.wide_display_entry.title" name="title">
-    <a target="_self" href="[% ctx.base_path %]/staff/cat/catalog/record/{{item.target_copy().call_number().record().id()}}">
+    <a href="/eg2/staff/catalog/record/{{item.target_copy().call_number().record().id()}}">
       {{item.target_copy().call_number().record().wide_display_entry().title()}}
     </a>
   </eg-grid-field>
index 4d5ff59..b08cdff 100644 (file)
@@ -10,7 +10,7 @@
   <div class="col-md-2">{{xact.summary().total_owed() | currency}}</div>
   <div class="col-md-2 strong-text">[% l('Title') %]</div>
   <div class="col-md-2">
-    <a ng-if="title_id" target="_self" href="[% ctx.base_path %]/staff/cat/catalog/record/{{title_id}}">{{title}}</a>
+    <a ng-if="title_id" href="/eg2/staff/catalog/record/{{title_id}}">{{title}}</a>
     <span ng-if="!title_id">{{title}}</span>
   </div>
 </div>
index 0a2caad..6447ecc 100644 (file)
     path='circ.renewal_remaining'></eg-grid-field>
 
   <eg-grid-field label="[% l('Title') %]" path="title">
-    <a target="_self" href="[% ctx.base_path %]/staff/cat/catalog/record/{{record.doc_id()}}">
+    <a href="/eg2/staff/catalog/record/{{record.doc_id()}}">
       {{item.title}}
     </a>
   </eg-grid-field>
index d151200..0719ed9 100644 (file)
@@ -57,7 +57,7 @@
   <eg-grid-field path='target_copy.call_number.label' hidden required sortable></eg-grid-field>
   <eg-grid-field label="[% l('CN Suffix') %]" path="target_copy.call_number.suffix.label"></eg-grid-field>
   <eg-grid-field path='target_copy.call_number.record.simple_record.title' label="[% l('Title') %]" sortable>
-    <a target="_self" href="[% ctx.base_path %]/staff/cat/catalog/record/{{item['target_copy.call_number.record.simple_record.id']}}">
+    <a href="/eg2/staff/catalog/record/{{item['target_copy.call_number.record.simple_record.id']}}">
       {{item['target_copy.call_number.record.simple_record.title']}}
     </a>
   </eg-grid-field>
index 35e5423..73053dd 100644 (file)
@@ -51,9 +51,9 @@
             </a>
           </li>
           <li>
-            <a href="./cat/catalog/index" target="_self"
+            <a href="/eg2/staff/catalog/search"
               eg-accesskey="[% l('f3') %]" 
-              eg-accesskey-desc="[% l('OPAC') %]">
+              eg-accesskey-desc="[% l('Catalog') %]">
               <span class="glyphicon glyphicon-search"></span>
               <span>[% l('Search the Catalog') %]</span>
             </a>
         <a href uib-dropdown-toggle>[% l('Cataloging') %]<b class="caret"></b>
         </a>
         <ul uib-dropdown-menu>
-          <li>
-            <a href="./cat/catalog/index" target="_self">
+          <li> 
+            <a href="/eg2/staff/catalog/search">
               <span class="glyphicon glyphicon-search"></span>
-              [% l('Search the Catalog') %]
+              <span>[% l('Search the Catalog') %]</span>
             </a>
           </li>
-          <!--
-            Link to experimental Angular staff catalog.
-          -->
-          <li ng-if="showAngularCatalog">
-            <a href="/eg2/staff/catalog/search">
+          <li>
+            <a href="./cat/catalog/index" target="_self">
               <span class="glyphicon glyphicon-search"></span>
-              <span>[% l('Staff Catalog (Experimental)') %]</span>
+              [% l('Search the Catalog (Traditional)') %]
             </a>
           </li>
           <li>
index 03820d2..6ca1e40 100644 (file)
@@ -7,7 +7,7 @@
     <div class="modal-body">
         <div ng-repeat="legacy in legacies">
             <div uib-tooltip="[% l('Record ID [_1]', '{{legacy.mvr.doc_id}}') %]" tooltip-placement="left">
-                <a target="_blank" href="/eg/staff/cat/catalog/record/{{legacy.mvr.doc_id}}">{{legacy.mvr.title}}</a>
+                <a href="/eg2/staff/catalog/record/{{legacy.mvr.doc_id}}">{{legacy.mvr.title}}</a>
             </div>
             <div>
                 {{legacy.mvr.physical_description}}
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 a07ee45..c419a72 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() {
@@ -656,7 +656,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 0ae837a..251ceb2 100644 (file)
@@ -668,10 +668,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() });
         });
     }
@@ -679,10 +676,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 a00e26a..755dcbb 100644 (file)
@@ -18,6 +18,14 @@ angular.module('egCoreMod')
                 }
 
                 function navTo(path) {
+
+                    if (path.match(/^\/eg2\//)) {
+                        // Hotkey for /eg2/ page.  Go directly to the
+                        // provided URL.
+                        $window.location.href = path;
+                        return;
+                    }
+
                     path = path.replace(/^\.\//,'');
                     $window.location.href = egCore.env.basePath + path;
                 }       
@@ -55,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;
                     }
                 }