Fixed bug #17187: CSH tooltip does not render correctly for allowed Excludefields
authorStanislas Rolland <typo3@sjbr.ca>
Fri, 21 Jan 2011 20:42:32 +0000 (20:42 +0000)
committerStanislas Rolland <typo3@sjbr.ca>
Fri, 21 Jan 2011 20:42:32 +0000 (20:42 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@10224 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
t3lib/js/extjs/contexthelp.js

index 3da639f..49cb89d 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -53,6 +53,7 @@
        * Updated htmlArea RTE version to 2.1.5
        * Fixed bug #16975: htmlArea RTE: Use parentNode rather than parentElement
        * Follow-up to bug #17157: htmlArea RTE: Not enabled in various browser/system combinations
+       * Fixed bug #17187: CSH tooltip does not render correctly for allowed Excludefields
 
 2011-01-21  Susanne Moog  <typo3@susanne-moog.de>
 
index c6041a2..42b10a3 100644 (file)
@@ -108,8 +108,6 @@ TYPO3.ContextHelp = function() {
                                html: '',
                                        // The tooltip will appear above the label, if viewport allows
                                anchor: 'bottom',
-                                       // The anchor is pushed slightly to the left in order to align with the help icon of doc headers
-                               anchorOffset: -10,
                                minWidth: 160,
                                maxWidth: 240,
                                target: Ext.getBody(),
@@ -182,14 +180,23 @@ TYPO3.ContextHelp = function() {
                        /**
                         * Adds a sequence to Ext.TooltTip::showAt so as to increase vertical offset when anchor position is 'botton'
                         * This positions the tip box closer to the target element when the anchor is on the bottom side of the box
+                        * When anchor position is 'top' or 'bottom', the anchor is pushed slightly to the left in order to align with the help icon, if any
                         *
                         */
                        Ext.ToolTip.prototype.showAt = Ext.ToolTip.prototype.showAt.createSequence(
                                function() {
                                        var ap = this.getAnchorPosition().charAt(0);
-                                       if (this.anchorToTarget && !this.trackMouse && ap == 'b') {
-                                               var xy = this.getPosition();
-                                               this.setPagePosition(xy[0], xy[1]+5);
+                                       if (this.anchorToTarget && !this.trackMouse) {
+                                               switch (ap) {
+                                                       case 'b':
+                                                               var xy = this.getPosition();
+                                                               this.setPagePosition(xy[0]-10, xy[1]+5);
+                                                               break;
+                                                       case 't':
+                                                               var xy = this.getPosition();
+                                                               this.setPagePosition(xy[0]-10, xy[1]);
+                                                               break;
+                                               }
                                        }
                                }
                        );