Ensure that the recycle bin doesn't delete content at root
This commit is contained in:
@@ -220,7 +220,7 @@ function startupLatestEditsController($scope) {
|
||||
}
|
||||
angular.module("umbraco").controller("Umbraco.Dashboard.StartupLatestEditsController", startupLatestEditsController);
|
||||
|
||||
function MediaFolderBrowserDashboardController($rootScope, $scope, $location, contentTypeResource, userService) {
|
||||
function MediaFolderBrowserDashboardController($scope, $routeParams, $location, contentTypeResource, userService) {
|
||||
|
||||
var currentUser = {};
|
||||
|
||||
@@ -251,6 +251,8 @@ function MediaFolderBrowserDashboardController($rootScope, $scope, $location, co
|
||||
view: dt.view
|
||||
};
|
||||
|
||||
// tell the list view to list content at root
|
||||
$routeParams.id = -1;
|
||||
});
|
||||
|
||||
} else if (currentUser.startMediaIds.length > 0){
|
||||
|
||||
@@ -276,6 +276,9 @@ function listViewController($scope, $interpolate, $routeParams, $injector, $time
|
||||
}
|
||||
|
||||
$scope.reloadView = function (id, reloadActiveNode) {
|
||||
if (!id) {
|
||||
return;
|
||||
}
|
||||
$scope.viewLoaded = false;
|
||||
$scope.folders = [];
|
||||
|
||||
@@ -713,10 +716,10 @@ function listViewController($scope, $interpolate, $routeParams, $injector, $time
|
||||
}
|
||||
|
||||
function initView() {
|
||||
//default to root id if the id is undefined
|
||||
var id = $routeParams.id;
|
||||
if (id === undefined) {
|
||||
id = -1;
|
||||
// no ID found in route params - don't list anything as we don't know for sure where we are
|
||||
return;
|
||||
}
|
||||
|
||||
getContentTypesCallback(id).then(function (listViewAllowedTypes) {
|
||||
|
||||
Reference in New Issue
Block a user