[TASK] Install Tool: Use classes for AJAX calls as selectors 32/52232/5
authorMarc Wessels <mwessels@me.com>
Wed, 29 Mar 2017 09:49:39 +0000 (11:49 +0200)
committerFrank Naegler <frank.naegler@typo3.org>
Fri, 31 Mar 2017 19:51:06 +0000 (21:51 +0200)
This patch changes selectors for some AJAX calls from id to class

Resolves: #80545
Releases: master
Change-Id: Ic3805c180779a2b5b2f49993f6064555f26d1938
Reviewed-on: https://review.typo3.org/52232
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: Frank Naegler <frank.naegler@typo3.org>
Tested-by: Frank Naegler <frank.naegler@typo3.org>
typo3/sysext/install/Resources/Private/Partials/Action/Tool/ImportantActions/ClearAllCache.html
typo3/sysext/install/Resources/Private/Partials/Action/Tool/ImportantActions/CoreUpdateButton.html
typo3/sysext/install/Resources/Private/Partials/Action/Tool/ImportantActions/ExtensionCompatibilityTester.html
typo3/sysext/install/Resources/Private/Partials/Action/Tool/ImportantActions/TcaExtTablesCheck.html
typo3/sysext/install/Resources/Private/Partials/Action/Tool/ImportantActions/TcaMigrationsCheck.html
typo3/sysext/install/Resources/Private/Templates/Action/Tool/LoadExtensions.html
typo3/sysext/install/Resources/Public/JavaScript/Install.js

index 6062d73..5203ec1 100644 (file)
@@ -24,7 +24,7 @@
 
 <form method="post">
        <f:render partial="Action/Common/HiddenFormFields" arguments="{_all}" />
-       <div id="clearAllCache">
+       <div class="t3js-clearAllCache">
                <f:render partial="Action/Common/SubmitButton" arguments="{name:'clearAllCache', text:'Clear all caches including PHP opcode cache'}"/>
        </div>
 </form>
\ No newline at end of file
index addc931..2ba4e28 100644 (file)
@@ -5,7 +5,7 @@
        minor release if certain criteria are met.
 </p>
 
-<div id="coreUpdate">
+<div class="t3js-coreUpdate">
        <f:if condition="!{composerMode} && {enableCoreUpdate} && {isInstalledVersionAReleasedVersion} && {isSymLinkedCore}">
                <f:then>
                        <div id="buttonTemplate">
index 1f18920..7594cdc 100644 (file)
@@ -5,7 +5,7 @@
 </p>
 <form method="post">
        <f:render partial="Action/Common/HiddenFormFields" arguments="{_all}" />
-       <div id="checkExtensions" data-protocolurl="{extensionCompatibilityTesterProtocolFile}" data-errorprotocolurl="{extensionCompatibilityTesterErrorProtocolFile}">
+       <div class="t3js-checkExtensions" data-protocolurl="{extensionCompatibilityTesterProtocolFile}" data-errorprotocolurl="{extensionCompatibilityTesterErrorProtocolFile}">
                <f:for each="{extensionCompatibilityTesterMessages}" as="statusMessage">
                        <f:render partial="Action/Common/StatusMessage" arguments="{message: statusMessage}" />
                </f:for>
index 53bc2b7..bffbccd 100644 (file)
@@ -4,7 +4,7 @@
 </p>
 <form method="post">
        <f:render partial="Action/Common/HiddenFormFields" arguments="{_all}" />
-       <div id="tcaExtTablesCheck">
+       <div class="t3js-tcaExtTablesCheck">
                <f:render partial="Action/Common/SubmitButton" arguments="{name:'tceExtTablesCheck', text:'Check loaded extensions'}"/>
        </div>
 </form>
index fe948c3..e3ecaac 100644 (file)
@@ -4,7 +4,7 @@
 </p>
 <form method="post">
        <f:render partial="Action/Common/HiddenFormFields" arguments="{_all}" />
-       <div id="tcaMigrationsCheck">
+       <div class="t3js-tcaMigrationsCheck">
                <f:render partial="Action/Common/SubmitButton" arguments="{name:'tcaMigrationsCheck', text:'Check TCA Migrations'}"/>
        </div>
 </form>
