Fixes merge issues, manually merges other changes
This commit is contained in:
@@ -30,12 +30,6 @@ function navigationService($routeParams, $location, $q, $timeout, $injector, eve
|
||||
var nonRoutingQueryStrings = ["mculture", "cculture"];
|
||||
var retainedQueryStrings = ['mculture'];
|
||||
|
||||
//used to track the current dialog object
|
||||
var currentDialog = null;
|
||||
|
||||
//tracks the user profile dialog
|
||||
var userDialog = null;
|
||||
|
||||
function setMode(mode) {
|
||||
switch (mode) {
|
||||
case 'tree':
|
||||
@@ -287,7 +281,7 @@ function navigationService($routeParams, $location, $q, $timeout, $injector, eve
|
||||
appState.setGlobalState("showTray", false);
|
||||
},
|
||||
|
||||
/**
|
||||
/**
|
||||
* @ngdoc method
|
||||
* @name umbraco.services.navigationService#syncTree
|
||||
* @methodOf umbraco.services.navigationService
|
||||
|
||||
@@ -34,22 +34,25 @@ function ContentDeleteController($scope, $timeout, contentResource, treeService,
|
||||
toggleDeleting(false);
|
||||
|
||||
if (rootNode) {
|
||||
$timeout(function () {
|
||||
//ensure the recycle bin has child nodes now
|
||||
var recycleBin = treeService.getDescendantNode(rootNode, -20);
|
||||
if (recycleBin) {
|
||||
//TODO: This seems to return a rejection and we end up with "Possibly unhanded rejection"
|
||||
treeService.syncTree({ node: recycleBin, path: treeService.getPath(recycleBin), forceReload: true });
|
||||
//ensure the recycle bin has child nodes now
|
||||
var recycleBin = treeService.getDescendantNode(rootNode, -20);
|
||||
if (recycleBin) {
|
||||
recycleBin.hasChildren = true;
|
||||
//reload the recycle bin if it's already expanded so the deleted item is shown
|
||||
if (recycleBin.expanded) {
|
||||
treeService.loadNodeChildren({ node: recycleBin, section: "content" });
|
||||
}
|
||||
}, 500);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//if the current edited item is the same one as we're deleting, we need to navigate elsewhere
|
||||
if (editorState.current && editorState.current.id == $scope.currentNode.id) {
|
||||
|
||||
//If the deleted item lived at the root then just redirect back to the root, otherwise redirect to the item's parent
|
||||
var location = "/content";
|
||||
if ($scope.currentNode.parentId.toString() !== "-1")
|
||||
if ($scope.currentNode.parentId.toString() === "-20")
|
||||
location = "/content/content/recyclebin";
|
||||
else if ($scope.currentNode.parentId.toString() !== "-1")
|
||||
location = "/content/content/edit/" + $scope.currentNode.parentId;
|
||||
|
||||
$location.path(location);
|
||||
|
||||
@@ -30,6 +30,10 @@ function MediaDeleteController($scope, mediaResource, treeService, navigationSer
|
||||
var recycleBin = treeService.getDescendantNode(rootNode, -21);
|
||||
if (recycleBin) {
|
||||
recycleBin.hasChildren = true;
|
||||
//reload the recycle bin if it's already expanded so the deleted item is shown
|
||||
if (recycleBin.expanded) {
|
||||
treeService.loadNodeChildren({ node: recycleBin, section: "media" });
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -37,8 +41,10 @@ function MediaDeleteController($scope, mediaResource, treeService, navigationSer
|
||||
if (editorState.current && editorState.current.id == $scope.currentNode.id) {
|
||||
|
||||
//If the deleted item lived at the root then just redirect back to the root, otherwise redirect to the item's parent
|
||||
var location = "/media";
|
||||
if ($scope.currentNode.parentId.toString() !== "-1")
|
||||
var location = "/media";
|
||||
if ($scope.currentNode.parentId.toString() === "-21")
|
||||
location = "/media/media/recyclebin";
|
||||
else if ($scope.currentNode.parentId.toString() !== "-1")
|
||||
location = "/media/media/edit/" + $scope.currentNode.parentId;
|
||||
|
||||
$location.path(location);
|
||||
|
||||
@@ -5,6 +5,14 @@ angular.module("umbraco").controller("Umbraco.Editors.Media.MoveController",
|
||||
$scope.dialogTreeApi = {};
|
||||
$scope.source = _.clone($scope.currentNode);
|
||||
|
||||
$scope.busy = false;
|
||||
$scope.searchInfo = {
|
||||
searchFromId: null,
|
||||
searchFromName: null,
|
||||
showSearch: false,
|
||||
results: [],
|
||||
selectedSearchResults: []
|
||||
}
|
||||
$scope.treeModel = {
|
||||
hideHeader: false
|
||||
}
|
||||
@@ -52,6 +60,24 @@ angular.module("umbraco").controller("Umbraco.Editors.Media.MoveController",
|
||||
$scope.close = function() {
|
||||
navigationService.hideDialog();
|
||||
};
|
||||
$scope.hideSearch = function () {
|
||||
$scope.searchInfo.showSearch = false;
|
||||
$scope.searchInfo.searchFromId = null;
|
||||
$scope.searchInfo.searchFromName = null;
|
||||
$scope.searchInfo.results = [];
|
||||
}
|
||||
|
||||
// method to select a search result
|
||||
$scope.selectResult = function (evt, result) {
|
||||
result.selected = result.selected === true ? false : true;
|
||||
nodeSelectHandler({ event: evt, node: result });
|
||||
};
|
||||
|
||||
//callback when there are search results
|
||||
$scope.onSearchResults = function (results) {
|
||||
$scope.searchInfo.results = results;
|
||||
$scope.searchInfo.showSearch = true;
|
||||
};
|
||||
|
||||
$scope.move = function () {
|
||||
$scope.busy = true;
|
||||
@@ -83,11 +109,11 @@ angular.module("umbraco").controller("Umbraco.Editors.Media.MoveController",
|
||||
$scope.error = err;
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
// Mini list view
|
||||
$scope.selectListViewNode = function (node) {
|
||||
node.selected = node.selected === true ? false : true;
|
||||
nodeSelectHandler({}, { node: node });
|
||||
nodeSelectHandler({ node: node });
|
||||
};
|
||||
|
||||
$scope.closeMiniListView = function () {
|
||||
|
||||
Reference in New Issue
Block a user