From: Alexander Ebert Date: Tue, 6 Mar 2012 18:49:24 +0000 (+0100) Subject: Uninstallation should now properly prompt X-Git-Tag: 2.0.0_Beta_1~1245^2~16 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=29b533c88600c3b921860a0699c425fcbdde1bd8;p=GitHub%2FWoltLab%2FWCF.git Uninstallation should now properly prompt --- diff --git a/wcfsetup/install/files/acp/js/WCF.ACP.js b/wcfsetup/install/files/acp/js/WCF.ACP.js index e7fd95fcb0..66478f30fb 100644 --- a/wcfsetup/install/files/acp/js/WCF.ACP.js +++ b/wcfsetup/install/files/acp/js/WCF.ACP.js @@ -489,32 +489,43 @@ WCF.ACP.Package.Uninstallation.prototype = { // bind event listener elements.each($.proxy(function(index, element) { - $(element).click($.proxy(this._createQueue, this)); + $(element).click($.proxy(this._prepareQueue, this)); }, this)); }, /** - * Creates a new package uninstallation process. + * Prepares a new package uninstallation process. * * @param object event */ - _createQueue: function(event) { + _prepareQueue: function(event) { var $element = $(event.target); - var packageID = $element.data('objectID'); - if (confirm(WCF.Language.get('wcf.acp.package.view.button.uninstall.sure'))) { - this._installation = new WCF.ACP.Package.Installation('uninstall', 0, false); - - // initialize dialog - WCF.showAJAXDialog('packageInstallationDialog', true, { - ajax: true, - closable: false, - data: { packageID: packageID, step: 'prepare' }, - success: $.proxy(this._installation._handleResponse, this._installation), - title: 'wcf.acp.package.uninstall.title', - url: 'index.php/UninstallPackage/?t=' + SECURITY_TOKEN + SID_ARG_2ND - }); + WCF.System.Confirmation.show($element.data('confirmMessage'), $.proxy(this._createQueue, this), { packageID: $element.data('objectID') }); + }, + + /** + * Initializes a new package uninstallation process. + * + * @param string action + * @param object parameters + */ + _createQueue: function(action, parameters) { + if (action !== 'confirm') { + return; } + + this._installation = new WCF.ACP.Package.Installation('uninstall', 0, false); + + // initialize dialog + WCF.showAJAXDialog('packageInstallationDialog', true, { + ajax: true, + closable: false, + data: { packageID: parameters.packageID, step: 'prepare' }, + success: $.proxy(this._installation._handleResponse, this._installation), + title: 'wcf.acp.package.uninstall.title', + url: 'index.php/UninstallPackage/?t=' + SECURITY_TOKEN + SID_ARG_2ND + }); } }; diff --git a/wcfsetup/install/files/acp/templates/packageListDetailed.tpl b/wcfsetup/install/files/acp/templates/packageListDetailed.tpl index 423143c3e0..b650447050 100644 --- a/wcfsetup/install/files/acp/templates/packageListDetailed.tpl +++ b/wcfsetup/install/files/acp/templates/packageListDetailed.tpl @@ -64,7 +64,7 @@ {/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/lang/de.xml b/wcfsetup/install/lang/de.xml index e5e17a8fdd..e6b97fa997 100644 --- a/wcfsetup/install/lang/de.xml +++ b/wcfsetup/install/lang/de.xml @@ -314,6 +314,7 @@ + getName()}“ wirklich deinstallieren?]]> diff --git a/wcfsetup/install/lang/en.xml b/wcfsetup/install/lang/en.xml index 411c7990a7..09b452d1fb 100644 --- a/wcfsetup/install/lang/en.xml +++ b/wcfsetup/install/lang/en.xml @@ -314,6 +314,7 @@ + getName()}”?]]>