diff --git a/src/Umbraco.Infrastructure/PropertyEditors/DataValueReferenceFactoryCollection.cs b/src/Umbraco.Core/PropertyEditors/DataValueReferenceFactoryCollection.cs
similarity index 92%
rename from src/Umbraco.Infrastructure/PropertyEditors/DataValueReferenceFactoryCollection.cs
rename to src/Umbraco.Core/PropertyEditors/DataValueReferenceFactoryCollection.cs
index 2737dcfef1..1dadd6cf0a 100644
--- a/src/Umbraco.Infrastructure/PropertyEditors/DataValueReferenceFactoryCollection.cs
+++ b/src/Umbraco.Core/PropertyEditors/DataValueReferenceFactoryCollection.cs
@@ -25,7 +25,7 @@ namespace Umbraco.Core.PropertyEditors
//TODO: We will need to change this once we support tracking via variants/segments
// for now, we are tracking values from ALL variants
- foreach(var propertyVal in p.Values)
+ foreach (var propertyVal in p.Values)
{
var val = propertyVal.EditedValue;
@@ -33,9 +33,9 @@ namespace Umbraco.Core.PropertyEditors
if (valueEditor is IDataValueReference reference)
{
var refs = reference.GetReferences(val);
- foreach(var r in refs)
+ foreach (var r in refs)
trackedRelations.Add(r);
- }
+ }
// Loop over collection that may be add to existing property editors
// implementation of GetReferences in IDataValueReference.
@@ -48,14 +48,11 @@ namespace Umbraco.Core.PropertyEditors
// in the dataeditor/property has referecnes to media/content items
if (item.IsForEditor(editor))
{
- foreach(var r in item.GetDataValueReference().GetReferences(val))
+ foreach (var r in item.GetDataValueReference().GetReferences(val))
trackedRelations.Add(r);
}
-
}
}
-
-
}
return trackedRelations;
diff --git a/src/Umbraco.Infrastructure/PropertyEditors/DataValueReferenceFactoryCollectionBuilder.cs b/src/Umbraco.Core/PropertyEditors/DataValueReferenceFactoryCollectionBuilder.cs
similarity index 100%
rename from src/Umbraco.Infrastructure/PropertyEditors/DataValueReferenceFactoryCollectionBuilder.cs
rename to src/Umbraco.Core/PropertyEditors/DataValueReferenceFactoryCollectionBuilder.cs
diff --git a/src/Umbraco.Infrastructure/PropertyEditors/DecimalConfigurationEditor.cs b/src/Umbraco.Core/PropertyEditors/DecimalConfigurationEditor.cs
similarity index 90%
rename from src/Umbraco.Infrastructure/PropertyEditors/DecimalConfigurationEditor.cs
rename to src/Umbraco.Core/PropertyEditors/DecimalConfigurationEditor.cs
index 207a82844d..efb1df1eb7 100644
--- a/src/Umbraco.Infrastructure/PropertyEditors/DecimalConfigurationEditor.cs
+++ b/src/Umbraco.Core/PropertyEditors/DecimalConfigurationEditor.cs
@@ -1,5 +1,4 @@
-using Umbraco.Core;
-using Umbraco.Core.PropertyEditors;
+using Umbraco.Core.PropertyEditors;
using Umbraco.Core.PropertyEditors.Validators;
namespace Umbraco.Web.PropertyEditors
@@ -7,7 +6,7 @@ namespace Umbraco.Web.PropertyEditors
///
/// A custom pre-value editor class to deal with the legacy way that the pre-value data is stored.
///
- internal class DecimalConfigurationEditor : ConfigurationEditor
+ public class DecimalConfigurationEditor : ConfigurationEditor
{
public DecimalConfigurationEditor()
{
diff --git a/src/Umbraco.Infrastructure/PropertyEditors/IDataValueReference.cs b/src/Umbraco.Core/PropertyEditors/IDataValueReference.cs
similarity index 96%
rename from src/Umbraco.Infrastructure/PropertyEditors/IDataValueReference.cs
rename to src/Umbraco.Core/PropertyEditors/IDataValueReference.cs
index 6377098bfc..8c0806a4a4 100644
--- a/src/Umbraco.Infrastructure/PropertyEditors/IDataValueReference.cs
+++ b/src/Umbraco.Core/PropertyEditors/IDataValueReference.cs
@@ -13,6 +13,6 @@ namespace Umbraco.Core.PropertyEditors
///
///
///
- IEnumerable GetReferences(object value);
+ IEnumerable GetReferences(object value);
}
}
diff --git a/src/Umbraco.Infrastructure/PropertyEditors/IDataValueReferenceFactory.cs b/src/Umbraco.Core/PropertyEditors/IDataValueReferenceFactory.cs
similarity index 90%
rename from src/Umbraco.Infrastructure/PropertyEditors/IDataValueReferenceFactory.cs
rename to src/Umbraco.Core/PropertyEditors/IDataValueReferenceFactory.cs
index 6587e071bf..c13c1ed212 100644
--- a/src/Umbraco.Infrastructure/PropertyEditors/IDataValueReferenceFactory.cs
+++ b/src/Umbraco.Core/PropertyEditors/IDataValueReferenceFactory.cs
@@ -5,7 +5,7 @@
///
/// Gets a value indicating whether the DataValueReference lookup supports a datatype (data editor).
///
- /// The datatype.
+ ///
/// A value indicating whether the converter supports a datatype.
bool IsForEditor(IDataEditor dataEditor);
diff --git a/src/Umbraco.Infrastructure/PropertyEditors/IntegerConfigurationEditor.cs b/src/Umbraco.Core/PropertyEditors/IntegerConfigurationEditor.cs
similarity index 90%
rename from src/Umbraco.Infrastructure/PropertyEditors/IntegerConfigurationEditor.cs
rename to src/Umbraco.Core/PropertyEditors/IntegerConfigurationEditor.cs
index e80c0fcb0e..bb1f8af790 100644
--- a/src/Umbraco.Infrastructure/PropertyEditors/IntegerConfigurationEditor.cs
+++ b/src/Umbraco.Core/PropertyEditors/IntegerConfigurationEditor.cs
@@ -1,5 +1,4 @@
-using Umbraco.Core;
-using Umbraco.Core.PropertyEditors;
+using Umbraco.Core.PropertyEditors;
using Umbraco.Core.PropertyEditors.Validators;
namespace Umbraco.Web.PropertyEditors
@@ -7,7 +6,7 @@ namespace Umbraco.Web.PropertyEditors
///
/// A custom pre-value editor class to deal with the legacy way that the pre-value data is stored.
///
- internal class IntegerConfigurationEditor : ConfigurationEditor
+ public class IntegerConfigurationEditor : ConfigurationEditor
{
public IntegerConfigurationEditor()
{
diff --git a/src/Umbraco.Infrastructure/PropertyEditors/ListViewConfiguration.cs b/src/Umbraco.Core/PropertyEditors/ListViewConfiguration.cs
similarity index 84%
rename from src/Umbraco.Infrastructure/PropertyEditors/ListViewConfiguration.cs
rename to src/Umbraco.Core/PropertyEditors/ListViewConfiguration.cs
index ce41628ec1..083e36029e 100644
--- a/src/Umbraco.Infrastructure/PropertyEditors/ListViewConfiguration.cs
+++ b/src/Umbraco.Core/PropertyEditors/ListViewConfiguration.cs
@@ -1,4 +1,4 @@
-using Newtonsoft.Json;
+using System.Runtime.Serialization;
using Umbraco.Core.PropertyEditors;
namespace Umbraco.Web.PropertyEditors
@@ -31,7 +31,7 @@ namespace Umbraco.Web.PropertyEditors
new Layout { Name = "grid", Icon = "icon-thumbnails-small", IsSystem = 1, Selected = true, Path = "views/propertyeditors/listview/layouts/grid/grid.html" }
};
- IncludeProperties = new []
+ IncludeProperties = new[]
{
new Property { Alias = "sortOrder", Header = "Sort order", IsSystem = 1 },
new Property { Alias = "updateDate", Header = "Last edited", IsSystem = 1 },
@@ -41,7 +41,7 @@ namespace Umbraco.Web.PropertyEditors
[ConfigurationField("pageSize", "Page Size", "number", Description = "Number of items per page")]
public int PageSize { get; set; }
-
+
[ConfigurationField("orderBy", "Order By", "views/propertyeditors/listview/sortby.prevalues.html",
Description = "The default sort order for the list")]
public string OrderBy { get; set; }
@@ -69,54 +69,57 @@ namespace Umbraco.Web.PropertyEditors
[ConfigurationField("showContentFirst", "Show Content App First", "boolean", Description = "Enable this to show the content app by default instead of the list view app")]
public bool ShowContentFirst { get; set; }
+ [DataContract]
public class Property
{
- [JsonProperty("alias")]
+ [DataMember(Name = "alias")]
public string Alias { get; set; }
- [JsonProperty("header")]
+ [DataMember(Name = "header")]
public string Header { get; set; }
- [JsonProperty("nameTemplate")]
+ [DataMember(Name = "nameTemplate")]
public string Template { get; set; }
- [JsonProperty("isSystem")]
+ [DataMember(Name = "isSystem")]
public int IsSystem { get; set; } // TODO: bool
}
+ [DataContract]
public class Layout
{
- [JsonProperty("name")]
+ [DataMember(Name = "name")]
public string Name { get; set; }
- [JsonProperty("path")]
+ [DataMember(Name = "path")]
public string Path { get; set; }
- [JsonProperty("icon")]
+ [DataMember(Name = "icon")]
public string Icon { get; set; }
- [JsonProperty("isSystem")]
+ [DataMember(Name = "isSystem")]
public int IsSystem { get; set; } // TODO: bool
- [JsonProperty("selected")]
+ [DataMember(Name = "selected")]
public bool Selected { get; set; }
}
+ [DataContract]
public class BulkActionPermissionSettings
{
- [JsonProperty("allowBulkPublish")]
+ [DataMember(Name = "allowBulkPublish")]
public bool AllowBulkPublish { get; set; } = true;
- [JsonProperty("allowBulkUnpublish")]
+ [DataMember(Name = "allowBulkUnpublish")]
public bool AllowBulkUnpublish { get; set; } = true;
- [JsonProperty("allowBulkCopy")]
+ [DataMember(Name = "allowBulkCopy")]
public bool AllowBulkCopy { get; set; } = true;
- [JsonProperty("allowBulkMove")]
+ [DataMember(Name = "allowBulkMove")]
public bool AllowBulkMove { get; set; } = true;
- [JsonProperty("allowBulkDelete")]
+ [DataMember(Name = "allowBulkDelete")]
public bool AllowBulkDelete { get; set; } = true;
}
}
diff --git a/src/Umbraco.Infrastructure/PropertyEditors/MemberPickerConfiguration.cs b/src/Umbraco.Core/PropertyEditors/MemberPickerConfiguration.cs
similarity index 89%
rename from src/Umbraco.Infrastructure/PropertyEditors/MemberPickerConfiguration.cs
rename to src/Umbraco.Core/PropertyEditors/MemberPickerConfiguration.cs
index 255be498bc..ba7dea6548 100644
--- a/src/Umbraco.Infrastructure/PropertyEditors/MemberPickerConfiguration.cs
+++ b/src/Umbraco.Core/PropertyEditors/MemberPickerConfiguration.cs
@@ -1,5 +1,5 @@
using System.Collections.Generic;
-using Umbraco.Core;
+using Umbraco.Core.PropertyEditors;
namespace Umbraco.Web.PropertyEditors
{
diff --git a/src/Umbraco.Infrastructure/PropertyEditors/MissingPropertyEditor.cs b/src/Umbraco.Core/PropertyEditors/MissingPropertyEditor.cs
similarity index 100%
rename from src/Umbraco.Infrastructure/PropertyEditors/MissingPropertyEditor.cs
rename to src/Umbraco.Core/PropertyEditors/MissingPropertyEditor.cs
diff --git a/src/Umbraco.Infrastructure/PropertyEditors/MultiNodePickerConfiguration.cs b/src/Umbraco.Core/PropertyEditors/MultiNodePickerConfiguration.cs
similarity index 100%
rename from src/Umbraco.Infrastructure/PropertyEditors/MultiNodePickerConfiguration.cs
rename to src/Umbraco.Core/PropertyEditors/MultiNodePickerConfiguration.cs
diff --git a/src/Umbraco.Core/PropertyEditors/MultiNodePickerConfigurationTreeSource.cs b/src/Umbraco.Core/PropertyEditors/MultiNodePickerConfigurationTreeSource.cs
new file mode 100644
index 0000000000..749f46abc5
--- /dev/null
+++ b/src/Umbraco.Core/PropertyEditors/MultiNodePickerConfigurationTreeSource.cs
@@ -0,0 +1,21 @@
+using System.Runtime.Serialization;
+using Umbraco.Core;
+
+namespace Umbraco.Web.PropertyEditors
+{
+ ///
+ /// Represents the 'startNode' value for the
+ ///
+ [DataContract]
+ public class MultiNodePickerConfigurationTreeSource
+ {
+ [DataMember(Name = "type")]
+ public string ObjectType { get; set; }
+
+ [DataMember(Name = "query")]
+ public string StartNodeQuery { get; set; }
+
+ [DataMember(Name = "id")]
+ public Udi StartNodeId { get; set; }
+ }
+}
diff --git a/src/Umbraco.Infrastructure/PropertyEditors/NestedContentConfiguration.cs b/src/Umbraco.Core/PropertyEditors/NestedContentConfiguration.cs
similarity index 88%
rename from src/Umbraco.Infrastructure/PropertyEditors/NestedContentConfiguration.cs
rename to src/Umbraco.Core/PropertyEditors/NestedContentConfiguration.cs
index 89190883c8..e75be48f36 100644
--- a/src/Umbraco.Infrastructure/PropertyEditors/NestedContentConfiguration.cs
+++ b/src/Umbraco.Core/PropertyEditors/NestedContentConfiguration.cs
@@ -1,4 +1,4 @@
-using Newtonsoft.Json;
+using System.Runtime.Serialization;
using Umbraco.Core.PropertyEditors;
namespace Umbraco.Web.PropertyEditors
@@ -27,15 +27,17 @@ namespace Umbraco.Web.PropertyEditors
[ConfigurationField("hideLabel", "Hide Label", "boolean", Description = "Hide the property label and let the item list span the full width of the editor window.")]
public bool HideLabel { get; set; }
+
+ [DataContract]
public class ContentType
{
- [JsonProperty("ncAlias")]
+ [DataMember(Name = "ncAlias")]
public string Alias { get; set; }
- [JsonProperty("ncTabAlias")]
+ [DataMember(Name = "ncTabAlias")]
public string TabAlias { get; set; }
- [JsonProperty("nameTemplate")]
+ [DataMember(Name = "nameTemplate")]
public string Template { get; set; }
}
}
diff --git a/src/Umbraco.Infrastructure/PropertyEditors/UserPickerConfiguration.cs b/src/Umbraco.Core/PropertyEditors/UserPickerConfiguration.cs
similarity index 95%
rename from src/Umbraco.Infrastructure/PropertyEditors/UserPickerConfiguration.cs
rename to src/Umbraco.Core/PropertyEditors/UserPickerConfiguration.cs
index 88eb1d224e..bf3cd197a3 100644
--- a/src/Umbraco.Infrastructure/PropertyEditors/UserPickerConfiguration.cs
+++ b/src/Umbraco.Core/PropertyEditors/UserPickerConfiguration.cs
@@ -1,5 +1,4 @@
using System.Collections.Generic;
-using Umbraco.Core;
using Umbraco.Core.PropertyEditors;
namespace Umbraco.Web.PropertyEditors
diff --git a/src/Umbraco.Infrastructure/PropertyEditors/MultiNodePickerConfigurationTreeSource.cs b/src/Umbraco.Infrastructure/PropertyEditors/MultiNodePickerConfigurationTreeSource.cs
deleted file mode 100644
index 2942271acc..0000000000
--- a/src/Umbraco.Infrastructure/PropertyEditors/MultiNodePickerConfigurationTreeSource.cs
+++ /dev/null
@@ -1,21 +0,0 @@
-using Newtonsoft.Json;
-using Umbraco.Core;
-
-namespace Umbraco.Web.PropertyEditors
-{
- ///
- /// Represents the 'startNode' value for the
- ///
- [JsonObject]
- public class MultiNodePickerConfigurationTreeSource
- {
- [JsonProperty("type")]
- public string ObjectType {get;set;}
-
- [JsonProperty("query")]
- public string StartNodeQuery {get;set;}
-
- [JsonProperty("id")]
- public Udi StartNodeId {get;set;}
- }
-}