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 #8 from umco/develop
Browse files Browse the repository at this point in the history
Preparing v1.0.2 release
  • Loading branch information
leekelleher authored Aug 29, 2018
2 parents 688fac6 + 49b945e commit 08d9c34
Show file tree
Hide file tree
Showing 9 changed files with 20 additions and 43 deletions.
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ The issue tracker is the preferred channel for [bug reports](#bugs),
requests](#pull-requests), but please respect the following restrictions:

* Please **do not** use the issue tracker for personal support requests (use
[Our Umbraco](https://our.umbraco.org/projects/backoffice-extensions/simple-content/simple-content-feedback) or Twitter).
[Our Umbraco](https://our.umbraco.org/projects/backoffice-extensions/content-list/content-list-feedback) or Twitter).

* Please **do not** derail or troll issues. Keep the discussion on topic and
respect the opinions of others.
Expand Down
2 changes: 1 addition & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
image: Visual Studio 2017

# version format
version: 1.0.1.{build}
version: 1.0.2.{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
Expand Down
2 changes: 1 addition & 1 deletion build/install.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ if (!$contentFolder)
$projectPathExists = Test-Path $projectPath

if ($projectPathExists) {
Write-Host "Updating Simple Content App_Plugin files using PS as they have been excluded from the project"
Write-Host "Updating Content List App_Plugin files using PS as they have been excluded from the project"
Copy-Item $newPackageFiles $projectPath -Recurse -Force
}
}
2 changes: 1 addition & 1 deletion build/package.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<language></language>
<tags></tags>
<dependencies>
<dependency id="Our.Umbraco.InnerContent" version="[2,3)" />
<dependency id="Our.Umbraco.InnerContent" version="[2.0.1,3)" />
</dependencies>
</metadata>
<files />
Expand Down
4 changes: 2 additions & 2 deletions src/Our.Umbraco.ContentList/Our.Umbraco.ContentList.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@
<HintPath>..\packages\Newtonsoft.Json.10.0.2\lib\net45\Newtonsoft.Json.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="Our.Umbraco.InnerContent, Version=2.0.6775.8222, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Our.Umbraco.InnerContent.Core.2.0.0\lib\net45\Our.Umbraco.InnerContent.dll</HintPath>
<Reference Include="Our.Umbraco.InnerContent, Version=2.0.6800.22164, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Our.Umbraco.InnerContent.Core.2.0.1\lib\net45\Our.Umbraco.InnerContent.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="System" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,14 @@

namespace Our.Umbraco.ContentList.PropertyEditors
{
[PropertyEditor(PropertyEditorAlias, PropertyEditorName, PropertyEditorValueTypes.Json, PropertyEditorViewPath, Group = "rich content", Icon = "icon-page-add")]
[PropertyEditorAsset(ClientDependencyType.Javascript, "~/App_Plugins/ContentList/contentlist.js")]
[PropertyEditor(PropertyEditorAlias, PropertyEditorName, PropertyEditorValueTypes.Json, PropertyEditorViewPath, Group = "lists", Icon = "icon-page-add")]
[PropertyEditorAsset(ClientDependencyType.Javascript, PropertyEditorJsPath)]
public class ContentListPropertyEditor : SimpleInnerContentPropertyEditor
{
public const string PropertyEditorAlias = "Our.Umbraco.ContentList";
public const string PropertyEditorName = "Content List";
public const string PropertyEditorViewPath = "~/App_Plugins/ContentList/contentlist.html";
public const string PropertyEditorJsPath = "~/App_Plugins/ContentList/contentlist.js";

public ContentListPropertyEditor()
: base()
Expand All @@ -20,11 +21,6 @@ public ContentListPropertyEditor()
DefaultPreValues.Add("hideLabel", "0");
}

protected override PropertyValueEditor CreateValueEditor()
{
return new SimpleInnerContentPropertyValueEditor(base.CreateValueEditor());
}

protected override PreValueEditor CreatePreValueEditor()
{
return new ContentListPreValueEditor();
Expand All @@ -35,27 +31,8 @@ internal class ContentListPreValueEditor : SimpleInnerContentPreValueEditor
public ContentListPreValueEditor()
: base()
{
// TODO: Once InnerContent exposes these extension methods, (in v2.0.1), uncomment the following lines. [LK:2018-07-20]
////Fields.Add("maxItems", "Max Items", "number", "Set the maximum number of items allowed.");
////Fields.AddHideLabel();

Fields.AddRange(new[]
{
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."
}
});
Fields.Add("maxItems", "Max Items", "number", "Set the maximum number of items allowed.");
Fields.AddHideLabel();
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
sortable="vm.sortable"
allow-remove="vm.allowRemove"
allow-edit="vm.allowEdit"
on-remove="vm.remove($index, model.value)"
on-remove="vm.remove($index)"
on-edit="vm.edit($event, $index, item)">
</umb-node-preview>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,20 +63,20 @@
vm.edit = edit;
vm.remove = remove;

function add(evt) {
vm.overlayConfig.event = evt;
function add($event) {
vm.overlayConfig.event = $event;
vm.overlayConfig.data = { model: null, idx: $scope.model.value.length, action: "add" };
vm.overlayConfig.show = true;
};

function edit(evt, idx, itm) {
vm.overlayConfig.event = evt;
vm.overlayConfig.data = { model: itm, idx: idx, action: "edit" };
function edit($event, $index, item) {
vm.overlayConfig.event = $event;
vm.overlayConfig.data = { model: item, idx: $index, action: "edit" };
vm.overlayConfig.show = true;
};

function remove(evt, idx) {
$scope.model.value.splice(idx, 1);
function remove($index) {
$scope.model.value.splice($index, 1);

if ($scope.model.config.maxItems === "0" || $scope.model.value.length < $scope.model.config.maxItems) {
vm.allowAdd = true;
Expand Down
2 changes: 1 addition & 1 deletion src/Our.Umbraco.ContentList/packages.config
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
<package id="MiniProfiler" version="2.1.0" targetFramework="net452" />
<package id="MySql.Data" version="6.9.9" targetFramework="net452" />
<package id="Newtonsoft.Json" version="10.0.2" targetFramework="net452" />
<package id="Our.Umbraco.InnerContent.Core" version="2.0.0" targetFramework="net452" />
<package id="Our.Umbraco.InnerContent.Core" version="2.0.1" targetFramework="net452" />
<package id="Owin" version="1.0" targetFramework="net452" />
<package id="semver" version="1.1.2" targetFramework="net452" />
<package id="SharpZipLib" version="0.86.0" targetFramework="net452" />
Expand Down

0 comments on commit 08d9c34

Please sign in to comment.