diff --git a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/contentpicker/contentpicker.controller.js b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/contentpicker/contentpicker.controller.js index dc15f49850..2bdbe4796b 100644 --- a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/contentpicker/contentpicker.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/contentpicker/contentpicker.controller.js @@ -76,6 +76,7 @@ function contentPickerController($scope, dialogService, entityResource, editorSt ? "Media" : "Document"; $scope.allowOpenButton = entityType === "Document" || entityType === "Media"; + $scope.allowEditButton = entityType === "Document"; //the dialog options for the picker var dialogOptions = { diff --git a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/contentpicker/contentpicker.html b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/contentpicker/contentpicker.html index b27da0bac2..86674abfe7 100644 --- a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/contentpicker/contentpicker.html +++ b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/contentpicker/contentpicker.html @@ -13,9 +13,9 @@ {{node.name}} -
- Open - Edit +
+ Open + Edit
diff --git a/src/Umbraco.Web/PropertyEditors/ContentPickerPropertyEditor.cs b/src/Umbraco.Web/PropertyEditors/ContentPickerPropertyEditor.cs index 605e4e49bf..f4433899f5 100644 --- a/src/Umbraco.Web/PropertyEditors/ContentPickerPropertyEditor.cs +++ b/src/Umbraco.Web/PropertyEditors/ContentPickerPropertyEditor.cs @@ -12,9 +12,9 @@ namespace Umbraco.Web.PropertyEditors { _internalPreValues = new Dictionary { + {"startNodeId", "-1"}, {"showOpenButton", "0"}, {"showEditButton", "0"}, - {"startNodeId", "-1"}, {"showPathOnHover", "0"} }; } diff --git a/src/Umbraco.Web/PropertyEditors/MultiNodeTreePickerPropertyEditor.cs b/src/Umbraco.Web/PropertyEditors/MultiNodeTreePickerPropertyEditor.cs index 673e721b70..1dd9204df9 100644 --- a/src/Umbraco.Web/PropertyEditors/MultiNodeTreePickerPropertyEditor.cs +++ b/src/Umbraco.Web/PropertyEditors/MultiNodeTreePickerPropertyEditor.cs @@ -1,8 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; +using System.Collections.Generic; using Umbraco.Core; using Umbraco.Core.Models; using Umbraco.Core.PropertyEditors; @@ -15,10 +11,12 @@ namespace Umbraco.Web.PropertyEditors public MultiNodeTreePickerPropertyEditor() { _internalPreValues = new Dictionary - { - {"multiPicker", "1"}, - {"showEditButton", "0"} - }; + { + {"multiPicker", "1"}, + {"showOpenButton", "0"}, + {"showEditButton", "0"}, + {"showPathOnHover", "0"} + }; } protected override PreValueEditor CreatePreValueEditor() @@ -47,9 +45,16 @@ namespace Umbraco.Web.PropertyEditors [PreValueField("maxNumber", "Maximum number of items", "number")] public string MaxNumber { get; set; } + + [PreValueField("showOpenButton", "Show open button", "boolean")] + public string ShowOpenButton { get; set; } + [PreValueField("showEditButton", "Show edit button (this feature is in preview!)", "boolean")] public string ShowEditButton { get; set; } + [PreValueField("showPathOnHover", "Show path when hovering items", "boolean")] + public bool ShowPathOnHover { get; set; } + /// /// This ensures the multiPicker pre-val is set based on the maxNumber of nodes set ///