staff portal: default to Angular portal
authorGalen Charlton <gmc@equinoxOLI.org>
Mon, 2 Aug 2021 22:34:02 +0000 (18:34 -0400)
committerGalen Charlton <gmc@equinoxOLI.org>
Wed, 1 Sep 2021 18:42:30 +0000 (14:42 -0400)
TODO: avoid flashing AngularJS portal when logging in from the AngularJS page

Signed-off-by: Galen Charlton <gmc@equinoxOLI.org>
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 207c525..d1acd5d 100644 (file)
@@ -94,11 +94,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 bd57834..ccf652d 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/"
+          href="/eg2/staff/"
           egAccessKey keyCtx="navbar" i18n-keySpec i18n-keyDesc
           keySpec="alt+h" keyDesc="Navigate Home">
           <span class="material-icons">home</span>
index 5daf52d..2ed58e4 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 50818e5..f60b48d 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();
         });
     }