Fix the flickering name when moving/copying doctypes

This commit is contained in:
Kenn Jacobsen
2018-12-11 17:23:31 +01:00
committed by Sebastiaan Janssen
parent cace1af958
commit d054771fc6
4 changed files with 10 additions and 8 deletions

View File

@@ -3,6 +3,7 @@ angular.module("umbraco")
function ($scope, contentTypeResource, treeService, navigationService, notificationsService, appState, eventsService) {
$scope.dialogTreeApi = {};
$scope.source = _.clone($scope.currentNode);
function nodeSelectHandler(args) {
args.event.preventDefault();
@@ -22,7 +23,7 @@ angular.module("umbraco")
$scope.busy = true;
$scope.error = false;
contentTypeResource.copy({ parentId: $scope.target.id, id: $scope.currentNode.id })
contentTypeResource.copy({ parentId: $scope.target.id, id: $scope.source.id })
.then(function (path) {
$scope.error = false;
$scope.success = true;

View File

@@ -4,7 +4,7 @@
<div class="umb-pane">
<p class="abstract" ng-hide="success">
<localize key="contentTypeEditor_folderToCopy">Select the folder to copy</localize> <strong>{{currentNode.name}}</strong>&nbsp;<localize key="contentTypeEditor_structureBelow">to in the tree structure below</localize>
<localize key="contentTypeEditor_folderToCopy">Select the folder to copy</localize> <strong>{{source.name}}</strong>&nbsp;<localize key="contentTypeEditor_structureBelow">to in the tree structure below</localize>
</p>
<div class="umb-loader-wrapper" ng-show="busy">
@@ -20,9 +20,9 @@
<div ng-show="success">
<div class="alert alert-success">
<strong>{{currentNode.name}}</strong> <localize key="contentTypeEditor_copiedUnderneath">was copied underneath</localize>&nbsp;<strong>{{target.name}}</strong>
<strong>{{source.name}}</strong> <localize key="contentTypeEditor_copiedUnderneath">was copied underneath</localize>&nbsp;<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>
<div ng-hide="success">

View File

@@ -3,6 +3,7 @@ angular.module("umbraco")
function ($scope, contentTypeResource, treeService, navigationService, notificationsService, appState, eventsService) {
$scope.dialogTreeApi = {};
$scope.source = _.clone($scope.currentNode);
function nodeSelectHandler(args) {
args.event.preventDefault();
@@ -22,7 +23,7 @@ angular.module("umbraco")
$scope.busy = true;
$scope.error = false;
contentTypeResource.move({ parentId: $scope.target.id, id: $scope.currentNode.id })
contentTypeResource.move({ parentId: $scope.target.id, id: $scope.source.id })
.then(function (path) {
$scope.error = false;
$scope.success = true;

View File

@@ -4,7 +4,7 @@
<div class="umb-pane">
<p class="abstract" ng-hide="success">
<localize key="contentTypeEditor_folderToMove">Select the folder to move</localize> <strong>{{currentNode.name}}</strong>&nbsp;<localize key="contentTypeEditor_structureBelow">to in the tree structure below</localize>
<localize key="contentTypeEditor_folderToMove">Select the folder to move</localize> <strong>{{source.name}}</strong>&nbsp;<localize key="contentTypeEditor_structureBelow">to in the tree structure below</localize>
</p>
<div class="umb-loader-wrapper" ng-show="busy">
@@ -20,9 +20,9 @@
<div ng-show="success">
<div class="alert alert-success">
<strong>{{currentNode.name}}</strong> <localize key="contentTypeEditor_movedUnderneath">was moved underneath</localize>&nbsp;<strong>{{target.name}}</strong>
<strong>{{source.name}}</strong> <localize key="contentTypeEditor_movedUnderneath">was moved underneath</localize>&nbsp;<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>
<div ng-hide="success">