Skip to content
This repository was archived by the owner on Dec 13, 2021. It is now read-only.

Commit ec376fd

Browse files
authored
Merge pull request #7 from umco/develop
Preparing v1.0.0 beta2 release
2 parents 0c5b3ab + 16be3d9 commit ec376fd

14 files changed

+426
-747
lines changed

README.md

Lines changed: 16 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Property List
22

33
[![Build status](https://img.shields.io/appveyor/ci/UMCO/umbraco-property-list.svg)](https://ci.appveyor.com/project/UMCO/umbraco-property-list)
4+
[![NuGet release](https://img.shields.io/nuget/v/Our.Umbraco.PropertyList.svg)](https://www.nuget.org/packages/Our.Umbraco.PropertyList)
45

56
Property List is a property editor for making repeatable lists of a datatype for Umbraco 7.6+
67

@@ -10,7 +11,16 @@ Property List is a property editor for making repeatable lists of a datatype for
1011

1112
> *Note:* Property List has been developed against **Umbraco v7.6.0** and will support that version and above.
1213
13-
Property List can be built manually from the source-code:
14+
Property List can be installed from either NuGet package repositories, or build manually from the source-code:
15+
16+
17+
#### NuGet package repository
18+
19+
To [install from NuGet](https://www.nuget.org/packages/Our.Umbraco.PropertyList), you can run the following command from within Visual Studio:
20+
21+
PM> Install-Package Our.Umbraco.PropertyList
22+
23+
We also have a [MyGet package repository](https://www.myget.org/gallery/umbraco-packages) - for bleeding-edge / development releases.
1424

1525
#### Manual build
1626

@@ -44,60 +54,11 @@ Anyone and everyone is welcome to contribute. Please take a moment to review the
4454

4555
What's left to do?
4656

47-
- [x] Pre Value Editor
48-
- [x] Prevalues
49-
- [x] DataType Picker
50-
- [x] Only save the ID
51-
- [x] Minimum items
52-
- [x] Maximum items
53-
- [x] Hide label
54-
- **Ideas**
55-
- [ ] Disable sorting?
56-
57-
- [ ] Value Editor
58-
- [x] ContentType preview
59-
- [x] HTML view
60-
- [x] Check if we can we reuse any Umbraco directives?
61-
- [x] Check if any UMCO projects are useful for reuse?
62-
- [x] CSS
63-
- [x] Angular / JS
64-
- [x] Prepare the value-editor
65-
- [x] Get the DataType by ID; then get...
66-
- [x] config/prevalues
67-
- [x] view-path
68-
- [x] property alias
69-
- [x] Initialize the list values
70-
- [x] Set the list values
71-
- [x] Set the IsDirty flag
72-
- [x] Render the DataType/property-editor
73-
- [x] Repeatable
74-
- [x] Addable
75-
- [x] Removeable
76-
- [x] Sortable
77-
- [x] Saving the values
78-
- [x] PropertyValueEditor
79-
- [x] ConvertDbToString
80-
- [x] ConvertDbToEditor
81-
- [x] ConvertEditorToDb
82-
- [x] Browser testing (Chrome, Firefox, IE/Edge)
83-
84-
- [x] PropertyValueConverter
85-
- [x] Get target DataType definition
86-
- [x] Create dummy PropertyType (in order to run the target property-editor's value-converter)
87-
- [x] Return as IEnumerable of that type
88-
- [x] Investigate ModelsBuilder support - think it's to provide the return type
89-
90-
- [x] Packaging
91-
- [x] MSBuild script
92-
- [x] Umbraco package
93-
- [x] NuGet package
94-
- [x] AppVeyor
95-
96-
- [ ] Courier data-resolver
97-
- [ ] Pre Value Editor
98-
- [ ] Add DataType dependency
99-
- [ ] Value Editor
100-
- [ ] Processing all list item DataTypes
57+
- [ ] Deploy ValueConnector
58+
- [ ] Pre Value Editor
59+
- [ ] Add DataType dependency
60+
- [ ] Value Editor
61+
- [ ] Processing all list item DataTypes
10162

10263

10364
---

appveyor.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ version: 1.0.0.{build}
66
# UMBRACO_PACKAGE_PRERELEASE_SUFFIX if a rtm release build this should be blank, otherwise if empty will default to alpha
77
# example UMBRACO_PACKAGE_PRERELEASE_SUFFIX=beta
88
init:
9-
- set UMBRACO_PACKAGE_PRERELEASE_SUFFIX=beta
9+
- set UMBRACO_PACKAGE_PRERELEASE_SUFFIX=beta2
1010

1111
cache:
1212
- src\packages -> **\packages.config # preserve "packages" directory in the root of build folder but will reset it if packages.config is modified

src/Our.Umbraco.PropertyList/Bootstrap.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
using Newtonsoft.Json;
2-
using Our.Umbraco.PropertyList.Converters;
2+
using Our.Umbraco.PropertyList.ValueConverters;
33
using Umbraco.Core;
44
using Umbraco.Core.Sync;
55
using Umbraco.Web.Cache;

src/Our.Umbraco.PropertyList/Our.Umbraco.PropertyList.csproj

Lines changed: 2 additions & 105 deletions
Original file line numberDiff line numberDiff line change
@@ -35,38 +35,10 @@
3535
<HintPath>..\packages\AutoMapper.3.3.1\lib\net40\AutoMapper.dll</HintPath>
3636
<Private>False</Private>
3737
</Reference>
38-
<Reference Include="businesslogic, Version=1.0.6331.7969, Culture=neutral, processorArchitecture=MSIL">
39-
<HintPath>..\packages\UmbracoCms.Core.7.6.0\lib\net45\businesslogic.dll</HintPath>
40-
<Private>False</Private>
41-
</Reference>
4238
<Reference Include="ClientDependency.Core">
4339
<HintPath>..\packages\ClientDependency.1.9.2\lib\net45\ClientDependency.Core.dll</HintPath>
4440
<Private>False</Private>
4541
</Reference>
46-
<Reference Include="cms, Version=1.0.6331.7970, Culture=neutral, processorArchitecture=MSIL">
47-
<HintPath>..\packages\UmbracoCms.Core.7.6.0\lib\net45\cms.dll</HintPath>
48-
<Private>False</Private>
49-
</Reference>
50-
<Reference Include="controls, Version=1.0.6331.7972, Culture=neutral, processorArchitecture=MSIL">
51-
<HintPath>..\packages\UmbracoCms.Core.7.6.0\lib\net45\controls.dll</HintPath>
52-
<Private>False</Private>
53-
</Reference>
54-
<Reference Include="Examine, Version=0.1.82.0, Culture=neutral, processorArchitecture=MSIL">
55-
<HintPath>..\packages\Examine.0.1.82\lib\net45\Examine.dll</HintPath>
56-
<Private>False</Private>
57-
</Reference>
58-
<Reference Include="HtmlAgilityPack, Version=1.4.9.5, Culture=neutral, PublicKeyToken=bd319b19eaf3b43a, processorArchitecture=MSIL">
59-
<HintPath>..\packages\HtmlAgilityPack.1.4.9.5\lib\Net45\HtmlAgilityPack.dll</HintPath>
60-
<Private>False</Private>
61-
</Reference>
62-
<Reference Include="ImageProcessor, Version=2.5.3.0, Culture=neutral, processorArchitecture=MSIL">
63-
<HintPath>..\packages\ImageProcessor.2.5.3\lib\net45\ImageProcessor.dll</HintPath>
64-
<Private>False</Private>
65-
</Reference>
66-
<Reference Include="ImageProcessor.Web, Version=4.8.3.0, Culture=neutral, processorArchitecture=MSIL">
67-
<HintPath>..\packages\ImageProcessor.Web.4.8.3\lib\net45\ImageProcessor.Web.dll</HintPath>
68-
<Private>False</Private>
69-
</Reference>
7042
<Reference Include="interfaces, Version=1.0.6331.7963, Culture=neutral, processorArchitecture=MSIL">
7143
<HintPath>..\packages\UmbracoCms.Core.7.6.0\lib\net45\interfaces.dll</HintPath>
7244
<Private>False</Private>
@@ -75,18 +47,6 @@
7547
<HintPath>..\packages\UmbracoCms.Core.7.6.0\lib\net45\log4net.dll</HintPath>
7648
<Private>False</Private>
7749
</Reference>
78-
<Reference Include="Log4Net.Async, Version=2.0.4.0, Culture=neutral, processorArchitecture=MSIL">
79-
<HintPath>..\packages\Log4Net.Async.2.0.4\lib\net40\Log4Net.Async.dll</HintPath>
80-
<Private>False</Private>
81-
</Reference>
82-
<Reference Include="Microsoft.ApplicationBlocks.Data, Version=1.0.1559.20655, Culture=neutral">
83-
<HintPath>..\packages\UmbracoCms.Core.7.6.0\lib\net45\Microsoft.ApplicationBlocks.Data.dll</HintPath>
84-
<Private>False</Private>
85-
</Reference>
86-
<Reference Include="Microsoft.AspNet.SignalR.Core, Version=2.2.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
87-
<HintPath>..\packages\Microsoft.AspNet.SignalR.Core.2.2.1\lib\net45\Microsoft.AspNet.SignalR.Core.dll</HintPath>
88-
<Private>False</Private>
89-
</Reference>
9050
<Reference Include="MiniProfiler, Version=2.1.0.0, Culture=neutral, PublicKeyToken=b44f9351044011a3, processorArchitecture=MSIL">
9151
<HintPath>..\packages\MiniProfiler.2.1.0\lib\net40\MiniProfiler.dll</HintPath>
9252
<Private>False</Private>
@@ -95,59 +55,22 @@
9555
<HintPath>..\packages\Newtonsoft.Json.10.0.2\lib\net45\Newtonsoft.Json.dll</HintPath>
9656
<Private>False</Private>
9757
</Reference>
98-
<Reference Include="Owin, Version=1.0.0.0, Culture=neutral, PublicKeyToken=f0ebd12fd5e55cc5, processorArchitecture=MSIL">
99-
<HintPath>..\packages\Owin.1.0\lib\net40\Owin.dll</HintPath>
100-
<Private>False</Private>
101-
</Reference>
102-
<Reference Include="SQLCE4Umbraco, Version=1.0.6331.7971, Culture=neutral, processorArchitecture=MSIL">
103-
<HintPath>..\packages\UmbracoCms.Core.7.6.0\lib\net45\SQLCE4Umbraco.dll</HintPath>
104-
<Private>False</Private>
105-
</Reference>
10658
<Reference Include="System" />
10759
<Reference Include="System.ComponentModel.DataAnnotations" />
10860
<Reference Include="System.Core" />
109-
<Reference Include="System.Data.SqlServerCe, Version=4.0.0.1, Culture=neutral, PublicKeyToken=89845dcd8080cc91, processorArchitecture=MSIL">
110-
<HintPath>..\packages\UmbracoCms.Core.7.6.0\lib\net45\System.Data.SqlServerCe.dll</HintPath>
111-
<Private>False</Private>
112-
</Reference>
113-
<Reference Include="System.Data.SqlServerCe.Entity, Version=4.0.0.1, Culture=neutral, PublicKeyToken=89845dcd8080cc91, processorArchitecture=MSIL">
114-
<HintPath>..\packages\UmbracoCms.Core.7.6.0\lib\net45\System.Data.SqlServerCe.Entity.dll</HintPath>
115-
<Private>False</Private>
116-
</Reference>
117-
<Reference Include="System.Net.Http.Formatting, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
118-
<HintPath>..\packages\Microsoft.AspNet.WebApi.Client.5.2.3\lib\net45\System.Net.Http.Formatting.dll</HintPath>
119-
<Private>False</Private>
120-
</Reference>
121-
<Reference Include="System.Threading.Tasks.Dataflow, Version=4.6.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
122-
<HintPath>..\packages\System.Threading.Tasks.Dataflow.4.7.0\lib\portable-net45+win8+wpa81\System.Threading.Tasks.Dataflow.dll</HintPath>
123-
<Private>False</Private>
124-
</Reference>
12561
<Reference Include="System.Web" />
126-
<Reference Include="System.Web.Helpers, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
127-
<HintPath>..\packages\Microsoft.AspNet.WebPages.3.2.3\lib\net45\System.Web.Helpers.dll</HintPath>
128-
<Private>False</Private>
129-
</Reference>
13062
<Reference Include="System.Web.Http, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
13163
<HintPath>..\packages\Microsoft.AspNet.WebApi.Core.5.2.3\lib\net45\System.Web.Http.dll</HintPath>
13264
<Private>False</Private>
13365
</Reference>
134-
<Reference Include="System.Web.Http.WebHost, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
135-
<HintPath>..\packages\Microsoft.AspNet.WebApi.WebHost.5.2.3\lib\net45\System.Web.Http.WebHost.dll</HintPath>
136-
<Private>False</Private>
137-
</Reference>
13866
<Reference Include="System.Web.Mvc, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
13967
<HintPath>..\packages\Microsoft.AspNet.Mvc.5.2.3\lib\net45\System.Web.Mvc.dll</HintPath>
14068
<Private>False</Private>
14169
</Reference>
14270
<Reference Include="System.Xml.Linq" />
14371
<Reference Include="Microsoft.CSharp" />
144-
<Reference Include="System.Data" />
14572
<Reference Include="System.Net.Http" />
14673
<Reference Include="System.Xml" />
147-
<Reference Include="TidyNet, Version=1.0.0.0, Culture=neutral">
148-
<HintPath>..\packages\UmbracoCms.Core.7.6.0\lib\net45\TidyNet.dll</HintPath>
149-
<Private>False</Private>
150-
</Reference>
15174
<Reference Include="umbraco, Version=1.0.6331.7975, Culture=neutral, processorArchitecture=MSIL">
15275
<HintPath>..\packages\UmbracoCms.Core.7.6.0\lib\net45\umbraco.dll</HintPath>
15376
<Private>False</Private>
@@ -156,34 +79,10 @@
15679
<HintPath>..\packages\UmbracoCms.Core.7.6.0\lib\net45\Umbraco.Core.dll</HintPath>
15780
<Private>False</Private>
15881
</Reference>
159-
<Reference Include="umbraco.DataLayer, Version=1.0.6331.7969, Culture=neutral, processorArchitecture=MSIL">
160-
<HintPath>..\packages\UmbracoCms.Core.7.6.0\lib\net45\umbraco.DataLayer.dll</HintPath>
161-
<Private>False</Private>
162-
</Reference>
163-
<Reference Include="umbraco.editorControls, Version=1.0.6331.7978, Culture=neutral, processorArchitecture=MSIL">
164-
<HintPath>..\packages\UmbracoCms.Core.7.6.0\lib\net45\umbraco.editorControls.dll</HintPath>
165-
<Private>False</Private>
166-
</Reference>
167-
<Reference Include="umbraco.MacroEngines, Version=1.0.6331.7979, Culture=neutral, processorArchitecture=MSIL">
168-
<HintPath>..\packages\UmbracoCms.Core.7.6.0\lib\net45\umbraco.MacroEngines.dll</HintPath>
169-
<Private>False</Private>
170-
</Reference>
171-
<Reference Include="umbraco.providers, Version=1.0.6331.7973, Culture=neutral, processorArchitecture=MSIL">
172-
<HintPath>..\packages\UmbracoCms.Core.7.6.0\lib\net45\umbraco.providers.dll</HintPath>
173-
<Private>False</Private>
174-
</Reference>
175-
<Reference Include="Umbraco.Web.UI, Version=1.0.6331.7980, Culture=neutral, processorArchitecture=MSIL">
176-
<HintPath>..\packages\UmbracoCms.Core.7.6.0\lib\net45\Umbraco.Web.UI.dll</HintPath>
177-
<Private>False</Private>
178-
</Reference>
179-
<Reference Include="UmbracoExamine, Version=0.7.0.7971, Culture=neutral, processorArchitecture=MSIL">
180-
<HintPath>..\packages\UmbracoCms.Core.7.6.0\lib\net45\UmbracoExamine.dll</HintPath>
181-
<Private>False</Private>
182-
</Reference>
18382
</ItemGroup>
18483
<ItemGroup>
18584
<Compile Include="Bootstrap.cs" />
186-
<Compile Include="Converters\PropertyListValueConverter.cs" />
85+
<Compile Include="ValueConverters\PropertyListValueConverter.cs" />
18786
<Compile Include="Models\PropertyListValue.cs" />
18887
<Compile Include="Properties\AssemblyInfo.cs" />
18988
<Compile Include="Properties\VersionInfo.cs" />
@@ -198,9 +97,7 @@
19897
<None Include="packages.config" />
19998
</ItemGroup>
20099
<ItemGroup>
201-
<Content Include="Web\UI\App_Plugins\PropertyList\css\propertylist.css" />
202-
<Content Include="Web\UI\App_Plugins\PropertyList\js\propertylist.controllers.js" />
203-
<Content Include="Web\UI\App_Plugins\PropertyList\js\propertylist.resources.js" />
100+
<Content Include="Web\UI\App_Plugins\PropertyList\js\propertylist.js" />
204101
<Content Include="Web\UI\App_Plugins\PropertyList\views\propertylist.datatypepicker.html" />
205102
<Content Include="Web\UI\App_Plugins\PropertyList\views\propertylist.html" />
206103
</ItemGroup>
Lines changed: 39 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,47 @@
1-
using Umbraco.Core.PropertyEditors;
1+
using Umbraco.Core.IO;
2+
using Umbraco.Core.PropertyEditors;
23

34
namespace Our.Umbraco.PropertyList.PropertyEditors
45
{
56
internal class PropertyListPreValueEditor : PreValueEditor
67
{
7-
[PreValueField("dataType", "Data Type", "~/App_Plugins/PropertyList/views/propertylist.datatypepicker.html", Description = "Select a data type.")]
8-
public string DataType { get; set; }
8+
public PropertyListPreValueEditor()
9+
: base()
10+
{
11+
// In terms of inheritance, we'd like the "dataType" field to always be at the top.
12+
Fields.Insert(0, new PreValueField
13+
{
14+
Key = "dataType",
15+
Name = "Data Type",
16+
View = IOHelper.ResolveUrl("~/App_Plugins/PropertyList/views/propertylist.datatypepicker.html"),
17+
Description = "Select a data type."
18+
});
919

10-
[PreValueField("minItems", "Min Items", "number", Description = "Set the minimum number of items allowed.")]
11-
public string MinItems { get; set; }
12-
13-
[PreValueField("maxItems", "Max Items", "number", Description = "Set the maximum number of items allowed.")]
14-
public string MaxItems { get; set; }
15-
16-
[PreValueField("hideLabel", "Hide Label", "boolean", Description = "Set whether to hide the editor label and have the list take up the full width of the editor window.")]
17-
public string HideLabel { get; set; }
20+
// The rest of the fields can be added at the bottom.
21+
Fields.AddRange(new[]
22+
{
23+
new PreValueField
24+
{
25+
Key = "minItems",
26+
Name = "Min Items",
27+
View = "number",
28+
Description = "Set the minimum number of items allowed."
29+
},
30+
new PreValueField
31+
{
32+
Key = "maxItems",
33+
Name = "Max Items",
34+
View = "number",
35+
Description = "Set the maximum number of items allowed."
36+
},
37+
new PreValueField
38+
{
39+
Key = "hideLabel",
40+
Name = "Hide Label",
41+
View = "boolean",
42+
Description = "Set whether to hide the editor label and have the list take up the full width of the editor window."
43+
}
44+
});
45+
}
1846
}
1947
}

src/Our.Umbraco.PropertyList/PropertyEditors/PropertyListPropertyEditor.cs

Lines changed: 5 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,17 @@
1-
using System;
2-
using System.Collections.Generic;
3-
using System.ComponentModel.DataAnnotations;
4-
using System.Linq;
5-
using System.Xml.Linq;
1+
using System.Collections.Generic;
62
using ClientDependency.Core;
7-
using Newtonsoft.Json;
8-
using Newtonsoft.Json.Linq;
9-
using Our.Umbraco.PropertyList.Models;
10-
using Umbraco.Core;
11-
using Umbraco.Core.Logging;
12-
using Umbraco.Core.Models;
13-
using Umbraco.Core.Models.Editors;
143
using Umbraco.Core.PropertyEditors;
15-
using Umbraco.Core.Services;
164
using Umbraco.Web.PropertyEditors;
175

186
namespace Our.Umbraco.PropertyList.PropertyEditors
197
{
20-
[PropertyEditor(
21-
PropertyEditorAlias,
22-
"Property List",
23-
"JSON",
24-
"~/App_Plugins/PropertyList/Views/propertylist.html",
25-
Group = "Lists",
26-
Icon = "icon-bulleted-list",
27-
IsParameterEditor = false)]
28-
[PropertyEditorAsset(ClientDependencyType.Css, "~/App_Plugins/PropertyList/css/propertylist.css")]
29-
[PropertyEditorAsset(ClientDependencyType.Javascript, "~/App_Plugins/PropertyList/js/propertylist.controllers.js")]
30-
[PropertyEditorAsset(ClientDependencyType.Javascript, "~/App_Plugins/PropertyList/js/propertylist.resources.js")]
8+
[PropertyEditor(PropertyEditorAlias, PropertyEditorName, "JSON", PropertyEditorViewPath, Group = "Lists", Icon = "icon-bulleted-list", IsParameterEditor = false)]
9+
[PropertyEditorAsset(ClientDependencyType.Javascript, "~/App_Plugins/PropertyList/js/propertylist.js")]
3110
public class PropertyListPropertyEditor : PropertyEditor
3211
{
3312
public const string PropertyEditorAlias = "Our.Umbraco.PropertyList";
13+
public const string PropertyEditorName = "Property List";
14+
public const string PropertyEditorViewPath = "~/App_Plugins/PropertyList/Views/propertylist.html";
3415

3516
internal const string DefaultTextstringPropertyEditorGuid = "0cc0eba1-9960-42c9-bf9b-60e150b429ae"; // Guid for default Textstring
3617

0 commit comments

Comments
 (0)