Fixed display of first step on (un-)install
authorAlexander Ebert <ebert@woltlab.com>
Sat, 8 Jun 2013 23:23:39 +0000 (01:23 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Sat, 8 Jun 2013 23:23:39 +0000 (01:23 +0200)
wcfsetup/install/files/acp/js/WCF.ACP.js
wcfsetup/install/files/acp/templates/packageUninstallationStepPrepare.tpl
wcfsetup/install/files/lib/acp/action/UninstallPackageAction.class.php
wcfsetup/install/lang/de.xml
wcfsetup/install/lang/en.xml

index 28bdf0ca80dbd4145ddca41d3ee3eac053779c64..b4a1837d2b68b8e655de77bfeba105272ccffd55 100644 (file)
@@ -503,6 +503,12 @@ WCF.ACP.Package.Installation = Class.extend({
                        this._queueID = data.queueID;
                }
                
+               // update template
+               if (data.template && !data.ignoreTemplate) {
+                       this._dialog.html(data.template);
+                       this._shouldRender = true;
+               }
+               
                // update progress
                if (data.progress) {
                        $('#packageInstallationProgress').attr('value', data.progress).text(data.progress + '%');
@@ -528,12 +534,6 @@ WCF.ACP.Package.Installation = Class.extend({
                        return;
                }
                
-               // update template
-               if (data.template && !data.ignoreTemplate) {
-                       this._dialog.html(data.template);
-                       this._shouldRender = true;
-               }
-               
                // handle inner template
                if (data.innerTemplate) {
                        var self = this;
index e8ee167d8d29c9f1d62f15ba28adf6d8e163ae33..ace5ef853b31a9821173ebbc0cb807abca0ce708 100644 (file)
@@ -3,7 +3,7 @@
                <span class="icon icon48 icon-spinner"></span>
                
                <div>
-                       <h1>{lang}wcf.acp.package.uninstallation.title.packageName{/lang}</h1>
+                       <h1>{lang}wcf.acp.package.uninstallation.title{/lang}</h1>
                        <p id="packageInstallationAction">{lang}wcf.acp.package.uninstallation.step.prepare{/lang}</span></p>
                        <p><progress id="packageInstallationProgress" value="0" max="100">0%</progress></p>
                </div>
index d92267f40ae3603fba1d9f5a28f27374bb54e92c..2a3ffcb8e7edc0212471e687f1f21031e49e84f9 100644 (file)
@@ -90,7 +90,7 @@ class UninstallPackageAction extends InstallPackageAction {
                        'template' => WCF::getTPL()->fetch($this->templateName),
                        'step' => 'uninstall',
                        'node' => $this->installation->nodeBuilder->getNextNode(),
-                       'currentAction' => WCF::getLanguage()->get('wcf.package.installation.step.uninstalling'),
+                       'currentAction' => $this->getCurrentAction($queueID),
                        'progress' => 0,
                        'queueID' => $queueID
                );
@@ -173,4 +173,22 @@ class UninstallPackageAction extends InstallPackageAction {
                        break;
                }
        }
+       
+       /**
+        * @see wcf\acp\action\InstallPackageAction::getCurrentAction()
+        */
+       protected function getCurrentAction($queueID) {
+               if ($queueID === null) {
+                       // success message
+                       $currentAction = WCF::getLanguage()->get('wcf.acp.package.uninstallation.step.' . $this->queue->action . '.success');
+               }
+               else {
+                       // build package name
+                       $packageName = $this->installation->nodeBuilder->getPackageNameByQueue($queueID);
+                       $installationType = $this->installation->nodeBuilder->getInstallationTypeByQueue($queueID);
+                       $currentAction = WCF::getLanguage()->getDynamicVariable('wcf.acp.package.uninstallation.step.'.$installationType, array('packageName' => $packageName));
+               }
+       
+               return $currentAction;
+       }
 }
index c6b049fa407e98167ebc802447fc19afb8e265aa..e8548a30b0ffc26da8d2094733c02dd3ab71ea99 100644 (file)
                <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.uninstallation.step.success"><![CDATA[Deinstallation abgeschlossen]]></item>
+               <item name="wcf.acp.package.uninstallation.step.uninstall"><![CDATA[Paket „{$queue->packageName}“ wird deinstalliert …]]></item>
                <item name="wcf.acp.package.uninstallation.title"><![CDATA[Deinstallation]]></item>
-               <item name="wcf.acp.package.uninstallation.title.packageName"><![CDATA[Paket „{$queue->packageName}“ wird deinstalliert …]]></item>
                <item name="wcf.acp.package.uninstall.step.prepare"><![CDATA[Deinstallation wird vorbereitet …]]></item>
                <item name="wcf.acp.package.updateDate"><![CDATA[Aktualisierungsdatum]]></item>
                <item name="wcf.acp.package.update.credentials"><![CDATA[Zugangsdaten]]></item>
index cac1d11c062d0f9a5bca32400b35d3658fcd9aca..151487d4bb64cbaff6ccb8df7584f0fce92980e7 100644 (file)
@@ -851,8 +851,8 @@ Examples for medium ID detection:
                <item name="wcf.acp.package.type.plugin"><![CDATA[Plugin]]></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.uninstallation.step.success"><![CDATA[Uninstallation completed]]></item>
+               <item name="wcf.acp.package.uninstallation.step.uninstall"><![CDATA[Package “{$queue->packageName}” is being uninstalled …]]></item>
                <item name="wcf.acp.package.uninstallation.title"><![CDATA[Uninstallation]]></item>
-               <item name="wcf.acp.package.uninstallation.title.packageName"><![CDATA[Package “{$queue->packageName}” is being uninstalled …]]></item>
                <item name="wcf.acp.package.uninstall.step.prepare"><![CDATA[Prepairing uninstallation …]]></item>
                <item name="wcf.acp.package.updateDate"><![CDATA[Update Date]]></item>
                <item name="wcf.acp.package.update.credentials"><![CDATA[Credentials]]></item>