[open-ils-commits] [GIT] Evergreen ILS branch master updated. 349d7e394ad943ddf1d09d1aef3c4870b29cfb70

Evergreen Git git at git.evergreen-ils.org
Thu Aug 30 14:14:25 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, master has been updated
       via  349d7e394ad943ddf1d09d1aef3c4870b29cfb70 (commit)
       via  764725a28c25adafc4a1673cd3c7c42723bfa6b8 (commit)
       via  1e9c0ab388a0697a1f099970240f2da21bfb5e1f (commit)
       via  8f44a224943e85e168d8224524ad669ee68a0aa0 (commit)
      from  03317dc6af32e23339f693592ead3e5993691277 (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 349d7e394ad943ddf1d09d1aef3c4870b29cfb70
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 5e0a6be..12d2fb6 100644
--- a/Open-ILS/src/templates/staff/share/t_autogrid.tt2
+++ b/Open-ILS/src/templates/staff/share/t_autogrid.tt2
@@ -332,6 +332,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>
@@ -348,6 +349,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 764725a28c25adafc4a1673cd3c7c42723bfa6b8
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 e77fa58..5e0a6be 100644
--- a/Open-ILS/src/templates/staff/share/t_autogrid.tt2
+++ b/Open-ILS/src/templates/staff/share/t_autogrid.tt2
@@ -332,6 +332,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>
@@ -347,6 +348,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 1e9c0ab388a0697a1f099970240f2da21bfb5e1f
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 a7722f6..e77fa58 100644
--- a/Open-ILS/src/templates/staff/share/t_autogrid.tt2
+++ b/Open-ILS/src/templates/staff/share/t_autogrid.tt2
@@ -328,9 +328,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>
@@ -342,8 +344,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 f2b577c..62a4719 100644
--- a/Open-ILS/web/js/ui/default/staff/services/grid.js
+++ b/Open-ILS/web/js/ui/default/staff/services/grid.js
@@ -859,6 +859,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 8f44a224943e85e168d8224524ad669ee68a0aa0
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 303e191..a7722f6 100644
--- a/Open-ILS/src/templates/staff/share/t_autogrid.tt2
+++ b/Open-ILS/src/templates/staff/share/t_autogrid.tt2
@@ -327,8 +327,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;"
@@ -337,8 +341,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