U4-9894 UDI Pickers and all 'v2' property editors shouldn't observe the EnablePropertyValueConverters setting
This commit is contained in:
@@ -50,10 +50,12 @@ namespace Umbraco.Web.PropertyEditors.ValueConverters
|
||||
/// </returns>
|
||||
public override bool IsConverter(PublishedPropertyType propertyType)
|
||||
{
|
||||
if (propertyType.PropertyEditorAlias.Equals(Constants.PropertyEditors.ContentPicker2Alias))
|
||||
return true;
|
||||
|
||||
if (UmbracoConfig.For.UmbracoSettings().Content.EnablePropertyValueConverters)
|
||||
{
|
||||
return propertyType.PropertyEditorAlias.Equals(Constants.PropertyEditors.ContentPickerAlias)
|
||||
|| propertyType.PropertyEditorAlias.Equals(Constants.PropertyEditors.ContentPicker2Alias);
|
||||
return propertyType.PropertyEditorAlias.Equals(Constants.PropertyEditors.ContentPickerAlias);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -18,16 +18,15 @@ namespace Umbraco.Web.PropertyEditors.ValueConverters
|
||||
[PropertyValueCache(PropertyCacheValue.All, PropertyCacheLevel.Content)]
|
||||
public class LegacyRelatedLinksEditorValueConvertor : PropertyValueConverterBase
|
||||
{
|
||||
private static readonly string[] MatchingEditors = {
|
||||
Constants.PropertyEditors.RelatedLinksAlias,
|
||||
Constants.PropertyEditors.RelatedLinks2Alias
|
||||
};
|
||||
|
||||
public override bool IsConverter(PublishedPropertyType propertyType)
|
||||
{
|
||||
if (propertyType.PropertyEditorAlias.Equals(Constants.PropertyEditors.RelatedLinks2Alias))
|
||||
return true;
|
||||
|
||||
if (UmbracoConfig.For.UmbracoSettings().Content.EnablePropertyValueConverters == false)
|
||||
{
|
||||
return MatchingEditors.Contains(propertyType.PropertyEditorAlias);
|
||||
return propertyType.PropertyEditorAlias.Equals(Constants.PropertyEditors.RelatedLinksAlias);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -17,12 +17,14 @@ namespace Umbraco.Web.PropertyEditors.ValueConverters
|
||||
{
|
||||
public override bool IsConverter(PublishedPropertyType propertyType)
|
||||
{
|
||||
if (UmbracoConfig.For.UmbracoSettings().Content.EnablePropertyValueConverters)
|
||||
if (propertyType.PropertyEditorAlias.Equals(Constants.PropertyEditors.MemberPicker2Alias))
|
||||
return true;
|
||||
|
||||
if (UmbracoConfig.For.UmbracoSettings().Content.EnablePropertyValueConverters == false)
|
||||
{
|
||||
return propertyType.PropertyEditorAlias.InvariantEquals(Constants.PropertyEditors.MemberPickerAlias)
|
||||
|| propertyType.PropertyEditorAlias.InvariantEquals(Constants.PropertyEditors.MemberPicker2Alias);
|
||||
return propertyType.PropertyEditorAlias.Equals(Constants.PropertyEditors.MemberPickerAlias);
|
||||
}
|
||||
return false;
|
||||
return false;
|
||||
}
|
||||
|
||||
public override object ConvertDataToSource(PublishedPropertyType propertyType, object source, bool preview)
|
||||
|
||||
@@ -52,12 +52,14 @@ namespace Umbraco.Web.PropertyEditors.ValueConverters
|
||||
/// </returns>
|
||||
public override bool IsConverter(PublishedPropertyType propertyType)
|
||||
{
|
||||
if (UmbracoConfig.For.UmbracoSettings().Content.EnablePropertyValueConverters)
|
||||
if (propertyType.PropertyEditorAlias.Equals(Constants.PropertyEditors.MultiNodeTreePicker2Alias))
|
||||
return true;
|
||||
|
||||
if (UmbracoConfig.For.UmbracoSettings().Content.EnablePropertyValueConverters == false)
|
||||
{
|
||||
return propertyType.PropertyEditorAlias.Equals(Constants.PropertyEditors.MultiNodeTreePickerAlias)
|
||||
|| propertyType.PropertyEditorAlias.Equals(Constants.PropertyEditors.MultiNodeTreePicker2Alias);
|
||||
return propertyType.PropertyEditorAlias.Equals(Constants.PropertyEditors.MultiNodeTreePickerAlias);
|
||||
}
|
||||
return false;
|
||||
return false;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -53,12 +53,14 @@ namespace Umbraco.Web.PropertyEditors.ValueConverters
|
||||
/// </returns>
|
||||
public override bool IsConverter(PublishedPropertyType propertyType)
|
||||
{
|
||||
if (UmbracoConfig.For.UmbracoSettings().Content.EnablePropertyValueConverters)
|
||||
if (propertyType.PropertyEditorAlias.Equals(Constants.PropertyEditors.RelatedLinks2Alias))
|
||||
return true;
|
||||
|
||||
if (UmbracoConfig.For.UmbracoSettings().Content.EnablePropertyValueConverters == false)
|
||||
{
|
||||
return propertyType.PropertyEditorAlias.Equals(Constants.PropertyEditors.RelatedLinksAlias)
|
||||
|| propertyType.PropertyEditorAlias.Equals(Constants.PropertyEditors.RelatedLinks2Alias);
|
||||
return propertyType.PropertyEditorAlias.Equals(Constants.PropertyEditors.RelatedLinksAlias);
|
||||
}
|
||||
return false;
|
||||
return false;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user