Skip to content

Commit

Permalink
Merge branch 'feature/label-property-editors'
Browse files Browse the repository at this point in the history
  • Loading branch information
Hendy committed May 4, 2015
2 parents 111e5fe + 2e078e4 commit c57d125
Show file tree
Hide file tree
Showing 30 changed files with 344 additions and 39 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
namespace nuPickers.PropertyEditors.DotNetLabels
{
using ClientDependency.Core;

using nuPickers.PropertyEditors;

using Umbraco.Core.PropertyEditors;
using Umbraco.Web.PropertyEditors;

// EDITOR UI
[PropertyEditor(PropertyEditorConstants.DotNetLabelsAlias, "nuPickers: DotNet Labels", EmbeddedResource.RootUrl + "Labels/LabelsEditor.html", ValueType = "TEXT")]
[PropertyEditorAsset(ClientDependencyType.Css, EmbeddedResource.RootUrl + "LayoutDirection/LayoutDirection.css.nu")]
[PropertyEditorAsset(ClientDependencyType.Javascript, EmbeddedResource.RootUrl + "Labels/LabelsEditorController.js.nu")]

// RESOURCES (all are referenced as EditorResource consumes the others)
[PropertyEditorAsset(ClientDependencyType.Javascript, EmbeddedResource.RootUrl + "Editor/EditorResource.js.nu")]
[PropertyEditorAsset(ClientDependencyType.Javascript, EmbeddedResource.RootUrl + "DataSource/DataSourceResource.js.nu")]
[PropertyEditorAsset(ClientDependencyType.Javascript, EmbeddedResource.RootUrl + "RelationMapping/RelationMappingResource.js.nu")]
[PropertyEditorAsset(ClientDependencyType.Javascript, EmbeddedResource.RootUrl + "SaveFormat/SaveFormatResource.js.nu")]

// CONFIG
[PropertyEditorAsset(ClientDependencyType.Css, EmbeddedResource.RootUrl + "PropertyEditor/PropertyEditorConfig.css.nu")]
[PropertyEditorAsset(ClientDependencyType.Javascript, EmbeddedResource.RootUrl + "DotNetDataSource/DotNetDataSourceConfigController.js.nu")]
[PropertyEditorAsset(ClientDependencyType.Javascript, EmbeddedResource.RootUrl + "Labels/LabelsConfigController.js.nu")]
[PropertyEditorAsset(ClientDependencyType.Javascript, EmbeddedResource.RootUrl + "CustomLabel/CustomLabelConfigController.js.nu")]
public class DotNetLabelsPropertyEditor : BasePropertyEditor
{
protected override PreValueEditor CreatePreValueEditor()
{
return new DotNetLabelsPreValueEditor();
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
namespace nuPickers.PropertyEditors.DotNetLabels
{
using Umbraco.Core.PropertyEditors;

internal class DotNetLabelsPreValueEditor : PreValueEditor
{
[PreValueField("dataSource", "", EmbeddedResource.RootUrl + "DotNetDataSource/DotNetDataSourceConfig.html", HideLabel = true)]
public string DataSource { get; set; }

[PreValueField("customLabel", "", EmbeddedResource.RootUrl + "CustomLabel/CustomLabelConfig.html", HideLabel = true)]
public string CustomLabel { get; set; }

/// <summary>
/// currently no ui, but forces controller to be loaded
/// </summary>
[PreValueField("labels", "", EmbeddedResource.RootUrl + "Labels/LabelsConfig.html", HideLabel = true)]
public string Labels { get; set; }

[PreValueField("layoutDirection", "Layout Direction", EmbeddedResource.RootUrl + "LayoutDirection/LayoutDirectionConfig.html")]
public string LayoutDirection { get; set; }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,8 @@

// CONFIG
[PropertyEditorAsset(ClientDependencyType.Css, EmbeddedResource.RootUrl + "PropertyEditor/PropertyEditorConfig.css.nu")]
[PropertyEditorAsset(ClientDependencyType.Javascript, EmbeddedResource.RootUrl + "TypeaheadListPicker/TypeaheadListPickerConfigController.js.nu")]
[PropertyEditorAsset(ClientDependencyType.Javascript, EmbeddedResource.RootUrl + "TypeaheadListPicker/TypeaheadListPickerConfigState.js.nu")]
[PropertyEditorAsset(ClientDependencyType.Javascript, EmbeddedResource.RootUrl + "DotNetDataSource/DotNetDataSourceConfigController.js.nu")]
[PropertyEditorAsset(ClientDependencyType.Javascript, EmbeddedResource.RootUrl + "TypeaheadListPicker/TypeaheadListPickerConfigController.js.nu")]
[PropertyEditorAsset(ClientDependencyType.Javascript, EmbeddedResource.RootUrl + "CustomLabel/CustomLabelConfigController.js.nu")]
[PropertyEditorAsset(ClientDependencyType.Javascript, EmbeddedResource.RootUrl + "RelationMapping/RelationMappingConfigController.js.nu")]
[PropertyEditorAsset(ClientDependencyType.Javascript, EmbeddedResource.RootUrl + "SaveFormat/SaveFormatConfigController.js.nu")]
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
namespace nuPickers.PropertyEditors.EnumLabels
{
using Umbraco.Core.PropertyEditors;

internal class EnumLabelsPreValueEditor : PreValueEditor
{
[PreValueField("dataSource", "", EmbeddedResource.RootUrl + "EnumDataSource/EnumDataSourceConfig.html", HideLabel = true)]
public string DataSource { get; set; }

[PreValueField("customLabel", "", EmbeddedResource.RootUrl + "CustomLabel/CustomLabelConfig.html", HideLabel = true)]
public string CustomLabel { get; set; }

/// <summary>
/// currently no ui, but forces controller to be loaded
/// </summary>
[PreValueField("labels", "", EmbeddedResource.RootUrl + "Labels/LabelsConfig.html", HideLabel = true)]
public string Labels { get; set; }

[PreValueField("layoutDirection", "Layout Direction", EmbeddedResource.RootUrl + "LayoutDirection/LayoutDirectionConfig.html")]
public string LayoutDirection { get; set; }
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
namespace nuPickers.PropertyEditors.EnumLabels
{
using ClientDependency.Core;

using nuPickers.PropertyEditors;

using Umbraco.Core.PropertyEditors;
using Umbraco.Web.PropertyEditors;

// EDITOR UI
[PropertyEditor(PropertyEditorConstants.EnumLabelsAlias, "nuPickers: Enum Labels", EmbeddedResource.RootUrl + "Labels/LabelsEditor.html", ValueType = "TEXT")]
[PropertyEditorAsset(ClientDependencyType.Css, EmbeddedResource.RootUrl + "LayoutDirection/LayoutDirection.css.nu")]
[PropertyEditorAsset(ClientDependencyType.Javascript, EmbeddedResource.RootUrl + "Labels/LabelsEditorController.js.nu")]

// RESOURCES (all are referenced as EditorResource consumes the others)
[PropertyEditorAsset(ClientDependencyType.Javascript, EmbeddedResource.RootUrl + "Editor/EditorResource.js.nu")]
[PropertyEditorAsset(ClientDependencyType.Javascript, EmbeddedResource.RootUrl + "DataSource/DataSourceResource.js.nu")]
[PropertyEditorAsset(ClientDependencyType.Javascript, EmbeddedResource.RootUrl + "RelationMapping/RelationMappingResource.js.nu")]
[PropertyEditorAsset(ClientDependencyType.Javascript, EmbeddedResource.RootUrl + "SaveFormat/SaveFormatResource.js.nu")]

// CONFIG
[PropertyEditorAsset(ClientDependencyType.Css, EmbeddedResource.RootUrl + "PropertyEditor/PropertyEditorConfig.css.nu")]
[PropertyEditorAsset(ClientDependencyType.Javascript, EmbeddedResource.RootUrl + "EnumDataSource/EnumDataSourceConfigController.js.nu")]
[PropertyEditorAsset(ClientDependencyType.Javascript, EmbeddedResource.RootUrl + "Labels/LabelsConfigController.js.nu")]
[PropertyEditorAsset(ClientDependencyType.Javascript, EmbeddedResource.RootUrl + "CustomLabel/CustomLabelConfigController.js.nu")]
public class EnumLabelsPropertyEditor : BasePropertyEditor
{
protected override PreValueEditor CreatePreValueEditor()
{
return new EnumLabelsPreValueEditor();
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
namespace nuPickers.PropertyEditors.JsonLabels
{
using Umbraco.Core.PropertyEditors;

internal class JsonLabelsPreValueEditor : PreValueEditor
{
[PreValueField("dataSource", "", EmbeddedResource.RootUrl + "JsonDataSource/JsonDataSourceConfig.html", HideLabel = true)]
public string DataSource { get; set; }

[PreValueField("customLabel", "", EmbeddedResource.RootUrl + "CustomLabel/CustomLabelConfig.html", HideLabel = true)]
public string CustomLabel { get; set; }

/// <summary>
/// currently no ui, but forces controller to be loaded
/// </summary>
[PreValueField("labels", "", EmbeddedResource.RootUrl + "Labels/LabelsConfig.html", HideLabel = true)]
public string Labels { get; set; }

[PreValueField("layoutDirection", "Layout Direction", EmbeddedResource.RootUrl + "LayoutDirection/LayoutDirectionConfig.html")]
public string LayoutDirection { get; set; }
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
namespace nuPickers.PropertyEditors.JsonLabels
{
using ClientDependency.Core;

using nuPickers.PropertyEditors;

using Umbraco.Core.PropertyEditors;
using Umbraco.Web.PropertyEditors;

// EDITOR UI
[PropertyEditor(PropertyEditorConstants.JsonLabelsAlias, "nuPickers: Json Labels", EmbeddedResource.RootUrl + "Labels/LabelsEditor.html", ValueType = "TEXT")]
[PropertyEditorAsset(ClientDependencyType.Css, EmbeddedResource.RootUrl + "LayoutDirection/LayoutDirection.css.nu")]
[PropertyEditorAsset(ClientDependencyType.Javascript, EmbeddedResource.RootUrl + "Labels/LabelsEditorController.js.nu")]

// RESOURCES (all are referenced as EditorResource consumes the others)
[PropertyEditorAsset(ClientDependencyType.Javascript, EmbeddedResource.RootUrl + "Editor/EditorResource.js.nu")]
[PropertyEditorAsset(ClientDependencyType.Javascript, EmbeddedResource.RootUrl + "DataSource/DataSourceResource.js.nu")]
[PropertyEditorAsset(ClientDependencyType.Javascript, EmbeddedResource.RootUrl + "RelationMapping/RelationMappingResource.js.nu")]
[PropertyEditorAsset(ClientDependencyType.Javascript, EmbeddedResource.RootUrl + "SaveFormat/SaveFormatResource.js.nu")]

// CONFIG
[PropertyEditorAsset(ClientDependencyType.Css, EmbeddedResource.RootUrl + "PropertyEditor/PropertyEditorConfig.css.nu")]
[PropertyEditorAsset(ClientDependencyType.Javascript, EmbeddedResource.RootUrl + "JsonDataSource/JsonDataSourceConfigController.js.nu")]
[PropertyEditorAsset(ClientDependencyType.Javascript, EmbeddedResource.RootUrl + "Labels/LabelsConfigController.js.nu")]
[PropertyEditorAsset(ClientDependencyType.Javascript, EmbeddedResource.RootUrl + "CustomLabel/CustomLabelConfigController.js.nu")]
public class JsonLabelsPropertyEditor : BasePropertyEditor
{
protected override PreValueEditor CreatePreValueEditor()
{
return new JsonLabelsPreValueEditor();
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,8 @@

// CONFIG
[PropertyEditorAsset(ClientDependencyType.Css, EmbeddedResource.RootUrl + "PropertyEditor/PropertyEditorConfig.css.nu")]
[PropertyEditorAsset(ClientDependencyType.Javascript, EmbeddedResource.RootUrl + "TypeaheadListPicker/TypeaheadListPickerConfigController.js.nu")]
[PropertyEditorAsset(ClientDependencyType.Javascript, EmbeddedResource.RootUrl + "TypeaheadListPicker/TypeaheadListPickerConfigState.js.nu")]
[PropertyEditorAsset(ClientDependencyType.Javascript, EmbeddedResource.RootUrl + "JsonDataSource/JsonDataSourceConfigController.js.nu")]
[PropertyEditorAsset(ClientDependencyType.Javascript, EmbeddedResource.RootUrl + "TypeaheadListPicker/TypeaheadListPickerConfigController.js.nu")]
[PropertyEditorAsset(ClientDependencyType.Javascript, EmbeddedResource.RootUrl + "CustomLabel/CustomLabelConfigController.js.nu")]
[PropertyEditorAsset(ClientDependencyType.Javascript, EmbeddedResource.RootUrl + "RelationMapping/RelationMappingConfigController.js.nu")]
[PropertyEditorAsset(ClientDependencyType.Javascript, EmbeddedResource.RootUrl + "SaveFormat/SaveFormatConfigController.js.nu")]
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
namespace nuPickers.PropertyEditors.LuceneLabels
{
using Umbraco.Core.PropertyEditors;

internal class LuceneLabelsPreValueEditor : PreValueEditor
{
[PreValueField("dataSource", "", EmbeddedResource.RootUrl + "LuceneDataSource/LuceneDataSourceConfig.html", HideLabel = true)]
public string DataSource { get; set; }

[PreValueField("customLabel", "", EmbeddedResource.RootUrl + "CustomLabel/CustomLabelConfig.html", HideLabel = true)]
public string CustomLabel { get; set; }

/// <summary>
/// currently no ui, but forces controller to be loaded
/// </summary>
[PreValueField("labels", "", EmbeddedResource.RootUrl + "Labels/LabelsConfig.html", HideLabel = true)]
public string Labels { get; set; }

[PreValueField("layoutDirection", "Layout Direction", EmbeddedResource.RootUrl + "LayoutDirection/LayoutDirectionConfig.html")]
public string LayoutDirection { get; set; }
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
namespace nuPickers.PropertyEditors.LuceneLabels
{
using ClientDependency.Core;

using nuPickers.PropertyEditors;

using Umbraco.Core.PropertyEditors;
using Umbraco.Web.PropertyEditors;

// EDITOR UI
[PropertyEditor(PropertyEditorConstants.LuceneLabelsAlias, "nuPickers: Lucene Labels", EmbeddedResource.RootUrl + "Labels/LabelsEditor.html", ValueType = "TEXT")]
[PropertyEditorAsset(ClientDependencyType.Css, EmbeddedResource.RootUrl + "LayoutDirection/LayoutDirection.css.nu")]
[PropertyEditorAsset(ClientDependencyType.Javascript, EmbeddedResource.RootUrl + "Labels/LabelsEditorController.js.nu")]

// RESOURCES (all are referenced as EditorResource consumes the others)
[PropertyEditorAsset(ClientDependencyType.Javascript, EmbeddedResource.RootUrl + "Editor/EditorResource.js.nu")]
[PropertyEditorAsset(ClientDependencyType.Javascript, EmbeddedResource.RootUrl + "DataSource/DataSourceResource.js.nu")]
[PropertyEditorAsset(ClientDependencyType.Javascript, EmbeddedResource.RootUrl + "RelationMapping/RelationMappingResource.js.nu")]
[PropertyEditorAsset(ClientDependencyType.Javascript, EmbeddedResource.RootUrl + "SaveFormat/SaveFormatResource.js.nu")]

// CONFIG
[PropertyEditorAsset(ClientDependencyType.Css, EmbeddedResource.RootUrl + "PropertyEditor/PropertyEditorConfig.css.nu")]
[PropertyEditorAsset(ClientDependencyType.Javascript, EmbeddedResource.RootUrl + "LuceneDataSource/LuceneDataSourceConfigController.js.nu")]
[PropertyEditorAsset(ClientDependencyType.Javascript, EmbeddedResource.RootUrl + "Labels/LabelsConfigController.js.nu")]
[PropertyEditorAsset(ClientDependencyType.Javascript, EmbeddedResource.RootUrl + "CustomLabel/CustomLabelConfigController.js.nu")]
public class LuceneLabelsPropertyEditor : BasePropertyEditor
{
protected override PreValueEditor CreatePreValueEditor()
{
return new LuceneLabelsPreValueEditor();
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,8 @@

// CONFIG
[PropertyEditorAsset(ClientDependencyType.Css, EmbeddedResource.RootUrl + "PropertyEditor/PropertyEditorConfig.css.nu")]
[PropertyEditorAsset(ClientDependencyType.Javascript, EmbeddedResource.RootUrl + "TypeaheadListPicker/TypeaheadListPickerConfigController.js.nu")]
[PropertyEditorAsset(ClientDependencyType.Javascript, EmbeddedResource.RootUrl + "TypeaheadListPicker/TypeaheadListPickerConfigState.js.nu")]
[PropertyEditorAsset(ClientDependencyType.Javascript, EmbeddedResource.RootUrl + "LuceneDataSource/LuceneDataSourceConfigController.js.nu")]
[PropertyEditorAsset(ClientDependencyType.Javascript, EmbeddedResource.RootUrl + "TypeaheadListPicker/TypeaheadListPickerConfigController.js.nu")]
[PropertyEditorAsset(ClientDependencyType.Javascript, EmbeddedResource.RootUrl + "CustomLabel/CustomLabelConfigController.js.nu")]
[PropertyEditorAsset(ClientDependencyType.Javascript, EmbeddedResource.RootUrl + "RelationMapping/RelationMappingConfigController.js.nu")]
[PropertyEditorAsset(ClientDependencyType.Javascript, EmbeddedResource.RootUrl + "SaveFormat/SaveFormatConfigController.js.nu")]
Expand Down
5 changes: 5 additions & 0 deletions source/nuPickers/PropertyEditors/PropertyEditorConstants.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,27 @@ public static class PropertyEditorConstants
{
public const string DotNetCheckBoxPickerAlias = "nuPickers.DotNetCheckBoxPicker";
public const string DotNetDropDownPickerAlias = "nuPickers.DotNetDropDownPicker";
public const string DotNetLabelsAlias = "nuPickers.DotNetLabels";
public const string DotNetPrefetchListPickerAlias = "nuPickers.DotNetPrefetchListPicker";
public const string DotNetRadioButtonPickerAlias = "nuPickers.DotNetRadioButtonPicker";
public const string DotNetTypeaheadListPickerAlias = "nuPickers.DotNetTypeaheadListPicker";

public const string EnumCheckBoxPickerAlias = "nuPickers.EnumCheckBoxPicker";
public const string EnumDropDownPickerAlias = "nuPickers.EnumDropDownPicker";
public const string EnumLabelsAlias = "nuPickers.EnumLabels";
public const string EnumPrefetchListPickerAlias = "nuPickers.EnumPrefetchListPicker";
public const string EnumRadioButtonPickerAlias = "nuPickers.EnumRadioButtonPicker";

public const string JsonCheckBoxPickerAlias = "nuPickers.JsonCheckBoxPicker";
public const string JsonDropDownPickerAlias = "nuPickers.JsonDropDownPicker";
public const string JsonLabelsAlias = "nuPickers.JsonLabels";
public const string JsonPrefetchListPickerAlias = "nuPickers.JsonPrefetchListPicker";
public const string JsonRadioButtonPickerAlias = "nuPickers.JsonRadioButtonPicker";
public const string JsonTypeaheadListPickerAlias = "nuPickers.JsonTypeaheadListPicker";

public const string LuceneCheckBoxPickerAlias = "nuPickers.LuceneCheckBoxPicker";
public const string LuceneDropDownPickerAlias = "nuPickers.LuceneDropDownPicker";
public const string LuceneLabelsAlias = "nuPickers.LuceneLabels";
public const string LucenePrefetchListPickerAlias = "nuPickers.LucenePrefetchListPicker";
public const string LuceneRadioButtonPickerAlias = "nuPickers.LuceneRadioButtonPicker";
public const string LuceneTypeaheadListPickerAlias = "nuPickers.LuceneTypeaheadListPicker";
Expand All @@ -40,6 +44,7 @@ public static class PropertyEditorConstants

public const string XmlCheckBoxPickerAlias = "nuPickers.XmlCheckBoxPicker";
public const string XmlDropDownPickerAlias = "nuPickers.XmlDropDownPicker";
public const string XmlLabelsAlias = "nuPickers.XmlLabels";
public const string XmlPrefetchListPickerAlias = "nuPickers.XmlPrefetchListPicker";
public const string XmlRadioButtonPickerAlias = "nuPickers.XmlRadioButtonPicker";
public const string XmlTypeaheadListPickerAlias = "nuPickers.XmlTypeaheadListPicker";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@

// CONFIG
[PropertyEditorAsset(ClientDependencyType.Css, EmbeddedResource.RootUrl + "PropertyEditor/PropertyEditorConfig.css.nu")]
[PropertyEditorAsset(ClientDependencyType.Javascript, EmbeddedResource.RootUrl + "RelationDataSource/RelationDataSourceConfigController.js.nu")]
[PropertyEditorAsset(ClientDependencyType.Javascript, EmbeddedResource.RootUrl + "SqlDataSource/SqlDataSourceConfigController.js.nu")]
[PropertyEditorAsset(ClientDependencyType.Javascript, EmbeddedResource.RootUrl + "Labels/LabelsConfigController.js.nu")]
[PropertyEditorAsset(ClientDependencyType.Javascript, EmbeddedResource.RootUrl + "CustomLabel/CustomLabelConfigController.js.nu")]
public class SqlLabelsPropertyEditor : BasePropertyEditor
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,8 @@

// CONFIG
[PropertyEditorAsset(ClientDependencyType.Css, EmbeddedResource.RootUrl + "PropertyEditor/PropertyEditorConfig.css.nu")]
[PropertyEditorAsset(ClientDependencyType.Javascript, EmbeddedResource.RootUrl + "TypeaheadListPicker/TypeaheadListPickerConfigController.js.nu")]
[PropertyEditorAsset(ClientDependencyType.Javascript, EmbeddedResource.RootUrl + "TypeaheadListPicker/TypeaheadListPickerConfigState.js.nu")]
[PropertyEditorAsset(ClientDependencyType.Javascript, EmbeddedResource.RootUrl + "SqlDataSource/SqlDataSourceConfigController.js.nu")]
[PropertyEditorAsset(ClientDependencyType.Javascript, EmbeddedResource.RootUrl + "TypeaheadListPicker/TypeaheadListPickerConfigController.js.nu")]
[PropertyEditorAsset(ClientDependencyType.Javascript, EmbeddedResource.RootUrl + "CustomLabel/CustomLabelConfigController.js.nu")]
[PropertyEditorAsset(ClientDependencyType.Javascript, EmbeddedResource.RootUrl + "RelationMapping/RelationMappingConfigController.js.nu")]
[PropertyEditorAsset(ClientDependencyType.Javascript, EmbeddedResource.RootUrl + "SaveFormat/SaveFormatConfigController.js.nu")]
Expand Down
Loading

0 comments on commit c57d125

Please sign in to comment.