From adf9791deefbeb94ece22838953866917597d8e0 Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Sun, 26 May 2013 00:06:13 +0200 Subject: [PATCH] Improved display of update/installation --- wcfsetup/install/files/acp/js/WCF.ACP.js | 11 ++++++----- .../acp/templates/packageInstallationConfirm.tpl | 2 +- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/wcfsetup/install/files/acp/js/WCF.ACP.js b/wcfsetup/install/files/acp/js/WCF.ACP.js index a81e1f3de6..694798a93e 100644 --- a/wcfsetup/install/files/acp/js/WCF.ACP.js +++ b/wcfsetup/install/files/acp/js/WCF.ACP.js @@ -379,8 +379,9 @@ WCF.ACP.Package.Installation = Class.extend({ * @param integer queueID * @param string actionName * @param boolean allowRollback + * @param boolean isUpdate */ - init: function(queueID, actionName, allowRollback) { + init: function(queueID, actionName, allowRollback, isUpdate) { this._actionName = (actionName) ? actionName : 'InstallPackage'; if (this._actionName === 'Setup') { // 'Setup' is an alias for 'InstallPackage' used during WCFSetup @@ -391,11 +392,11 @@ WCF.ACP.Package.Installation = Class.extend({ switch (this._actionName) { case 'InstallPackage': - if (allowRollback || actionName === 'Setup') { - this._dialogTitle = 'wcf.acp.package.installation.title'; + if (isUpdate) { + this._dialogTitle = 'wcf.acp.package.update.title'; } else { - this._dialogTitle = 'wcf.acp.package.update.title'; + this._dialogTitle = 'wcf.acp.package.installation.title'; } break; @@ -1290,7 +1291,7 @@ WCF.ACP.Package.Update.Manager = Class.extend({ this._dialog.wcfDialog('close'); } - var $installation = new WCF.ACP.Package.Installation(data.returnValues.queueID, undefined, false); + var $installation = new WCF.ACP.Package.Installation(data.returnValues.queueID, undefined, false, true); $installation.prepareInstallation(); } else if (data.returnValues.template) { diff --git a/wcfsetup/install/files/acp/templates/packageInstallationConfirm.tpl b/wcfsetup/install/files/acp/templates/packageInstallationConfirm.tpl index 41e41a0ac0..7812ec003f 100644 --- a/wcfsetup/install/files/acp/templates/packageInstallationConfirm.tpl +++ b/wcfsetup/install/files/acp/templates/packageInstallationConfirm.tpl @@ -8,7 +8,7 @@ 'wcf.acp.package.uninstallation.title': '{lang}wcf.acp.package.uninstallation.title{/lang}', 'wcf.acp.package.update.title': '{lang}wcf.acp.package.update.title{/lang}' }); - new WCF.ACP.Package.Installation({@$queue->queueID}, undefined, {if $queue->action == 'install'}true{else}false{/if}); + new WCF.ACP.Package.Installation({@$queue->queueID}, undefined, {if $queue->action == 'install'}true, false{else}false, true{/if}); }); //]]> -- 2.20.1