From e098d2120e251374e63a59e263527fd4d6265b6d Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Sat, 29 Jun 2013 16:04:37 +0200 Subject: [PATCH] Improved feedback during package installation --- wcfsetup/install/files/acp/js/WCF.ACP.js | 16 ++++++++++++++++ .../templates/packageInstallationStepPrepare.tpl | 2 +- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/wcfsetup/install/files/acp/js/WCF.ACP.js b/wcfsetup/install/files/acp/js/WCF.ACP.js index 42c8cb9ac3..4b93b4004a 100644 --- a/wcfsetup/install/files/acp/js/WCF.ACP.js +++ b/wcfsetup/install/files/acp/js/WCF.ACP.js @@ -423,6 +423,8 @@ WCF.ACP.Package.Installation = Class.extend({ * Handles erroneous AJAX requests. */ _failure: function() { + this._setIcon('remove'); + if (!this._allowRollback) { return; } @@ -445,6 +447,8 @@ WCF.ACP.Package.Installation = Class.extend({ * @param object event */ _rollback: function(event) { + this._setIcon('spinner'); + if (event) { $(event.currentTarget).disable(); } @@ -490,6 +494,8 @@ WCF.ACP.Package.Installation = Class.extend({ }); } + this._setIcon('spinner'); + if (data.step == 'rollback') { this._dialog.wcfDialog('close'); this._dialog.remove(); @@ -528,6 +534,8 @@ WCF.ACP.Package.Installation = Class.extend({ // handle success if (data.step === 'success') { + this._setIcon('ok'); + this._purgeTemplateContent($.proxy(function() { var $form = $('
').appendTo($('#packageInstallationInnerContent')); $('').appendTo($form).click(function() { @@ -554,6 +562,8 @@ WCF.ACP.Package.Installation = Class.extend({ // create button to handle next step if (data.step && data.node) { + this._setIcon('question'); + var $form = $('
').appendTo($('#packageInstallationInnerContent')); $('').appendTo($form).click($.proxy(function(event) { $(event.currentTarget).disable(); @@ -588,6 +598,8 @@ WCF.ACP.Package.Installation = Class.extend({ * @param object data */ _submit: function(data) { + this._setIcon('spinner'); + // collect form values var $additionalData = {}; $('#packageInstallationInnerContent input').each(function(index, inputElement) { @@ -665,6 +677,10 @@ WCF.ACP.Package.Installation = Class.extend({ this._proxy.setOption('data', $data); this._proxy.sendRequest(); + }, + + _setIcon: function(iconName) { + this._dialog.find('.jsPackageInstallationStatus').removeClass('icon-ok icon-question icon-remove icon-spinner').addClass('icon-' + iconName); } }); diff --git a/wcfsetup/install/files/acp/templates/packageInstallationStepPrepare.tpl b/wcfsetup/install/files/acp/templates/packageInstallationStepPrepare.tpl index 99068ca7c3..9fb3572609 100644 --- a/wcfsetup/install/files/acp/templates/packageInstallationStepPrepare.tpl +++ b/wcfsetup/install/files/acp/templates/packageInstallationStepPrepare.tpl @@ -1,6 +1,6 @@
- +

{lang}wcf.acp.package.{@$installationType}.title{/lang}

-- 2.20.1