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

This commit is contained in:
Warren
2018-06-11 15:01:31 +01:00
parent 9388089b9e
commit 6dae192497

View File

@@ -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";