// 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
+ });
}
};
<img src="{@$__wcf->getPath()}icon/update1D.svg" alt="" title="{lang}wcf.acp.package.button.update{/lang}" />
{/if}
{if $__wcf->session->getPermission('admin.system.package.canUninstallPackage') && $package->package != 'com.woltlab.wcf' && $package->packageID != PACKAGE_ID}
- <img src="{@$__wcf->getPath()}icon/delete1.svg" alt="" title="{lang}wcf.acp.package.button.uninstall{/lang}" data-object-id="{@$package->packageID}" class="jsUninstallButton jsTooltip" />
+ <img src="{@$__wcf->getPath()}icon/delete1.svg" alt="" title="{lang}wcf.acp.package.button.uninstall{/lang}" class="jsUninstallButton jsTooltip" data-object-id="{@$package->packageID}" data-confirmMessage="{lang}wcf.acp.package.uninstallation.confirm{/lang}" />
{else}
<img src="{@$__wcf->getPath()}icon/delete1D.svg" alt="" title="{lang}wcf.acp.package.button.uninstall{/lang}" />
{/if}
<item name="wcf.acp.package.type.application"><![CDATA[Anwendung]]></item>
<item name="wcf.acp.package.type.other"><![CDATA[Basispaket]]></item>
<item name="wcf.acp.package.type.plugin"><![CDATA[Erweiterung]]></item>
+ <item name="wcf.acp.package.uninstallation.confirm"><![CDATA[Wollen Sie das Paket „{@$package->getName()}“ wirklich deinstallieren?]]></item>
<item name="wcf.acp.package.updateDate"><![CDATA[Aktualisierungsdatum]]></item>
<item name="wcf.acp.package.version"><![CDATA[Version]]></item>
</category>
<item name="wcf.acp.package.type.application"><![CDATA[Application]]></item>
<item name="wcf.acp.package.type.other"><![CDATA[Base package]]></item>
<item name="wcf.acp.package.type.plugin"><![CDATA[Extension]]></item>
+ <item name="wcf.acp.package.uninstallation.confirm"><![CDATA[Do you really want to uninstall the package “{@$package->getName()}”?]]></item>
<item name="wcf.acp.package.updateDate"><![CDATA[Update date]]></item>
<item name="wcf.acp.package.version"><![CDATA[Version]]></item>
</category>