From 64d98666efdc2d62a9430a7eea95e512ba1e724e Mon Sep 17 00:00:00 2001 From: Ronald Barendse Date: Wed, 30 Jun 2021 15:29:34 +0200 Subject: [PATCH] Remove AngularJS testing code --- .../components/content/edit.controller.js | 63 +------------------ .../content/umbvariantcontent.directive.js | 1 - 2 files changed, 1 insertion(+), 63 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/common/directives/components/content/edit.controller.js b/src/Umbraco.Web.UI.Client/src/common/directives/components/content/edit.controller.js index 6bb2ca765d..4a1988cc27 100644 --- a/src/Umbraco.Web.UI.Client/src/common/directives/components/content/edit.controller.js +++ b/src/Umbraco.Web.UI.Client/src/common/directives/components/content/edit.controller.js @@ -222,65 +222,10 @@ //we are editing so get the content item from the server return $scope.getMethod()($scope.contentId) - .then(function (data) { + .then(function (data) { $scope.content = data; - // TODO: remove all of this - hacking for testing with starter kit - if ($scope.content.contentTypeAlias === 'home') { - $scope.content.apps = $scope.content.apps.filter(app => app.alias !== 'umbContent'); - - $scope.content.test = [ - { - id: '1', - name: 'Content', - alias: 'contentTest', - icon: 'icon-document', - view: 'views/content/apps/content/content.html' - }, - { - id: '2', - name: 'Design', - alias: 'designTest', - icon: 'icon-brush', - view: 'views/content/apps/content/content.html' - }, - { - id: '3', - name: 'SEO', - alias: 'seoTest', - icon: 'icon-search', - view: 'views/content/apps/content/content.html' - } - ]; - - $scope.content.variants.forEach(variant => { - variant.tabs.forEach(tab => { - if (tab.alias === 'Hero') { - tab.testId = '1'; - } - - if (tab.alias === 'Content') { - tab.testId = '1'; - } - - if (tab.alias === 'Footer') { - tab.testId = '1'; - } - - if (tab.alias === 'Design') { - tab.testId = '2'; - } - - if (tab.seo === 'Media') { - tab.testId = '3'; - } - }); - }); - - $scope.content.apps = [...$scope.content.test, ...$scope.content.apps]; - } - appendRuntimeData(); init(); @@ -291,10 +236,7 @@ eventsService.emit("content.loaded", { content: $scope.content }); return $q.resolve($scope.content); - - }); - } /** @@ -338,8 +280,6 @@ // only create the save/publish/preview buttons if the // content app is "Conent" - // TODO: Add this back - only for testing purposes - /* if ($scope.activeApp && !contentAppHelper.isContentBasedApp($scope.activeApp)) { $scope.defaultButton = null; $scope.subButtons = null; @@ -347,7 +287,6 @@ $scope.page.showPreviewButton = false; return; } - */ // create the save button if (_.contains($scope.content.allowedActions, "A")) { diff --git a/src/Umbraco.Web.UI.Client/src/common/directives/components/content/umbvariantcontent.directive.js b/src/Umbraco.Web.UI.Client/src/common/directives/components/content/umbvariantcontent.directive.js index efd7eca84d..7663616549 100644 --- a/src/Umbraco.Web.UI.Client/src/common/directives/components/content/umbvariantcontent.directive.js +++ b/src/Umbraco.Web.UI.Client/src/common/directives/components/content/umbvariantcontent.directive.js @@ -111,7 +111,6 @@ // disable the name field if the active content app is not "Content" or "Info" vm.nameDisabled = (activeApp && !contentAppHelper.isContentBasedApp(activeApp)); - vm.nameDisabled = false; // TODO - remove this. Only for testing purposes } /**