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:
@@ -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;
|
||||
|
||||
@@ -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 = "";
|
||||
}
|
||||
|
||||
|
||||
});
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
<div ng-hide="searchInfo.showSearch">
|
||||
<umb-tree
|
||||
section="content"
|
||||
hideheader="false"
|
||||
hideheader="treeModel.hideHeader"
|
||||
hideoptions="true"
|
||||
isdialog="true"
|
||||
eventhandler="dialogTreeEventHandler"
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
<div ng-hide="searchInfo.showSearch">
|
||||
<umb-tree
|
||||
section="content"
|
||||
hideheader="false"
|
||||
hideheader="treeModel.hideHeader"
|
||||
hideoptions="true"
|
||||
isdialog="true"
|
||||
eventhandler="dialogTreeEventHandler"
|
||||
|
||||
Reference in New Issue
Block a user