Showing path when hovering nodes should be configurable on the content picker.

This commit is contained in:
Claus
2015-11-12 10:55:00 +01:00
parent cacd08b57c
commit 2ae4ede258
3 changed files with 8 additions and 6 deletions

View File

@@ -49,7 +49,8 @@ function contentPickerController($scope, dialogService, entityResource, editorSt
//the default pre-values
var defaultConfig = {
multiPicker: false,
showEditButton: false,
showEditButton: false,
showPathOnHover: false,
startNode: {
query: "",
type: "content",
@@ -65,6 +66,7 @@ function contentPickerController($scope, dialogService, entityResource, editorSt
//Umbraco persists boolean for prevalues as "0" or "1" so we need to convert that!
$scope.model.config.multiPicker = ($scope.model.config.multiPicker === "1" ? true : false);
$scope.model.config.showEditButton = ($scope.model.config.showEditButton === "1" ? true : false);
$scope.model.config.showPathOnHover = ($scope.model.config.showPathOnHover === "1" ? true : false);
var entityType = $scope.model.config.startNode.type === "member"
? "Member"

View File

@@ -5,11 +5,8 @@
<ul class="unstyled list-icons"
ui-sortable
ng-model="renderModel">
<li ng-repeat="node in renderModel" ng-attr-title="Path: {{node.path}}">
<li ng-repeat="node in renderModel" ng-attr-title="{{model.config.showPathOnHover && 'Path: ' + node.path || undefined}}">
<i class="icon icon-navigation handle"></i>
<a href="#" prevent-default ng-click="remove($index)">
<i class="icon icon-delete red hover-show"></i>
<i class="{{node.icon}} hover-hide"></i>

View File

@@ -13,7 +13,8 @@ namespace Umbraco.Web.PropertyEditors
_internalPreValues = new Dictionary<string, object>
{
{"showEditButton", "0"},
{"startNodeId", "-1"}
{"startNodeId", "-1"},
{"showPathOnHover", "0"}
};
}
@@ -37,6 +38,8 @@ namespace Umbraco.Web.PropertyEditors
[PreValueField("startNodeId", "Start node", "treepicker")]
public int StartNodeId { get; set; }
[PreValueField("showPathOnHover", "Show path when hovering items", "boolean")]
public bool ShowPathOnHover { get; set; }
}
}
}