Fixed: U4-7176 Content copy should relate to original by default

This commit is contained in:
Per Ploug
2015-10-09 10:41:03 +02:00
parent fc06bbf116
commit dee16b3b70

View File

@@ -7,7 +7,7 @@ angular.module("umbraco").controller("Umbraco.Editors.Content.CopyController",
searchText = value + "...";
});
$scope.relateToOriginal = false;
$scope.relateToOriginal = true;
$scope.dialogTreeEventHandler = $({});
$scope.busy = false;
$scope.searchInfo = {
@@ -42,7 +42,7 @@ angular.module("umbraco").controller("Umbraco.Editors.Content.CopyController",
$scope.target = args.node;
$scope.target.selected = true;
}
}
function nodeExpandedHandler(ev, args) {
@@ -50,7 +50,7 @@ angular.module("umbraco").controller("Umbraco.Editors.Content.CopyController",
//iterate children
_.each(args.children, function (child) {
//check if any of the items are list views, if so we need to add a custom
//check if any of the items are list views, if so we need to add a custom
// child: A node to activate the search
if (child.metaData.isContainer) {
child.hasChildren = true;
@@ -78,18 +78,18 @@ angular.module("umbraco").controller("Umbraco.Editors.Content.CopyController",
$scope.searchInfo.results = [];
}
// method to select a search result
// method to select a search result
$scope.selectResult = function (evt, result) {
result.selected = result.selected === true ? false : true;
nodeSelectHandler(evt, { event: evt, node: result });
};
//callback when there are search results
//callback when there are search results
$scope.onSearchResults = function (results) {
$scope.searchInfo.results = results;
$scope.searchInfo.showSearch = true;
};
$scope.copy = function () {
$scope.busy = true;
@@ -129,4 +129,4 @@ angular.module("umbraco").controller("Umbraco.Editors.Content.CopyController",
$scope.dialogTreeEventHandler.unbind("treeNodeSelect", nodeSelectHandler);
$scope.dialogTreeEventHandler.unbind("treeNodeExpanded", nodeExpandedHandler);
});
});
});