-
Notifications
You must be signed in to change notification settings - Fork 66
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* #82 Support for Sort order on Content Type Allowed Items * Add Version checking ping. * - DataType Serializers for core pickers. * Tidy up function names. * Fix - for items nested inside nested items json not serialized correctly. * DataTypeSerializer package. * Update comment in delete. * Fix: Dictionary items should sync based on level. * 8.5.1 - Release Versions Co-authored-by: Kevin Jump <[email protected]>
- Loading branch information
Showing
33 changed files
with
545 additions
and
62 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
@REM build a single | ||
@REM single [project] [nuspec] [version] [depends] | ||
@REM single uSync8.Community.Contrib uSync.Community.Contrib 8.5.0.1 8.5.1 | ||
|
||
@echo off | ||
|
||
@Echo Packaging | ||
nuget pack ..\%1\%2.nuspec -build -OutputDirectory %3 -version %3 -properties "depends=%4;Configuration=release" | ||
|
||
XCOPY %3\*.nupkg c:\source\localgit /y |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -310,4 +310,8 @@ | |
|
||
.usync-table-message-cell { | ||
flex-basis: 25%; | ||
} | ||
|
||
.usync-alert a { | ||
text-decoration: underline; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
63 changes: 63 additions & 0 deletions
63
uSync8.Community.DataTypeSerializers/CoreTypes/ContentPickerConfigSerializer.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
using System; | ||
|
||
using Newtonsoft.Json; | ||
|
||
using Umbraco.Core.Services; | ||
using Umbraco.Web.PropertyEditors; | ||
|
||
using uSync8.Core.DataTypes; | ||
|
||
namespace uSync8.Community.DataTypeSerializers.CoreTypes | ||
{ | ||
public class ContentPickerConfigSerializer : SyncDataTypeSerializerBase, IConfigurationSerializer | ||
{ | ||
public ContentPickerConfigSerializer(IEntityService entityService) | ||
: base(entityService) | ||
{ } | ||
|
||
public string Name => "ContentPickerNodeSerializer"; | ||
|
||
public string[] Editors => new string[] { "Umbraco.ContentPicker" }; | ||
|
||
public override string SerializeConfig(object configuration) | ||
{ | ||
|
||
if (configuration is ContentPickerConfiguration pickerConfig) | ||
{ | ||
var contentPickerConfig = new MappedPathConfigBase<ContentPickerConfiguration>(); | ||
|
||
contentPickerConfig.Config = new ContentPickerConfiguration() | ||
{ | ||
IgnoreUserStartNodes = pickerConfig.IgnoreUserStartNodes, | ||
StartNodeId = null, | ||
ShowOpenButton = pickerConfig.ShowOpenButton | ||
}; | ||
|
||
if (pickerConfig.StartNodeId != null) | ||
contentPickerConfig.MappedPath = UdiToEntityPath(pickerConfig.StartNodeId); | ||
|
||
return base.SerializeConfig(contentPickerConfig); | ||
} | ||
|
||
return base.SerializeConfig(configuration); | ||
} | ||
|
||
|
||
public override object DeserializeConfig(string config, Type configType) | ||
{ | ||
if (configType == typeof(ContentPickerConfiguration)) | ||
{ | ||
var mappedConfig = JsonConvert.DeserializeObject<MappedPathConfigBase<ContentPickerConfiguration>>(config); | ||
|
||
if (!string.IsNullOrWhiteSpace(mappedConfig.MappedPath)) | ||
{ | ||
mappedConfig.Config.StartNodeId = PathToUdi(mappedConfig.MappedPath); | ||
} | ||
|
||
return mappedConfig.Config; | ||
} | ||
|
||
return base.DeserializeConfig(config, configType); | ||
} | ||
} | ||
} |
73 changes: 73 additions & 0 deletions
73
uSync8.Community.DataTypeSerializers/CoreTypes/MNTPickerConfigSerializer.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
using System; | ||
|
||
using Newtonsoft.Json; | ||
|
||
using Umbraco.Core.Services; | ||
using Umbraco.Web.PropertyEditors; | ||
|
||
using uSync8.Core.DataTypes; | ||
|
||
namespace uSync8.Community.DataTypeSerializers.CoreTypes | ||
{ | ||
public class MNTPickerConfigSerializer : SyncDataTypeSerializerBase, IConfigurationSerializer | ||
{ | ||
public MNTPickerConfigSerializer(IEntityService entityService) | ||
: base(entityService) | ||
{ } | ||
|
||
public string Name => "MNTPNodeSerializer"; | ||
|
||
public string[] Editors => new string[] { "Umbraco.MultiNodeTreePicker" }; | ||
|
||
public override string SerializeConfig(object configuration) | ||
{ | ||
var MNTPMappedConfig = new MappedPathConfigBase<MultiNodePickerConfiguration>(); | ||
|
||
if (configuration is MultiNodePickerConfiguration pickerConfig) | ||
{ | ||
MNTPMappedConfig.Config = new MultiNodePickerConfiguration() | ||
{ | ||
IgnoreUserStartNodes = pickerConfig.IgnoreUserStartNodes, | ||
Filter = pickerConfig.Filter, | ||
MaxNumber = pickerConfig.MaxNumber, | ||
MinNumber = pickerConfig.MinNumber, | ||
ShowOpen = pickerConfig.ShowOpen, | ||
TreeSource = new MultiNodePickerConfigurationTreeSource() | ||
{ | ||
ObjectType = pickerConfig.TreeSource.ObjectType, | ||
StartNodeId = pickerConfig.TreeSource.StartNodeId, | ||
StartNodeQuery = pickerConfig.TreeSource.StartNodeQuery | ||
} | ||
|
||
}; | ||
|
||
if (pickerConfig?.TreeSource?.StartNodeId != null) | ||
{ | ||
MNTPMappedConfig.MappedPath = UdiToEntityPath(pickerConfig.TreeSource.StartNodeId); | ||
} | ||
|
||
return base.SerializeConfig(MNTPMappedConfig); | ||
} | ||
|
||
return base.SerializeConfig(configuration); | ||
} | ||
|
||
|
||
public override object DeserializeConfig(string config, Type configType) | ||
{ | ||
if (configType == typeof(MultiNodePickerConfiguration)) | ||
{ | ||
var mappedConfig = JsonConvert.DeserializeObject<MappedPathConfigBase<MultiNodePickerConfiguration>>(config); | ||
|
||
if (!string.IsNullOrWhiteSpace(mappedConfig.MappedPath)) | ||
{ | ||
mappedConfig.Config.TreeSource.StartNodeId = PathToUdi(mappedConfig.MappedPath); | ||
} | ||
|
||
return mappedConfig.Config; | ||
} | ||
|
||
return base.DeserializeConfig(config, configType); | ||
} | ||
} | ||
} |
Oops, something went wrong.