From: Bill Erickson Date: Mon, 24 Sep 2018 20:19:33 +0000 (-0400) Subject: LP#1794176 Avoid capturing grid cell tooltip/display values X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=4a5521ec38cdef5d47dd76b0b6bf994ba8998995;p=Evergreen.git 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 Conflicts: Open-ILS/src/templates/staff/share/t_autogrid.tt2 Signed-off-by: Dan Wells --- diff --git a/Open-ILS/src/templates/staff/share/t_autogrid.tt2 b/Open-ILS/src/templates/staff/share/t_autogrid.tt2 index 80c5430c1f..d5f7f185fe 100644 --- a/Open-ILS/src/templates/staff/share/t_autogrid.tt2 +++ b/Open-ILS/src/templates/staff/share/t_autogrid.tt2 @@ -344,14 +344,14 @@ - + style="padding-left:5px; padding-right:10px;"> - + uib-tooltip-html="getHtmlTooltip(col, item)"> + @@ -359,13 +359,12 @@ pass through datatype-specific filtering. --> - {{text_value}} + {{itemFieldValue(item, col) | egGridValueFilter:col:item}} 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 ce494daf73..6df298c263 100644 --- a/Open-ILS/web/js/ui/default/staff/services/grid.js +++ b/Open-ILS/web/js/ui/default/staff/services/grid.js @@ -1094,6 +1094,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.