Improved display of update/installation
authorAlexander Ebert <ebert@woltlab.com>
Sat, 25 May 2013 22:06:13 +0000 (00:06 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Sat, 25 May 2013 22:06:13 +0000 (00:06 +0200)
wcfsetup/install/files/acp/js/WCF.ACP.js
wcfsetup/install/files/acp/templates/packageInstallationConfirm.tpl

index a81e1f3de6efd9a3eadf922f8a9f3a14ca149d69..694798a93ee8427272fb729a976ef730db1c07d3 100644 (file)
@@ -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) {
index 41e41a0ac05dd71e70bac3d2649187480432f47a..7812ec003f75dde534e9c193a3d218304da97ab8 100644 (file)
@@ -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});
        });
        //]]>
 </script>