[open-ils-commits] [GIT] Evergreen ILS branch master updated. 7609099190455ce8662c8950e426c00552390a98

Evergreen Git git at git.evergreen-ils.org
Fri May 19 10:15:07 EDT 2017


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Evergreen ILS".

The branch, master has been updated
       via  7609099190455ce8662c8950e426c00552390a98 (commit)
       via  7814064a1a4c21094017f4b553e91c879c5e100d (commit)
      from  1c83704e0ed0ddca391f8324689751f5adc0c80b (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 7609099190455ce8662c8950e426c00552390a98
Author: Galen Charlton <gmc at equinoxinitiative.org>
Date:   Fri May 19 09:37:49 2017 -0400

    LP#1564508: disable selecting Hatch status menu item
    
    Add the "disabled" class to the <li> for the navbar menu
    item that displays Hatch's status, to avoid making users
    think that there's an action available to them by selecting
    that menu item.
    
    Signed-off-by: Galen Charlton <gmc at equinoxinitiative.org>
    Signed-off-by: Bill Erickson <berickxx at gmail.com>

diff --git a/Open-ILS/src/templates/staff/navbar.tt2 b/Open-ILS/src/templates/staff/navbar.tt2
index 65bef57..ba99321 100644
--- a/Open-ILS/src/templates/staff/navbar.tt2
+++ b/Open-ILS/src/templates/staff/navbar.tt2
@@ -492,7 +492,7 @@
             </a>
           </li>
           <li class="divider"></li>
-          <li>
+          <li class="disabled">
             <a href disabled="disabled">
               <span
                 title="[% l('Hatch Connection Status') %]"

commit 7814064a1a4c21094017f4b553e91c879c5e100d
Author: Bill Erickson <berickxx at gmail.com>
Date:   Thu Nov 17 15:33:02 2016 -0500

    LP#1564508 Hatch status in hamburger, remove statusbar
    
    * Move the Hatch connectivity status indicator into the upper-right
      hamburger menu.
    
    * Removes the long-hidden hatch/websockets statusbar.
    
    * Since the Hamburger forces a re-digest of the interface when opened,
      the code no longer attempts to force the page to re-$apply() when
      the Hatch connection opens or closes.  It's no longer necesssary
      (and was buggy).
    
    * The WebSockets connectivity status is not added to the hamburger.  The
      websockets connection will go up and down regularly as connections
      expire and reset.  Having the indicator flash could lead to
      unneccesary panic.  Plus, if websockets are down, staff can't log in
      anyway.
    
    Signed-off-by: Bill Erickson <berickxx at gmail.com>
    Signed-off-by: Galen Charlton <gmc at equinoxinitiative.org>

diff --git a/Open-ILS/src/templates/staff/base.tt2 b/Open-ILS/src/templates/staff/base.tt2
index 445b1ad..f279759 100644
--- a/Open-ILS/src/templates/staff/base.tt2
+++ b/Open-ILS/src/templates/staff/base.tt2
@@ -42,9 +42,6 @@
     <div id="top-content-container" class="container" ng-cloak>[% content %]</div>
 
     [% 
-      # status bar along bottom of page
-      INCLUDE "staff/statusbar.tt2";
-
       # script imports
       INCLUDE "staff/base_js.tt2";
 
diff --git a/Open-ILS/src/templates/staff/base_js.tt2 b/Open-ILS/src/templates/staff/base_js.tt2
index 06f8bc4..82b662e 100644
--- a/Open-ILS/src/templates/staff/base_js.tt2
+++ b/Open-ILS/src/templates/staff/base_js.tt2
@@ -42,7 +42,6 @@
 <script src="[% ctx.media_prefix %]/js/ui/default/staff/services/coresvc.js"></script>
 <script src="[% ctx.media_prefix %]/js/ui/default/staff/services/user.js"></script>
 <script src="[% ctx.media_prefix %]/js/ui/default/staff/services/navbar.js"></script>
-<script src="[% ctx.media_prefix %]/js/ui/default/staff/services/statusbar.js"></script>
 <script src="[% ctx.media_prefix %]/js/ui/default/staff/services/ui.js"></script>
 <script src="[% ctx.media_prefix %]/js/ui/default/staff/services/date.js"></script>
 <script src="[% ctx.media_prefix %]/js/ui/default/staff/services/op_change.js"></script>
diff --git a/Open-ILS/src/templates/staff/css/style.css.tt2 b/Open-ILS/src/templates/staff/css/style.css.tt2
index bdfd64d..eff1037 100644
--- a/Open-ILS/src/templates/staff/css/style.css.tt2
+++ b/Open-ILS/src/templates/staff/css/style.css.tt2
@@ -27,31 +27,8 @@
     border-bottom-color: #ddd;
 }
 
-/* status bar along the bottom of the page ------------------------ */
-/* decrease padding to decrease overall height */
-
-/** TODO:move status bar items into navbar config entry (top-right)
- * to avoid body padding weirdness.  Or if we want a permenently
- * visible status bar, maybe put it just below the navbar.. */
-
-/* bottom padding ensures no body content is hidden behind the status
- * bar.  When content reaches the status bar a scroll bar appears */
-/*body { padding-bottom: 26px; }*/
-
-#status-bar {
-  min-height:1.8em !important;
-}
-#status-bar > ul {
-  margin-right:6px; 
-}
-#status-bar li {
-  padding-left: 10px;
-}
-#status-bar > li > a {
-  padding-top:5px !important; 
-  padding-bottom:5px !important;
-}
-.status-bar-connected {
+/* Hatch / WebSockets / Etc. connectivity status indicator */
+.connect-status-ok {
   color: rgb(92, 184, 92); /* success */
 }
 
diff --git a/Open-ILS/src/templates/staff/navbar.tt2 b/Open-ILS/src/templates/staff/navbar.tt2
index 8d593b9..65bef57 100644
--- a/Open-ILS/src/templates/staff/navbar.tt2
+++ b/Open-ILS/src/templates/staff/navbar.tt2
@@ -491,6 +491,17 @@
               [% l('Log Out') %]
             </a>
           </li>
+          <li class="divider"></li>
+          <li>
+            <a href disabled="disabled">
+              <span
+                title="[% l('Hatch Connection Status') %]"
+                class="glyphicon glyphicon-transfer"
+                ng-class="{'connect-status-ok' : hatchConnected()}">
+              </span>
+              [% l('Hatch') %]
+            </a>
+          </li>
         </ul>
       </li>
     </ul>
diff --git a/Open-ILS/src/templates/staff/statusbar.tt2 b/Open-ILS/src/templates/staff/statusbar.tt2
deleted file mode 100644
index 1153223..0000000
--- a/Open-ILS/src/templates/staff/statusbar.tt2
+++ /dev/null
@@ -1,41 +0,0 @@
-<!-- Status bar along the bottom of the page -->
-
-<div id="status-bar" 
-  class="navbar navbar-default navbar-fixed-bottom" 
-  ng-model="statusbar_hidden"
-  ng-hide="true"
-  role="navigation">
-
-  <!-- 
-    Define the status bar as a directive so it may be used globally.
-    The template is defined inline (below) to leverage i18n and 
-    so one less network fetch is required.
-  -->
-  <eg-status-bar></eg-status-bar>
-  <script type="text/ng-template" id="eg-status-bar-template">
-    <ul class="nav navbar-nav navbar-right">
-      <li>{{messages[0]}}</li>
-      <li>
-        <span 
-          ng-click="hatchConnect()"
-          title="[% l('Print/Store Connection Status') %]"
-          class="glyphicon glyphicon-transfer"
-          ng-class="{'status-bar-connected' : hatchConnected()}">
-        </span>
-      </li>
-      <li>
-        <span 
-          title="[% l('Network Connection Status') %]"
-          class="glyphicon glyphicon-signal"
-          ng-class="{'status-bar-connected' : netConnected()}">
-        </span>
-      </li>
-      <li ng-click="statusbar_hidden ? statusbar_hidden = false : statusbar_hidden = true">
-        <span 
-          title="[% l('Collapse ... Reload to restore') %]"
-          class="glyphicon glyphicon-collapse-down">
-        </span>
-      </li>
-    </ul>    
-  </script>
-</div>
diff --git a/Open-ILS/web/js/ui/default/staff/Gruntfile.js b/Open-ILS/web/js/ui/default/staff/Gruntfile.js
index b35584a..e594196 100644
--- a/Open-ILS/web/js/ui/default/staff/Gruntfile.js
+++ b/Open-ILS/web/js/ui/default/staff/Gruntfile.js
@@ -165,7 +165,6 @@ module.exports = function(grunt) {
             'services/audio.js',
             'services/coresvc.js',
             'services/navbar.js',
-            'services/statusbar.js',
             'services/ui.js',
             'services/date.js',
             'services/op_change.js',
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 c7bb4ed..713d9f3 100644
--- a/Open-ILS/web/js/ui/default/staff/services/navbar.js
+++ b/Open-ILS/web/js/ui/default/staff/services/navbar.js
@@ -99,6 +99,11 @@ angular.module('egCoreMod')
                     return egCore.auth.token();
                 }
 
+                // Returns true if the browser is connected to Hatch
+                $scope.hatchConnected = function() {
+                    return egCore.hatch.hatchAvailable;
+                }
+
                 // tied to logout link
                 $scope.logout = function() {
                     egCore.auth.logout();
diff --git a/Open-ILS/web/js/ui/default/staff/services/statusbar.js b/Open-ILS/web/js/ui/default/staff/services/statusbar.js
deleted file mode 100644
index 8c7d116..0000000
--- a/Open-ILS/web/js/ui/default/staff/services/statusbar.js
+++ /dev/null
@@ -1,61 +0,0 @@
-/**
- * egStatusBar
- *
- * Displays key information and messages to the user.
- *
- * Currently displays network connection status, egHatch connection
- * status, and messages delivered via 
- * $scope.$emit('egStatusBarMessage', msg)
- */
-
-angular.module('egCoreMod')
-
-.directive('egStatusBar', function() {
-    return {
-        restrict : 'AE',
-        replace : true,
-        templateUrl : 'eg-status-bar-template',
-        scope : { },
-        controller : [
-                    '$scope','$rootScope','egHatch',
-            function($scope , $rootScope , egHatch) {
-            $scope.messages = []; // keep a log of recent messages
-
-            $scope.netConnected = function() {
-                // TODO: should should be abstracted through egNet
-                return OpenSRF.websocketConnected();
-            }
-
-            // update the UI whenever we lose connection
-            OpenSRF.onWebSocketClosed = function() {
-                $scope.$apply();
-            }
-
-            $scope.hatchConnected = function() {
-                return egHatch.hatchAvailable;
-            }
-
-            // update the UI whenever we lose connection
-            egHatch.onHatchClose = function() {
-                $scope.$apply();
-            }
-
-            // update the UI whenever we lose connection
-            egHatch.onHatchOpen = function() {
-                $scope.$apply();
-            }
-
-            $scope.hatchConnect = function() {
-                egHatch.hatchConnect();
-            }
-
-            $rootScope.$on('egStatusBarMessage', function(evt, args) {
-                $scope.messages.unshift(args);
-
-                // ensure the list does not exceed 10 messages
-                // TODO: configurable?
-                $scope.messages.splice(10, 1); 
-            });
-        }]
-    }
-});
diff --git a/Open-ILS/web/js/ui/default/staff/test/karma.conf.js b/Open-ILS/web/js/ui/default/staff/test/karma.conf.js
index 4da4e66..87d6731 100644
--- a/Open-ILS/web/js/ui/default/staff/test/karma.conf.js
+++ b/Open-ILS/web/js/ui/default/staff/test/karma.conf.js
@@ -42,7 +42,6 @@ module.exports = function(config){
       'services/user.js',
       'services/startup.js',
       'services/ui.js',
-      'services/statusbar.js',
       'services/grid.js',
       'services/op_change.js',
       'services/navbar.js', 'services/date.js',

-----------------------------------------------------------------------

Summary of changes:
 Open-ILS/src/templates/staff/base.tt2              |    3 -
 Open-ILS/src/templates/staff/base_js.tt2           |    1 -
 Open-ILS/src/templates/staff/css/style.css.tt2     |   27 +--------
 Open-ILS/src/templates/staff/navbar.tt2            |   11 ++++
 Open-ILS/src/templates/staff/statusbar.tt2         |   41 -------------
 Open-ILS/web/js/ui/default/staff/Gruntfile.js      |    1 -
 .../web/js/ui/default/staff/services/navbar.js     |    5 ++
 .../web/js/ui/default/staff/services/statusbar.js  |   61 --------------------
 .../web/js/ui/default/staff/test/karma.conf.js     |    1 -
 9 files changed, 18 insertions(+), 133 deletions(-)
 delete mode 100644 Open-ILS/src/templates/staff/statusbar.tt2
 delete mode 100644 Open-ILS/web/js/ui/default/staff/services/statusbar.js


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list