[open-ils-commits] [GIT] Evergreen ILS branch master updated. 25f60b4e7d9ba78cb96cd177659c8f82493287e2

Evergreen Git git at git.evergreen-ils.org
Mon Sep 24 16:52:02 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  25f60b4e7d9ba78cb96cd177659c8f82493287e2 (commit)
      from  6c0e0d5efaa90dd22468127d6e7d5bf87bdff6c1 (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 25f60b4e7d9ba78cb96cd177659c8f82493287e2
Author: Bill Erickson <berickxx at gmail.com>
Date:   Mon Sep 24 16:19:33 2018 -0400

    LP#1794176 Avoid capturing grid cell tooltip/display values
    
    Remove the grid-tooltip logic that captured the cell content into a
    template-level variable so the content only needed to be generated once
    for both the tooltip and cell display.  This logic fails to handle cases
    where the cell content is dynamic, typically the result of row
    attributes being modified via external process.
    
    Signed-off-by: Bill Erickson <berickxx at gmail.com>
    Signed-off-by: Dan Wells <dbw2 at calvin.edu>

diff --git a/Open-ILS/src/templates/staff/share/t_autogrid.tt2 b/Open-ILS/src/templates/staff/share/t_autogrid.tt2
index c23a72a..19862d4 100644
--- a/Open-ILS/src/templates/staff/share/t_autogrid.tt2
+++ b/Open-ILS/src/templates/staff/share/t_autogrid.tt2
@@ -330,13 +330,12 @@
                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)">
+            style="padding-left:5px; padding-right:10px;">
             <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>
+              uib-tooltip-html="getHtmlTooltip(col, item)">
+              <span ng-bind-html="translateCellTemplate(col, item)"></span>
             </span>
           </span>
 
@@ -348,13 +347,12 @@
                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="{{cellOverflowed(cellId(col, item), 1) ? text_value : ''}}"
+            uib-tooltip="{{cellOverflowed(cellId(col, item), 1) ? (itemFieldValue(item, col) | egGridValueFilter:col:item) : ''}}"
             tooltip-class="eg-grid-tooltip"
             tooltip-placement="top-left"
             tooltip-class="eg-grid-tooltip"
             style="padding-left:5px; padding-right:10px;">
-            {{text_value}}
+            {{itemFieldValue(item, col) | egGridValueFilter:col:item}}
           </span>
       </div>
     </div>
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 a1f8d5f..833c0fc 100644
--- a/Open-ILS/web/js/ui/default/staff/services/grid.js
+++ b/Open-ILS/web/js/ui/default/staff/services/grid.js
@@ -1144,6 +1144,13 @@ angular.module('egGridMod',
                 return val;
             }
 
+            $scope.getHtmlTooltip = function(col, item) {
+                if ($scope.cellOverflowed($scope.cellId(col, item), 1)) {
+                    return grid.getItemTextContent(item, col);
+                }
+                return "";
+            }
+
             /**
              * Fetches all grid data and transates each item into a simple
              * key-value pair of column name => text-value.

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

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


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list