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

Evergreen Git git at git.evergreen-ils.org
Thu Nov 15 10:57:03 EST 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  b65ad62c795748ef9ae5dc2ece77201d0009fb0b (commit)
      from  c932d8fdf6bed1e3449d418ee0e6548d70c3ba44 (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 b65ad62c795748ef9ae5dc2ece77201d0009fb0b
Author: Bill Erickson <berickxx at gmail.com>
Date:   Mon Nov 5 10:52:17 2018 -0500

    LP#1797007 Grid cell tooltips apply to all cells
    
    Avoid excessive browser page re-flows, caused by checking cell widths
    for rendering tooltips, by rendering tooltips for all cells regardless
    of the size of the content.
    
    This reverts commit 1e9c0ab388a0697a1f099970240f2da21bfb5e1f.
    
    Signed-off-by: Bill Erickson <berickxx at gmail.com>
    Signed-off-by: Jason Boyer <JBoyer at library.in.gov>
    Signed-off-by: Galen Charlton <gmc at equinoxinitiative.org>

diff --git a/Open-ILS/src/templates/staff/share/t_autogrid.tt2 b/Open-ILS/src/templates/staff/share/t_autogrid.tt2
index 0bd2d6b..0fd5d9e 100644
--- a/Open-ILS/src/templates/staff/share/t_autogrid.tt2
+++ b/Open-ILS/src/templates/staff/share/t_autogrid.tt2
@@ -323,7 +323,6 @@
           <!-- 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;">
             <span tooltip-class="eg-grid-tooltip"
               tooltip-class="eg-grid-tooltip"
@@ -340,9 +339,7 @@
           <!-- otherwise, simply display the item value, which may 
                pass through datatype-specific filtering. -->
           <span ng-if="!col.template" 
-            id="{{cellId(col, item)}}"
-            uib-tooltip="{{cellOverflowed(cellId(col, item), 1) ? (itemFieldValue(item, col) | egGridValueFilter:col:item) : ''}}"
-            tooltip-class="eg-grid-tooltip"
+            uib-tooltip="{{itemFieldValue(item, col) | egGridValueFilter:col:item}}"
             tooltip-placement="top-left"
             tooltip-class="eg-grid-tooltip"
             style="padding-left:5px; padding-right:10px;">
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 d53b48e..c47287e 100644
--- a/Open-ILS/web/js/ui/default/staff/services/grid.js
+++ b/Open-ILS/web/js/ui/default/staff/services/grid.js
@@ -848,32 +848,6 @@ 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) {
@@ -1110,10 +1084,7 @@ angular.module('egGridMod',
             }
 
             $scope.getHtmlTooltip = function(col, item) {
-                if ($scope.cellOverflowed($scope.cellId(col, item), 1)) {
-                    return grid.getItemTextContent(item, col);
-                }
-                return "";
+                return grid.getItemTextContent(item, col);
             }
 
             /**

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

Summary of changes:
 Open-ILS/src/templates/staff/share/t_autogrid.tt2 |    5 +---
 Open-ILS/web/js/ui/default/staff/services/grid.js |   31 +--------------------
 2 files changed, 2 insertions(+), 34 deletions(-)


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list