[open-ils-commits] [GIT] Evergreen ILS branch rel_3_0 updated. 76fa907a2fd76bbfb3899f302109f9d51c6d756e
Evergreen Git
git at git.evergreen-ils.org
Thu Sep 20 11:36:42 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, rel_3_0 has been updated
via 76fa907a2fd76bbfb3899f302109f9d51c6d756e (commit)
via d2ab77bc8a2e59d3ad535868525b1a99fbe4ebdd (commit)
via e8115509bd907248bdb1088e68fcacd5dc15d899 (commit)
via b1e0da12b30a3a960fe7834f5862c02f5828846f (commit)
from 965c65519462ce9bf3273b97a88e51d5a5ec0b26 (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 76fa907a2fd76bbfb3899f302109f9d51c6d756e
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>
Signed-off-by: John Amundson <jamundson at cwmars.org>
Signed-off-by: Jason Stephenson <jason at sigio.com>
diff --git a/Open-ILS/src/templates/staff/css/style.css.tt2 b/Open-ILS/src/templates/staff/css/style.css.tt2
index 183d848..c5d28b5 100644
--- a/Open-ILS/src/templates/staff/css/style.css.tt2
+++ b/Open-ILS/src/templates/staff/css/style.css.tt2
@@ -504,6 +504,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 61d939e..80c5430 100644
--- a/Open-ILS/src/templates/staff/share/t_autogrid.tt2
+++ b/Open-ILS/src/templates/staff/share/t_autogrid.tt2
@@ -348,6 +348,7 @@
id="{{cellId(col, item)}}"
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>
@@ -360,6 +361,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 d2ab77bc8a2e59d3ad535868525b1a99fbe4ebdd
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>
Signed-off-by: John Amundson <jamundson at cwmars.org>
Signed-off-by: Jason Stephenson <jason at sigio.com>
diff --git a/Open-ILS/src/templates/staff/share/t_autogrid.tt2 b/Open-ILS/src/templates/staff/share/t_autogrid.tt2
index 12996ea..61d939e 100644
--- a/Open-ILS/src/templates/staff/share/t_autogrid.tt2
+++ b/Open-ILS/src/templates/staff/share/t_autogrid.tt2
@@ -348,6 +348,7 @@
id="{{cellId(col, item)}}"
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>
@@ -359,6 +360,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 e8115509bd907248bdb1088e68fcacd5dc15d899
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>
Signed-off-by: John Amundson <jamundson at cwmars.org>
Signed-off-by: Jason Stephenson <jason at sigio.com>
diff --git a/Open-ILS/src/templates/staff/share/t_autogrid.tt2 b/Open-ILS/src/templates/staff/share/t_autogrid.tt2
index 8e07c7b..12996ea 100644
--- a/Open-ILS/src/templates/staff/share/t_autogrid.tt2
+++ b/Open-ILS/src/templates/staff/share/t_autogrid.tt2
@@ -345,8 +345,10 @@
<!-- if the cell comes with its own template,
translate that content into HTML and insert it here -->
<span ng-if="col.template" style="padding-left:5px; padding-right:10px;"
+ id="{{cellId(col, item)}}"
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>
@@ -354,8 +356,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 bf421c1..72d40e5 100644
--- a/Open-ILS/web/js/ui/default/staff/services/grid.js
+++ b/Open-ILS/web/js/ui/default/staff/services/grid.js
@@ -814,6 +814,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 b1e0da12b30a3a960fe7834f5862c02f5828846f
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>
Signed-off-by: John Amundson <jamundson at cwmars.org>
Signed-off-by: Jason Stephenson <jason at sigio.com>
diff --git a/Open-ILS/src/templates/staff/css/style.css.tt2 b/Open-ILS/src/templates/staff/css/style.css.tt2
index 9213e8c..183d848 100644
--- a/Open-ILS/src/templates/staff/css/style.css.tt2
+++ b/Open-ILS/src/templates/staff/css/style.css.tt2
@@ -421,6 +421,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 cf48ed8..8e07c7b 100644
--- a/Open-ILS/src/templates/staff/share/t_autogrid.tt2
+++ b/Open-ILS/src/templates/staff/share/t_autogrid.tt2
@@ -345,13 +345,20 @@
<!-- if the cell comes with its own template,
translate that content into HTML and insert it here -->
<span ng-if="col.template" style="padding-left:5px; padding-right:10px;"
- ng-bind-html="translateCellTemplate(col, item)">
+ 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>
<!-- 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 | 20 +++++++++++++--
Open-ILS/web/js/ui/default/staff/services/grid.js | 26 +++++++++++++++++++++
3 files changed, 55 insertions(+), 3 deletions(-)
hooks/post-receive
--
Evergreen ILS
More information about the open-ils-commits
mailing list