Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
651 changes: 649 additions & 2 deletions .gitignore

Large diffs are not rendered by default.

41 changes: 0 additions & 41 deletions src/KeyValuePropertyConverterV7.cs

This file was deleted.

25 changes: 25 additions & 0 deletions src/Vokseverk.KeyValueEditor.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.32126.315
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Vokseverk.KeyValueEditor", "Vokseverk.KeyValueEditor\Vokseverk.KeyValueEditor.csproj", "{C4DE2166-D38C-44F9-8213-932E979E20F9}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{C4DE2166-D38C-44F9-8213-932E979E20F9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C4DE2166-D38C-44F9-8213-932E979E20F9}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C4DE2166-D38C-44F9-8213-932E979E20F9}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C4DE2166-D38C-44F9-8213-932E979E20F9}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {7E2CD425-F0B8-4824-B45E-D443FD04C419}
EndGlobalSection
EndGlobal
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{
"propertyEditors": [
{
"alias": "Vokseverk.KeyValueEditor",
"name": "Key/Value Editor",
"icon": "icon-bulleted-list",
"group": "lists",
"editor": {
"view": "~/App_Plugins/Vokseverk.KeyValueEditor/views/keyvalueeditor.html"
},
"prevalues": {
"fields": [
{
"label": "Minimum",
"key": "min",
"description": "Enter the minimum number of key/value pairs",
"view": "number"
},
{
"label": "Maximum",
"key": "max",
"description": "Enter the maximum number of key/value pairs",
"view": "number"
}
]
},
"defaultConfig": {
"min": 0,
"max": 5
}
}
],
"css": [
"~/App_Plugins/Vokseverk.KeyValueEditor/css/keyvalueeditor.css"
],
"javascript": [
"~/App_Plugins/Vokseverk.KeyValueEditor/js/keyvalueeditor.controller.js"
]
}
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,9 @@
using System.Collections.Generic;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using Umbraco.Core;
using Umbraco.Core.Models;
using Umbraco.Core.PropertyEditors;
using Umbraco.Core.Models.PublishedContent;
using Umbraco.Cms.Core.Models.PublishedContent;
using Umbraco.Cms.Core.PropertyEditors;
using Umbraco.Extensions;

namespace Vokseverk {

Expand Down Expand Up @@ -83,18 +82,22 @@ public object ConvertIntermediateToXPath(IPublishedElement owner, IPublishedProp
return inter.ToString();
}

public class KeyAndValue {
public KeyAndValue(string key, string value) {
Key = key;
Value = value;
}

public string Key { get; }
public string Value { get; }

public override string ToString() {
return JsonConvert.SerializeObject(this);
}
}

public class KeyAndValue
{
public KeyAndValue(string key, string value)
{
Key = key;
Value = value;
}

public string Key { get; }
public string Value { get; }

public override string ToString()
{
return JsonConvert.SerializeObject(this);
}
}
}
29 changes: 29 additions & 0 deletions src/Vokseverk.KeyValueEditor/Vokseverk.KeyValueEditor.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
<ContentTargetFolders>.</ContentTargetFolders>
<Product>Vokseverk.KeyValueEditor</Product>
<PackageId>Vokseverk.KeyValueEditor</PackageId>
<Title>Vokseverk.KeyValueEditor</Title>
<Description>This property editor is heavily based on the Multiple Textstrings built-in property editor, so should look and behave very similar to that one, even though it has two textboxes. (So hitting Enter/Return adds another set, and you can sort them by using the handles on the right.)</Description>
<PackageTags>umbraco plugin package</PackageTags>
<RootNamespace>Vokseverk.KeyValueEditor</RootNamespace>
<Version>1.2.0</Version>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Umbraco.Cms.Web.Website" Version="9.3.1" />
<PackageReference Include="Umbraco.Cms.Web.BackOffice" Version="9.3.1" />
</ItemGroup>

<ItemGroup>
<Content Include="App_Plugins\Vokseverk.KeyValueEditor\**\*.*">
<ExcludeFromSingleFile>true</ExcludeFromSingleFile>
<CopyToPublishDirectory>Always</CopyToPublishDirectory>
</Content>
<None Include="build\**\*.*">
<Pack>True</Pack>
<PackagePath>buildTransitive</PackagePath>
</None>
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">

<PropertyGroup>
<VokseverkKeyValueEditorContentFilesPath>$(MSBuildThisFileDirectory)..\App_Plugins\Vokseverk.KeyValueEditor\**\*.*</VokseverkKeyValueEditorContentFilesPath>
</PropertyGroup>

<Target Name="CopyVokseverkKeyValueEditorAssets" BeforeTargets="Build">
<ItemGroup>
<VokseverkKeyValueEditorContentFiles Include="$(VokseverkKeyValueEditorContentFilesPath)" />
</ItemGroup>
<Message Text="Copying Vokseverk.KeyValueEditor files: $(VokseverkKeyValueEditorContentFilesPath) - #@(VokseverkKeyValueEditorContentFiles->Count()) files" Importance="high" />
<Copy
SourceFiles="@(VokseverkKeyValueEditorContentFiles)"
DestinationFiles="@(VokseverkKeyValueEditorContentFiles->'$(MSBuildProjectDirectory)\App_Plugins\Vokseverk.KeyValueEditor\%(RecursiveDir)%(Filename)%(Extension)')"
SkipUnchangedFiles="true" />

</Target>

<Target Name="ClearVokseverkKeyValueEditorAssets" BeforeTargets="Clean">
<ItemGroup>
<VokseverkKeyValueEditorDir Include="$(MSBuildProjectDirectory)\App_Plugins\Vokseverk.KeyValueEditor\" />
</ItemGroup>
<Message Text="Clear old Vokseverk.KeyValueEditor data" Importance="high" />
<RemoveDir Directories="@(VokseverkKeyValueEditorDir)" />
</Target>

</Project>
38 changes: 0 additions & 38 deletions src/manifest.xml

This file was deleted.

8 changes: 0 additions & 8 deletions src/package.ent

This file was deleted.

51 changes: 0 additions & 51 deletions src/package.xml

This file was deleted.