[FEATURE] Install Tool: Check for broken ext indicates loading 65/23365/3
authorChristoph Buchli <cbuchli@snowflake.ch>
Tue, 27 Aug 2013 14:03:40 +0000 (16:03 +0200)
committerWouter Wolters <typo3@wouterwolters.nl>
Tue, 27 Aug 2013 17:11:45 +0000 (19:11 +0200)
"Check for broken extensions" in important actions of the install
tool checks for broken extenions over an Ajax-Request.

Currently, the user clicks the button to check for broken extensions
and doesn't get any feedback whether there is something going on or not.
This patch implements a loading-message with a Spinner that is displayed
as soon as the button to check for broken extensions is clicked.
Furthermore the button is hidden as long as the request is beign executed
and displayed again if there is anything more to check (e.g. broken
extensions are found).

Resolves: #51379
Release: 6.2
Change-Id: I13e5024a1e2666e54e782ff1bab9418ba8b180f6
Reviewed-on: https://review.typo3.org/23365
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
Reviewed-by: Christoph Buchli
Tested-by: Christoph Buchli
Reviewed-by: Wouter Wolters
Tested-by: Wouter Wolters
typo3/sysext/install/Resources/Private/Partials/Action/Tool/ImportantActions/ExtensionCompatibilityTester.html [changed mode: 0644->0755]
typo3/sysext/install/Resources/Public/Images/Icon/SpinnerSmall.gif [new file with mode: 0644]
typo3/sysext/install/Resources/Public/Javascript/Install.js [changed mode: 0644->0755]
typo3/sysext/install/Resources/Public/Stylesheets/Action/Common/Install.css [changed mode: 0644->0755]

old mode 100644 (file)
new mode 100755 (executable)
index baf51c0..0149a08
@@ -7,6 +7,9 @@
        <f:render partial="Action/Common/HiddenFormFields" arguments="{_all}" />
        <div id="checkExtensions" data-protocolurl="{extensionCompatibilityTesterProtocolFile}">
                <f:render partial="Action/Common/StatusMessage" arguments="{
+                       message: {severity:'loading', title:'', message:'Loading...'}
+               }" />
+               <f:render partial="Action/Common/StatusMessage" arguments="{
                        message: {severity:'error', title:'Incompatible extension found!', message:'Something went wrong and no protocol was written.'}
                }" />
                <f:render partial="Action/Common/StatusMessage" arguments="{
@@ -14,4 +17,4 @@
                }" />
                <f:render partial="Action/Common/SubmitButton" arguments="{name:'checkExtensions', text:'Check extensions'}"/>
        </div>
-</form>
\ No newline at end of file
+</form>
diff --git a/typo3/sysext/install/Resources/Public/Images/Icon/SpinnerSmall.gif b/typo3/sysext/install/Resources/Public/Images/Icon/SpinnerSmall.gif
new file mode 100644 (file)
index 0000000..5b33f7e
Binary files /dev/null and b/typo3/sysext/install/Resources/Public/Images/Icon/SpinnerSmall.gif differ
old mode 100644 (file)
new mode 100755 (executable)
index b447fb8..a5c3827
@@ -80,6 +80,9 @@ $(document).ready(function() {
 
        $('.typo3-message', '#checkExtensions').hide();
        $('button', '#checkExtensions').click(function(e) {
+               $('button', '#checkExtensions').hide();
+               $('.typo3-message', '#checkExtensions').hide();
+               $('.message-loading', '#checkExtensions').show();
                checkExtensionsCompatibility(true);
                e.preventDefault();
                return false;
@@ -156,6 +159,7 @@ function handleCheckExtensionsSuccess() {
                                var unloadAllButton = $('<button />', {
                                        text: 'Uninstall all incompatible extensions: '+ data,
                                        click: function(e) {
+                                               $('.message-loading', '#checkExtensions').show();
                                                uninstallExtension(data);
                                                e.preventDefault();
                                                return false;
@@ -165,18 +169,18 @@ function handleCheckExtensionsSuccess() {
                                var fullUnloadAllButton = unloadButtonWrapper.append(unloadAllButton);
                                $('.message-error .message-body', '#checkExtensions').append(fullUnloadAllButton);
 
-
+                               $('.message-loading', '#checkExtensions').hide();
+                               $('button', '#checkExtensions').show();
                                $('.message-error', '#checkExtensions').show();
                        } else {
-                               $('.message-error', '#checkExtensions').hide();
+                               $('.typo3-message', '#checkExtensions').hide();
                                $('.message-ok', '#checkExtensions').show();
-                               $('button', '#checkExtensions').hide();
+
                        }
                },
                error: function(data) {
-                       $('.message-error', '#checkExtensions').hide();
+                       $('.typo3-message', '#checkExtensions').hide();
                        $('.message-ok', '#checkExtensions').show();
-                       $('button', '#checkExtensions').hide();
                }
        })
 }
@@ -211,6 +215,7 @@ function uninstallExtension(extension) {
                                if (data.substring(data.length - 2) === 'OK') {
                                        checkExtensionsCompatibility(true);
                                } else {
+                                       $('.message-loading', '#checkExtensions').hide();
                                        $('.message-error .message-body', '#checkExtensions').html(
                                                'Something went wrong. Check failed.'
                                        );
@@ -231,4 +236,4 @@ function clearCache() {
                url: location.href + '&install[controller]=ajax&install[action]=clearCache',
                cache: false
        });
-}
+}
\ No newline at end of file
old mode 100644 (file)
new mode 100755 (executable)
index e1e7ff7..63dc18e
@@ -434,6 +434,11 @@ button span.t3-install-form-button-icon-positive {
        border-color: #dc4c42;
 }
 
+.message-loading {
+       background-image: url("../../../Images/Icon/SpinnerSmall.gif");
+       border-color: #606060;
+}
+
 #t3-install-copyright {
        color: #797878;
        border-top: 1px #5f5f5f solid;