Merge pull request #2763 from OptimisticCoder/U4-7030-Using-radiobuttonlist-prevalue-editor
U4-7030 enable use of radiobuttonlist pre editor
This commit is contained in:
13
src/Umbraco.Core/Models/PreValueInnerListItem.cs
Normal file
13
src/Umbraco.Core/Models/PreValueInnerListItem.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Umbraco.Core.Models
|
||||
{
|
||||
public class PreValueInnerListItem
|
||||
{
|
||||
[JsonProperty("value")]
|
||||
public object Value { get; set; }
|
||||
|
||||
[JsonProperty("label")]
|
||||
public string Label { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,7 @@
|
||||
using System.Collections.Generic;
|
||||
using Newtonsoft.Json;
|
||||
using Umbraco.Core.Manifest;
|
||||
using Umbraco.Core.Models;
|
||||
|
||||
namespace Umbraco.Core.PropertyEditors
|
||||
{
|
||||
@@ -86,5 +87,11 @@ namespace Umbraco.Core.PropertyEditors
|
||||
/// </summary>
|
||||
[JsonProperty("config")]
|
||||
public IDictionary<string, object> Config { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// This allows for inner prevalues to be defined, for views such as radiobuttonlist, that require a selection.
|
||||
/// </summary>
|
||||
[JsonProperty("prevalues")]
|
||||
public PreValueInnerListItem[] PreValues { get; set; }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -386,6 +386,7 @@
|
||||
<Compile Include="Models\Membership\UserProfile.cs" />
|
||||
<Compile Include="Models\Membership\UserState.cs" />
|
||||
<Compile Include="Models\Membership\UserType.cs" />
|
||||
<Compile Include="Models\PreValueInnerListItem.cs" />
|
||||
<Compile Include="Models\PublishedContent\PublishedContentTypeConverter.cs" />
|
||||
<Compile Include="Models\Rdbms\AuditEntryDto.cs" />
|
||||
<Compile Include="Models\Rdbms\ConsentDto.cs" />
|
||||
|
||||
@@ -18,7 +18,8 @@ function dataTypeHelper() {
|
||||
description: preVals[i].description,
|
||||
label: preVals[i].label,
|
||||
view: preVals[i].view,
|
||||
value: preVals[i].value
|
||||
value: preVals[i].value,
|
||||
prevalues: preVals[i].prevalues
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -29,6 +29,7 @@ function DataTypeEditController($scope, $routeParams, $location, appState, navig
|
||||
view: preVals[i].view,
|
||||
value: preVals[i].value,
|
||||
config: preVals[i].config,
|
||||
prevalues: preVals[i].prevalues
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Runtime.Serialization;
|
||||
using Umbraco.Core.Models;
|
||||
|
||||
namespace Umbraco.Web.Models.ContentEditing
|
||||
{
|
||||
@@ -40,5 +41,10 @@ namespace Umbraco.Web.Models.ContentEditing
|
||||
[DataMember(Name = "config")]
|
||||
public IDictionary<string, object> Config { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// This allows for inner prevalues to be defined, for views such as radiobuttonlist, that require a selection.
|
||||
/// </summary>
|
||||
[DataMember(Name = "prevalues")]
|
||||
public PreValueInnerListItem[] PreValues { get; set; }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user