Implemented much more for the new drop down property editors to ensure backwards compatibility, had to implement a new required method for property editors to format their data for cache storage. Changed how the drop down angular list is generated, now it uses a dictionary which is much more elegant with less code. Got drop down (normal) and drop down publishing keys working and saving the correct data types, nearly have drop down list multiple working but going to change the property editors to be able to post object (json) instead of just a string for values.

This commit is contained in:
Shannon
2013-08-26 17:24:08 +10:00
parent 5844c54a1f
commit 5b289a4971
32 changed files with 501 additions and 178 deletions

View File

@@ -0,0 +1,27 @@
using Umbraco.Core;
using Umbraco.Core.PropertyEditors;
namespace Umbraco.Web.PropertyEditors
{
/// <summary>
/// A property editor to allow the individual selection of pre-defined items.
/// </summary>
/// <remarks>
/// Due to remaining backwards compatible, this stores the id of the drop down item in the database which is why it is marked
/// as INT and we have logic in here to ensure it is formatted correctly including ensuring that the INT ID value is published
/// in cache and not the string value.
/// </remarks>
[PropertyEditor(Constants.PropertyEditors.DropdownlistPublishingKeys, "Dropdown list, publishing keys", "dropdown", ValueType = "INT")]
public class DropDownWithKeysPropertyEditor : PropertyEditor
{
/// <summary>
/// Return a custom pre-value editor
/// </summary>
/// <returns></returns>
protected override PreValueEditor CreatePreValueEditor()
{
return new DropDownPreValueEditor();
}
}
}