U4-9522 Media recycle bin does not show folders

This commit is contained in:
Shannon
2017-02-21 14:18:49 +11:00
parent 27164093ea
commit 9142314d39
3 changed files with 14 additions and 2 deletions

View File

@@ -51,7 +51,7 @@
</umb-file-dropzone>
<umb-folder-grid
ng-if="folders.length > 0 && !vm.isRecycleBin"
ng-if="folders.length > 0"
folders="folders"
on-click="vm.selectFolder"
on-click-name="vm.goToItem">

View File

@@ -37,7 +37,8 @@
function activate() {
vm.itemsWithoutFolders = filterOutFolders($scope.items);
if($scope.entityType === 'media') {
//no need to make another REST/DB call if this data is not used when we are browsing the bin
if ($scope.entityType === 'media' && !vm.isRecycleBin) {
mediaTypeHelper.getAllowedImagetypes(vm.nodeId).then(function (types) {
vm.acceptedMediatypes = types;
});

View File

@@ -222,6 +222,17 @@ namespace Umbraco.Web.Editors
return GetResultForChildren(id, type);
}
/// <summary>
/// Get paged descendant entities by id
/// </summary>
/// <param name="id"></param>
/// <param name="type"></param>
/// <param name="pageNumber"></param>
/// <param name="pageSize"></param>
/// <param name="orderBy"></param>
/// <param name="orderDirection"></param>
/// <param name="filter"></param>
/// <returns></returns>
public IEnumerable<EntityBasic> GetAncestors(int id, UmbracoEntityTypes type)
{
return GetResultForAncestors(id, type);