From 1fe125ca617d0d8df30240a12524c9ab30d54b36 Mon Sep 17 00:00:00 2001 From: Marcel Werk Date: Fri, 12 Aug 2011 17:07:13 +0200 Subject: [PATCH] Balloon tooltips optimized --- .../files/acp/templates/packageList.tpl | 4 ++-- .../files/acp/templates/updateServerList.tpl | 6 +++--- wcfsetup/install/files/js/WCF.js | 18 ++++++++++++++---- 3 files changed, 19 insertions(+), 9 deletions(-) diff --git a/wcfsetup/install/files/acp/templates/packageList.tpl b/wcfsetup/install/files/acp/templates/packageList.tpl index 475e7e515e..c304c737e9 100644 --- a/wcfsetup/install/files/acp/templates/packageList.tpl +++ b/wcfsetup/install/files/acp/templates/packageList.tpl @@ -55,12 +55,12 @@ {if $__wcf->session->getPermission('admin.system.package.canUpdatePackage')} - + {else} {/if} {if $__wcf->session->getPermission('admin.system.package.canUninstallPackage') && $package->package != 'com.woltlab.wcf' && $package->packageID != PACKAGE_ID} - + {else} {/if} diff --git a/wcfsetup/install/files/acp/templates/updateServerList.tpl b/wcfsetup/install/files/acp/templates/updateServerList.tpl index ad578282ba..3925f10b13 100644 --- a/wcfsetup/install/files/acp/templates/updateServerList.tpl +++ b/wcfsetup/install/files/acp/templates/updateServerList.tpl @@ -54,9 +54,9 @@ {foreach from=$updateServers item=updateServer} - - - + + + {if $additionalButtons[$updateServer->packageUpdateServerID]|isset}{@$additionalButtons[$updateServer->packageUpdateServerID]}{/if} diff --git a/wcfsetup/install/files/js/WCF.js b/wcfsetup/install/files/js/WCF.js index 867d3ddd58..fb341ca6bc 100644 --- a/wcfsetup/install/files/js/WCF.js +++ b/wcfsetup/install/files/js/WCF.js @@ -1621,10 +1621,20 @@ WCF.Effect.BalloonTooltip.prototype = { * Moves tooltip to cursor position. */ _mouseMoveHandler: function(event) { - this.tooltip.css({ - top: (event.pageY - 0) + "px", - left: (event.pageX + 15) + "px" - }); + if ($(document).width() - event.pageX < this.tooltip.getDimensions().width) { + this.tooltip.css({ + top: (event.pageY) + "px", + right: ($(document).width() - event.pageX) + "px", + left: "auto" + }); + } + else { + this.tooltip.css({ + top: (event.pageY) + "px", + left: (event.pageX + 15) + "px", + right: "auto" + }); + } } }; -- 2.20.1