Fix the changing source name when moving a node
This commit is contained in:
committed by
Sebastiaan Janssen
parent
a072278490
commit
9b4a580734
@@ -22,11 +22,11 @@ angular.module("umbraco").controller("Umbraco.Editors.Content.MoveController",
|
||||
$scope.treeModel.hideHeader = userData.startContentIds.length > 0 && userData.startContentIds.indexOf(-1) == -1;
|
||||
});
|
||||
|
||||
var node = $scope.currentNode;
|
||||
$scope.source = _.clone($scope.currentNode);
|
||||
|
||||
function treeLoadedHandler(args) {
|
||||
if (node && node.path) {
|
||||
$scope.dialogTreeApi.syncTree({ path: node.path, activate: false });
|
||||
if ($scope.source && $scope.source.path) {
|
||||
$scope.dialogTreeApi.syncTree({ path: $scope.source.path, activate: false });
|
||||
}
|
||||
}
|
||||
|
||||
@@ -84,7 +84,7 @@ angular.module("umbraco").controller("Umbraco.Editors.Content.MoveController",
|
||||
$scope.busy = true;
|
||||
$scope.error = false;
|
||||
|
||||
contentResource.move({ parentId: $scope.target.id, id: node.id })
|
||||
contentResource.move({ parentId: $scope.target.id, id: $scope.source.id })
|
||||
.then(function (path) {
|
||||
$scope.error = false;
|
||||
$scope.success = true;
|
||||
|
||||
@@ -11,14 +11,14 @@
|
||||
|
||||
<div ng-show="success">
|
||||
<div class="alert alert-success">
|
||||
<strong>{{currentNode.name}}</strong> was moved underneath <strong>{{target.name}}</strong>
|
||||
<strong>{{source.name}}</strong> was moved underneath <strong>{{target.name}}</strong>
|
||||
</div>
|
||||
<button class="btn btn-primary" ng-click="nav.hideDialog()">Ok</button>
|
||||
<button class="btn btn-primary" ng-click="close()">Ok</button>
|
||||
</div>
|
||||
|
||||
<p class="abstract" ng-hide="success">
|
||||
<localize key="actions_chooseWhereToMove">Choose where to move</localize>
|
||||
<strong>{{currentNode.name}}</strong>
|
||||
<strong>{{source.name}}</strong>
|
||||
<localize key="actions_toInTheTreeStructureBelow">to in the tree structure below</localize>
|
||||
</p>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user