LP#1938835: always display the Angular portal, not the AngularJS one
authorGalen Charlton <gmc@equinoxOLI.org>
Mon, 2 Aug 2021 22:34:02 +0000 (18:34 -0400)
committerMike Rylander <mrylander@gmail.com>
Thu, 24 Mar 2022 12:54:59 +0000 (08:54 -0400)
This patch ensures that when a user navigates to the staff home page,
they will always see the Angular version, not the AngularJS version.

Consequently, the AngularJS staff portal is now deprecated (and also
does not need to learn how to be dynamic.)

Sponsored-by: Pioneer Library System

Signed-off-by: Galen Charlton <gmc@equinoxOLI.org>
Signed-off-by: Mike Rylander <mrylander@gmail.com>

Open-ILS/src/eg2/src/app/staff/login.component.ts
Open-ILS/src/eg2/src/app/staff/nav.component.html
Open-ILS/src/templates/staff/navbar.tt2
Open-ILS/web/js/ui/default/staff/app.js
Open-ILS/web/js/ui/default/staff/services/auth.js

index d9b9621..48ce941 100644 (file)
@@ -95,11 +95,8 @@ export class StaffLoginComponent implements OnInit {
                         // Force reload of the app after a successful login.
                         // This allows the route resolver to re-run with a
                         // valid auth token and workstation.
-
-                        // Temporarily redirect to AngularJS splash page
-                        // (LP#1848550/LP#1835128)
-                        window.location.href = '/eg/staff/splash';
-                            // this.ngLocation.prepareExternalUrl(url);
+                        window.location.href =
+                            this.ngLocation.prepareExternalUrl(url);
 
                     });
                 }
index 6040ccf..76f4e71 100644 (file)
@@ -3,7 +3,7 @@
     <div class="navbar-nav">
       <div class="nav-item">
         <a i18n class="nav-link with-material-icon" 
-          href="/eg/staff/"
+          routerLink="/staff/"
           egAccessKey keyCtx="navbar" i18n-keySpec i18n-keyDesc
           keySpec="alt+h" keyDesc="Navigate Home">
           <span class="material-icons">home</span>
index bb0409a..f6e52f5 100644 (file)
@@ -25,7 +25,7 @@
 
   <div class="navbar-collapse collapse" ng-class="!navCollapsed && 'in'">
     <ul class="nav navbar-nav">
-      <li><a href='./' title="[% l('Home') %]" target="_self"
+      <li><a href='/eg2/staff/' title="[% l('Home') %]" target="_self"
         class="glyphicon glyphicon-home"></a><li>
 
       <!-- search -->
index 58afd06..8d78ab7 100644 (file)
@@ -155,20 +155,8 @@ function($routeProvider , $locationProvider) {
  */
 .controller('SplashCtrl', ['$scope', '$window','egCore', 
     function($scope, $window,egCore) {
-               
-    $scope.focus_search = true;
-       
-       egCore.strings.setPageTitle(
-        egCore.strings['PAGE_TITLE_SPLASH']);
-
-    $scope.catalog_search = function($event) {
-        $scope.focus_search = true;
-        if (!$scope.cat_query) return;
-        if ($event && $event.keyCode != 13) return; // input ng-keypress
-        $window.location.href = 
-            '/eg2/staff/catalog/search?query=' +
-            encodeURIComponent($scope.cat_query);
-    }
+
+    $window.location.href = '/eg2/staff/';
 }])
 
 .controller('AboutCtrl', [
index 6a5643a..358c036 100644 (file)
@@ -147,7 +147,7 @@ function($q , $timeout , $rootScope , $window , $location , egNet , egHatch , $i
 
             // NOTE: egEnv also defines basePath, but we cannot import
             // egEnv here becuase it creates a circular reference.
-            $window.location.href = '/eg/staff' + ws_path;
+            $window.location.href = '/eg2/staff' + ws_path;
             deferred.resolve();
         });
     }