* @param object event
*/
_createQueue: function(event) {
- var packageID = $(event.target).data('objectID');
+ var $element = $(event.target);
+ var packageID = $element.data('objectID');
- this._installation = new WCF.ACP.PackageInstallation('uninstall', 0, false);
-
- // initialize dialog
- WCF.showAJAXDialog('packageInstallationDialog', true, {
- ajax: {
- url: 'index.php?action=UninstallPackage&t=' + SECURITY_TOKEN + SID_ARG_2ND,
- type: 'POST',
- data: { packageID: packageID, step: 'prepare' },
- success: $.proxy(this._installation._handleResponse, this._installation)
- },
- preventClose: true,
- hideTitle: true
- });
+ if (confirm(WCF.Language.get('wcf.acp.package.view.button.uninstall.sure'))) {
+ this._installation = new WCF.ACP.PackageInstallation('uninstall', 0, false);
+
+ // initialize dialog
+ WCF.showAJAXDialog('packageInstallationDialog', true, {
+ ajax: {
+ url: 'index.php?action=UninstallPackage&t=' + SECURITY_TOKEN + SID_ARG_2ND,
+ type: 'POST',
+ data: { packageID: packageID, step: 'prepare' },
+ success: $.proxy(this._installation._handleResponse, this._installation)
+ },
+ preventClose: true,
+ hideTitle: true
+ });
+ }
}
};
<img src="{@RELATIVE_WCF_DIR}icon/update1D.svg" alt="" title="{lang}wcf.acp.package.view.button.update{/lang}" />
{/if}
{if $__wcf->session->getPermission('admin.system.package.canUninstallPackage') && $package->package != 'com.woltlab.wcf' && $package->packageID != PACKAGE_ID}
- <img src="{@RELATIVE_WCF_DIR}icon/delete1.svg" alt="" title="{lang}wcf.acp.package.view.button.uninstall{/lang}" class="uninstallButton balloonTooltip" data-objectID="{@$package->packageID}" data-confirmMessage="Are you sure?" />
+ <img src="{@RELATIVE_WCF_DIR}icon/delete1.svg" alt="" title="{lang}wcf.acp.package.view.button.uninstall{/lang}" class="uninstallButton balloonTooltip" data-objectID="{@$package->packageID}" />
{else}
<img src="{@RELATIVE_WCF_DIR}icon/delete1D.svg" alt="" title="{lang}wcf.acp.package.view.button.uninstall{/lang}" />
{/if}
* @see wcf\page\IPage::show()
*/
public function show() {
- if ($this->action == 'install') WCF::getSession()->checkPermission(array('admin.system.package.canInstallPackage'));
- else WCF::getSession()->checkPermission(array('admin.system.package.canUpdatePackage'));
+ if ($this->action == 'install') WCF::getSession()->checkPermissions(array('admin.system.package.canInstallPackage'));
+ else WCF::getSession()->checkPermissions(array('admin.system.package.canUpdatePackage'));
// check master password
WCFACP::checkMasterPassword();