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

Commit 0c5b3ab

Browse files
authored
Merge pull request #2 from umco/develop
Preparing v1.0.0 beta release
2 parents 2439c12 + ab3eff4 commit 0c5b3ab

22 files changed

+541
-338
lines changed

LICENSE.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
The MIT License (MIT)
22

3-
Copyright © 2017 Lee Kelleher, Umbrella Inc and other contributors
3+
Copyright © 2017 UMCO, Our Umbraco and other contributors
44

5-
Permission is hereby granted, free of charge, to any person obtaining a copy
6-
of this software and associated documentation files (the "Software"), to deal
7-
in the Software without restriction, including without limitation the rights
8-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9-
copies of the Software, and to permit persons to whom the Software is
10-
furnished to do so, subject to the following conditions:
5+
Permission is hereby granted, free of charge, to any person obtaining a copy of
6+
this software and associated documentation files (the "Software"), to deal in
7+
the Software without restriction, including without limitation the rights to
8+
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
9+
of the Software, and to permit persons to whom the Software is furnished to do
10+
so, subject to the following conditions:
1111

1212
The above copyright notice and this permission notice shall be included in all
1313
copies or substantial portions of the Software.

README.md

Lines changed: 79 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,48 @@
11
# Property List
22

3-
A repeatable list (of selected datatype) for Umbraco.
3+
[![Build status](https://img.shields.io/appveyor/ci/UMCO/umbraco-property-list.svg)](https://ci.appveyor.com/project/UMCO/umbraco-property-list)
44

5-
## TODO
5+
Property List is a property editor for making repeatable lists of a datatype for Umbraco 7.6+
6+
7+
## Getting Started
8+
9+
### Installation
10+
11+
> *Note:* Property List has been developed against **Umbraco v7.6.0** and will support that version and above.
12+
13+
Property List can be built manually from the source-code:
14+
15+
#### Manual build
16+
17+
If you prefer, you can compile Property List yourself, you'll need:
18+
19+
* Visual Studio 2017 (or above)
20+
21+
To clone it locally click the "Clone in Windows" button above or run the following git commands.
22+
23+
git clone https://github.com/umco/umbraco-property-list.git umbraco-property-list
24+
cd umbraco-property-list
25+
.\build.cmd
26+
27+
---
28+
29+
## Known Issues
30+
31+
* _[TBC]_
32+
33+
---
34+
35+
## Contributing to this project
36+
37+
Anyone and everyone is welcome to contribute. Please take a moment to review the [guidelines for contributing](CONTRIBUTING.md).
38+
39+
* [Bug reports](CONTRIBUTING.md#bugs)
40+
* [Feature requests](CONTRIBUTING.md#features)
41+
* [Pull requests](CONTRIBUTING.md#pull-requests)
42+
43+
### TODO
44+
45+
What's left to do?
646

747
- [x] Pre Value Editor
848
- [x] Prevalues
@@ -20,43 +60,61 @@ A repeatable list (of selected datatype) for Umbraco.
2060
- [x] Check if we can we reuse any Umbraco directives?
2161
- [x] Check if any UMCO projects are useful for reuse?
2262
- [x] CSS
23-
- [ ] Angular / JS
63+
- [x] Angular / JS
2464
- [x] Prepare the value-editor
2565
- [x] Get the DataType by ID; then get...
2666
- [x] config/prevalues
2767
- [x] view-path
2868
- [x] property alias
2969
- [x] Initialize the list values
3070
- [x] Set the list values
31-
- [ ] Set the IsDirty flag
71+
- [x] Set the IsDirty flag
3272
- [x] Render the DataType/property-editor
3373
- [x] Repeatable
3474
- [x] Addable
3575
- [x] Removeable
3676
- [x] Sortable
3777
- [x] Saving the values
3878
- [x] PropertyValueEditor
39-
- [ ] ConvertDbToString
40-
- [ ] ConvertDbToEditor
41-
- [ ] ConvertEditorToDb
42-
- [ ] Browser testing (Chrome, Firefox, IE/Edge)
79+
- [x] ConvertDbToString
80+
- [x] ConvertDbToEditor
81+
- [x] ConvertEditorToDb
82+
- [x] Browser testing (Chrome, Firefox, IE/Edge)
4383

44-
- [ ] PropertyValueConverter
45-
- [ ] Get target DataType definition
46-
- [ ] Create dummy PropertyType (in order to run the target property-editor's value-converter)
47-
- [ ] Return as IEnumerable of that type
48-
- [ ] Investigate ModelsBuilder support - think it's to provide the return type
49-
50-
- [ ] Packaging
51-
- [ ] MSBuild script
52-
- [ ] Umbraco package
53-
- [ ] NuGet package
54-
- [ ] AppVeyor
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
5595

5696
- [ ] Courier data-resolver
5797
- [ ] Pre Value Editor
58-
- [ ] Convert the DataType ID to the GUID
98+
- [ ] Add DataType dependency
5999
- [ ] Value Editor
60-
- [ ] Convert the DataType ID to the GUID
61100
- [ ] Processing all list item DataTypes
62101

102+
103+
---
104+
105+
## Contact
106+
107+
Have a question?
108+
109+
* [Raise an issue](https://github.com/umco/umbraco-property-list/issues) on GitHub
110+
111+
## Dev Team
112+
113+
* [Lee Kelleher](https://github.com/leekelleher)
114+
* [Matt Brailsford](https://github.com/mattbrailsford)
115+
116+
## License
117+
118+
Copyright © 2017 UMCO, Our Umbraco and [other contributors](https://github.com/umco/umbraco-property-list/graphs/contributors)
119+
120+
Licensed under the [MIT License](LICENSE.md)

appveyor.yml

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,21 @@
1+
image: Visual Studio 2017
2+
13
# version format
2-
version: 0.1.0.{build}
4+
version: 1.0.0.{build}
35

46
# UMBRACO_PACKAGE_PRERELEASE_SUFFIX if a rtm release build this should be blank, otherwise if empty will default to alpha
57
# example UMBRACO_PACKAGE_PRERELEASE_SUFFIX=beta
68
init:
7-
- set UMBRACO_PACKAGE_PRERELEASE_SUFFIX=
9+
- set UMBRACO_PACKAGE_PRERELEASE_SUFFIX=beta
810

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

14+
before_build:
15+
- nuget restore src
16+
1217
build_script:
13-
- build\build-appveyor.cmd
18+
- build\build-appveyor.cmd
1419

1520
artifacts:
1621
- path: artifacts\*.nupkg
@@ -19,8 +24,8 @@ artifacts:
1924
deploy:
2025
# MyGet Deployment for builds & releases
2126
- provider: NuGet
22-
server: https://www.myget.org/F/umbraco-packages/
23-
symbol_server: https://nuget.symbolsource.org/MyGet/umbraco-packages
27+
server: https://www.myget.org/F/umbraco-packages/api/v2/package
28+
symbol_server: https://www.myget.org/F/umbraco-packages/symbols/api/v2/package
2429
api_key:
2530
secure: 36/Ax5O+e6wENlhoTwgvoEBZV3FG4XjF429SNTej2qsGTAL+cdfA1kT/tm1St8vx
2631
artifact: /.*\.nupkg/
@@ -42,7 +47,7 @@ deploy:
4247
- provider: NuGet
4348
server:
4449
api_key:
45-
secure: eSLiOXbGVrxSG+X7PV6qTTUZ5VzS9EFj5+EufaWPfd+QXkF6gc8rZ4mGoHIVp/fL
50+
secure: 0+oAleUTnr9UuJrhLW5rphRR+QGz00XX1Ui3k5kwyr2kUdEamiQ3F+gW0q8MJbDT
4651
artifact: /.*\.nupkg/
4752
on:
4853
branch: master

build/build-appveyor.cmd

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,6 @@ ECHO APPVEYOR_REPO_TAG: %APPVEYOR_REPO_TAG%
33
ECHO APPVEYOR_BUILD_NUMBER : %APPVEYOR_BUILD_NUMBER%
44
ECHO APPVEYOR_BUILD_VERSION : %APPVEYOR_BUILD_VERSION%
55

6-
CALL tools\NuGet.exe restore ..\src\Our.Umbraco.PropertyList.sln
7-
CALL "%WINDIR%\Microsoft.NET\Framework\v4.0.30319\msbuild.exe" build\package.proj
6+
CALL build\tools\NuGet.exe restore src\Our.Umbraco.PropertyList.sln
7+
CALL "%programfiles(x86)%\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\amd64\MsBuild.exe" build\package.proj
8+
REM CALL "%programfiles(x86)%\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\amd64\MsBuild.exe" build\package.proj

build/package.proj

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@
1818
<PropertyGroup>
1919
<ProjectName>Our.Umbraco.PropertyList</ProjectName>
2020
<PackageName>Property List</PackageName>
21-
<MinUmbracoVersion>7.5.11</MinUmbracoVersion>
22-
<Readme>Property List is a property editor for making repeatable lists of a datatype for Umbraco 7.5+</Readme>
21+
<MinUmbracoVersion>7.6.0</MinUmbracoVersion>
22+
<Readme>Property List is a property editor for making repeatable lists of a datatype for Umbraco 7.6+</Readme>
2323
<AuthorName>Lee Kelleher, Matt Brailsford</AuthorName>
2424
<AuthorUrl>https://github.com/umco/umbraco-property-list/graphs/contributors</AuthorUrl>
2525
<PackageLicenseName>MIT license</PackageLicenseName>
@@ -33,7 +33,7 @@
3333
<NuGetPackageName>Property List for Umbraco</NuGetPackageName>
3434
<Copyright>Copyright &#169; 2017 UMCO, Our Umbraco and other contributors</Copyright>
3535
<Owners>Lee Kelleher, Matt Brailsford</Owners>
36-
<IconUrl></IconUrl>
36+
<IconUrl>https://raw.githubusercontent.com/umco/umbraco-property-list/master/docs/img/logo.png</IconUrl>
3737
<Tags>umbraco list editor</Tags>
3838
<Language>en-GB</Language>
3939
<RequireLicenseAcceptance>false</RequireLicenseAcceptance>
@@ -193,7 +193,7 @@
193193
OutputDirectory="$(ArtifactsDir)"
194194
Files="@(PackageFiles)" />
195195

196-
<MSBuild.NuGet.Tasks.Pack NuGetExePath="$(RootDir)\src\.nuget\NuGet.exe"
196+
<MSBuild.NuGet.Tasks.Pack NuGetExePath="$(MSBuildProjectDirectory)\tools\NuGet.exe"
197197
ManifestFile="$(BuildNuGetDir)\package.nuspec"
198198
BasePath="$(BuildNuGetDir)"
199199
Version="$(ProductVersion)"

docs/img/logo.png

5.69 KB
Loading

docs/img/logo.psd

173 KB
Binary file not shown.

src/Our.Umbraco.PropertyList.sln

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
Microsoft Visual Studio Solution File, Format Version 12.00
3-
# Visual Studio 14
4-
VisualStudioVersion = 14.0.25420.1
3+
# Visual Studio 15
4+
VisualStudioVersion = 15.0.27004.2009
55
MinimumVisualStudioVersion = 10.0.40219.1
66
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Our.Umbraco.PropertyList", "Our.Umbraco.PropertyList\Our.Umbraco.PropertyList.csproj", "{3A156991-6196-48CC-80C8-42C49B1AC06F}"
77
EndProject
@@ -40,4 +40,7 @@ Global
4040
GlobalSection(NestedProjects) = preSolution
4141
{02D2DC50-BF81-4ACB-8EE4-1D626733834F} = {75F0130A-1048-4D1A-B922-FB6916004BC4}
4242
EndGlobalSection
43+
GlobalSection(ExtensibilityGlobals) = postSolution
44+
SolutionGuid = {DDD2E97D-CC58-4450-B20B-0EBB22B4D910}
45+
EndGlobalSection
4346
EndGlobal
Lines changed: 21 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,33 @@
1-
using Umbraco.Core;
2-
using Umbraco.Core.Events;
3-
using Umbraco.Core.Models;
4-
using Umbraco.Core.Services;
1+
using Newtonsoft.Json;
2+
using Our.Umbraco.PropertyList.Converters;
3+
using Umbraco.Core;
4+
using Umbraco.Core.Sync;
5+
using Umbraco.Web.Cache;
56

67
namespace Our.Umbraco.PropertyList
78
{
89
public class Bootstrap : ApplicationEventHandler
910
{
10-
private CacheHelper _applicationCache;
11-
1211
protected override void ApplicationStarted(UmbracoApplicationBase umbracoApplication, ApplicationContext applicationContext)
1312
{
14-
_applicationCache = applicationContext.ApplicationCache;
15-
16-
DataTypeService.Saved += DataTypeService_Saved;
17-
}
13+
DataTypeCacheRefresher.CacheUpdated += (sender, e) =>
14+
{
15+
if (e.MessageType != MessageType.RefreshByJson)
16+
return;
1817

19-
private void DataTypeService_Saved(IDataTypeService sender, SaveEventArgs<IDataTypeDefinition> e)
20-
{
21-
var cacheKeyPrefix = "Our.Umbraco.PropertyList.PropertyListValueConverter.GetInnerPublishedPropertyType_";
18+
// NOTE: The properties for the JSON payload are available here: (Currently there isn't a public API to deserialize the payload)
19+
// https://github.com/umbraco/Umbraco-CMS/blob/release-7.6.0/src/Umbraco.Web/Cache/DataTypeCacheRefresher.cs#L66-L70
20+
// TODO: Once `DataTypeCacheRefresher.DeserializeFromJsonPayload` is public, we can deserialize correctly.
21+
// https://github.com/umbraco/Umbraco-CMS/blob/release-7.6.0/src/Umbraco.Web/Cache/DataTypeCacheRefresher.cs#L27
22+
var payload = JsonConvert.DeserializeAnonymousType((string)e.MessageObject, new[] { new { Id = default(int) } });
23+
if (payload == null)
24+
return;
2225

23-
foreach (var dataType in e.SavedEntities)
24-
{
25-
_applicationCache.RuntimeCache.ClearCacheByKeySearch(string.Concat(cacheKeyPrefix, dataType.Id));
26-
}
26+
foreach (var item in payload)
27+
{
28+
PropertyListValueConverter.ClearDataTypeCache(item.Id);
29+
}
30+
};
2731
}
2832
}
2933
}

0 commit comments

Comments
 (0)