2013-09-02 15:40:14 +02:00
|
|
|
using Umbraco.Core.PropertyEditors;
|
|
|
|
|
|
|
|
|
|
namespace Umbraco.Web.PropertyEditors
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Useful when returning a custom value editor when your property editor is attributed, it ensures the attribute
|
|
|
|
|
/// values are copied across to your custom value editor.
|
|
|
|
|
/// </summary>
|
|
|
|
|
public class ValueEditorWrapper : ValueEditor
|
|
|
|
|
{
|
|
|
|
|
public ValueEditorWrapper(ValueEditor wrapped)
|
|
|
|
|
{
|
|
|
|
|
this.View = wrapped.View;
|
|
|
|
|
this.ValueType = wrapped.ValueType;
|
|
|
|
|
foreach (var v in wrapped.Validators)
|
|
|
|
|
{
|
|
|
|
|
Validators.Add(v);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
2013-08-26 17:24:08 +10:00
|
|
|
}
|