index d3906bf..2aba342 100644 (file)
@@ -19,7 +19,7 @@
        <f:render partial="Action/Tool/ImportantActions/ExtensionCompatibilityTester" arguments="{_all}"/>
        <script type="text/javascript">
                $(function() {
-                       var $container = $('#checkExtensions');
+                       var $container = $('.t3js-checkExtensions');
                        $('button', $container).hide();
                        $('.t3js-message', $container).hide();
                        $('.alert-loading', $container).show();
index b08d9f6..1461e7c 100644 (file)
@@ -233,7 +233,7 @@ TYPO3.Install.Cache = {
        * @return boolean DOM container could be found and initialization finished
        */
        initialize: function(cacheCheckContainer) {
-               this.outputContainer[cacheCheckContainer] = $('#' + cacheCheckContainer);
+               this.outputContainer[cacheCheckContainer] = $('.t3js-' + cacheCheckContainer)
 
                if (this.outputContainer[cacheCheckContainer]) {
                        // submit button: save and delete
@@ -371,7 +371,7 @@ TYPO3.Install.ExtensionChecker = {
                var self = this;
                var url = location.href + '&install[controller]=ajax&install[action]=uninstallExtension' +
                        '&install[uninstallExtension][extensions]=' + extension;
-               var $container = $('#checkExtensions');
+               var $container = $('.t3js-checkExtensions');
                $.ajax({
                        url: url,
                        cache: false,
@@ -407,7 +407,7 @@ TYPO3.Install.ExtensionChecker = {
         */
        handleCheckExtensionsSuccess: function () {
                var self = this;
-               var $checkExtensions = $('#checkExtensions');
+               var $checkExtensions = $('.t3js-checkExtensions');
 
                $.ajax({
                        url: $checkExtensions.data('protocolurl'),
@@ -558,7 +558,7 @@ TYPO3.Install.TcaIntegrityChecker = {
         */
        initialize: function (tcaIntegrityCheckContainer) {
                var success = false;
-               this.outputContainer[tcaIntegrityCheckContainer] = $('#' + tcaIntegrityCheckContainer);
+               this.outputContainer[tcaIntegrityCheckContainer] = $('.t3js-' + tcaIntegrityCheckContainer);
 
                if (this.outputContainer[tcaIntegrityCheckContainer]) {
                        // submit button: save and delete
@@ -872,14 +872,14 @@ TYPO3.Install.coreUpdate = {
         */
        addLoadingMessage: function (messageTitle) {
                var domMessage = TYPO3.Install.FlashMessage.render(TYPO3.Install.Severity.loading, messageTitle);
-               $('#coreUpdate').append(domMessage);
+               $('.t3js-coreUpdate').append(domMessage);
        },
 
        /**
         * Remove an enabled loading message
         */
        removeLoadingMessage: function () {
-               $('#coreUpdate').find('.alert-loading').remove();
+               $('.t3js-coreUpdate').find('.alert-loading').remove();
        },
 
        /**
@@ -924,7 +924,7 @@ TYPO3.Install.coreUpdate = {
                if (title) {
                        domButton.find('button').html(title);
                }
-               $('#coreUpdate').append(domButton);
+               $('.t3js-coreUpdate').append(domButton);
        },
 
        /**
@@ -936,7 +936,7 @@ TYPO3.Install.coreUpdate = {
         */
        addMessage: function (severity, title, message) {
                var domMessage = TYPO3.Install.FlashMessage.render(severity, title, message);
-               $('#coreUpdate').append(domMessage);
+               $('.t3js-coreUpdate').append(domMessage);
        }
 };
 
@@ -1014,7 +1014,7 @@ $(function () {
        }).trigger('change');
 
        // Extension compatibility check
-       var $container = $('#checkExtensions');
+       var $container = $('.t3js-checkExtensions');
        $('.t3js-message', $container).hide();
        $('button', $container).click(function (e) {
                $('button', $container).hide();
@@ -1026,7 +1026,7 @@ $(function () {
        });
 
        // Handle core update
-       var $coreUpdateSection = $('#coreUpdate');
+       var $coreUpdateSection = $('.t3js-coreUpdate');
        if ($coreUpdateSection) {
                TYPO3.Install.coreUpdate.initialize();
                $coreUpdateSection.on('click', 'button', (function (e) {
@@ -1038,7 +1038,7 @@ $(function () {
        }
 
        // Handle clearAllCache
-       var $clearAllCacheSection = $('#clearAllCache');
+       var $clearAllCacheSection = $('.t3js-clearAllCache');
        if ($clearAllCacheSection) {
                $clearAllCacheSection.on('click', 'button', (function(e) {
                        TYPO3.Install.Cache.clearAllCache('clearAllCache');
@@ -1058,7 +1058,7 @@ $(function () {
        }
 
        // Handle TCA ext_tables check
-       var $tcaExtTablesCheckSection = $('#tcaExtTablesCheck');
+       var $tcaExtTablesCheckSection = $('.t3js-tcaExtTablesCheck');
        if ($tcaExtTablesCheckSection) {
                $tcaExtTablesCheckSection.on('click', 'button', (function (e) {
                        TYPO3.Install.TcaIntegrityChecker.checkTcaIntegrity('tcaExtTablesCheck');
@@ -1068,7 +1068,7 @@ $(function () {
        }
 
        // Handle TCA Migrations check
-       var $tcaMigrationsCheckSection = $('#tcaMigrationsCheck');
+       var $tcaMigrationsCheckSection = $('.t3js-tcaMigrationsCheck');
        if ($tcaMigrationsCheckSection) {
                $tcaMigrationsCheckSection.on('click', 'button', (function (e) {
                        TYPO3.Install.TcaIntegrityChecker.checkTcaIntegrity('tcaMigrationsCheck');