From ab6c0d1416b6fdc62b9f2b922f0ac37350f04c6a Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Mon, 11 Apr 2016 18:22:52 +0200 Subject: [PATCH] Increased popover offset They still look awful. --- .../js/WoltLab/WCF/Controller/Popover.js | 25 ++++++++----------- 1 file changed, 11 insertions(+), 14 deletions(-) diff --git a/wcfsetup/install/files/js/WoltLab/WCF/Controller/Popover.js b/wcfsetup/install/files/js/WoltLab/WCF/Controller/Popover.js index 4e80814c95..6f7178734e 100644 --- a/wcfsetup/install/files/js/WoltLab/WCF/Controller/Popover.js +++ b/wcfsetup/install/files/js/WoltLab/WCF/Controller/Popover.js @@ -2,7 +2,7 @@ * Versatile popover manager. * * @author Alexander Ebert - * @copyright 2001-2015 WoltLab GmbH + * @copyright 2001-2016 WoltLab GmbH * @license GNU Lesser General Public License * @module WoltLab/WCF/Controller/Popover */ @@ -87,6 +87,7 @@ define(['Ajax', 'Dictionary', 'Environment', 'Dom/ChangeListener', 'Dom/Util', ' * Initializes a popover handler. * * Usage: + * * ControllerPopover.init({ * attributeName: 'data-object-id', * className: 'fooLink', @@ -99,7 +100,7 @@ define(['Ajax', 'Dictionary', 'Environment', 'Dom/ChangeListener', 'Dom/Util', ' * } * }); * - * @param {object} options handler options + * @param {Object} options handler options */ init: function(options) { if (Environment.platform() !== 'desktop') { @@ -142,8 +143,8 @@ define(['Ajax', 'Dictionary', 'Environment', 'Dom/ChangeListener', 'Dom/Util', ' /** * Binds event listeners for popover-enabled elements. * - * @param {object} options handler options - * @param {string} identifier handler identifier + * @param {Object} options handler options + * @param {string} identifier handler identifier */ _initElements: function(options, identifier) { var elements = options.legacy ? elBySelAll(options.elements) : options.elements; @@ -245,10 +246,8 @@ define(['Ajax', 'Dictionary', 'Environment', 'Dom/ChangeListener', 'Dom/Util', ' /** * Handles the mouse leaving the popover-enabled element or the popover itself. - * - * @param {object} event event object */ - _mouseLeave: function(event) { + _mouseLeave: function() { _hoverId = null; if (_timeoutLeave !== null) { @@ -268,10 +267,8 @@ define(['Ajax', 'Dictionary', 'Environment', 'Dom/ChangeListener', 'Dom/Util', ' /** * Handles the mouse start hovering the popover element. - * - * @param {object} event event object */ - _popoverMouseEnter: function(event) { + _popoverMouseEnter: function() { if (_timeoutLeave !== null) { window.clearTimeout(_timeoutLeave); _timeoutLeave = null; @@ -363,7 +360,7 @@ define(['Ajax', 'Dictionary', 'Environment', 'Dom/ChangeListener', 'Dom/Util', ' UiAlignment.set(_popover, _elements.get(_activeId).element, { pointer: true, vertical: 'top', - verticalOffset: 3 + verticalOffset: 8 }); }, @@ -375,9 +372,9 @@ define(['Ajax', 'Dictionary', 'Environment', 'Dom/ChangeListener', 'Dom/Util', ' /** * Sends an AJAX requests to the server, simple wrapper to reuse the request object. * - * @param {object} data request data - * @param {function} success success callback - * @param {function=} failure error callback + * @param {Object} data request data + * @param {function} success success callback + * @param {function=} failure error callback */ ajaxApi: function(data, success, failure) { if (typeof success !== 'function') { -- 2.20.1