Fixes data type pre-value issues with MNTP, removes unecessary contentpicker.html and memberpicker.html overlays since treepicker.html is all that should be used, cleans up the treepicker one to be more inline with our current angular standards. Removes uneeded event handling from treepicker
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using Umbraco.Core.PropertyEditors;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using Umbraco.Core.PropertyEditors;
|
||||
|
||||
namespace Umbraco.Web.PropertyEditors
|
||||
{
|
||||
@@ -8,7 +9,7 @@ namespace Umbraco.Web.PropertyEditors
|
||||
public class MultiNodePickerConfiguration
|
||||
{
|
||||
[ConfigurationField("startNode", "Node type", "treesource")]
|
||||
public string TreeSource { get; set; }
|
||||
public MultiNodePickerConfigurationTreeSource TreeSource { get; set; }
|
||||
|
||||
[ConfigurationField("filter", "Allow items of type", "textstring", Description = "Separate with comma")]
|
||||
public string Filter { get; set; }
|
||||
@@ -19,7 +20,7 @@ namespace Umbraco.Web.PropertyEditors
|
||||
[ConfigurationField("maxNumber", "Maximum number of items", "number")]
|
||||
public int MaxNumber { get; set; }
|
||||
|
||||
[ConfigurationField("showOpenButtom", "Show open button (this feature is in preview!)", "boolean", Description = "Opens the node in a dialog")]
|
||||
[ConfigurationField("showOpenButton", "Show open button (this feature is in preview!)", "boolean", Description = "Opens the node in a dialog")]
|
||||
public bool ShowOpen { get; set; }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@ namespace Umbraco.Web.PropertyEditors
|
||||
// sanitize configuraiton
|
||||
var output = base.ToConfigurationEditor(configuration);
|
||||
|
||||
output["multiPicker"] = configuration.MaxNumber > 1 ? "1" : "0";
|
||||
output["multiPicker"] = configuration.MaxNumber > 1 ? true : false;
|
||||
|
||||
return output;
|
||||
}
|
||||
@@ -39,4 +39,4 @@ namespace Umbraco.Web.PropertyEditors
|
||||
return d;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Umbraco.Web.PropertyEditors
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents the 'startNode' value for the <see cref="MultiNodePickerConfiguration"/>
|
||||
/// </summary>
|
||||
[JsonObject]
|
||||
public class MultiNodePickerConfigurationTreeSource
|
||||
{
|
||||
[JsonProperty("type")]
|
||||
public string ObjectType {get;set;}
|
||||
|
||||
[JsonProperty("query")]
|
||||
public string StartNodeQuery {get;set;}
|
||||
|
||||
[JsonProperty("id")]
|
||||
public int? StartNodeId {get;set;}
|
||||
}
|
||||
}
|
||||
@@ -17,7 +17,7 @@ using Constants = Umbraco.Core.Constants;
|
||||
namespace Umbraco.Web.Trees
|
||||
{
|
||||
[UmbracoTreeAuthorize(Constants.Trees.DataTypes)]
|
||||
[Tree(Constants.Applications.Developer, Constants.Trees.DataTypes, null, sortOrder:1)]
|
||||
[Tree(Constants.Applications.Settings, Constants.Trees.DataTypes, null, sortOrder:1)]
|
||||
[PluginController("UmbracoTrees")]
|
||||
[CoreTree]
|
||||
public class DataTypeTreeController : TreeController, ISearchableTree
|
||||
|
||||
@@ -313,6 +313,7 @@
|
||||
<Compile Include="PropertyEditors\MemberPickerConfiguration.cs" />
|
||||
<Compile Include="PropertyEditors\MultiNodePickerConfiguration.cs" />
|
||||
<Compile Include="PropertyEditors\MultiNodePickerConfigurationEditor.cs" />
|
||||
<Compile Include="PropertyEditors\MultiNodePickerConfigurationTreeSource.cs" />
|
||||
<Compile Include="PropertyEditors\MultiNodeTreePickerPropertyEditor.cs" />
|
||||
<Compile Include="PropertyEditors\MultipleTestStringConfiguration.cs" />
|
||||
<Compile Include="PropertyEditors\MultipleTextStringConfigurationEditor.cs" />
|
||||
|
||||
Reference in New Issue
Block a user