Fixes language items for uninstallation dialog
authorMatthias Schmidt <gravatronics@live.com>
Tue, 7 May 2013 07:50:34 +0000 (09:50 +0200)
committerMatthias Schmidt <gravatronics@live.com>
Tue, 7 May 2013 07:50:34 +0000 (09:50 +0200)
wcfsetup/install/files/acp/js/WCF.ACP.js
wcfsetup/install/files/acp/templates/packageInstallationConfirm.tpl
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 f242d6dd1d54c81e637ca49c39550ddf69e5153e..693a7d927948e53a509ec3dc1178ed5af36f6219 100644 (file)
@@ -349,6 +349,12 @@ WCF.ACP.Package.Installation = Class.extend({
         */
        _dialog: null,
        
+       /**
+        * name of the language item with the title of the dialog
+        * @var string
+        */
+       _dialogTitle: '',
+       
        /**
         * action proxy
         * @var WCF.Action.Proxy
@@ -379,6 +385,11 @@ WCF.ACP.Package.Installation = Class.extend({
                this._allowRollback = (allowRollback === true) ? true : false;
                this._queueID = queueID;
                
+               this._dialogTitle = 'wcf.acp.package.installation.title';
+               if (actionName == 'UninstallPackage') {
+                       this._dialogTitle = 'wcf.acp.package.uninstallation.title';
+               }
+               
                this._initProxy();
                this._init();
        },
@@ -463,7 +474,7 @@ WCF.ACP.Package.Installation = Class.extend({
                        this._dialog = $('<div id="packageInstallationDialog" />').hide().appendTo(document.body);
                        this._dialog.wcfDialog({
                                closable: false,
-                               title: WCF.Language.get('wcf.acp.package.installation.title')
+                               title: WCF.Language.get(this._dialogTitle)
                        });
                }
                
@@ -656,6 +667,7 @@ WCF.ACP.Package.Uninstallation = WCF.ACP.Package.Installation.extend({
                this._actionName = 'UninstallPackage';
                this._packageID = packageID;
                this._queueID = 0;
+               this._dialogTitle = 'wcf.acp.package.uninstallation.title';
                
                this._initProxy();
                this.prepareInstallation();
index 6a86d5955272a8ef819d12ce4dac302bfad90e2b..3501f6ade52540ba3ae4599278052d5f07c359f8 100644 (file)
@@ -3,7 +3,10 @@
 <script type="text/javascript">
        //<![CDATA[
        $(function() {
-               WCF.Language.add('wcf.acp.package.installation.title', '{lang}wcf.acp.package.installation.title{/lang}');
+               WCF.Language.addObject({
+                       'wcf.acp.package.installation.title': '{lang}wcf.acp.package.installation.title{/lang}',
+                       'wcf.acp.package.uninstallation.title': '{lang}wcf.acp.package.uninstallation.title{/lang}'
+               });
                new WCF.ACP.Package.Installation({@$queueID}, undefined, true);
        });
        //]]>
index a244c559593269f613ec3d44e76024492e199d99..ace5ef853b31a9821173ebbc0cb807abca0ce708 100644 (file)
@@ -3,8 +3,8 @@
                <span class="icon icon48 icon-spinner"></span>
                
                <div>
-                       <h1>Paket &raquo;{$queue->packageName}&laquo; wird deinstalliert &hellip;</h1><!-- ToDo: Language variables -->
-                       <p>Aktueller Schritt: <span id="packageInstallationAction">{lang}wcf.package.uninstallation.step.prepare{/lang}</span></p>
+                       <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>
        </header>
index 58d85dddceb13a4f139874239b50dcd9996abb75..97681854ffb29241cd4ab6de97db9014abb80cb9 100644 (file)
@@ -74,13 +74,13 @@ class UninstallPackageAction extends InstallPackageAction {
                        'packageID' => $package->packageID,
                        'action' => 'uninstall'
                ));
-                       
+               
                // initialize uninstallation
                $this->installation = new PackageUninstallationDispatcher($queue);
-                       
+               
                $this->installation->nodeBuilder->purgeNodes();
                $this->installation->nodeBuilder->buildNodes();
-                       
+               
                WCF::getTPL()->assign(array(
                        'queue' => $queue
                ));
@@ -126,7 +126,7 @@ class UninstallPackageAction extends InstallPackageAction {
                        else {
                                $packageID = PACKAGE_ID;
                        }
-                               
+                       
                        // get domain path
                        $sql = "SELECT  *
                                FROM    wcf".WCF_N."_application
@@ -140,6 +140,7 @@ class UninstallPackageAction extends InstallPackageAction {
                        
                        // show success
                        $this->data = array(
+                               'currentAction' => WCF::getLanguage()->get('wcf.acp.package.uninstallation.step.success'),
                                'progress' => 100,
                                'redirectLocation' => $location,
                                'step' => 'success'
@@ -168,7 +169,7 @@ class UninstallPackageAction extends InstallPackageAction {
                        break;
                        
                        default:
-                               die(print_r($_POST, true));
+                               die(print_r($_POST, true)); // todo: remove/replace
                                throw new IllegalLinkException();
                        break;
                }
index 8a13f13dcb439db53e106c5392deb373f00f0e6e..d53a73973a2123045f2a5525c68527ae75dda61a 100644 (file)
                <item name="wcf.acp.package.type.application"><![CDATA[Anwendung]]></item>
                <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.prepare"><![CDATA[Deinstallation wird vorbereitet …]]></item>
+               <item name="wcf.acp.package.uninstallation.step.success"><![CDATA[Deinstallation abgeschlossen]]></item>
+               <item name="wcf.acp.package.uninstallation.title"><![CDATA[Deinstallation]]></item>
                <item name="wcf.acp.package.updateDate"><![CDATA[Aktualisierungsdatum]]></item>
                <item name="wcf.acp.package.update.credentials"><![CDATA[Zugangsdaten]]></item>
                <item name="wcf.acp.package.update.errorCode.401"><![CDATA[Ihre Angaben sind ungültig, bitte überprüfen Sie {if $updateServer->requiresLicense()}Lizenz- und Seriennummer{else}Benutzername und Passwort{/if}.]]></item>
index c085a80435812f07d9b2a92e9ca7bda524dfabd3..8dbf6569655b17b8c11946101f0149d456705a46 100644 (file)
                <item name="wcf.acp.package.type.application"><![CDATA[Application]]></item>
                <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.prepare"><![CDATA[TODO: Deinstallation wird vorbereitet …]]></item>
+               <item name="wcf.acp.package.uninstallation.step.success"><![CDATA[TODO: Deinstallation abgeschlossen]]></item>
+               <item name="wcf.acp.package.uninstallation.title"><![CDATA[TODO: Deinstallation]]></item>
                <item name="wcf.acp.package.updateDate"><![CDATA[Update Date]]></item>
                <item name="wcf.acp.package.update.credentials"><![CDATA[Credentials]]></item>
                <item name="wcf.acp.package.update.errorCode.401"><![CDATA[Your credentials are invalid, please verify {if $updateServer->requiresLicense()}license and serial number{else}username and password{/if}.]]></item>