Revert "[BUGFIX] Allow any navigation component to load in BE" 83/52083/4
authorChristian Kuhn <lolli@schwarzbu.ch>
Fri, 17 Mar 2017 14:02:00 +0000 (15:02 +0100)
committerChristian Kuhn <lolli@schwarzbu.ch>
Fri, 17 Mar 2017 14:22:30 +0000 (15:22 +0100)
This reverts commit 51b5fad91efa5bef84bec16f3ae3738c382da5f1.

The patch introduced some delays and the acceptance tests fail,
reverted for now.

Change-Id: I2214932f4aadb8cb98c1e44752111dbaeaf04587
Resolves: #80328
Reverts: #80058
Releases: master
Reviewed-on: https://review.typo3.org/52083
Reviewed-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
components/testing_framework/Classes/Core/Acceptance/Support/Page/PageTree.php
typo3/sysext/backend/Resources/Public/JavaScript/ModuleMenu.js

index c5fc49c..159c508 100644 (file)
@@ -71,7 +71,6 @@ class PageTree
     {
         $I = $this->tester;
         $I->switchToIFrame();
-        $I->waitforelementVisible(self::$pageTreeSelector);
         return $I->executeInSelenium(function (\Facebook\WebDriver\Remote\RemoteWebDriver $webdriver) {
             return $webdriver->findElement(\WebDriverBy::cssSelector(self::$pageTreeSelector));
         });
index e7481a6..5da493b 100644 (file)
@@ -209,7 +209,7 @@ require(
                                        return;
                                }
                                if (this.loadedNavigationComponentId !== '') {
-                                       $('#navigationComponent-' + this.loadedNavigationComponentId).hide();
+                                       Ext.getCmp(this.loadedNavigationComponentId).hide();
                                }
                                if ($('.t3js-scaffold-content-navigation [data-component="' + navigationComponentId + '"]').length < 1) {
                                        $('.t3js-scaffold-content-navigation')
@@ -217,29 +217,12 @@ require(
                                }
                                var component = Ext.getCmp(navigationComponentId);
                                if (typeof component === 'undefined') {
-                                       var self = this,
-                                               deferredComponentExists = $.Deferred();
-
-                                       function checkIfComponentIdIsAvailable(componentId) {
-                                               if (typeof self.availableNavigationComponents[componentId] === 'undefined') {
-                                                       setTimeout(function (id) { checkIfComponentIdIsAvailable(id); }, 100, componentId);
-                                               } else {
-                                                       deferredComponentExists.resolve();
-                                               }
-                                       }
-                                       checkIfComponentIdIsAvailable(navigationComponentId);
-
-                                       deferredComponentExists.promise().done(function() {
-                                               component = self.availableNavigationComponents[navigationComponentId]();
-                                               component.render('navigationComponent-' + navigationComponentId);
-
-                                               TYPO3.Backend.NavigationContainer.show(navigationComponentId);
-                                               self.loadedNavigationComponentId = navigationComponentId;
-                                       });
-                               } else {
-                                       TYPO3.Backend.NavigationContainer.show(navigationComponentId);
-                                       this.loadedNavigationComponentId = navigationComponentId;
+                                       /** @todo fix hard coded pagetree **/
+                                       component = new TYPO3.Components.PageTree.App();
+                                       component.render('navigationComponent-' + navigationComponentId);
                                }
+                               TYPO3.Backend.NavigationContainer.show(navigationComponentId);
+                               this.loadedNavigationComponentId = navigationComponentId;
                        },
 
                        registerNavigationComponent: function (componentId, initCallback) {