Skip to content

Commit c2ea5d7

Browse files
committed
Initial property editor draft
1 parent f5018c9 commit c2ea5d7

15 files changed

+347
-1
lines changed
Lines changed: 1 addition & 0 deletions
Loading
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
function ProductPickerController($scope) {
2+
3+
}
4+
5+
angular.module("umbraco")
6+
.controller("Umbraco.Cms.Integrations.Commerce.Shopify.ProductPickerController", ProductPickerController);
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"javascript": [
3+
"~/App_Plugins/UmbracoCms.Integrations/Commerce/Shopify/js/productPicker.controller.js"
4+
]
5+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<p>Hello, world!</p>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<p>
2+
SETTINGS
3+
</p>
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
using Newtonsoft.Json;
2+
3+
namespace Umbraco.Cms.Integrations.Commerce.Shopify.Models
4+
{
5+
public class ProductPickerSettings
6+
{
7+
[JsonProperty("name")]
8+
public string Name { get; set; }
9+
}
10+
}
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
using System.Reflection;
2+
using System.Runtime.CompilerServices;
3+
using System.Runtime.InteropServices;
4+
5+
// General Information about an assembly is controlled through the following
6+
// set of attributes. Change these attribute values to modify the information
7+
// associated with an assembly.
8+
[assembly: AssemblyTitle("Umbraco.Cms.Integrations.Commerce.Shopify")]
9+
[assembly: AssemblyDescription("")]
10+
[assembly: AssemblyConfiguration("")]
11+
[assembly: AssemblyCompany("")]
12+
[assembly: AssemblyProduct("Umbraco.Cms.Integrations.Commerce.Shopify")]
13+
[assembly: AssemblyCopyright("Copyright © 2022")]
14+
[assembly: AssemblyTrademark("")]
15+
[assembly: AssemblyCulture("")]
16+
17+
// Setting ComVisible to false makes the types in this assembly not visible
18+
// to COM components. If you need to access a type in this assembly from
19+
// COM, set the ComVisible attribute to true on that type.
20+
[assembly: ComVisible(false)]
21+
22+
// The following GUID is for the ID of the typelib if this project is exposed to COM
23+
[assembly: Guid("d1fb84db-f1e4-42b6-8118-8c5b8424775b")]
24+
25+
// Version information for an assembly consists of the following four values:
26+
//
27+
// Major Version
28+
// Minor Version
29+
// Build Number
30+
// Revision
31+
//
32+
// You can specify all the values or you can default the Build and Revision Numbers
33+
// by using the '*' as shown below:
34+
// [assembly: AssemblyVersion("1.0.*")]
35+
[assembly: AssemblyVersion("1.0.0.0")]
36+
[assembly: AssemblyFileVersion("1.0.0.0")]
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
using Umbraco.Cms.Integrations.Commerce.Shopify.Models;
2+
using Umbraco.Core.PropertyEditors;
3+
4+
namespace Umbraco.Cms.Integrations.Commerce.Shopify
5+
{
6+
public class ShopifyProductPickerConfiguration
7+
{
8+
[ConfigurationField(
9+
key: "productPickerSettings",
10+
name: "Product Picker Settings",
11+
view: "~/App_Plugins/UmbracoCms.Integrations/Commerce/Shopify/views/productPickerSettings.html")]
12+
public ProductPickerSettings ProductPickerSettings { get; set; }
13+
}
14+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
using Umbraco.Core.PropertyEditors;
2+
3+
namespace Umbraco.Cms.Integrations.Commerce.Shopify
4+
{
5+
public class ShopifyProductPickerConfigurationEditor: ConfigurationEditor<ShopifyProductPickerConfiguration>
6+
{
7+
}
8+
}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
using Umbraco.Core.Logging;
2+
using Umbraco.Core.PropertyEditors;
3+
4+
namespace Umbraco.Cms.Integrations.Commerce.Shopify
5+
{
6+
[DataEditor(
7+
alias: "Umbraco.Cms.Integrations.Commerce.Shopify.ProductPicker",
8+
name: "Shopify Product Picker",
9+
view: "~/App_Plugins/UmbracoCms.Integrations/Commerce/Shopify/views/productPicker.html",
10+
Group = "Pickers",
11+
Icon = "icon-shopify")]
12+
public class ShopifyProductPickerPropertyEditor: DataEditor
13+
{
14+
public ShopifyProductPickerPropertyEditor(ILogger logger) : base(logger)
15+
{
16+
}
17+
18+
protected override IConfigurationEditor CreateConfigurationEditor()
19+
{
20+
return new ShopifyProductPickerConfigurationEditor();
21+
}
22+
}
23+
}

0 commit comments

Comments
 (0)