[eGroupWare-svn] r56085 - in /trunk/egroupware/api: js/jsapi/egw_tooltip.js templates/default/etemplate2.css

[email protected] Sat, 07 May 2016 16:56:18 -0000
Newsgroups gmane.comp.web.egroupware.cvs
Message-ID <[email protected]>
Author: ralfbecker
Date: Sat May  7 18:56:18 2016
New Revision: 56085

URL: http://svn.stylite.de/viewvc/egroupware?rev=56085&view=rev
Log:
fix tooltips for displaying lots of content

Modified:
    trunk/egroupware/api/js/jsapi/egw_tooltip.js
    trunk/egroupware/api/templates/default/etemplate2.css

Modified: trunk/egroupware/api/js/jsapi/egw_tooltip.js
URL: http://svn.stylite.de/viewvc/egroupware/trunk/egroupware/api/js/jsapi/egw_tooltip.js?rev=56085&r1=56084&r2=56085&view=diff
==============================================================================
--- trunk/egroupware/api/js/jsapi/egw_tooltip.js (original)
+++ trunk/egroupware/api/js/jsapi/egw_tooltip.js Sat May  7 18:56:18 2016
@@ -86,13 +86,16 @@
 				tooltip_div.css('max-width', space_left.right);
 			}
 
-			if (space_left.bottom < tooltip_height) {
+			// tooltip does fit neither above nor below: put him vertical centered left or right of cursor
+			if (space_left.bottom < tooltip_height && space_left.top < tooltip_height) {
+				if (tooltip_height > window_height-20) {
+					tooltip_div.css('max-height', tooltip_height=window_height-20);
+				}
+				tooltip_div.css('top', (window_height-tooltip_height)/2);
+			} else if (space_left.bottom < tooltip_height) {
 				tooltip_div.css('top', cursor_rect.top - tooltip_height);
-			} else if (space_left.top >= tooltip_height) {
+			} else {
 				tooltip_div.css('top', cursor_rect.bottom);
-			} else	{
-				tooltip_div.css('top', cursor_rect.bottom);
-				tooltip_div.css('max-height', space_left.bottom);
 			}
 
 			tooltip_div.fadeIn(100);

Modified: trunk/egroupware/api/templates/default/etemplate2.css
URL: http://svn.stylite.de/viewvc/egroupware/trunk/egroupware/api/templates/default/etemplate2.css?rev=56085&r1=56084&r2=56085&view=diff
==============================================================================
--- trunk/egroupware/api/templates/default/etemplate2.css (original)
+++ trunk/egroupware/api/templates/default/etemplate2.css Sat May  7 18:56:18 2016
@@ -869,6 +869,7 @@
   -webkit-box-shadow: 2px 2px 10px 0px rgba(0,0,0,0.75);
   -moz-box-shadow: 2px 2px 10px 0px rgba(0,0,0,0.75);
   box-shadow: 2px 2px 10px 0px rgba(0,0,0,0.75);
+  white-space: pre-wrap;
 }
 /**
  * Tabs widget


------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z