[open-ils-commits] [GIT] Evergreen ILS branch rel_3_1 updated. 307b44187efee7210d353362a7452af7ccfe3bc3

Evergreen Git git at git.evergreen-ils.org
Thu Aug 30 14:16:40 EDT 2018


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, rel_3_1 has been updated
       via  307b44187efee7210d353362a7452af7ccfe3bc3 (commit)
       via  5d28cb725b47d3af30a91ca8f4337762ab02788e (commit)
       via  62b9a0d551df315e7d0f5f082e8310110ceb9e94 (commit)
       via  fc0c383faf3204d4cb6ef942694b859d0ee2e980 (commit)
      from  3ea1d7cf2b7f1cc110fc2320aae86cd7837ae659 (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 307b44187efee7210d353362a7452af7ccfe3bc3
Author: Bill Erickson <berickxx at gmail.com>
Date:   Wed Aug 29 14:05:09 2018 -0400

    LP#1740412 Double grid tooltip max width
    
    Bump the max-width of the grid tooltip from 200 to 400px to accommodate
    longer messages.  Shorter messages will continue using narrower
    tooltips.
    
    Signed-off-by: Bill Erickson <berickxx at gmail.com>
    Signed-off-by: Michele Morgan <mmorgan at noblenet.org>
    Signed-off-by: Kathy Lussier <klussier at masslnc.org>

diff --git a/Open-ILS/src/templates/staff/css/style.css.tt2 b/Open-ILS/src/templates/staff/css/style.css.tt2
index f59fbef..063da5f 100644
--- a/Open-ILS/src/templates/staff/css/style.css.tt2
+++ b/Open-ILS/src/templates/staff/css/style.css.tt2
@@ -564,6 +564,10 @@ eg-grid-field {
   display: none;
 }
 
+.eg-grid-tooltip .tooltip-inner {
+  max-width: 400px;
+}
+
 [%# 
 vim: ft=css 
 %]
diff --git a/Open-ILS/src/templates/staff/share/t_autogrid.tt2 b/Open-ILS/src/templates/staff/share/t_autogrid.tt2
index de8a583..9e37456 100644
--- a/Open-ILS/src/templates/staff/share/t_autogrid.tt2
+++ b/Open-ILS/src/templates/staff/share/t_autogrid.tt2
@@ -327,6 +327,7 @@
             style="padding-left:5px; padding-right:10px;"
             ng-init="html_value=translateCellTemplate(col, item)">
             <span tooltip-class="eg-grid-tooltip"
+              tooltip-class="eg-grid-tooltip"
               tooltip-placement="top-left"
               uib-tooltip-html="cellOverflowed(cellId(col, item), 1) ? html_value : ''">
               <span ng-bind-html="html_value"></span>
@@ -343,6 +344,7 @@
             id="{{cellId(col, item)}}"
             ng-init="text_value = (itemFieldValue(item, col) | egGridValueFilter:col:item)"
             uib-tooltip="{{cellOverflowed(cellId(col, item), 1) ? text_value : ''}}"
+            tooltip-class="eg-grid-tooltip"
             tooltip-placement="top-left"
             tooltip-class="eg-grid-tooltip"
             style="padding-left:5px; padding-right:10px;">

commit 5d28cb725b47d3af30a91ca8f4337762ab02788e
Author: Bill Erickson <berickxx at gmail.com>
Date:   Fri Aug 24 10:30:34 2018 -0400

    LP#1740412 Grid cell tooltips moved to top-left
    
    Avoid rendering the tooltip in the middle of a section of overflowed
    text, since it can lead to tooltips being pushed far to the right.
    Render at top left of cell instead.
    
    Signed-off-by: Bill Erickson <berickxx at gmail.com>
    Signed-off-by: Michele Morgan <mmorgan at noblenet.org>
    Signed-off-by: Kathy Lussier <klussier at masslnc.org>

diff --git a/Open-ILS/src/templates/staff/share/t_autogrid.tt2 b/Open-ILS/src/templates/staff/share/t_autogrid.tt2
index cb8c011..de8a583 100644
--- a/Open-ILS/src/templates/staff/share/t_autogrid.tt2
+++ b/Open-ILS/src/templates/staff/share/t_autogrid.tt2
@@ -327,6 +327,7 @@
             style="padding-left:5px; padding-right:10px;"
             ng-init="html_value=translateCellTemplate(col, item)">
             <span tooltip-class="eg-grid-tooltip"
+              tooltip-placement="top-left"
               uib-tooltip-html="cellOverflowed(cellId(col, item), 1) ? html_value : ''">
               <span ng-bind-html="html_value"></span>
             </span>
@@ -342,6 +343,7 @@
             id="{{cellId(col, item)}}"
             ng-init="text_value = (itemFieldValue(item, col) | egGridValueFilter:col:item)"
             uib-tooltip="{{cellOverflowed(cellId(col, item), 1) ? text_value : ''}}"
+            tooltip-placement="top-left"
             tooltip-class="eg-grid-tooltip"
             style="padding-left:5px; padding-right:10px;">
             {{text_value}}

commit 62b9a0d551df315e7d0f5f082e8310110ceb9e94
Author: Bill Erickson <berickxx at gmail.com>
Date:   Thu Aug 23 13:52:38 2018 -0400

    LP#1740412 Grid cell tooltips limited to long content
    
    Only display grid cell tooltips when the content of the cell overflows
    its container.
    
    Signed-off-by: Bill Erickson <berickxx at gmail.com>
    Signed-off-by: Michele Morgan <mmorgan at noblenet.org>
    Signed-off-by: Kathy Lussier <klussier at masslnc.org>

diff --git a/Open-ILS/src/templates/staff/share/t_autogrid.tt2 b/Open-ILS/src/templates/staff/share/t_autogrid.tt2
index 3e2b014..cb8c011 100644
--- a/Open-ILS/src/templates/staff/share/t_autogrid.tt2
+++ b/Open-ILS/src/templates/staff/share/t_autogrid.tt2
@@ -323,9 +323,11 @@
           <!-- if the cell comes with its own template,
                translate that content into HTML and insert it here -->
           <span ng-if="col.template && !col.compiled" 
+            id="{{cellId(col, item)}}"
             style="padding-left:5px; padding-right:10px;"
             ng-init="html_value=translateCellTemplate(col, item)">
-            <span uib-tooltip-html="html_value" tooltip-class="eg-grid-tooltip">
+            <span tooltip-class="eg-grid-tooltip"
+              uib-tooltip-html="cellOverflowed(cellId(col, item), 1) ? html_value : ''">
               <span ng-bind-html="html_value"></span>
             </span>
           </span>
@@ -337,8 +339,9 @@
           <!-- otherwise, simply display the item value, which may 
                pass through datatype-specific filtering. -->
           <span ng-if="!col.template" 
+            id="{{cellId(col, item)}}"
             ng-init="text_value = (itemFieldValue(item, col) | egGridValueFilter:col:item)"
-            uib-tooltip="{{text_value}}"
+            uib-tooltip="{{cellOverflowed(cellId(col, item), 1) ? text_value : ''}}"
             tooltip-class="eg-grid-tooltip"
             style="padding-left:5px; padding-right:10px;">
             {{text_value}}
diff --git a/Open-ILS/web/js/ui/default/staff/services/grid.js b/Open-ILS/web/js/ui/default/staff/services/grid.js
index 3238663..4ee2c23 100644
--- a/Open-ILS/web/js/ui/default/staff/services/grid.js
+++ b/Open-ILS/web/js/ui/default/staff/services/grid.js
@@ -829,6 +829,32 @@ angular.module('egGridMod',
                 return grid.modifyColumnPos(col, diff);
             }
 
+            // Returns true of the contents of the cell overflow its container.
+            // parentDepth tells the code how far up the DOM tree to traverse
+            // via parentNode before stopping to inspect the value.
+            // There's no way to pass a reference to a DOM node directly via
+            // a scope function (except ng-click, etc.) so pass the 
+            // DOM id instead and get the node from there.
+            $scope.cellOverflowed = function(id, parentDepth) {
+                var node = document.getElementById(id);
+                if (!node) return;
+                for (var i = 0; i < parentDepth; i++) {
+                    node = node.parentNode;
+                }
+                return node.scrollHeight > node.clientHeight 
+                    || node.scrollWidth > node.clientWidth;
+            }
+
+            // Generates a unique identifier per cell per grid.
+            $scope.cellId = function(col, item) {
+                if (!col || !item) return '';
+                return 'grid-cell-span-' 
+                    // differentiate grids
+                    + ($scope.persistKey || $scope.idlClass || $scope.grid_element.id)
+                    // differentiate rows and columns.
+                    + '-' + col.name + '-' + $scope.indexValue(item);
+
+            }
 
             // handles click, control-click, and shift-click
             $scope.handleRowClick = function($event, item) {

commit fc0c383faf3204d4cb6ef942694b859d0ee2e980
Author: Bill Erickson <berickxx at gmail.com>
Date:   Mon Jun 25 12:19:36 2018 -0400

    LP#1740412 Grid cell content tooltips
    
    Display a tooltip (popover), containing the full grid contents, when
    mousing over a grid cell.  This allows users to see the full contents of
    a cell without having to resize the grid column.
    
    This applies to text contents and pre-compiled HTML contents.
    
    Signed-off-by: Bill Erickson <berickxx at gmail.com>
    Signed-off-by: Michele Morgan <mmorgan at noblenet.org>
    Signed-off-by: Kathy Lussier <klussier at masslnc.org>

diff --git a/Open-ILS/src/templates/staff/css/style.css.tt2 b/Open-ILS/src/templates/staff/css/style.css.tt2
index ff61b4a..f59fbef 100644
--- a/Open-ILS/src/templates/staff/css/style.css.tt2
+++ b/Open-ILS/src/templates/staff/css/style.css.tt2
@@ -464,6 +464,14 @@ table.list tr.selected td { /* deprecated? */
   box-shadow: none;
 }
 
+.eg-grid-tooltip {
+  font-size: 110%;
+}
+/* avoid visited "blue" links over black background */
+.eg-grid-tooltip a {
+  color: white;
+}
+
 
 /* ----------------------------------------------------------------------
  * /Grid
diff --git a/Open-ILS/src/templates/staff/share/t_autogrid.tt2 b/Open-ILS/src/templates/staff/share/t_autogrid.tt2
index 58b3534..3e2b014 100644
--- a/Open-ILS/src/templates/staff/share/t_autogrid.tt2
+++ b/Open-ILS/src/templates/staff/share/t_autogrid.tt2
@@ -322,8 +322,12 @@
 
           <!-- if the cell comes with its own template,
                translate that content into HTML and insert it here -->
-          <span ng-if="col.template && !col.compiled" style="padding-left:5px; padding-right:10px;"
-            ng-bind-html="translateCellTemplate(col, item)">
+          <span ng-if="col.template && !col.compiled" 
+            style="padding-left:5px; padding-right:10px;"
+            ng-init="html_value=translateCellTemplate(col, item)">
+            <span uib-tooltip-html="html_value" tooltip-class="eg-grid-tooltip">
+              <span ng-bind-html="html_value"></span>
+            </span>
           </span>
 
           <span ng-if="col.template && col.compiled" style="padding-left:5px; padding-right:10px;"
@@ -332,8 +336,12 @@
 
           <!-- otherwise, simply display the item value, which may 
                pass through datatype-specific filtering. -->
-          <span ng-if="!col.template" style="padding-left:5px; padding-right:10px;">
-            {{itemFieldValue(item, col) | egGridValueFilter:col:item}}
+          <span ng-if="!col.template" 
+            ng-init="text_value = (itemFieldValue(item, col) | egGridValueFilter:col:item)"
+            uib-tooltip="{{text_value}}"
+            tooltip-class="eg-grid-tooltip"
+            style="padding-left:5px; padding-right:10px;">
+            {{text_value}}
           </span>
       </div>
     </div>

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

Summary of changes:
 Open-ILS/src/templates/staff/css/style.css.tt2    |   12 +++++++++
 Open-ILS/src/templates/staff/share/t_autogrid.tt2 |   23 +++++++++++++++---
 Open-ILS/web/js/ui/default/staff/services/grid.js |   26 +++++++++++++++++++++
 3 files changed, 57 insertions(+), 4 deletions(-)


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list