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

Commit

Permalink
Merge pull request #7 from umco/develop
Browse files Browse the repository at this point in the history
Preparing v1.0.0 beta2 release
  • Loading branch information
leekelleher authored Jun 14, 2018
2 parents 0c5b3ab + 16be3d9 commit ec376fd
Show file tree
Hide file tree
Showing 14 changed files with 426 additions and 747 deletions.
71 changes: 16 additions & 55 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Property List

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

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

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

> *Note:* Property List has been developed against **Umbraco v7.6.0** and will support that version and above.
Property List can be built manually from the source-code:
Property List can be installed from either NuGet package repositories, or build manually from the source-code:


#### NuGet package repository

To [install from NuGet](https://www.nuget.org/packages/Our.Umbraco.PropertyList), you can run the following command from within Visual Studio:

PM> Install-Package Our.Umbraco.PropertyList

We also have a [MyGet package repository](https://www.myget.org/gallery/umbraco-packages) - for bleeding-edge / development releases.

#### Manual build

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

What's left to do?

- [x] Pre Value Editor
- [x] Prevalues
- [x] DataType Picker
- [x] Only save the ID
- [x] Minimum items
- [x] Maximum items
- [x] Hide label
- **Ideas**
- [ ] Disable sorting?

- [ ] Value Editor
- [x] ContentType preview
- [x] HTML view
- [x] Check if we can we reuse any Umbraco directives?
- [x] Check if any UMCO projects are useful for reuse?
- [x] CSS
- [x] Angular / JS
- [x] Prepare the value-editor
- [x] Get the DataType by ID; then get...
- [x] config/prevalues
- [x] view-path
- [x] property alias
- [x] Initialize the list values
- [x] Set the list values
- [x] Set the IsDirty flag
- [x] Render the DataType/property-editor
- [x] Repeatable
- [x] Addable
- [x] Removeable
- [x] Sortable
- [x] Saving the values
- [x] PropertyValueEditor
- [x] ConvertDbToString
- [x] ConvertDbToEditor
- [x] ConvertEditorToDb
- [x] Browser testing (Chrome, Firefox, IE/Edge)

- [x] PropertyValueConverter
- [x] Get target DataType definition
- [x] Create dummy PropertyType (in order to run the target property-editor's value-converter)
- [x] Return as IEnumerable of that type
- [x] Investigate ModelsBuilder support - think it's to provide the return type

- [x] Packaging
- [x] MSBuild script
- [x] Umbraco package
- [x] NuGet package
- [x] AppVeyor

- [ ] Courier data-resolver
- [ ] Pre Value Editor
- [ ] Add DataType dependency
- [ ] Value Editor
- [ ] Processing all list item DataTypes
- [ ] Deploy ValueConnector
- [ ] Pre Value Editor
- [ ] Add DataType dependency
- [ ] Value Editor
- [ ] Processing all list item DataTypes


---
Expand Down
2 changes: 1 addition & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ version: 1.0.0.{build}
# UMBRACO_PACKAGE_PRERELEASE_SUFFIX if a rtm release build this should be blank, otherwise if empty will default to alpha
# example UMBRACO_PACKAGE_PRERELEASE_SUFFIX=beta
init:
- set UMBRACO_PACKAGE_PRERELEASE_SUFFIX=beta
- set UMBRACO_PACKAGE_PRERELEASE_SUFFIX=beta2

cache:
- src\packages -> **\packages.config # preserve "packages" directory in the root of build folder but will reset it if packages.config is modified
Expand Down
2 changes: 1 addition & 1 deletion src/Our.Umbraco.PropertyList/Bootstrap.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
using Newtonsoft.Json;
using Our.Umbraco.PropertyList.Converters;
using Our.Umbraco.PropertyList.ValueConverters;
using Umbraco.Core;
using Umbraco.Core.Sync;
using Umbraco.Web.Cache;
Expand Down
107 changes: 2 additions & 105 deletions src/Our.Umbraco.PropertyList/Our.Umbraco.PropertyList.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -35,38 +35,10 @@
<HintPath>..\packages\AutoMapper.3.3.1\lib\net40\AutoMapper.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="businesslogic, Version=1.0.6331.7969, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\UmbracoCms.Core.7.6.0\lib\net45\businesslogic.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="ClientDependency.Core">
<HintPath>..\packages\ClientDependency.1.9.2\lib\net45\ClientDependency.Core.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="cms, Version=1.0.6331.7970, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\UmbracoCms.Core.7.6.0\lib\net45\cms.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="controls, Version=1.0.6331.7972, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\UmbracoCms.Core.7.6.0\lib\net45\controls.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="Examine, Version=0.1.82.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Examine.0.1.82\lib\net45\Examine.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="HtmlAgilityPack, Version=1.4.9.5, Culture=neutral, PublicKeyToken=bd319b19eaf3b43a, processorArchitecture=MSIL">
<HintPath>..\packages\HtmlAgilityPack.1.4.9.5\lib\Net45\HtmlAgilityPack.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="ImageProcessor, Version=2.5.3.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\ImageProcessor.2.5.3\lib\net45\ImageProcessor.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="ImageProcessor.Web, Version=4.8.3.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\ImageProcessor.Web.4.8.3\lib\net45\ImageProcessor.Web.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="interfaces, Version=1.0.6331.7963, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\UmbracoCms.Core.7.6.0\lib\net45\interfaces.dll</HintPath>
<Private>False</Private>
Expand All @@ -75,18 +47,6 @@
<HintPath>..\packages\UmbracoCms.Core.7.6.0\lib\net45\log4net.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="Log4Net.Async, Version=2.0.4.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Log4Net.Async.2.0.4\lib\net40\Log4Net.Async.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="Microsoft.ApplicationBlocks.Data, Version=1.0.1559.20655, Culture=neutral">
<HintPath>..\packages\UmbracoCms.Core.7.6.0\lib\net45\Microsoft.ApplicationBlocks.Data.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="Microsoft.AspNet.SignalR.Core, Version=2.2.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.AspNet.SignalR.Core.2.2.1\lib\net45\Microsoft.AspNet.SignalR.Core.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="MiniProfiler, Version=2.1.0.0, Culture=neutral, PublicKeyToken=b44f9351044011a3, processorArchitecture=MSIL">
<HintPath>..\packages\MiniProfiler.2.1.0\lib\net40\MiniProfiler.dll</HintPath>
<Private>False</Private>
Expand All @@ -95,59 +55,22 @@
<HintPath>..\packages\Newtonsoft.Json.10.0.2\lib\net45\Newtonsoft.Json.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="Owin, Version=1.0.0.0, Culture=neutral, PublicKeyToken=f0ebd12fd5e55cc5, processorArchitecture=MSIL">
<HintPath>..\packages\Owin.1.0\lib\net40\Owin.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="SQLCE4Umbraco, Version=1.0.6331.7971, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\UmbracoCms.Core.7.6.0\lib\net45\SQLCE4Umbraco.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="System" />
<Reference Include="System.ComponentModel.DataAnnotations" />
<Reference Include="System.Core" />
<Reference Include="System.Data.SqlServerCe, Version=4.0.0.1, Culture=neutral, PublicKeyToken=89845dcd8080cc91, processorArchitecture=MSIL">
<HintPath>..\packages\UmbracoCms.Core.7.6.0\lib\net45\System.Data.SqlServerCe.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="System.Data.SqlServerCe.Entity, Version=4.0.0.1, Culture=neutral, PublicKeyToken=89845dcd8080cc91, processorArchitecture=MSIL">
<HintPath>..\packages\UmbracoCms.Core.7.6.0\lib\net45\System.Data.SqlServerCe.Entity.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="System.Net.Http.Formatting, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.AspNet.WebApi.Client.5.2.3\lib\net45\System.Net.Http.Formatting.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="System.Threading.Tasks.Dataflow, Version=4.6.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Threading.Tasks.Dataflow.4.7.0\lib\portable-net45+win8+wpa81\System.Threading.Tasks.Dataflow.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="System.Web" />
<Reference Include="System.Web.Helpers, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.AspNet.WebPages.3.2.3\lib\net45\System.Web.Helpers.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="System.Web.Http, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.AspNet.WebApi.Core.5.2.3\lib\net45\System.Web.Http.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="System.Web.Http.WebHost, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.AspNet.WebApi.WebHost.5.2.3\lib\net45\System.Web.Http.WebHost.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="System.Web.Mvc, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.AspNet.Mvc.5.2.3\lib\net45\System.Web.Mvc.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="System.Xml.Linq" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
<Reference Include="TidyNet, Version=1.0.0.0, Culture=neutral">
<HintPath>..\packages\UmbracoCms.Core.7.6.0\lib\net45\TidyNet.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="umbraco, Version=1.0.6331.7975, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\UmbracoCms.Core.7.6.0\lib\net45\umbraco.dll</HintPath>
<Private>False</Private>
Expand All @@ -156,34 +79,10 @@
<HintPath>..\packages\UmbracoCms.Core.7.6.0\lib\net45\Umbraco.Core.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="umbraco.DataLayer, Version=1.0.6331.7969, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\UmbracoCms.Core.7.6.0\lib\net45\umbraco.DataLayer.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="umbraco.editorControls, Version=1.0.6331.7978, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\UmbracoCms.Core.7.6.0\lib\net45\umbraco.editorControls.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="umbraco.MacroEngines, Version=1.0.6331.7979, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\UmbracoCms.Core.7.6.0\lib\net45\umbraco.MacroEngines.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="umbraco.providers, Version=1.0.6331.7973, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\UmbracoCms.Core.7.6.0\lib\net45\umbraco.providers.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="Umbraco.Web.UI, Version=1.0.6331.7980, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\UmbracoCms.Core.7.6.0\lib\net45\Umbraco.Web.UI.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="UmbracoExamine, Version=0.7.0.7971, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\UmbracoCms.Core.7.6.0\lib\net45\UmbracoExamine.dll</HintPath>
<Private>False</Private>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="Bootstrap.cs" />
<Compile Include="Converters\PropertyListValueConverter.cs" />
<Compile Include="ValueConverters\PropertyListValueConverter.cs" />
<Compile Include="Models\PropertyListValue.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Properties\VersionInfo.cs" />
Expand All @@ -198,9 +97,7 @@
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<Content Include="Web\UI\App_Plugins\PropertyList\css\propertylist.css" />
<Content Include="Web\UI\App_Plugins\PropertyList\js\propertylist.controllers.js" />
<Content Include="Web\UI\App_Plugins\PropertyList\js\propertylist.resources.js" />
<Content Include="Web\UI\App_Plugins\PropertyList\js\propertylist.js" />
<Content Include="Web\UI\App_Plugins\PropertyList\views\propertylist.datatypepicker.html" />
<Content Include="Web\UI\App_Plugins\PropertyList\views\propertylist.html" />
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,19 +1,47 @@
using Umbraco.Core.PropertyEditors;
using Umbraco.Core.IO;
using Umbraco.Core.PropertyEditors;

namespace Our.Umbraco.PropertyList.PropertyEditors
{
internal class PropertyListPreValueEditor : PreValueEditor
{
[PreValueField("dataType", "Data Type", "~/App_Plugins/PropertyList/views/propertylist.datatypepicker.html", Description = "Select a data type.")]
public string DataType { get; set; }
public PropertyListPreValueEditor()
: base()
{
// In terms of inheritance, we'd like the "dataType" field to always be at the top.
Fields.Insert(0, new PreValueField
{
Key = "dataType",
Name = "Data Type",
View = IOHelper.ResolveUrl("~/App_Plugins/PropertyList/views/propertylist.datatypepicker.html"),
Description = "Select a data type."
});

[PreValueField("minItems", "Min Items", "number", Description = "Set the minimum number of items allowed.")]
public string MinItems { get; set; }

[PreValueField("maxItems", "Max Items", "number", Description = "Set the maximum number of items allowed.")]
public string MaxItems { get; set; }

[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.")]
public string HideLabel { get; set; }
// The rest of the fields can be added at the bottom.
Fields.AddRange(new[]
{
new PreValueField
{
Key = "minItems",
Name = "Min Items",
View = "number",
Description = "Set the minimum number of items allowed."
},
new PreValueField
{
Key = "maxItems",
Name = "Max Items",
View = "number",
Description = "Set the maximum number of items allowed."
},
new PreValueField
{
Key = "hideLabel",
Name = "Hide Label",
View = "boolean",
Description = "Set whether to hide the editor label and have the list take up the full width of the editor window."
}
});
}
}
}
Original file line number Diff line number Diff line change
@@ -1,36 +1,17 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Xml.Linq;
using System.Collections.Generic;
using ClientDependency.Core;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using Our.Umbraco.PropertyList.Models;
using Umbraco.Core;
using Umbraco.Core.Logging;
using Umbraco.Core.Models;
using Umbraco.Core.Models.Editors;
using Umbraco.Core.PropertyEditors;
using Umbraco.Core.Services;
using Umbraco.Web.PropertyEditors;

namespace Our.Umbraco.PropertyList.PropertyEditors
{
[PropertyEditor(
PropertyEditorAlias,
"Property List",
"JSON",
"~/App_Plugins/PropertyList/Views/propertylist.html",
Group = "Lists",
Icon = "icon-bulleted-list",
IsParameterEditor = false)]
[PropertyEditorAsset(ClientDependencyType.Css, "~/App_Plugins/PropertyList/css/propertylist.css")]
[PropertyEditorAsset(ClientDependencyType.Javascript, "~/App_Plugins/PropertyList/js/propertylist.controllers.js")]
[PropertyEditorAsset(ClientDependencyType.Javascript, "~/App_Plugins/PropertyList/js/propertylist.resources.js")]
[PropertyEditor(PropertyEditorAlias, PropertyEditorName, "JSON", PropertyEditorViewPath, Group = "Lists", Icon = "icon-bulleted-list", IsParameterEditor = false)]
[PropertyEditorAsset(ClientDependencyType.Javascript, "~/App_Plugins/PropertyList/js/propertylist.js")]
public class PropertyListPropertyEditor : PropertyEditor
{
public const string PropertyEditorAlias = "Our.Umbraco.PropertyList";
public const string PropertyEditorName = "Property List";
public const string PropertyEditorViewPath = "~/App_Plugins/PropertyList/Views/propertylist.html";

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

Expand Down
Loading

0 comments on commit ec376fd

Please sign in to comment.