Ensures Content header node isn't shown in copy/move dialogs when the user has a start node set that is not the root

This commit is contained in:
Shannon
2017-09-08 14:28:18 +10:00
parent 504f32f25b
commit 858c21c79f
6 changed files with 20 additions and 7 deletions

View File

@@ -378,6 +378,7 @@ div.locked:before{
}
.umb-tree li div.no-access .umb-tree-icon,
.umb-tree li div.no-access .root-link,
.umb-tree li div.no-access .umb-tree-item__label {
color: @gray-7;
cursor: not-allowed;

View File

@@ -169,10 +169,10 @@ angular.module("umbraco")
$scope.showPasswordFields = !$scope.showPasswordFields;
}
function clearPasswordFields() {
function clearPasswordFields() {
$scope.changePasswordModel.value.oldPassword = "";
$scope.changePasswordModel.value.newPassword = "";
$scope.changePasswordModel.value.confirm = "";
}
});

View File

@@ -1,5 +1,5 @@
angular.module("umbraco").controller("Umbraco.Editors.Content.CopyController",
function ($scope, eventsService, contentResource, navigationService, appState, treeService, localizationService, notificationsService) {
function ($scope, userService, eventsService, contentResource, navigationService, appState, treeService, localizationService, notificationsService) {
var dialogOptions = $scope.dialogOptions;
var searchText = "Search...";
@@ -18,6 +18,12 @@ angular.module("umbraco").controller("Umbraco.Editors.Content.CopyController",
results: [],
selectedSearchResults: []
}
$scope.treeModel = {
hideHeader: false
}
userService.getCurrentUser().then(function (userData) {
$scope.treeModel.hideHeader = userData.startContentIds.length > 0 && userData.startContentIds.indexOf(-1) == -1;
});
var node = dialogOptions.currentNode;

View File

@@ -1,5 +1,5 @@
angular.module("umbraco").controller("Umbraco.Editors.Content.MoveController",
function ($scope, eventsService, contentResource, navigationService, appState, treeService, localizationService, notificationsService) {
function ($scope, userService, eventsService, contentResource, navigationService, appState, treeService, localizationService, notificationsService) {
var dialogOptions = $scope.dialogOptions;
var searchText = "Search...";
@@ -15,7 +15,13 @@ angular.module("umbraco").controller("Umbraco.Editors.Content.MoveController",
showSearch: false,
results: [],
selectedSearchResults: []
}
}
$scope.treeModel = {
hideHeader: false
}
userService.getCurrentUser().then(function (userData) {
$scope.treeModel.hideHeader = userData.startContentIds.length > 0 && userData.startContentIds.indexOf(-1) == -1;
});
var node = dialogOptions.currentNode;

View File

@@ -48,7 +48,7 @@
<div ng-hide="searchInfo.showSearch">
<umb-tree
section="content"
hideheader="false"
hideheader="treeModel.hideHeader"
hideoptions="true"
isdialog="true"
eventhandler="dialogTreeEventHandler"

View File

@@ -49,7 +49,7 @@
<div ng-hide="searchInfo.showSearch">
<umb-tree
section="content"
hideheader="false"
hideheader="treeModel.hideHeader"
hideoptions="true"
isdialog="true"
eventhandler="dialogTreeEventHandler"