From 79eff8508d22da5845ee835959e46cdd88c353e4 Mon Sep 17 00:00:00 2001 From: Matthias Schmidt Date: Tue, 28 May 2013 08:39:51 +0200 Subject: [PATCH] Fixes uninstallation button in package.tpl Fixes #1288 --- wcfsetup/install/files/acp/js/WCF.ACP.js | 2 +- wcfsetup/install/files/acp/templates/package.tpl | 10 ++++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/wcfsetup/install/files/acp/js/WCF.ACP.js b/wcfsetup/install/files/acp/js/WCF.ACP.js index 0c59710a5a..6fc46c28ed 100644 --- a/wcfsetup/install/files/acp/js/WCF.ACP.js +++ b/wcfsetup/install/files/acp/js/WCF.ACP.js @@ -715,7 +715,7 @@ WCF.ACP.Package.Uninstallation = WCF.ACP.Package.Installation.extend({ * @param object event */ _prepareQueue: function(event) { - var $element = $(event.target); + var $element = $(event.currentTarget); if ($element.data('isRequired')) { new WCF.Action.Proxy({ diff --git a/wcfsetup/install/files/acp/templates/package.tpl b/wcfsetup/install/files/acp/templates/package.tpl index 9833157d73..ff82d88bd9 100644 --- a/wcfsetup/install/files/acp/templates/package.tpl +++ b/wcfsetup/install/files/acp/templates/package.tpl @@ -5,7 +5,13 @@ $(function() { WCF.TabMenu.init() - new WCF.ACP.Package.Uninstallation($('.jsPackageRow .jsUninstallButton')); + {if PACKAGE_ID != $package->packageID && $package->canUninstall()} + WCF.Language.addObject({ + 'wcf.acp.package.uninstallation.title': '{lang}wcf.acp.package.uninstallation.title{/lang}' + }); + + new WCF.ACP.Package.Uninstallation($('.jsUninstallButton')); + {/if} }); //]]> @@ -212,7 +218,7 @@