Don't use a hardcoded folder type alias to determine folder types in the list view
This commit is contained in:
committed by
Sebastiaan Janssen
parent
cc6c16894c
commit
4564623899
@@ -1,4 +1,4 @@
|
||||
function listViewController($rootScope, $scope, $routeParams, $injector, $cookieStore, notificationsService, iconHelper, dialogService, editorState, localizationService, $location, appState, $timeout, $q, mediaResource, listViewHelper, userService, navigationService, treeService) {
|
||||
function listViewController($rootScope, $scope, $routeParams, $injector, $cookieStore, notificationsService, iconHelper, dialogService, editorState, localizationService, $location, appState, $timeout, $q, mediaResource, listViewHelper, userService, navigationService, treeService, mediaHelper) {
|
||||
|
||||
//this is a quick check to see if we're in create mode, if so just exit - we cannot show children for content
|
||||
// that isn't created yet, if we continue this will use the parent id in the route params which isn't what
|
||||
@@ -269,10 +269,12 @@ function listViewController($rootScope, $scope, $routeParams, $injector, $cookie
|
||||
$scope.listViewResultSet = data;
|
||||
|
||||
//update all values for display
|
||||
var section = appState.getSectionState("currentSection");
|
||||
if ($scope.listViewResultSet.items) {
|
||||
_.each($scope.listViewResultSet.items, function (e, index) {
|
||||
setPropertyValues(e);
|
||||
if (e.contentTypeAlias === 'Folder') {
|
||||
// create the folders collection (only for media list views)
|
||||
if (section === "media" && !mediaHelper.hasFilePropertyType(e)) {
|
||||
$scope.folders.push(e);
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user