Revert "LP#1794176 Avoid capturing grid cell tooltip/display values"
authorJason Stephenson <jason@sigio.com>
Wed, 10 Oct 2018 19:46:40 +0000 (15:46 -0400)
committerJason Stephenson <jason@sigio.com>
Wed, 10 Oct 2018 19:46:40 +0000 (15:46 -0400)
This reverts commit 4a5521ec38cdef5d47dd76b0b6bf994ba8998995.

Remove tooltips functionality that causes performance hit.

Signed-off-by: Jason Stephenson <jason@sigio.com>
Open-ILS/src/templates/staff/share/t_autogrid.tt2
Open-ILS/web/js/ui/default/staff/services/grid.js

index d5f7f18..80c5430 100644 (file)
 
           <!-- if the cell comes with its own template,
                translate that content into HTML and insert it here -->
-          <span ng-if="col.template"
+          <span ng-if="col.template" style="padding-left:5px; padding-right:10px;"
             id="{{cellId(col, item)}}"
-            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="getHtmlTooltip(col, item)">
-              <span ng-bind-html="translateCellTemplate(col, item)"></span>
+              uib-tooltip-html="cellOverflowed(cellId(col, item), 1) ? html_value : ''">
+              <span ng-bind-html="html_value"></span>
             </span>
           </span>
 
                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) : ''}}"
+            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;">
-            {{itemFieldValue(item, col) | egGridValueFilter:col:item}}
+            {{text_value}}
           </span>
       </div>
     </div>
index 6df298c..ce494da 100644 (file)
@@ -1094,13 +1094,6 @@ 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.