[BUGFIX] CSH popup of main help icon not shown completely 03/44703/3
authorFrank Nägler <frank.naegler@typo3.org>
Fri, 13 Nov 2015 11:25:32 +0000 (12:25 +0100)
committerWouter Wolters <typo3@wouterwolters.nl>
Fri, 13 Nov 2015 19:50:36 +0000 (20:50 +0100)
Resolves: #71555
Releases: master
Change-Id: Iedc048a2dc393021a043aa0a819e0aac9c48f353
Reviewed-on: https://review.typo3.org/44703
Reviewed-by: Georg Ringer <georg.ringer@gmail.com>
Tested-by: Georg Ringer <georg.ringer@gmail.com>
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: Wouter Wolters <typo3@wouterwolters.nl>
typo3/sysext/backend/Resources/Public/JavaScript/ContextHelp.js
typo3/sysext/backend/Resources/Public/JavaScript/Popover.js

index 741f8cb..105dd43 100644 (file)
@@ -68,6 +68,11 @@ define(['jquery', 'TYPO3/CMS/Backend/Popover', 'bootstrap'], function($) {
                        } else if ($me.attr('data-loaded') === 'false' && $me.data('table')) {
                                ContextHelp.loadHelp($me);
                        }
+
+                       // if help icon is in DocHeader, force open to bottom
+                       if ($me.closest('.t3js-module-docheader').length) {
+                               TYPO3.Popover.setOption($me, 'placement', 'bottom');
+                       }
                });
                $(document).on('shown.bs.popover', ContextHelp.selector, function(evt) {
                        var $popover = $(evt.target).data('bs.popover').$tip;
index e06c2e4..ad3689d 100644 (file)
@@ -61,6 +61,17 @@ define(['jquery', 'bootstrap'], function($) {
        };
 
        /**
+        * Set popover option on $element
+        *
+        * @param {Object} $element
+        * @param {String} key
+        * @param {String} value
+     */
+       Popover.setOption = function($element, key, value) {
+               $element.data('bs.popover').options[key] = value;
+       };
+
+       /**
         * Show popover with title and content on $element
         *
         * @param {Object} $element