From: Alexander Ebert Date: Sat, 29 Jun 2013 14:04:37 +0000 (+0200) Subject: Improved feedback during package installation X-Git-Tag: 2.0.0_Beta_5~118^2~1 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=e098d2120e251374e63a59e263527fd4d6265b6d;p=GitHub%2FWoltLab%2FWCF.git Improved feedback during package installation --- 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}