From 6dae1924972dcbb03d2faf21da9618eacb7456af Mon Sep 17 00:00:00 2001 From: Warren Date: Mon, 11 Jun 2018 15:01:31 +0100 Subject: [PATCH] Fixes up missing listview create button - due to the HTTP promise being directly assigned to the Angular property on the model as opposed to the items/result of the promise --- .../views/propertyeditors/listview/listview.controller.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/listview/listview.controller.js b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/listview/listview.controller.js index 4b88223bbf..41c8216a77 100644 --- a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/listview/listview.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/listview/listview.controller.js @@ -36,7 +36,7 @@ function listViewController($rootScope, $scope, $routeParams, $injector, notific else { $scope.entityType = "content"; contentResource = $injector.get('contentResource'); - getContentTypesCallback = $injector.get('contentTypeResource').getAllowedTypes; + getContentTypesCallback = $injector.get('contentTypeResource').getAllowedTypes; } getListResultsCallback = contentResource.getChildren; deleteItemCallback = contentResource.deleteById; @@ -604,8 +604,10 @@ function listViewController($rootScope, $scope, $routeParams, $injector, notific id = -1; } - $scope.listViewAllowedTypes = getContentTypesCallback(id); - + getContentTypesCallback(id).then(function (items) { + $scope.listViewAllowedTypes = items; + }); + $scope.contentId = id; $scope.isTrashed = id === "-20" || id === "-21";