Compare commits
182 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| e9da0aa351 | |||
| b42e411e49 | |||
| 4c4b09b187 | |||
| 43a72ed5e5 | |||
| 709198f943 | |||
| 77f72ed72e | |||
| a03fe3af32 | |||
| 697a797c7e | |||
| cfe014ee45 | |||
| d62fa05ab5 | |||
| 662cf4c3bf | |||
| d0b8314134 | |||
| 8eb4786976 | |||
| 20155b5ca6 | |||
| 16c310f3c6 | |||
| 99d570dc97 | |||
| 2ae3e3ade9 | |||
| d4718e358c | |||
| bb91eb7036 | |||
| 484f2c22a3 | |||
| a2121cd8a7 | |||
| 2fb922fd6c | |||
| c2986d39a9 | |||
| 8ee5488261 | |||
| c60c9e1c5d | |||
| 8610f69c88 | |||
| 34b4209de7 | |||
| b6145c9275 | |||
| f51ca65659 | |||
| d026af9fd2 | |||
| 11fff5da1a | |||
| 788a5dd720 | |||
| 24e232b2cc | |||
| 5bdcb23933 | |||
| 34b3ed3b47 | |||
| 50a486a9ac | |||
| 4f4128a744 | |||
| 4851797a83 | |||
| 54a435dce7 | |||
| 03a170d716 | |||
| 37976abc84 | |||
| f7e96438be | |||
| f1c3caae2d | |||
| 8f8078e12f | |||
| dbc9b872d8 | |||
| eef1b94586 | |||
| 9bbf366fe2 | |||
| 368a9f6c07 | |||
| d3b3f80f3d | |||
| 11f7881dd7 | |||
| 9894357469 | |||
| 146a3770a1 | |||
| caf9d1ac15 | |||
| 614595ceb3 | |||
| d1b21a1ca7 | |||
| 54bc507049 | |||
| 037585458c | |||
| f52649eb9e | |||
| 423fedb954 | |||
| b39312ccd2 | |||
| b9c4be0bb6 | |||
| 29285607a9 | |||
| 909b87cea0 | |||
| 3d25f75fb9 | |||
| 6fa713f88e | |||
| d9982fe3a2 | |||
| 588bdfe429 | |||
| 0174f6d78b | |||
| 84144b6206 | |||
| 27910e8d22 | |||
| 9bf413207f | |||
| e5cd3d0cb0 | |||
| 032ee958c1 | |||
| ef5bd7ccc8 | |||
| 7839e4a992 | |||
| 408c178348 | |||
| 852b7a92a7 | |||
| 5a4118a1cc | |||
| 4b603bf97f | |||
| c8884c8d92 | |||
| dd843ce2c6 | |||
| 8036ab72d0 | |||
| b25d8bdc4b | |||
| 023d99cc88 | |||
| 1cc0586c75 | |||
| a16b61f03f | |||
| 7ea01cad86 | |||
| aea65a531d | |||
| 482cb5a149 | |||
| 81ac5fbddb | |||
| 801baf355b | |||
| a3b531caa4 | |||
| 1d680c612e | |||
| cdea3c1aec | |||
| 37fa9c40d6 | |||
| 774ba46e13 | |||
| 280a97c8d1 | |||
| 7dd3848bdf | |||
| add44e533a | |||
| 870b848e3b | |||
| b262d8a86f | |||
| 5dba1a0895 | |||
| 8f4857aba1 | |||
| cd95404a08 | |||
| 7e7a4aff58 | |||
| c9d8952b7f | |||
| 890b5674a6 | |||
| 7f5dbd31c9 | |||
| a2255aa037 | |||
| 415a84f5c0 | |||
| 3a0eba401a | |||
| 991d56dac1 | |||
| f704088bcb | |||
| a599215620 | |||
| a6e76cb398 | |||
| 4fd134ac74 | |||
| 22b87c0a37 | |||
| d707b55362 | |||
| 37a195109c | |||
| 205919ccae | |||
| 04e57b7d6b | |||
| 9e8cc0c556 | |||
| 8fe90c3b86 | |||
| 99581b0aeb | |||
| d8939c59a0 | |||
| e49fe6ee17 | |||
| ca52f0a216 | |||
| 08d4e4b51d | |||
| e9c51ee96e | |||
| b5f281cae0 | |||
| 3bbb27f85e | |||
| 247eea3477 | |||
| 8635fa7301 | |||
| e49a8d947d | |||
| 3e2e43d342 | |||
| 78ba99a52e | |||
| 42efa1a3d4 | |||
| d2f4fce808 | |||
| d76a5f58d4 | |||
| f6457416cc | |||
| c841813a74 | |||
| bcc7be94e7 | |||
| e200c22244 | |||
| 244db7f19d | |||
| 31f3d00b76 | |||
| 07125bae84 | |||
| f2a8286f00 | |||
| 5725c0770e | |||
| 210fbb8230 | |||
| c8e398c726 | |||
| bfa882fa01 | |||
| 876aea4007 | |||
| 07750c7537 | |||
| 17a1577d09 | |||
| 987f383139 | |||
| dc14f11f83 | |||
| 500f4c4dee | |||
| a16451df1f | |||
| 9ac7877174 | |||
| 4d3bcb68b3 | |||
| 30074fe198 | |||
| 7f0bd45a9d | |||
| 6045eed5c5 | |||
| 57ffa69ff5 | |||
| 6b61dc978a | |||
| c20aa64af2 | |||
| 25826958a3 | |||
| b5bfbb5c25 | |||
| 9afaa024c0 | |||
| c58dcd80ff | |||
| b7c16ee6ef | |||
| 786c547e0b | |||
| 1cbb7b3173 | |||
| 71be453ada | |||
| efae05b3ae | |||
| 84acd43ccf | |||
| 9fe756bacb | |||
| cd03b5a4f9 | |||
| 07a62d7edf | |||
| a6c166d926 | |||
| c1bc555443 | |||
| d4166f33e8 |
+13
-8
@@ -55,10 +55,15 @@ module.exports = function(grunt) {
|
||||
'app/controllers/controller.js',
|
||||
'app/controllers/config.controller.js',
|
||||
'app/directives/archetypeproperty.js',
|
||||
'app/directives/archetypesubmitwatcher.js',
|
||||
'app/directives/archetypecustomview.js',
|
||||
'app/directives/localize.js',
|
||||
'app/services/localization.js',
|
||||
'app/resources/propertyeditor.js'
|
||||
'app/directives/archetypeLocalize.js',
|
||||
'app/services/archetypeLocalizationService.js',
|
||||
'app/helpers/sampleLabelHelpers.js',
|
||||
'app/resources/archetypePropertyEditorResource.js',
|
||||
'app/services/archetypeService.js',
|
||||
'app/services/archetypeLabelService.js',
|
||||
'app/services/archetypeCacheService.js'
|
||||
],
|
||||
dest: '<%= basePath %>/js/archetype.js'
|
||||
}
|
||||
@@ -72,7 +77,7 @@ module.exports = function(grunt) {
|
||||
expand: true
|
||||
},
|
||||
dll: {
|
||||
cwd: 'app/Umbraco/Umbraco.Archetype/bin/Release/',
|
||||
cwd: 'app/Umbraco/Umbraco.Archetype/bin/Debug/',
|
||||
src: 'Archetype.dll',
|
||||
dest: '<%= dest %>/bin/',
|
||||
expand: true
|
||||
@@ -162,10 +167,10 @@ module.exports = function(grunt) {
|
||||
|
||||
assemblyinfo: {
|
||||
options: {
|
||||
files: ['app/Umbraco/Umbraco.Archetype/Archetype.Umbraco.csproj'],
|
||||
files: ['app/Umbraco/Umbraco.Archetype/Archetype.Umbraco.csproj', 'app/Umbraco/Umbraco.Archetype/Archetype.Courier.csproj'],
|
||||
filename: 'VersionInfo.cs',
|
||||
info: {
|
||||
version: '<%= (pkgMeta.version.indexOf("-") ? pkgMeta.version.substring(0, pkgMeta.version.indexOf("-")) : pkgMeta.version) %>',
|
||||
version: '<%= (pkgMeta.version.indexOf("-") > 0 ? pkgMeta.version.substring(0, pkgMeta.version.indexOf("-")) : pkgMeta.version) %>',
|
||||
fileVersion: '<%= pkgMeta.version %>'
|
||||
}
|
||||
}
|
||||
@@ -198,9 +203,9 @@ module.exports = function(grunt) {
|
||||
}
|
||||
},
|
||||
dist: {
|
||||
src: ['app/Umbraco/Umbraco.Archetype/Archetype.Umbraco.csproj'],
|
||||
src: ['app/Umbraco/Umbraco.Archetype/Archetype.Umbraco.csproj','app/Umbraco/Archetype.Courier/Archetype.Courier.csproj'],
|
||||
options: {
|
||||
projectConfiguration: 'Release',
|
||||
projectConfiguration: 'Debug',
|
||||
targets: ['Clean', 'Rebuild'],
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@ Install the selected <a href='https://github.com/imulus/Archetype/releases'>rele
|
||||
|
||||
|
||||
## Official Docs ##
|
||||
http://imulus.github.io/Archetype
|
||||
https://github.com/kgiszewski/ArchetypeManual
|
||||
|
||||
Follow us on Twitter https://twitter.com/ArchetypeKit
|
||||
|
||||
|
||||
@@ -1,14 +1,13 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Archetype.Extensions;
|
||||
using Archetype.Models;
|
||||
using Archetype.PropertyConverters;
|
||||
using Newtonsoft.Json;
|
||||
using Umbraco.Core;
|
||||
using Umbraco.Core.Logging;
|
||||
using Umbraco.Core.Models;
|
||||
using Umbraco.Core.Models.PublishedContent;
|
||||
using Umbraco.Courier.Core;
|
||||
using Umbraco.Courier.Core.Logging;
|
||||
using Umbraco.Courier.Core.ProviderModel;
|
||||
using Umbraco.Courier.DataResolvers;
|
||||
using Umbraco.Courier.ItemProviders;
|
||||
|
||||
@@ -26,13 +25,13 @@ namespace Archetype.Courier.DataResolvers
|
||||
{
|
||||
get
|
||||
{
|
||||
return Archetype.Constants.PropertyEditorAlias;
|
||||
return Constants.PropertyEditorAlias;
|
||||
}
|
||||
}
|
||||
|
||||
public override void ExtractingDataType(DataType item)
|
||||
{
|
||||
// No longer need to extract the DataType (int) Ids as they now reference the Guid [LK]
|
||||
// No longer need to extract the DataType (int) Ids as Archetype now references the Guid [LK]
|
||||
}
|
||||
|
||||
public override void ExtractingProperty(Item item, ContentProperty propertyData)
|
||||
@@ -55,7 +54,7 @@ namespace Archetype.Courier.DataResolvers
|
||||
if (item.Prevalues != null && item.Prevalues.Count > 0)
|
||||
{
|
||||
var prevalue = item.Prevalues[0];
|
||||
if (prevalue.Alias.InvariantEquals(Archetype.Constants.PreValueAlias) && !string.IsNullOrWhiteSpace(prevalue.Value))
|
||||
if (prevalue.Alias.InvariantEquals(Constants.PreValueAlias) && !string.IsNullOrWhiteSpace(prevalue.Value))
|
||||
{
|
||||
var config = JsonConvert.DeserializeObject<ArchetypePreValue>(prevalue.Value);
|
||||
|
||||
@@ -63,7 +62,7 @@ namespace Archetype.Courier.DataResolvers
|
||||
{
|
||||
foreach (var property in config.Fieldsets.SelectMany(x => x.Properties))
|
||||
{
|
||||
item.Dependencies.Add(property.DataTypeGuid.ToString(), ProviderIDCollection.dataTypeItemProviderGuid);
|
||||
item.Dependencies.Add(property.DataTypeGuid.ToString(), ItemProviderIds.dataTypeItemProviderGuid);
|
||||
}
|
||||
|
||||
item.Prevalues[0].Value = JsonConvert.SerializeObject(config, Formatting.None);
|
||||
@@ -76,17 +75,26 @@ namespace Archetype.Courier.DataResolvers
|
||||
{
|
||||
if (propertyData != null && propertyData.Value != null)
|
||||
{
|
||||
// just look at the amount of dancing around we have to do in order to fake a `PublishedPropertyType`?!
|
||||
var dataTypeId = PersistenceManager.Default.GetNodeId(propertyData.DataType, NodeObjectTypes.DataType);
|
||||
var fakePropertyType = this.CreateDummyPropertyType(dataTypeId, this.EditorAlias);
|
||||
var dataType = ExecutionContext.DatabasePersistence.RetrieveItem<DataType>(new ItemIdentifier(propertyData.DataType.ToString(),
|
||||
ItemProviderIds.dataTypeItemProviderGuid));
|
||||
|
||||
var converter = new ArchetypeValueConverter();
|
||||
var archetype = (ArchetypeModel)converter.ConvertDataToSource(fakePropertyType, propertyData.Value, false);
|
||||
//Fetch the Prevalues for the current Property's DataType (if its an 'Archetype config')
|
||||
var prevalue = dataType.Prevalues.FirstOrDefault(x => x.Alias.ToLowerInvariant().Equals("archetypeconfig"));
|
||||
var archetypePreValue = prevalue == null
|
||||
? null
|
||||
: JsonConvert.DeserializeObject<ArchetypePreValue>(prevalue.Value,
|
||||
ArchetypeHelper.Instance.JsonSerializerSettings);
|
||||
RetrieveAdditionalProperties(ref archetypePreValue);
|
||||
|
||||
//Deserialize the value of the current Property to an ArchetypeModel and set additional properties before converting values
|
||||
var sourceJson = propertyData.Value.ToString();
|
||||
var archetype = JsonConvert.DeserializeObject<ArchetypeModel>(sourceJson, ArchetypeHelper.Instance.JsonSerializerSettings);
|
||||
RetrieveAdditionalProperties(ref archetype, archetypePreValue);
|
||||
|
||||
if (archetype != null)
|
||||
{
|
||||
// create a 'fake' provider, as ultimately only the 'Packaging' enum will be referenced.
|
||||
var fakeItemProvider = new PropertyItemProvider();
|
||||
// get the `PropertyItemProvider` from the collection.
|
||||
var propertyItemProvider = ItemProviderCollection.Instance.GetProvider(ItemProviderIds.propertyDataItemProviderGuid, ExecutionContext);
|
||||
|
||||
foreach (var property in archetype.Fieldsets.SelectMany(x => x.Properties))
|
||||
{
|
||||
@@ -94,16 +102,16 @@ namespace Archetype.Courier.DataResolvers
|
||||
continue;
|
||||
|
||||
// create a 'fake' item for Courier to process
|
||||
var fakeItem = new ContentPropertyData()
|
||||
var fakeItem = new ContentPropertyData
|
||||
{
|
||||
ItemId = item.ItemId,
|
||||
Name = string.Format("{0} [{1}: Nested {2} ({3})]", new[] { item.Name, this.EditorAlias, property.PropertyEditorAlias, property.Alias }),
|
||||
Name = string.Format("{0} [{1}: Nested {2} ({3})]", new[] { item.Name, EditorAlias, property.PropertyEditorAlias, property.Alias }),
|
||||
Data = new List<ContentProperty>
|
||||
{
|
||||
new ContentProperty
|
||||
{
|
||||
Alias = property.Alias,
|
||||
DataType = PersistenceManager.Default.GetUniqueId(property.DataTypeId, NodeObjectTypes.DataType),
|
||||
DataType = ExecutionContext.DatabasePersistence.GetUniqueId(property.DataTypeId, UmbracoNodeObjectTypeIds.DataType),
|
||||
PropertyEditorAlias = property.PropertyEditorAlias,
|
||||
Value = property.Value
|
||||
}
|
||||
@@ -115,11 +123,11 @@ namespace Archetype.Courier.DataResolvers
|
||||
try
|
||||
{
|
||||
// run the 'fake' item through Courier's data resolvers
|
||||
ResolutionManager.Instance.PackagingItem(fakeItem, fakeItemProvider);
|
||||
ResolutionManager.Instance.PackagingItem(fakeItem, propertyItemProvider);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
LogHelper.Error<ArchetypeDataResolver>(string.Concat("Error packaging data value: ", fakeItem.Name), ex);
|
||||
CourierLogHelper.Error<ArchetypeDataResolver>(string.Concat("Error packaging data value: ", fakeItem.Name), ex);
|
||||
}
|
||||
|
||||
// pass up the dependencies and resources
|
||||
@@ -131,11 +139,11 @@ namespace Archetype.Courier.DataResolvers
|
||||
try
|
||||
{
|
||||
// run the 'fake' item through Courier's data resolvers
|
||||
ResolutionManager.Instance.ExtractingItem(fakeItem, fakeItemProvider);
|
||||
ResolutionManager.Instance.ExtractingItem(fakeItem, propertyItemProvider);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
LogHelper.Error<ArchetypeDataResolver>(string.Concat("Error extracting data value: ", fakeItem.Name), ex);
|
||||
CourierLogHelper.Error<ArchetypeDataResolver>(string.Concat("Error extracting data value: ", fakeItem.Name), ex);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -149,28 +157,58 @@ namespace Archetype.Courier.DataResolvers
|
||||
|
||||
// (if packaging) add a dependency for the property's data-type
|
||||
if (direction == Direction.Packaging)
|
||||
item.Dependencies.Add(firstDataType.DataType.ToString(), ProviderIDCollection.dataTypeItemProviderGuid);
|
||||
item.Dependencies.Add(firstDataType.DataType.ToString(), ItemProviderIds.dataTypeItemProviderGuid);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (item.Name.Contains(string.Concat(this.EditorAlias, ": Nested")))
|
||||
{
|
||||
// if the Archetype is nested, then we only want to return the object itself - not a serialized string
|
||||
propertyData.Value = archetype;
|
||||
}
|
||||
else
|
||||
{
|
||||
// if the Archetype is the root/container, then we can serialize it to a string
|
||||
propertyData.Value = archetype.SerializeForPersistence();
|
||||
}
|
||||
// serialize the Archetype back to a string
|
||||
propertyData.Value = archetype.SerializeForPersistence();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private PublishedPropertyType CreateDummyPropertyType(int dataTypeId, string propertyEditorAlias)
|
||||
private void RetrieveAdditionalProperties(ref ArchetypePreValue preValue)
|
||||
{
|
||||
return new PublishedPropertyType(null, new PropertyType(new DataTypeDefinition(-1, propertyEditorAlias) { Id = dataTypeId }));
|
||||
if (preValue == null)
|
||||
return;
|
||||
|
||||
foreach (var fieldset in preValue.Fieldsets)
|
||||
{
|
||||
foreach (var property in fieldset.Properties)
|
||||
{
|
||||
var dataType = ExecutionContext.DatabasePersistence.RetrieveItem<DataType>(
|
||||
new ItemIdentifier(property.DataTypeGuid.ToString(),
|
||||
ItemProviderIds.dataTypeItemProviderGuid));
|
||||
|
||||
if (dataType == null)
|
||||
continue;
|
||||
|
||||
property.PropertyEditorAlias = dataType.PropertyEditorAlias;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void RetrieveAdditionalProperties(ref ArchetypeModel archetype, ArchetypePreValue preValue)
|
||||
{
|
||||
foreach (var fieldset in preValue.Fieldsets)
|
||||
{
|
||||
var fieldsetAlias = fieldset.Alias;
|
||||
foreach (var fieldsetInst in archetype.Fieldsets.Where(x => x.Alias == fieldsetAlias))
|
||||
{
|
||||
foreach (var property in fieldset.Properties)
|
||||
{
|
||||
var propertyAlias = property.Alias;
|
||||
foreach (var propertyInst in fieldsetInst.Properties.Where(x => x.Alias == propertyAlias))
|
||||
{
|
||||
propertyInst.DataTypeGuid = property.DataTypeGuid.ToString();
|
||||
propertyInst.DataTypeId = ExecutionContext.DatabasePersistence.GetNodeId(
|
||||
property.DataTypeGuid, UmbracoNodeObjectTypeIds.DataType);
|
||||
propertyInst.PropertyEditorAlias = property.PropertyEditorAlias;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -33,139 +33,167 @@
|
||||
<ItemGroup>
|
||||
<Reference Include="AutoMapper">
|
||||
<HintPath>..\packages\AutoMapper.3.0.0\lib\net40\AutoMapper.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="AutoMapper.Net4">
|
||||
<HintPath>..\packages\AutoMapper.3.0.0\lib\net40\AutoMapper.Net4.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="businesslogic, Version=1.0.5242.22740, Culture=neutral, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\packages\UmbracoCms.Core.7.1.2\lib\businesslogic.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="ClientDependency.Core">
|
||||
<HintPath>..\packages\ClientDependency.1.7.1.2\lib\ClientDependency.Core.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="ClientDependency.Core.Mvc">
|
||||
<HintPath>..\packages\ClientDependency-Mvc.1.7.0.4\lib\ClientDependency.Core.Mvc.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="cms, Version=1.0.5242.22741, Culture=neutral, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\packages\UmbracoCms.Core.7.1.2\lib\cms.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="controls, Version=1.0.5242.22742, Culture=neutral, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\packages\UmbracoCms.Core.7.1.2\lib\controls.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="CookComputing.XmlRpcV2">
|
||||
<HintPath>..\packages\xmlrpcnet.2.5.0\lib\net20\CookComputing.XmlRpcV2.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="Examine, Version=0.1.55.2941, Culture=neutral, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\packages\UmbracoCms.Core.7.1.2\lib\Examine.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="HtmlAgilityPack">
|
||||
<HintPath>..\packages\HtmlAgilityPack.1.4.6\lib\Net45\HtmlAgilityPack.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="ICSharpCode.SharpZipLib">
|
||||
<HintPath>..\packages\SharpZipLib.0.86.0\lib\20\ICSharpCode.SharpZipLib.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="ImageProcessor, Version=1.9.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\packages\ImageProcessor.1.9.0.0\lib\ImageProcessor.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="ImageProcessor.Web, Version=3.2.3.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\packages\ImageProcessor.Web.3.2.3.0\lib\net45\ImageProcessor.Web.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="interfaces, Version=1.0.5242.22737, Culture=neutral, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\packages\UmbracoCms.Core.7.1.2\lib\interfaces.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="log4net, Version=1.2.11.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\packages\UmbracoCms.Core.7.1.2\lib\log4net.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="Lucene.Net">
|
||||
<HintPath>..\packages\Lucene.Net.2.9.4.1\lib\net40\Lucene.Net.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.ApplicationBlocks.Data, Version=1.0.1559.20655, Culture=neutral">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\packages\UmbracoCms.Core.7.1.2\lib\Microsoft.ApplicationBlocks.Data.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Web.Helpers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\packages\UmbracoCms.Core.7.1.2\lib\Microsoft.Web.Helpers.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Web.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<Private>True</Private>
|
||||
<Private>False</Private>
|
||||
<HintPath>..\packages\Microsoft.Web.Infrastructure.1.0.0.0\lib\net40\Microsoft.Web.Infrastructure.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Web.Mvc.FixedDisplayModes">
|
||||
<HintPath>..\packages\Microsoft.AspNet.Mvc.FixedDisplayModes.1.0.1\lib\net40\Microsoft.Web.Mvc.FixedDisplayModes.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="MiniProfiler">
|
||||
<HintPath>..\packages\MiniProfiler.2.1.0\lib\net40\MiniProfiler.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="Moq">
|
||||
<HintPath>..\packages\Moq.4.2.1312.1622\lib\net40\Moq.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="MySql.Data">
|
||||
<HintPath>..\packages\MySql.Data.6.6.5\lib\net40\MySql.Data.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\packages\Newtonsoft.Json.6.0.2\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="nunit.framework">
|
||||
<HintPath>..\packages\NUnit.2.6.3\lib\nunit.framework.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="SQLCE4Umbraco, Version=1.0.5242.22741, Culture=neutral, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\packages\UmbracoCms.Core.7.1.2\lib\SQLCE4Umbraco.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Data.SqlServerCe, Version=4.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91, processorArchitecture=MSIL">
|
||||
<Private>True</Private>
|
||||
<Private>False</Private>
|
||||
<HintPath>..\packages\UmbracoCms.Core.7.1.2\lib\System.Data.SqlServerCe.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Data.SqlServerCe.Entity, Version=4.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91, processorArchitecture=MSIL">
|
||||
<Private>True</Private>
|
||||
<Private>False</Private>
|
||||
<HintPath>..\packages\UmbracoCms.Core.7.1.2\lib\System.Data.SqlServerCe.Entity.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Net.Http" />
|
||||
<Reference Include="System.Net.Http.Formatting, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.AspNet.WebApi.Client.4.0.30506.0\lib\net40\System.Net.Http.Formatting.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="System.Net.Http.WebRequest" />
|
||||
<Reference Include="System.Web.Helpers, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<Private>True</Private>
|
||||
<Private>False</Private>
|
||||
<HintPath>..\packages\Microsoft.AspNet.WebPages.2.0.30506.0\lib\net40\System.Web.Helpers.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Web.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.AspNet.WebApi.Core.4.0.30506.0\lib\net40\System.Web.Http.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="System.Web.Http.WebHost, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.AspNet.WebApi.WebHost.4.0.30506.0\lib\net40\System.Web.Http.WebHost.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="System.Web.Mvc, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<Private>True</Private>
|
||||
<Private>False</Private>
|
||||
<HintPath>..\packages\Microsoft.AspNet.Mvc.4.0.30506.0\lib\net40\System.Web.Mvc.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Web.Razor, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\packages\Microsoft.AspNet.Razor.2.0.30506.0\lib\net40\System.Web.Razor.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="System.Web.WebPages, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<Private>True</Private>
|
||||
<Private>False</Private>
|
||||
<HintPath>..\packages\Microsoft.AspNet.WebPages.2.0.30506.0\lib\net40\System.Web.WebPages.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Web.WebPages.Deployment, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<Private>True</Private>
|
||||
<Private>False</Private>
|
||||
<HintPath>..\packages\Microsoft.AspNet.WebPages.2.0.30506.0\lib\net40\System.Web.WebPages.Deployment.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Web.WebPages.Razor, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<Private>True</Private>
|
||||
<Private>False</Private>
|
||||
<HintPath>..\packages\Microsoft.AspNet.WebPages.2.0.30506.0\lib\net40\System.Web.WebPages.Razor.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
@@ -176,46 +204,57 @@
|
||||
<Reference Include="TidyNet, Version=1.0.0.0, Culture=neutral">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\packages\UmbracoCms.Core.7.1.2\lib\TidyNet.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="umbraco, Version=1.0.5242.22743, Culture=neutral, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\packages\UmbracoCms.Core.7.1.2\lib\umbraco.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="Umbraco.Core, Version=1.0.5242.22738, Culture=neutral, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\packages\UmbracoCms.Core.7.1.2\lib\Umbraco.Core.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="umbraco.DataLayer, Version=1.0.5242.22740, Culture=neutral, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\packages\UmbracoCms.Core.7.1.2\lib\umbraco.DataLayer.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="umbraco.editorControls, Version=1.0.5242.22746, Culture=neutral, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\packages\UmbracoCms.Core.7.1.2\lib\umbraco.editorControls.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="umbraco.MacroEngines, Version=1.0.5242.22747, Culture=neutral, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\packages\UmbracoCms.Core.7.1.2\lib\umbraco.MacroEngines.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="umbraco.providers, Version=1.0.5242.22742, Culture=neutral, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\packages\UmbracoCms.Core.7.1.2\lib\umbraco.providers.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="Umbraco.Web.UI, Version=1.0.5242.22748, Culture=neutral, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\packages\UmbracoCms.Core.7.1.2\lib\Umbraco.Web.UI.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="umbraco.XmlSerializers, Version=1.0.5242.22743, Culture=neutral, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\packages\UmbracoCms.Core.7.1.2\lib\umbraco.XmlSerializers.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="UmbracoExamine, Version=0.6.0.22741, Culture=neutral, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\packages\UmbracoCms.Core.7.1.2\lib\UmbracoExamine.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="UrlRewritingNet.UrlRewriter, Version=2.0.60829.1, Culture=neutral, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\packages\UmbracoCms.Core.7.1.2\lib\UrlRewritingNet.UrlRewriter.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
@@ -232,6 +271,7 @@
|
||||
<ProjectReference Include="..\Umbraco.Archetype\Archetype.Umbraco.csproj">
|
||||
<Project>{7D185D41-4228-4978-ACB8-83F9A48AD94F}</Project>
|
||||
<Name>Archetype.Umbraco</Name>
|
||||
<Private>True</Private>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup />
|
||||
|
||||
@@ -33,119 +33,145 @@
|
||||
<ItemGroup>
|
||||
<Reference Include="AutoMapper">
|
||||
<HintPath>..\packages\AutoMapper.3.0.0\lib\net40\AutoMapper.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="AutoMapper.Net4">
|
||||
<HintPath>..\packages\AutoMapper.3.0.0\lib\net40\AutoMapper.Net4.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="businesslogic">
|
||||
<HintPath>..\packages\UmbracoCms.Core.7.1.2\lib\businesslogic.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="ClientDependency.Core">
|
||||
<HintPath>..\packages\ClientDependency.1.7.1.2\lib\ClientDependency.Core.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="ClientDependency.Core.Mvc">
|
||||
<HintPath>..\packages\ClientDependency-Mvc.1.7.0.4\lib\ClientDependency.Core.Mvc.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="cms">
|
||||
<HintPath>..\packages\UmbracoCms.Core.7.1.2\lib\cms.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="controls">
|
||||
<HintPath>..\packages\UmbracoCms.Core.7.1.2\lib\controls.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="CookComputing.XmlRpcV2">
|
||||
<HintPath>..\packages\xmlrpcnet.2.5.0\lib\net20\CookComputing.XmlRpcV2.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="Examine">
|
||||
<HintPath>..\packages\UmbracoCms.Core.7.1.2\lib\Examine.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="HtmlAgilityPack">
|
||||
<HintPath>..\packages\HtmlAgilityPack.1.4.6\lib\Net45\HtmlAgilityPack.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="ICSharpCode.SharpZipLib">
|
||||
<HintPath>..\packages\SharpZipLib.0.86.0\lib\20\ICSharpCode.SharpZipLib.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="ImageProcessor">
|
||||
<HintPath>..\packages\ImageProcessor.1.9.0.0\lib\ImageProcessor.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="ImageProcessor.Web">
|
||||
<HintPath>..\packages\ImageProcessor.Web.3.2.3.0\lib\net45\ImageProcessor.Web.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="interfaces">
|
||||
<HintPath>..\packages\UmbracoCms.Core.7.1.2\lib\interfaces.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="log4net">
|
||||
<HintPath>..\packages\UmbracoCms.Core.7.1.2\lib\log4net.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="Lucene.Net">
|
||||
<HintPath>..\packages\Lucene.Net.2.9.4.1\lib\net40\Lucene.Net.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.ApplicationBlocks.Data">
|
||||
<HintPath>..\packages\UmbracoCms.Core.7.1.2\lib\Microsoft.ApplicationBlocks.Data.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Web.Helpers">
|
||||
<HintPath>..\packages\UmbracoCms.Core.7.1.2\lib\Microsoft.Web.Helpers.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Web.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<Private>True</Private>
|
||||
<Private>False</Private>
|
||||
<HintPath>..\packages\Microsoft.Web.Infrastructure.1.0.0.0\lib\net40\Microsoft.Web.Infrastructure.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Web.Mvc.FixedDisplayModes">
|
||||
<HintPath>..\packages\Microsoft.AspNet.Mvc.FixedDisplayModes.1.0.0\lib\net40\Microsoft.Web.Mvc.FixedDisplayModes.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="MiniProfiler">
|
||||
<HintPath>..\packages\MiniProfiler.2.1.0\lib\net40\MiniProfiler.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="MySql.Data">
|
||||
<HintPath>..\packages\MySql.Data.6.6.5\lib\net40\MySql.Data.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="Newtonsoft.Json">
|
||||
<HintPath>..\packages\Newtonsoft.Json.6.0.2\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="SQLCE4Umbraco">
|
||||
<HintPath>..\packages\UmbracoCms.Core.7.1.2\lib\SQLCE4Umbraco.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Data.SqlServerCe, Version=4.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91, processorArchitecture=MSIL">
|
||||
<Private>True</Private>
|
||||
<Private>False</Private>
|
||||
<HintPath>..\packages\UmbracoCms.Core.7.1.2\lib\System.Data.SqlServerCe.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Data.SqlServerCe.Entity, Version=4.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91, processorArchitecture=MSIL">
|
||||
<Private>True</Private>
|
||||
<Private>False</Private>
|
||||
<HintPath>..\packages\UmbracoCms.Core.7.1.2\lib\System.Data.SqlServerCe.Entity.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Net.Http.Formatting, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.AspNet.WebApi.Client.4.0.30506.0\lib\net40\System.Net.Http.Formatting.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="System.Web" />
|
||||
<Reference Include="System.Web.Helpers, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<Private>True</Private>
|
||||
<Private>False</Private>
|
||||
<HintPath>..\packages\Microsoft.AspNet.WebPages.2.0.20710.0\lib\net40\System.Web.Helpers.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Web.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.AspNet.WebApi.Core.4.0.20710.0\lib\net40\System.Web.Http.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="System.Web.Http.WebHost, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.AspNet.WebApi.WebHost.4.0.20710.0\lib\net40\System.Web.Http.WebHost.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="System.Web.Mvc, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<Private>True</Private>
|
||||
<Private>False</Private>
|
||||
<HintPath>..\packages\Microsoft.AspNet.Mvc.4.0.20710.0\lib\net40\System.Web.Mvc.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Web.Razor, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<Private>True</Private>
|
||||
<Private>False</Private>
|
||||
<HintPath>..\packages\Microsoft.AspNet.Razor.2.0.20710.0\lib\net40\System.Web.Razor.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Web.WebPages, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<Private>True</Private>
|
||||
<Private>False</Private>
|
||||
<HintPath>..\packages\Microsoft.AspNet.WebPages.2.0.20710.0\lib\net40\System.Web.WebPages.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Web.WebPages.Deployment, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<Private>True</Private>
|
||||
<Private>False</Private>
|
||||
<HintPath>..\packages\Microsoft.AspNet.WebPages.2.0.20710.0\lib\net40\System.Web.WebPages.Deployment.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Web.WebPages.Razor, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<Private>True</Private>
|
||||
<Private>False</Private>
|
||||
<HintPath>..\packages\Microsoft.AspNet.WebPages.2.0.20710.0\lib\net40\System.Web.WebPages.Razor.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
@@ -155,36 +181,47 @@
|
||||
<Reference Include="System.Xml" />
|
||||
<Reference Include="TidyNet">
|
||||
<HintPath>..\packages\UmbracoCms.Core.7.1.2\lib\TidyNet.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="umbraco">
|
||||
<HintPath>..\packages\UmbracoCms.Core.7.1.2\lib\umbraco.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="Umbraco.Core">
|
||||
<HintPath>..\packages\UmbracoCms.Core.7.1.2\lib\Umbraco.Core.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="umbraco.DataLayer">
|
||||
<HintPath>..\packages\UmbracoCms.Core.7.1.2\lib\umbraco.DataLayer.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="umbraco.editorControls">
|
||||
<HintPath>..\packages\UmbracoCms.Core.7.1.2\lib\umbraco.editorControls.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="umbraco.MacroEngines">
|
||||
<HintPath>..\packages\UmbracoCms.Core.7.1.2\lib\umbraco.MacroEngines.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="umbraco.providers">
|
||||
<HintPath>..\packages\UmbracoCms.Core.7.1.2\lib\umbraco.providers.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="Umbraco.Web.UI">
|
||||
<HintPath>..\packages\UmbracoCms.Core.7.1.2\lib\Umbraco.Web.UI.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="umbraco.XmlSerializers">
|
||||
<HintPath>..\packages\UmbracoCms.Core.7.1.2\lib\umbraco.XmlSerializers.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="UmbracoExamine">
|
||||
<HintPath>..\packages\UmbracoCms.Core.7.1.2\lib\UmbracoExamine.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="UrlRewritingNet.UrlRewriter">
|
||||
<HintPath>..\packages\UmbracoCms.Core.7.1.2\lib\UrlRewritingNet.UrlRewriter.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
|
||||
@@ -8,6 +8,9 @@ using Umbraco.Core.Models;
|
||||
using Umbraco.Web.Models.ContentEditing;
|
||||
using Umbraco.Web.Mvc;
|
||||
using Umbraco.Web.Editors;
|
||||
using Umbraco.Core.PropertyEditors;
|
||||
using Archetype.Extensions;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Archetype.Api
|
||||
{
|
||||
@@ -19,7 +22,7 @@ namespace Archetype.Api
|
||||
{
|
||||
return
|
||||
global::Umbraco.Core.PropertyEditors.PropertyEditorResolver.Current.PropertyEditors
|
||||
.Select(x => new {defaultPreValues = x.DefaultPreValues, alias = x.Alias, view = x.ValueEditor.View});
|
||||
.Select(x => new {defaultPreValues = x.DefaultPreValuesForArchetype(), alias = x.Alias, view = x.ValueEditor.View});
|
||||
}
|
||||
|
||||
public object GetAll()
|
||||
@@ -35,8 +38,20 @@ namespace Archetype.Api
|
||||
{
|
||||
throw new HttpResponseException(HttpStatusCode.NotFound);
|
||||
}
|
||||
|
||||
var dataTypeDisplay = Mapper.Map<IDataTypeDefinition, DataTypeDisplay>(dataType);
|
||||
return new { selectedEditor = dataTypeDisplay.SelectedEditor, preValues = dataTypeDisplay.PreValues };
|
||||
}
|
||||
|
||||
public object GetByGuid(Guid guid, string contentTypeAlias, string propertyTypeAlias, string archetypeAlias, int nodeId)
|
||||
{
|
||||
var dataType = Services.DataTypeService.GetDataTypeDefinitionById(guid);
|
||||
if (dataType == null)
|
||||
{
|
||||
throw new HttpResponseException(HttpStatusCode.NotFound);
|
||||
}
|
||||
var dataTypeDisplay = Mapper.Map<IDataTypeDefinition, DataTypeDisplay>(dataType);
|
||||
return new { selectedEditor = dataTypeDisplay.SelectedEditor, preValues = dataTypeDisplay.PreValues, contentTypeAlias = contentTypeAlias, propertyTypeAlias = propertyTypeAlias, archetypeAlias = archetypeAlias, nodeId = nodeId };
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -234,6 +234,7 @@
|
||||
<Compile Include="Extensions\ArchetypeHelper.cs" />
|
||||
<Compile Include="Extensions\HtmlHelperExtensions.cs" />
|
||||
<Compile Include="Extensions\ArchetypePropertyModelExtensions.cs" />
|
||||
<Compile Include="Extensions\PropertyEditorExtensions.cs" />
|
||||
<Compile Include="Extensions\StringExtensions.cs" />
|
||||
<Compile Include="Models\ArchetypeModel.cs" />
|
||||
<Compile Include="Models\ArchetypePreValue.cs" />
|
||||
|
||||
@@ -3,6 +3,7 @@ using System.Linq;
|
||||
using Archetype.Models;
|
||||
using Newtonsoft.Json;
|
||||
using Umbraco.Core;
|
||||
using Umbraco.Core.Logging;
|
||||
using Umbraco.Core.Models;
|
||||
using Umbraco.Core.Models.PublishedContent;
|
||||
|
||||
@@ -26,6 +27,8 @@ namespace Archetype.Extensions
|
||||
_app = ApplicationContext.Current;
|
||||
}
|
||||
|
||||
internal JsonSerializerSettings JsonSerializerSettings { get { return _jsonSettings; } }
|
||||
|
||||
internal ArchetypeModel DeserializeJsonToArchetype(string sourceJson, PreValueCollection dataTypePreValues)
|
||||
{
|
||||
try
|
||||
@@ -40,6 +43,7 @@ namespace Archetype.Extensions
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
LogHelper.Error<ArchetypeHelper>("DeserializeJsonToArchetype", ex);
|
||||
}
|
||||
|
||||
return archetype;
|
||||
@@ -64,6 +68,7 @@ namespace Archetype.Extensions
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
LogHelper.Error<ArchetypeHelper>("DeserializeJsonToArchetype", ex);
|
||||
}
|
||||
|
||||
return archetype;
|
||||
@@ -74,6 +79,15 @@ namespace Archetype.Extensions
|
||||
}
|
||||
}
|
||||
|
||||
internal bool IsPropertyValueConverterOverridden(int dataTypeId)
|
||||
{
|
||||
var prevalues = GetArchetypePreValueFromDataTypeId(dataTypeId);
|
||||
if (prevalues == null)
|
||||
return false;
|
||||
|
||||
return prevalues.OverrideDefaultPropertyValueConverter;
|
||||
}
|
||||
|
||||
private ArchetypePreValue GetArchetypePreValueFromDataTypeId(int dataTypeId)
|
||||
{
|
||||
return _app.ApplicationCache.RuntimeCache.GetCacheItem(
|
||||
@@ -101,7 +115,7 @@ namespace Archetype.Extensions
|
||||
return preValue;
|
||||
}
|
||||
|
||||
private IDataTypeDefinition GetDataTypeByGuid(Guid guid)
|
||||
internal IDataTypeDefinition GetDataTypeByGuid(Guid guid)
|
||||
{
|
||||
return (IDataTypeDefinition)ApplicationContext.Current.ApplicationCache.RuntimeCache.GetCacheItem(
|
||||
Constants.CacheKey_DataTypeByGuid + guid,
|
||||
|
||||
@@ -0,0 +1,58 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Newtonsoft.Json;
|
||||
using Umbraco.Core.PropertyEditors;
|
||||
|
||||
namespace Archetype.Extensions
|
||||
{
|
||||
public static class PropertyEditorExtensions
|
||||
{
|
||||
/// <summary>
|
||||
/// Formats the default prevalues for a property editor for use within an Archetype clientside context
|
||||
/// </summary>
|
||||
/// <param name="propertyEditor">The property editor</param>
|
||||
/// <returns>The formatted default prevalues</returns>
|
||||
public static IDictionary<string, object> DefaultPreValuesForArchetype(this PropertyEditor propertyEditor)
|
||||
{
|
||||
if (propertyEditor.DefaultPreValues == null || propertyEditor.DefaultPreValues.Any() == false)
|
||||
{
|
||||
return propertyEditor.DefaultPreValues;
|
||||
}
|
||||
var view = propertyEditor.ValueEditor.View.ToLowerInvariant();
|
||||
|
||||
// This is the extension point for default prevalues formatting, in case we need to handle any other
|
||||
// property editors later on. It should be replaced with a switch statement by then, or maybe some fancy
|
||||
// auto discovery of formatters :)
|
||||
if (view == "imagecropper")
|
||||
{
|
||||
propertyEditor.FormatImageCropperDefaultPreValuesForArchetype();
|
||||
}
|
||||
return propertyEditor.DefaultPreValues;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Format the default prevalues of the image cropper property editor
|
||||
/// </summary>
|
||||
/// <param name="propertyEditor"></param>
|
||||
/// <remarks>
|
||||
/// In order for the image cropper to work clientside, we need to make sure it's default prevalue "focalpoint" is returned
|
||||
/// as a JSON object and not as the string it's defined as on the image cropper property editor.
|
||||
/// </remarks>
|
||||
private static void FormatImageCropperDefaultPreValuesForArchetype(this PropertyEditor propertyEditor)
|
||||
{
|
||||
const string focalPointKey = "focalPoint";
|
||||
|
||||
if (propertyEditor.DefaultPreValues.ContainsKey(focalPointKey) == false || propertyEditor.DefaultPreValues[focalPointKey] == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
var focalPoint = propertyEditor.DefaultPreValues[focalPointKey].ToString();
|
||||
if (string.IsNullOrEmpty(focalPoint))
|
||||
{
|
||||
return;
|
||||
}
|
||||
// translate the JSON string to a JSON object
|
||||
propertyEditor.DefaultPreValues[focalPointKey] = JsonConvert.DeserializeObject(focalPoint);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2,6 +2,7 @@ using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Newtonsoft.Json;
|
||||
using Umbraco.Core;
|
||||
using System;
|
||||
|
||||
namespace Archetype.Models
|
||||
{
|
||||
@@ -16,6 +17,9 @@ namespace Archetype.Models
|
||||
[JsonProperty("properties")]
|
||||
public IEnumerable<ArchetypePropertyModel> Properties;
|
||||
|
||||
[JsonProperty("id")]
|
||||
public Guid Id { get; set; }
|
||||
|
||||
public ArchetypeFieldsetModel()
|
||||
{
|
||||
Properties = new List<ArchetypePropertyModel>();
|
||||
@@ -84,4 +88,4 @@ namespace Archetype.Models
|
||||
#endregion
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Linq;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Linq;
|
||||
|
||||
@@ -11,7 +11,7 @@ namespace Archetype.Models
|
||||
public class ArchetypeModel : IEnumerable<ArchetypeFieldsetModel>
|
||||
{
|
||||
[JsonProperty("fieldsets")]
|
||||
internal IEnumerable<ArchetypeFieldsetModel> Fieldsets { get; set; }
|
||||
public IEnumerable<ArchetypeFieldsetModel> Fieldsets { get; set; }
|
||||
|
||||
public ArchetypeModel()
|
||||
{
|
||||
@@ -28,9 +28,16 @@ namespace Archetype.Models
|
||||
return this.GetEnumerator();
|
||||
}
|
||||
|
||||
internal string SerializeForPersistence()
|
||||
public string SerializeForPersistence()
|
||||
{
|
||||
var json = JObject.Parse(JsonConvert.SerializeObject(this));
|
||||
// clear the editor state before serializing (it's temporary state data)
|
||||
foreach(var property in Fieldsets.SelectMany(f => f.Properties.Where(p => p.EditorState != null)).ToList())
|
||||
{
|
||||
property.EditorState = null;
|
||||
}
|
||||
|
||||
var json = JObject.Parse(JsonConvert.SerializeObject(this, new JsonSerializerSettings() { ReferenceLoopHandling = ReferenceLoopHandling.Ignore }));
|
||||
|
||||
var propertiesToRemove = new String[] { "propertyEditorAlias", "dataTypeId", "dataTypeGuid", "hostContentType" };
|
||||
|
||||
json.Descendants().OfType<JProperty>()
|
||||
@@ -38,7 +45,7 @@ namespace Archetype.Models
|
||||
.ToList()
|
||||
.ForEach(x => x.Remove());
|
||||
|
||||
return json.ToString(Formatting.None);//.DelintArchetypeJson();
|
||||
return json.ToString(Formatting.None);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,6 +20,9 @@ namespace Archetype.Models
|
||||
[JsonProperty("enableCollapsing")]
|
||||
public bool EnableCollapsing { get; set; }
|
||||
|
||||
[JsonProperty("enableCloning")]
|
||||
public bool EnableCloning { get; set; }
|
||||
|
||||
[JsonProperty("enableDisabling")]
|
||||
public bool EnableDisabling { get; set; }
|
||||
|
||||
@@ -29,6 +32,9 @@ namespace Archetype.Models
|
||||
[JsonProperty("hidePropertyLabel")]
|
||||
public bool HidePropertyLabel { get; set; }
|
||||
|
||||
[JsonProperty("minFieldsets", NullValueHandling = NullValueHandling.Ignore)]
|
||||
public int MinFieldsets { get; set; }
|
||||
|
||||
[JsonProperty("maxFieldsets", NullValueHandling = NullValueHandling.Ignore)]
|
||||
public int MaxFieldsets { get; set; }
|
||||
|
||||
@@ -50,7 +56,13 @@ namespace Archetype.Models
|
||||
[JsonProperty("customViewPath")]
|
||||
public string CustomViewPath { get; set; }
|
||||
|
||||
[JsonProperty("enableDeepDatatypeRequests")]
|
||||
public bool EnableDeepDatatypeRequests { get; set; }
|
||||
|
||||
[JsonProperty("developerMode")]
|
||||
public bool DeveloperMode { get; set; }
|
||||
|
||||
[JsonProperty("overrideDefaultPropertyValueConverter")]
|
||||
public bool OverrideDefaultPropertyValueConverter { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,10 +12,10 @@ namespace Archetype.Models
|
||||
public class ArchetypePropertyModel
|
||||
{
|
||||
[JsonProperty("alias")]
|
||||
public string Alias { get; internal set; }
|
||||
public string Alias { get; set; }
|
||||
|
||||
[JsonProperty("value")]
|
||||
public object Value { get; internal set; }
|
||||
public object Value { get; set; }
|
||||
|
||||
[JsonProperty("propertyEditorAlias")]
|
||||
public string PropertyEditorAlias { get; internal set; }
|
||||
@@ -26,15 +26,18 @@ namespace Archetype.Models
|
||||
[JsonProperty("dataTypeGuid")]
|
||||
internal string DataTypeGuid { get; set; }
|
||||
|
||||
// container for temporary editor state from the Umbraco backend
|
||||
[JsonProperty("editorState")]
|
||||
internal UmbracoEditorState EditorState { get; set; }
|
||||
|
||||
[JsonProperty("hostContentType")]
|
||||
internal PublishedContentType HostContentType { get; set; }
|
||||
|
||||
public T GetValue<T>()
|
||||
{
|
||||
|
||||
// Try Umbraco's PropertyValueConverters
|
||||
var converters = UmbracoContext.Current != null ? PropertyValueConvertersResolver.Current.Converters : Enumerable.Empty<IPropertyValueConverter>();
|
||||
if (converters.Any())
|
||||
if (!string.IsNullOrWhiteSpace(this.PropertyEditorAlias) && converters.Any())
|
||||
{
|
||||
var convertedAttempt = TryConvertWithPropertyValueConverters<T>(Value, converters);
|
||||
if (convertedAttempt.Success)
|
||||
@@ -73,6 +76,13 @@ namespace Archetype.Models
|
||||
if (value2 is T)
|
||||
return Attempt<T>.Succeed((T)value2);
|
||||
|
||||
// If ConvertDataToSource failed try ConvertSourceToObject.
|
||||
var value3 = converter.ConvertSourceToObject(properyType, value2, false);
|
||||
|
||||
// If the value is of type T, just return it
|
||||
if (value3 is T)
|
||||
return Attempt<T>.Succeed((T)value3);
|
||||
|
||||
// Value is not final value type, so try a regular type conversion aswell
|
||||
var convertAttempt = value2.TryConvertTo<T>();
|
||||
if (convertAttempt.Success)
|
||||
@@ -81,5 +91,12 @@ namespace Archetype.Models
|
||||
|
||||
return Attempt<T>.Fail();
|
||||
}
|
||||
|
||||
internal class UmbracoEditorState
|
||||
{
|
||||
// container for the names of any files selected for a property in the Umbraco backend
|
||||
[JsonProperty("fileNames")]
|
||||
public IEnumerable<string> FileNames;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@ using System.Runtime.InteropServices;
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("Imulus")]
|
||||
[assembly: AssemblyProduct("Archetype")]
|
||||
[assembly: AssemblyCopyright("Copyright \xa9 Imulus 2014")]
|
||||
[assembly: AssemblyCopyright("MIT Licensed")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using System.Reflection;
|
||||
|
||||
[assembly: AssemblyVersion("1.4.0")]
|
||||
[assembly: AssemblyFileVersion("1.4.0-beta")]
|
||||
[assembly: AssemblyVersion("1.9")]
|
||||
[assembly: AssemblyFileVersion("1.9")]
|
||||
|
||||
@@ -12,7 +12,6 @@ namespace Archetype.PropertyConverters
|
||||
[PropertyValueCache(PropertyCacheValue.All, PropertyCacheLevel.Content)]
|
||||
public class ArchetypeValueConverter : PropertyValueConverterBase
|
||||
{
|
||||
|
||||
public ServiceContext Services
|
||||
{
|
||||
get { return ApplicationContext.Current.Services; }
|
||||
@@ -20,8 +19,12 @@ namespace Archetype.PropertyConverters
|
||||
|
||||
public override bool IsConverter(PublishedPropertyType propertyType)
|
||||
{
|
||||
return !String.IsNullOrEmpty(propertyType.PropertyEditorAlias)
|
||||
var isArcheTypePropertyEditor = !String.IsNullOrEmpty(propertyType.PropertyEditorAlias)
|
||||
&& propertyType.PropertyEditorAlias.Equals(Constants.PropertyEditorAlias);
|
||||
if (!isArcheTypePropertyEditor)
|
||||
return false;
|
||||
|
||||
return !ArchetypeHelper.Instance.IsPropertyValueConverterOverridden(propertyType.DataTypeId);
|
||||
}
|
||||
|
||||
public override object ConvertDataToSource(PublishedPropertyType propertyType, object source, bool preview)
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Archetype.Extensions;
|
||||
using ClientDependency.Core;
|
||||
using Newtonsoft.Json;
|
||||
@@ -10,11 +11,12 @@ using Umbraco.Core.Models.Editors;
|
||||
using Umbraco.Core.PropertyEditors;
|
||||
using Umbraco.Core.Services;
|
||||
using Umbraco.Web.PropertyEditors;
|
||||
using Umbraco.Web.Models.ContentEditing;
|
||||
|
||||
namespace Archetype.PropertyEditors
|
||||
{
|
||||
[PropertyEditorAsset(ClientDependencyType.Javascript, "/App_Plugins/Archetype/js/archetype.js")]
|
||||
[PropertyEditor("Imulus.Archetype", "Archetype", "/App_Plugins/Archetype/views/archetype.html", ValueType = "JSON")]
|
||||
[PropertyEditorAsset(ClientDependencyType.Javascript, "../App_Plugins/Archetype/js/archetype.js")]
|
||||
[PropertyEditor(Constants.PropertyEditorAlias, "Archetype", "../App_Plugins/Archetype/views/archetype.html", ValueType = "JSON")]
|
||||
public class ArchetypePropertyEditor : PropertyEditor
|
||||
{
|
||||
#region Pre Value Editor
|
||||
@@ -26,7 +28,7 @@ namespace Archetype.PropertyEditors
|
||||
|
||||
internal class ArchetypePreValueEditor : PreValueEditor
|
||||
{
|
||||
[PreValueField("archetypeConfig", "Config", "/App_Plugins/Archetype/views/archetype.config.html",
|
||||
[PreValueField("archetypeConfig", "Config", "../App_Plugins/Archetype/views/archetype.config.html",
|
||||
Description = "(Required) Describe your Archetype.")]
|
||||
public string Config { get; set; }
|
||||
|
||||
@@ -49,111 +51,141 @@ namespace Archetype.PropertyEditors
|
||||
protected JsonSerializerSettings _jsonSettings;
|
||||
|
||||
public ArchetypePropertyValueEditor(PropertyValueEditor wrapped)
|
||||
: base(wrapped) { }
|
||||
: base(wrapped)
|
||||
{
|
||||
}
|
||||
|
||||
public override string ConvertDbToString(Property property, PropertyType propertyType, IDataTypeService dataTypeService)
|
||||
{
|
||||
if (property.Value == null || property.Value.ToString() == "")
|
||||
return string.Empty;
|
||||
|
||||
//LogHelper.Info<ArchetypeHelper>(property.Value.ToString());
|
||||
if(property.Value == null || property.Value.ToString() == "")
|
||||
return string.Empty;
|
||||
|
||||
var archetype = ArchetypeHelper.Instance.DeserializeJsonToArchetype(property.Value.ToString(), propertyType.DataTypeDefinitionId);
|
||||
|
||||
foreach (var fieldset in archetype.Fieldsets)
|
||||
{
|
||||
foreach (var propDef in fieldset.Properties)
|
||||
foreach (var propDef in fieldset.Properties.Where(p => p.DataTypeGuid != null))
|
||||
{
|
||||
try
|
||||
{
|
||||
var dtd = dataTypeService.GetDataTypeDefinitionById(Guid.Parse(propDef.DataTypeGuid));
|
||||
var propType = new PropertyType(dtd) { Alias = propDef.Alias };
|
||||
var prop = new Property(propType, propDef.Value);
|
||||
var propEditor = PropertyEditorResolver.Current.GetByAlias(dtd.PropertyEditorAlias);
|
||||
propDef.Value = propEditor.ValueEditor.ConvertDbToString(prop, propType, dataTypeService);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
LogHelper.Error<ArchetypeHelper>(ex.Message, ex);
|
||||
}
|
||||
try
|
||||
{
|
||||
if(propDef == null || propDef.DataTypeGuid == null) continue;
|
||||
var dtd = ArchetypeHelper.Instance.GetDataTypeByGuid(Guid.Parse(propDef.DataTypeGuid));
|
||||
var propType = new PropertyType(dtd) {Alias = propDef.Alias};
|
||||
var prop = new Property(propType, propDef.Value);
|
||||
var propEditor = PropertyEditorResolver.Current.GetByAlias(dtd.PropertyEditorAlias);
|
||||
propDef.Value = propEditor.ValueEditor.ConvertDbToString(prop, propType, dataTypeService);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
LogHelper.Error<ArchetypePropertyValueEditor>(ex.Message, ex);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return archetype.SerializeForPersistence();
|
||||
return archetype.SerializeForPersistence();
|
||||
}
|
||||
|
||||
public override object ConvertDbToEditor(Property property, PropertyType propertyType, IDataTypeService dataTypeService)
|
||||
{
|
||||
if (property.Value == null || property.Value.ToString() == "")
|
||||
return string.Empty;
|
||||
|
||||
//LogHelper.Info<ArchetypeHelper>(property.Value.ToString());
|
||||
if(property.Value == null || property.Value.ToString() == "")
|
||||
return string.Empty;
|
||||
|
||||
var archetype = ArchetypeHelper.Instance.DeserializeJsonToArchetype(property.Value.ToString(), propertyType.DataTypeDefinitionId);
|
||||
|
||||
foreach (var fieldset in archetype.Fieldsets)
|
||||
{
|
||||
foreach (var propDef in fieldset.Properties)
|
||||
foreach (var propDef in fieldset.Properties.Where(p => p.DataTypeGuid != null))
|
||||
{
|
||||
try
|
||||
{
|
||||
var dtd = dataTypeService.GetDataTypeDefinitionById(Guid.Parse(propDef.DataTypeGuid));
|
||||
var propType = new PropertyType(dtd) { Alias = propDef.Alias };
|
||||
var prop = new Property(propType, propDef.Value);
|
||||
var propEditor = PropertyEditorResolver.Current.GetByAlias(dtd.PropertyEditorAlias);
|
||||
propDef.Value = propEditor.ValueEditor.ConvertDbToEditor(prop, propType, dataTypeService);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
LogHelper.Error<ArchetypeHelper>(ex.Message, ex);
|
||||
}
|
||||
try
|
||||
{
|
||||
var dtd = ArchetypeHelper.Instance.GetDataTypeByGuid(Guid.Parse(propDef.DataTypeGuid));
|
||||
var propType = new PropertyType(dtd) {Alias = propDef.Alias};
|
||||
var prop = new Property(propType, propDef.Value);
|
||||
var propEditor = PropertyEditorResolver.Current.GetByAlias(dtd.PropertyEditorAlias);
|
||||
propDef.Value = propEditor.ValueEditor.ConvertDbToEditor(prop, propType, dataTypeService);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
LogHelper.Error<ArchetypePropertyValueEditor>(ex.Message, ex);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return archetype;
|
||||
}
|
||||
public override object ConvertEditorToDb(ContentPropertyData editorValue, object currentValue)
|
||||
{
|
||||
if (editorValue.Value == null || editorValue.Value.ToString() == "")
|
||||
return string.Empty;
|
||||
|
||||
//LogHelper.Info<ArchetypeHelper>(editorValue.Value.ToString());
|
||||
|
||||
public override object ConvertEditorToDb(ContentPropertyData editorValue, object currentValue)
|
||||
{
|
||||
if(editorValue.Value == null || editorValue.Value.ToString() == "")
|
||||
return string.Empty;
|
||||
|
||||
// attempt to deserialize the current property value as an Archetype
|
||||
var currentArchetype = currentValue != null ? ArchetypeHelper.Instance.DeserializeJsonToArchetype(currentValue.ToString(), editorValue.PreValues) : null;
|
||||
var archetype = ArchetypeHelper.Instance.DeserializeJsonToArchetype(editorValue.Value.ToString(), editorValue.PreValues);
|
||||
|
||||
// get all files uploaded via the file manager (if any)
|
||||
var uploadedFiles = editorValue.AdditionalData.ContainsKey("files") ? editorValue.AdditionalData["files"] as IEnumerable<ContentItemFile> : null;
|
||||
foreach (var fieldset in archetype.Fieldsets)
|
||||
{
|
||||
// assign an id to the fieldset if it has none (e.g. newly created fieldset)
|
||||
fieldset.Id = fieldset.Id == Guid.Empty ? Guid.NewGuid() : fieldset.Id;
|
||||
// find the corresponding fieldset in the current Archetype value (if any)
|
||||
var currentFieldset = currentArchetype != null ? currentArchetype.Fieldsets.FirstOrDefault(f => f.Id == fieldset.Id) : null;
|
||||
foreach (var propDef in fieldset.Properties)
|
||||
{
|
||||
try
|
||||
{
|
||||
var dtd = ApplicationContext.Current.Services.DataTypeService.GetDataTypeDefinitionById(Guid.Parse(propDef.DataTypeGuid));
|
||||
var preValues = ApplicationContext.Current.Services.DataTypeService.GetPreValuesCollectionByDataTypeId(dtd.Id);
|
||||
var propData = new ContentPropertyData(propDef.Value, preValues, new Dictionary<string, object>());
|
||||
var propEditor = PropertyEditorResolver.Current.GetByAlias(dtd.PropertyEditorAlias);
|
||||
propDef.Value = propEditor.ValueEditor.ConvertEditorToDb(propData, propDef.Value);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
LogHelper.Error<ArchetypeHelper>(ex.Message, ex);
|
||||
}
|
||||
try
|
||||
{
|
||||
// find the corresponding property in the current Archetype value (if any)
|
||||
var currentProperty = currentFieldset != null ? currentFieldset.Properties.FirstOrDefault(p => p.Alias == propDef.Alias) : null;
|
||||
var dtd = ArchetypeHelper.Instance.GetDataTypeByGuid(Guid.Parse(propDef.DataTypeGuid));
|
||||
var preValues = ApplicationContext.Current.Services.DataTypeService.GetPreValuesCollectionByDataTypeId(dtd.Id);
|
||||
|
||||
var additionalData = new Dictionary<string, object>();
|
||||
|
||||
// figure out if we need to pass a files collection in the additional data to the property value editor
|
||||
if(uploadedFiles != null)
|
||||
{
|
||||
if(dtd.PropertyEditorAlias == Constants.PropertyEditorAlias)
|
||||
{
|
||||
// it's a nested Archetype - just pass all uploaded files to the value editor
|
||||
additionalData["files"] = uploadedFiles.ToList();
|
||||
}
|
||||
else if (propDef.EditorState != null && propDef.EditorState.FileNames != null && propDef.EditorState.FileNames.Any())
|
||||
{
|
||||
// pass the uploaded files that belongs to this property (if any) to the value editor
|
||||
var propertyFiles = propDef.EditorState.FileNames.Select(f => uploadedFiles.FirstOrDefault(u => u.FileName == f)).Where(f => f != null).ToList();
|
||||
if(propertyFiles.Any())
|
||||
{
|
||||
additionalData["files"] = propertyFiles;
|
||||
}
|
||||
}
|
||||
}
|
||||
var propData = new ContentPropertyData(propDef.Value, preValues, additionalData);
|
||||
var propEditor = PropertyEditorResolver.Current.GetByAlias(dtd.PropertyEditorAlias);
|
||||
// make sure to send the current property value (if any) to the PE ValueEditor
|
||||
propDef.Value = propEditor.ValueEditor.ConvertEditorToDb(propData, currentProperty != null ? currentProperty.Value : null);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
LogHelper.Error<ArchetypePropertyValueEditor>(ex.Message, ex);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return archetype.SerializeForPersistence();
|
||||
}
|
||||
|
||||
internal virtual PropertyEditor GetPropertyEditor(IDataTypeDefinition dtd)
|
||||
{
|
||||
if (dtd.Id != 0)
|
||||
return PropertyEditorResolver.Current.GetByAlias(dtd.PropertyEditorAlias);
|
||||
|
||||
return dtd.PropertyEditorAlias.Equals(Constants.PropertyEditorAlias)
|
||||
? new ArchetypePropertyEditor()
|
||||
: (PropertyEditor)new TextboxPropertyEditor();
|
||||
}
|
||||
return archetype.SerializeForPersistence();
|
||||
}
|
||||
|
||||
internal virtual PropertyEditor GetPropertyEditor(IDataTypeDefinition dtd)
|
||||
{
|
||||
if(dtd.Id != 0)
|
||||
return PropertyEditorResolver.Current.GetByAlias(dtd.PropertyEditorAlias);
|
||||
|
||||
return dtd.PropertyEditorAlias.Equals(Constants.PropertyEditorAlias)
|
||||
? new ArchetypePropertyEditor()
|
||||
: (PropertyEditor) new TextboxPropertyEditor();
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@ angular.module("umbraco").controller("Imulus.ArchetypeConfigController", functio
|
||||
//define empty items
|
||||
var newPropertyModel = '{"alias": "", "remove": false, "collapse": false, "label": "", "helpText": "", "dataTypeGuid": "0cc0eba1-9960-42c9-bf9b-60e150b429ae", "value": ""}';
|
||||
var newFieldsetModel = '{"alias": "", "remove": false, "collapse": false, "labelTemplate": "", "icon": "", "label": "", "properties": [' + newPropertyModel + ']}';
|
||||
var defaultFieldsetConfigModel = JSON.parse('{"showAdvancedOptions": false, "startWithAddButton": false, "hideFieldsetToolbar": false, "enableMultipleFieldsets": false, "hideFieldsetControls": false, "hidePropertyLabel": false, "maxFieldsets": null, "enableCollapsing": true, "enableDisabling": true, "fieldsets": [' + newFieldsetModel + ']}');
|
||||
var defaultFieldsetConfigModel = JSON.parse('{"showAdvancedOptions": false, "startWithAddButton": false, "hideFieldsetToolbar": false, "enableMultipleFieldsets": false, "hideFieldsetControls": false, "hidePropertyLabel": false, "minFieldsets": null, "maxFieldsets": null, "enableCollapsing": true, "enableCloning": false, "enableDisabling": true, "enableDeepDatatypeRequests": false, "fieldsets": [' + newFieldsetModel + ']}');
|
||||
|
||||
//ini the model
|
||||
$scope.model.value = $scope.model.value || defaultFieldsetConfigModel;
|
||||
@@ -104,7 +104,7 @@ angular.module("umbraco").controller("Imulus.ArchetypeConfigController", functio
|
||||
|
||||
//ini the properties
|
||||
_.each($scope.archetypeConfigRenderModel.fieldsets, function(fieldset){
|
||||
$scope.focusProperty(fieldset.properties);
|
||||
$scope.focusProperty(fieldset.properties);
|
||||
});
|
||||
|
||||
//setup JSON.stringify helpers
|
||||
@@ -290,5 +290,5 @@ angular.module("umbraco").controller("Imulus.ArchetypeConfigController", functio
|
||||
}
|
||||
|
||||
//archetype css
|
||||
assetsService.loadCss("/App_Plugins/Archetype/css/archetype.css");
|
||||
assetsService.loadCss("../App_Plugins/Archetype/css/archetype.css");
|
||||
});
|
||||
|
||||
+128
-31
@@ -1,4 +1,4 @@
|
||||
angular.module("umbraco").controller("Imulus.ArchetypeController", function ($scope, $http, assetsService, angularHelper, notificationsService, $timeout) {
|
||||
angular.module("umbraco").controller("Imulus.ArchetypeController", function ($scope, $http, assetsService, angularHelper, notificationsService, $timeout, fileManager, entityResource, archetypeService, archetypeLabelService, archetypeCacheService, archetypePropertyEditorResource) {
|
||||
|
||||
//$scope.model.value = "";
|
||||
$scope.model.hideLabel = $scope.model.config.hideLabel == 1;
|
||||
@@ -17,49 +17,66 @@
|
||||
|
||||
init();
|
||||
|
||||
//hold references to helper resources
|
||||
$scope.resources = {
|
||||
entityResource: entityResource,
|
||||
archetypePropertyEditorResource: archetypePropertyEditorResource
|
||||
}
|
||||
|
||||
//hold references to helper services
|
||||
$scope.services = {
|
||||
archetypeService: archetypeService,
|
||||
archetypeLabelService: archetypeLabelService,
|
||||
archetypeCacheService: archetypeCacheService
|
||||
}
|
||||
|
||||
//helper to get $eval the labelTemplate
|
||||
$scope.getFieldsetTitle = function(fieldsetConfigModel, fieldsetIndex) {
|
||||
if(!fieldsetConfigModel)
|
||||
return "";
|
||||
var fieldset = $scope.model.value.fieldsets[fieldsetIndex];
|
||||
var fieldsetConfig = $scope.getConfigFieldsetByAlias(fieldset.alias);
|
||||
var template = fieldsetConfigModel.labelTemplate;
|
||||
$scope.getFieldsetTitle = function (fieldsetConfigModel, fieldsetIndex) {
|
||||
return archetypeLabelService.getFieldsetTitle($scope, fieldsetConfigModel, fieldsetIndex);
|
||||
}
|
||||
|
||||
if (template.length < 1)
|
||||
return fieldsetConfig.label;
|
||||
|
||||
var rgx = /{{(.*?)}}*/g;
|
||||
var results;
|
||||
var parsedTemplate = template;
|
||||
|
||||
while ((results = rgx.exec(template)) !== null) {
|
||||
var propertyAlias = results[1];
|
||||
var propertyValue = $scope.getPropertyValueByAlias(fieldset, propertyAlias);
|
||||
parsedTemplate = parsedTemplate.replace(results[0], propertyValue);
|
||||
}
|
||||
|
||||
return parsedTemplate;
|
||||
};
|
||||
var draggedRteSettings;
|
||||
var rteClass = ".mce-tinymce";
|
||||
|
||||
//sort config
|
||||
$scope.sortableOptions = {
|
||||
axis: 'y',
|
||||
cursor: "move",
|
||||
handle: ".handle",
|
||||
start: function(ev, ui) {
|
||||
draggedRteSettings = {};
|
||||
ui.item.parent().find(rteClass).each(function () {
|
||||
// remove all RTEs in the dragged row and save their settings
|
||||
var $element = $(this);
|
||||
var wrapperId = $element.attr('id');
|
||||
var $textarea = $element.siblings('textarea');
|
||||
var textareaId = $textarea.attr('id');
|
||||
|
||||
draggedRteSettings[textareaId] = _.findWhere(tinyMCE.editors, { id: textareaId }).settings;
|
||||
tinyMCE.execCommand('mceRemoveEditor', false, wrapperId);
|
||||
});
|
||||
},
|
||||
update: function (ev, ui) {
|
||||
$scope.setDirty();
|
||||
},
|
||||
stop: function (ev, ui) {
|
||||
ui.item.parent().find(rteClass).each(function () {
|
||||
var $element = $(this);
|
||||
var wrapperId = $element.attr('id');
|
||||
var $textarea = $element.siblings('textarea');
|
||||
var textareaId = $textarea.attr('id');
|
||||
|
||||
draggedRteSettings[textareaId] = draggedRteSettings[textareaId] || _.findWhere(tinyMCE.editors, { id: textareaId }).settings;
|
||||
tinyMCE.execCommand('mceRemoveEditor', false, wrapperId);
|
||||
tinyMCE.init(draggedRteSettings[textareaId]);
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
//handles a fieldset add
|
||||
$scope.addRow = function (fieldsetAlias, $index) {
|
||||
if ($scope.canAdd())
|
||||
{
|
||||
if ($scope.model.config.fieldsets)
|
||||
{
|
||||
if ($scope.canAdd()) {
|
||||
if ($scope.model.config.fieldsets) {
|
||||
var newFieldset = getEmptyRenderFieldset($scope.getConfigFieldsetByAlias(fieldsetAlias));
|
||||
|
||||
if (typeof $index != 'undefined')
|
||||
@@ -71,8 +88,11 @@
|
||||
$scope.model.value.fieldsets.push(newFieldset);
|
||||
}
|
||||
}
|
||||
|
||||
$scope.setDirty();
|
||||
|
||||
$scope.$broadcast("archetypeAddFieldset", {index: $index, visible: countVisible()});
|
||||
|
||||
newFieldset.collapse = $scope.model.config.enableCollapsing ? true : false;
|
||||
$scope.focusFieldset(newFieldset);
|
||||
}
|
||||
@@ -83,6 +103,23 @@
|
||||
if (confirm('Are you sure you want to remove this?')) {
|
||||
$scope.setDirty();
|
||||
$scope.model.value.fieldsets.splice($index, 1);
|
||||
$scope.$broadcast("archetypeRemoveFieldset", {index: $index, visible: countVisible()});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$scope.cloneRow = function ($index) {
|
||||
if ($scope.canClone() && typeof $index != 'undefined') {
|
||||
var newFieldset = angular.copy($scope.model.value.fieldsets[$index]);
|
||||
|
||||
if(newFieldset) {
|
||||
|
||||
$scope.model.value.fieldsets.splice($index + 1, 0, newFieldset);
|
||||
|
||||
$scope.setDirty();
|
||||
|
||||
newFieldset.collapse = $scope.model.config.enableCollapsing ? true : false;
|
||||
$scope.focusFieldset(newFieldset);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -94,8 +131,7 @@
|
||||
}
|
||||
|
||||
//helpers for determining if a user can do something
|
||||
$scope.canAdd = function ()
|
||||
{
|
||||
$scope.canAdd = function () {
|
||||
if ($scope.model.config.maxFieldsets)
|
||||
{
|
||||
return countVisible() < $scope.model.config.maxFieldsets;
|
||||
@@ -105,13 +141,26 @@
|
||||
}
|
||||
|
||||
//helper that returns if an item can be removed
|
||||
$scope.canRemove = function ()
|
||||
{
|
||||
$scope.canRemove = function () {
|
||||
return countVisible() > 1
|
||||
|| ($scope.model.config.maxFieldsets == 1 && $scope.model.config.fieldsets.length > 1)
|
||||
|| $scope.model.config.startWithAddButton;
|
||||
}
|
||||
|
||||
$scope.canClone = function () {
|
||||
|
||||
if (!$scope.model.config.enableCloning) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if ($scope.model.config.maxFieldsets)
|
||||
{
|
||||
return countVisible() < $scope.model.config.maxFieldsets;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
//helper that returns if an item can be sorted
|
||||
$scope.canSort = function ()
|
||||
{
|
||||
@@ -206,11 +255,36 @@
|
||||
//developerMode helpers
|
||||
$scope.model.value.toString = stringify;
|
||||
|
||||
// issue 114: register handler for file selection
|
||||
$scope.model.value.setFiles = setFiles;
|
||||
|
||||
//encapsulate stringify (should be built into browsers, not sure of IE support)
|
||||
function stringify() {
|
||||
return JSON.stringify(this);
|
||||
}
|
||||
|
||||
// issue 114: handler for file selection
|
||||
function setFiles(files) {
|
||||
// get all currently selected files from file manager
|
||||
var currentFiles = fileManager.getFiles();
|
||||
|
||||
// get the files already selected for this archetype (by alias)
|
||||
var archetypeFiles = [];
|
||||
_.each(currentFiles, function (item) {
|
||||
if (item.alias === $scope.model.alias) {
|
||||
archetypeFiles.push(item.file);
|
||||
}
|
||||
});
|
||||
|
||||
// add the newly selected files
|
||||
_.each(files, function (file) {
|
||||
archetypeFiles.push(file);
|
||||
});
|
||||
|
||||
// update the selected files for this archetype (by alias)
|
||||
fileManager.setFiles($scope.model.alias, archetypeFiles);
|
||||
}
|
||||
|
||||
//watch for changes
|
||||
$scope.$watch('model.value', function (v) {
|
||||
if ($scope.model.config.developerMode) {
|
||||
@@ -220,6 +294,13 @@
|
||||
$scope.model.value.toString = stringify;
|
||||
}
|
||||
}
|
||||
|
||||
// issue 114: re-register handler for files selection and reset the currently selected files on the file manager
|
||||
$scope.model.value.setFiles = setFiles;
|
||||
fileManager.setFiles($scope.model.alias, []);
|
||||
|
||||
// reset submit watcher counter on save
|
||||
$scope.activeSubmitWatcher = 0;
|
||||
});
|
||||
|
||||
//helper to count what is visible
|
||||
@@ -286,6 +367,7 @@
|
||||
|
||||
// recursive validation of nested fieldsets
|
||||
var nestedFieldsetsValid = true;
|
||||
|
||||
_.each(fieldset.properties, function (property) {
|
||||
if (property != null && property.value != null && property.propertyEditorAlias == "Imulus.Archetype") {
|
||||
_.each(property.value.fieldsets, function (inner) {
|
||||
@@ -312,11 +394,26 @@
|
||||
}
|
||||
|
||||
//archetype css
|
||||
assetsService.loadCss("/App_Plugins/Archetype/css/archetype.css");
|
||||
assetsService.loadCss("../App_Plugins/Archetype/css/archetype.css");
|
||||
|
||||
//custom css
|
||||
if($scope.model.config.customCssPath)
|
||||
{
|
||||
assetsService.loadCss($scope.model.config.customCssPath);
|
||||
}
|
||||
|
||||
// submit watcher handling:
|
||||
// because some property editors use the "formSubmitting" event to set/clean up their model.value,
|
||||
// we need to monitor the "formSubmitting" event from a custom property and broadcast our own event
|
||||
// to forcefully update the appropriate model.value's
|
||||
$scope.activeSubmitWatcher = 0;
|
||||
|
||||
$scope.submitWatcherOnLoad = function () {
|
||||
$scope.activeSubmitWatcher++;
|
||||
return $scope.activeSubmitWatcher;
|
||||
}
|
||||
|
||||
$scope.submitWatcherOnSubmit = function () {
|
||||
$scope.$broadcast("archetypeFormSubmitting");
|
||||
}
|
||||
});
|
||||
|
||||
@@ -12,7 +12,7 @@ angular.module("umbraco.directives").directive('archetypeLocalize', function (ar
|
||||
|
||||
return {
|
||||
restrict: "E",
|
||||
rep1ace: true,
|
||||
replace: true,
|
||||
link: linker,
|
||||
scope: {
|
||||
key: '@'
|
||||
@@ -3,10 +3,10 @@ angular.module("umbraco.directives").directive('archetypeCustomView', function (
|
||||
|
||||
var view = "/App_plugins/Archetype/views/archetype.default.html";
|
||||
if(scope.model.config.customViewPath) {
|
||||
view = config.customViewPath;
|
||||
view = scope.model.config.customViewPath;
|
||||
}
|
||||
|
||||
$http.get(view).then(function(data) {
|
||||
$http.get(view, { cache: true }).then(function(data) {
|
||||
|
||||
element.html(data.data).show();
|
||||
|
||||
|
||||
+119
-154
@@ -1,79 +1,33 @@
|
||||
angular.module("umbraco.directives").directive('archetypeProperty', function ($compile, $http, archetypePropertyEditorResource, umbPropEditorHelper, $timeout, $rootScope, $q) {
|
||||
|
||||
function getFieldsetByAlias(fieldsets, alias)
|
||||
{
|
||||
return _.find(fieldsets, function(fieldset){
|
||||
return fieldset.alias == alias;
|
||||
});
|
||||
}
|
||||
|
||||
function getPropertyIndexByAlias(properties, alias){
|
||||
for (var i in properties)
|
||||
{
|
||||
if (properties[i].alias == alias) {
|
||||
return i;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function getPropertyByAlias(fieldset, alias){
|
||||
return _.find(fieldset.properties, function(property){
|
||||
return property.alias == alias;
|
||||
});
|
||||
}
|
||||
|
||||
//helper that returns a JS ojbect from 'value' string or the original string
|
||||
function jsonOrString(value, developerMode, debugLabel){
|
||||
if(value && typeof value == 'string'){
|
||||
try{
|
||||
if(developerMode == '1'){
|
||||
console.log("Trying to parse " + debugLabel + ": " + value);
|
||||
}
|
||||
value = JSON.parse(value);
|
||||
}
|
||||
catch(exception)
|
||||
{
|
||||
if(developerMode == '1'){
|
||||
console.log("Failed to parse " + debugLabel + ".");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(value && developerMode == '1'){
|
||||
console.log(debugLabel + " post-parsing: ");
|
||||
console.log(value);
|
||||
}
|
||||
|
||||
return value;
|
||||
}
|
||||
angular.module("umbraco.directives").directive('archetypeProperty', function ($compile, $http, archetypePropertyEditorResource, umbPropEditorHelper, $timeout, $rootScope, $q, fileManager, editorState, archetypeService, archetypeCacheService, notificationsService) {
|
||||
|
||||
var linker = function (scope, element, attrs, ngModelCtrl) {
|
||||
var configFieldsetModel = getFieldsetByAlias(scope.archetypeConfig.fieldsets, scope.fieldset.alias);
|
||||
var configFieldsetModel = archetypeService.getFieldsetByAlias(scope.archetypeConfig.fieldsets, scope.fieldset.alias);
|
||||
var view = "";
|
||||
var label = configFieldsetModel.properties[scope.propertyConfigIndex].label;
|
||||
var dataTypeGuid = configFieldsetModel.properties[scope.propertyConfigIndex].dataTypeGuid;
|
||||
var config = null;
|
||||
var alias = configFieldsetModel.properties[scope.propertyConfigIndex].alias;
|
||||
var defaultValue = configFieldsetModel.properties[scope.propertyConfigIndex].value;
|
||||
var propertyAlias = getUniquePropertyAlias(scope);
|
||||
propertyAliasParts = [];
|
||||
// initialize container for invalid fieldset property identifiers (store on ngModelCtrl to separate Archetype validations, e.g. when there two Archetype properties on the same document)
|
||||
if(ngModelCtrl.invalidProperties == null) {
|
||||
ngModelCtrl.invalidProperties = [];
|
||||
}
|
||||
|
||||
var propertyAliasParts = [];
|
||||
var propertyAlias = archetypeService.getUniquePropertyAlias(scope, propertyAliasParts);
|
||||
|
||||
//try to convert the defaultValue to a JS object
|
||||
defaultValue = jsonOrString(defaultValue, scope.archetypeConfig.developerMode, "defaultValue");
|
||||
defaultValue = archetypeService.jsonOrString(defaultValue, scope.archetypeConfig.developerMode, "defaultValue");
|
||||
|
||||
//grab info for the selected datatype, prepare for view
|
||||
archetypePropertyEditorResource.getDataType(dataTypeGuid).then(function (data) {
|
||||
archetypePropertyEditorResource.getDataType(dataTypeGuid, scope.archetypeConfig.enableDeepDatatypeRequests, editorState.current.contentTypeAlias, scope.propertyEditorAlias, alias, editorState.current.id).then(function (data) {
|
||||
//transform preValues array into object expected by propertyeditor views
|
||||
var configObj = {};
|
||||
|
||||
_.each(data.preValues, function(p) {
|
||||
configObj[p.key] = p.value;
|
||||
});
|
||||
|
||||
config = configObj;
|
||||
|
||||
//caching for use by label templates later
|
||||
archetypeCacheService.addDatatypeToCache(data, dataTypeGuid);
|
||||
|
||||
//determine the view to use [...] and load it
|
||||
archetypePropertyEditorResource.getPropertyEditorMapping(data.selectedEditor).then(function(propertyEditor) {
|
||||
var pathToView = umbPropEditorHelper.getViewPath(propertyEditor.view);
|
||||
@@ -86,98 +40,15 @@ angular.module("umbraco.directives").directive('archetypeProperty', function ($c
|
||||
|
||||
var mergedConfig = _.extend(defaultConfigObj, config);
|
||||
|
||||
loadView(pathToView, mergedConfig, defaultValue, alias, propertyAlias, scope, element, ngModelCtrl, validateProperty);
|
||||
loadView(pathToView, mergedConfig, defaultValue, alias, propertyAlias, scope, element, ngModelCtrl, configFieldsetModel);
|
||||
});
|
||||
});
|
||||
|
||||
scope.$on("formSubmitting", function (ev, args) {
|
||||
// "hard" validate to highlight any erroneous entries
|
||||
_.each(scope.fieldset.properties, function (property) {
|
||||
validateProperty(scope.fieldset, property, true);
|
||||
});
|
||||
});
|
||||
|
||||
scope.$on("formSubmitted", function (ev, args) {
|
||||
// reset the nested fieldset validation state after submit
|
||||
ngModelCtrl.invalidProperties = [];
|
||||
});
|
||||
|
||||
// need to pass the property fieldset here to clear any invalid state of the fieldset when validating a single fieldset property
|
||||
// - it's the Umbraco way to hide the invalid state when altering an invalid property, even if the new value isn't valid either
|
||||
function validateProperty(fieldset, property, markAsInvalid) {
|
||||
var valid = true;
|
||||
fieldset.isValid = true;
|
||||
property.isValid = true;
|
||||
var propertyConfig = getPropertyByAlias(configFieldsetModel, property.alias);
|
||||
if (propertyConfig) {
|
||||
// use property.value !== property.value to check for NaN values on numeric inputs
|
||||
if (propertyConfig.required && (property.value == null || property.value === "" || property.value !== property.value)) {
|
||||
valid = false;
|
||||
}
|
||||
// issue 116: RegEx validate property value
|
||||
// Only validate the property value if anything has been entered - RegEx is considered a supplement to "required".
|
||||
if (valid == true && propertyConfig.regEx && property.value) {
|
||||
var regEx = new RegExp(propertyConfig.regEx);
|
||||
if (regEx.test(property.value) == false) {
|
||||
valid = false;
|
||||
}
|
||||
}
|
||||
// only mark the property as invalid when doing a "hard" validation
|
||||
if (valid == false && markAsInvalid == true) {
|
||||
property.isValid = false;
|
||||
}
|
||||
}
|
||||
|
||||
// handle nested fieldset validation by storing the identifier of all invalid fieldset properties
|
||||
var propertyAliasIndex = ngModelCtrl.invalidProperties.indexOf(propertyAlias);
|
||||
if (valid == false) {
|
||||
if (propertyAliasIndex == -1) {
|
||||
ngModelCtrl.invalidProperties.push(propertyAlias);
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (propertyAliasIndex != -1) {
|
||||
ngModelCtrl.invalidProperties.splice(propertyAliasIndex, 1);
|
||||
}
|
||||
}
|
||||
|
||||
if (markAsInvalid) {
|
||||
// mark the entire fieldset as invalid if there are any invalid properties in the fieldset, otherwise mark it as valid
|
||||
fieldset.isValid =
|
||||
_.find(fieldset.properties, function (property) {
|
||||
return property.isValid == false
|
||||
}) == null;
|
||||
}
|
||||
|
||||
// set invalid state if one or more fieldsets contain invalid properties
|
||||
ngModelCtrl.$setValidity('validation', ngModelCtrl.invalidProperties.length == 0);
|
||||
}
|
||||
}
|
||||
|
||||
var propertyAliasParts = [];
|
||||
var getUniquePropertyAlias = function (currentScope) {
|
||||
if (currentScope.hasOwnProperty('fieldsetIndex') && currentScope.hasOwnProperty('property') && currentScope.hasOwnProperty('propertyConfigIndex'))
|
||||
{
|
||||
var currentPropertyAlias = "f" + currentScope.fieldsetIndex + "-" + currentScope.property.alias + "-p" + currentScope.propertyConfigIndex;
|
||||
propertyAliasParts.push(currentPropertyAlias);
|
||||
}
|
||||
else if (currentScope.hasOwnProperty('isPreValue')) // Crappy way to identify this is the umbraco property scope
|
||||
{
|
||||
var umbracoPropertyAlias = currentScope.$parent.$parent.property.alias; // Crappy way to get the umbraco host alias once we identify its scope
|
||||
propertyAliasParts.push(umbracoPropertyAlias);
|
||||
}
|
||||
|
||||
if (currentScope.$parent)
|
||||
getUniquePropertyAlias(currentScope.$parent);
|
||||
|
||||
return _.unique(propertyAliasParts).reverse().join("-");
|
||||
};
|
||||
|
||||
|
||||
function loadView(view, config, defaultValue, alias, propertyAlias, scope, element, ngModelCtrl, validateProperty) {
|
||||
function loadView(view, config, defaultValue, alias, propertyAlias, scope, element, ngModelCtrl, configFieldsetModel) {
|
||||
if (view)
|
||||
{
|
||||
$http.get(view).success(function (data) {
|
||||
$http.get(view, { cache: true }).success(function (data) {
|
||||
if (data) {
|
||||
if (scope.archetypeConfig.developerMode == '1')
|
||||
{
|
||||
@@ -190,28 +61,121 @@ angular.module("umbraco.directives").directive('archetypeProperty', function ($c
|
||||
scope.model.config = {};
|
||||
|
||||
//ini the property value after test to make sure a prop exists in the renderModel
|
||||
var renderModelPropertyIndex = getPropertyIndexByAlias(scope.archetypeRenderModel.fieldsets[scope.fieldsetIndex].properties, alias);
|
||||
scope.renderModelPropertyIndex = archetypeService.getPropertyIndexByAlias(archetypeService.getFieldset(scope).properties, alias);
|
||||
|
||||
if (!renderModelPropertyIndex)
|
||||
if (!scope.renderModelPropertyIndex)
|
||||
{
|
||||
scope.archetypeRenderModel.fieldsets[scope.fieldsetIndex].properties.push(JSON.parse('{"alias": "' + alias + '", "value": "' + defaultValue + '"}'));
|
||||
renderModelPropertyIndex = getPropertyIndexByAlias(scope.archetypeRenderModel.fieldsets[scope.fieldsetIndex].properties, alias);
|
||||
archetypeService.getFieldset(scope).properties.push(JSON.parse('{"alias": "' + alias + '", "value": "' + defaultValue + '"}'));
|
||||
scope.renderModelPropertyIndex = archetypeService.getPropertyIndexByAlias(archetypeService.getFieldset(scope).properties, alias);
|
||||
}
|
||||
scope.model.value = scope.archetypeRenderModel.fieldsets[scope.fieldsetIndex].properties[renderModelPropertyIndex].value;
|
||||
|
||||
scope.renderModel = {};
|
||||
scope.model.value = archetypeService.getFieldsetProperty(scope).value;
|
||||
|
||||
//init the property editor state
|
||||
archetypeService.getFieldsetProperty(scope).editorState = {};
|
||||
|
||||
//set the config from the prevalues
|
||||
scope.model.config = config;
|
||||
|
||||
/*
|
||||
Property Specific Hacks
|
||||
|
||||
Preference is to not do these, but unless we figure out core issues, this is quickest fix.
|
||||
*/
|
||||
|
||||
//MNTP *single* hack
|
||||
if(scope.model.config.maxNumber && scope.model.config.multiPicker)
|
||||
{
|
||||
if(scope.model.config.maxNumber == "1")
|
||||
{
|
||||
scope.model.config.multiPicker = "0";
|
||||
}
|
||||
}
|
||||
|
||||
//upload datatype hack
|
||||
if(view.indexOf('fileupload.html') != -1) {
|
||||
scope.propertyForm = scope.form;
|
||||
scope.model.validation = {};
|
||||
scope.model.validation.mandatory = 0;
|
||||
}
|
||||
|
||||
//some items need an alias
|
||||
scope.model.alias = "archetype-property-" + propertyAlias;
|
||||
//some items also need an id (file upload for example)
|
||||
scope.model.id = propertyAlias;
|
||||
|
||||
//watch for changes since there is no two-way binding with the local model.value
|
||||
scope.$watch('model.value', function (newValue, oldValue) {
|
||||
scope.archetypeRenderModel.fieldsets[scope.fieldsetIndex].properties[renderModelPropertyIndex].value = newValue;
|
||||
|
||||
archetypeService.getFieldsetProperty(scope).value = newValue;
|
||||
|
||||
// call validation method for the property when the value changes
|
||||
// use "soft" validation to mimic the default umbraco validation style (show error highlights on submit, not while entering data)
|
||||
validateProperty(scope.archetypeRenderModel.fieldsets[scope.fieldsetIndex], scope.archetypeRenderModel.fieldsets[scope.fieldsetIndex].properties[renderModelPropertyIndex], false);
|
||||
// notify the linker that the property value changed
|
||||
archetypeService.propertyValueChanged(archetypeService.getFieldset(scope), archetypeService.getFieldsetProperty(scope));
|
||||
});
|
||||
|
||||
scope.$on('formSubmitting', function(ev, args){
|
||||
archetypeCacheService.clearInvalidations();
|
||||
archetypeCacheService.clearNotifications();
|
||||
});
|
||||
|
||||
scope.$on('archetypeFormSubmitting', function (ev, args) {
|
||||
// validate all fieldset properties
|
||||
_.each(scope.fieldset.properties, function (property) {
|
||||
archetypeService.validateProperty(scope.fieldset, property, configFieldsetModel);
|
||||
});
|
||||
|
||||
var validationKey = "validation-f" + scope.fieldsetIndex;
|
||||
|
||||
ngModelCtrl.$setValidity(validationKey, scope.fieldset.isValid);
|
||||
|
||||
// did the value change (if it did, it most likely did so during the "formSubmitting" event)
|
||||
var property = archetypeService.getFieldsetProperty(scope);
|
||||
|
||||
var currentValue = property.value;
|
||||
|
||||
if (currentValue != scope.model.value) {
|
||||
archetypeService.getFieldsetProperty(scope).value = scope.model.value;
|
||||
|
||||
// notify the linker that the property value changed
|
||||
archetypeService.propertyValueChanged(archetypeService.getFieldset(scope), archetypeService.getFieldsetProperty(scope));
|
||||
}
|
||||
|
||||
archetypeService.validateMinFieldsets(scope);
|
||||
|
||||
archetypeCacheService.notifyEditor();
|
||||
});
|
||||
|
||||
// issue 114: handle file selection on property editors
|
||||
scope.$on("filesSelected", function (event, args) {
|
||||
// populate the fileNames collection on the property editor state
|
||||
var property = archetypeService.getFieldsetProperty(scope);
|
||||
|
||||
property.editorState.fileNames = [];
|
||||
|
||||
_.each(args.files, function (item) {
|
||||
property.editorState.fileNames.push(item.name);
|
||||
});
|
||||
|
||||
// remove the files set for this property
|
||||
// NOTE: we can't use property.alias because the file manager registers the selected files on the assigned Archetype property alias (e.g. "archetype-property-archetype-property-archetype-property-content-0-2-0-1-0-0")
|
||||
fileManager.setFiles(scope.model.alias, []);
|
||||
|
||||
// now tell the containing Archetype to pick up the selected files
|
||||
scope.archetypeRenderModel.setFiles(args.files);
|
||||
});
|
||||
|
||||
scope.$on("archetypeRemoveFieldset", function (ev, args) {
|
||||
var validationKey = "validation-f" + args.index;
|
||||
ngModelCtrl.$setValidity(validationKey, true);
|
||||
|
||||
scope.archetypeRenderModel.fieldsets.length = args.visible;
|
||||
|
||||
archetypeService.validateMinFieldsets(scope);
|
||||
});
|
||||
|
||||
scope.$on("archetypeAddFieldset", function (ev, args) {
|
||||
archetypeService.validateMinFieldsets(scope);
|
||||
});
|
||||
|
||||
element.html(data).show();
|
||||
@@ -235,6 +199,7 @@ angular.module("umbraco.directives").directive('archetypeProperty', function ($c
|
||||
scope: {
|
||||
property: '=',
|
||||
propertyConfigIndex: '=',
|
||||
propertyEditorAlias: '=',
|
||||
archetypeConfig: '=',
|
||||
fieldset: '=',
|
||||
fieldsetIndex: '=',
|
||||
@@ -243,4 +208,4 @@ angular.module("umbraco.directives").directive('archetypeProperty', function ($c
|
||||
umbracoForm: '='
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
angular.module("umbraco.directives").directive('archetypeSubmitWatcher', function ($rootScope) {
|
||||
var linker = function (scope, element, attrs, ngModelCtrl) {
|
||||
// call the load callback on scope to obtain the ID of this submit watcher
|
||||
var id = scope.loadCallback();
|
||||
scope.$on("formSubmitting", function (ev, args) {
|
||||
// on the "formSubmitting" event, call the submit callback on scope to notify the Archetype controller to do it's magic
|
||||
if (id == scope.activeSubmitWatcher) {
|
||||
scope.submitCallback();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
return {
|
||||
restrict: "E",
|
||||
replace: true,
|
||||
link: linker,
|
||||
template: "",
|
||||
scope: {
|
||||
loadCallback: '=',
|
||||
submitCallback: '=',
|
||||
activeSubmitWatcher: '='
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -0,0 +1,70 @@
|
||||
var ArchetypeSampleLabelTemplates = (function() {
|
||||
|
||||
//public functions
|
||||
return {
|
||||
Entity: function (value, scope, args) {
|
||||
|
||||
if(!args.entityType) {
|
||||
args = {entityType: "Document", propertyName: "name"}
|
||||
}
|
||||
|
||||
if (value) {
|
||||
//if handed a csv list, take the first only
|
||||
var id = value.split(",")[0];
|
||||
|
||||
if (id) {
|
||||
var entity = scope.services.archetypeLabelService.getEntityById(scope, id, args.entityType);
|
||||
|
||||
if(entity) {
|
||||
return entity[args.propertyName];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return "";
|
||||
},
|
||||
UrlPicker: function(value, scope, args) {
|
||||
|
||||
if(!args.propertyName) {
|
||||
args = {propertyName: "name"}
|
||||
}
|
||||
|
||||
var entity;
|
||||
|
||||
switch (value.type) {
|
||||
case "content":
|
||||
if(value.typeData.contentId) {
|
||||
entity = scope.services.archetypeLabelService.getEntityById(scope, value.typeData.contentId, "Document");
|
||||
}
|
||||
break;
|
||||
|
||||
case "media":
|
||||
if(value.typeData.mediaId) {
|
||||
entity = scope.services.archetypeLabelService.getEntityById(scope, value.typeData.mediaId, "Media");
|
||||
}
|
||||
break;
|
||||
|
||||
case "url":
|
||||
return value.typeData.url;
|
||||
|
||||
default:
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
if(entity) {
|
||||
return entity[args.propertyName];
|
||||
}
|
||||
|
||||
return "";
|
||||
},
|
||||
Rte: function (value, scope, args) {
|
||||
|
||||
if(!args.contentLength) {
|
||||
args = {contentLength: 50}
|
||||
}
|
||||
|
||||
return $(value).text().substring(0, args.contentLength);
|
||||
}
|
||||
}
|
||||
})();
|
||||
+7
-1
@@ -33,5 +33,11 @@
|
||||
"select": "Vælg",
|
||||
"icon": "Ikon",
|
||||
"enableDisabling": "Aktivér fieldset-deaktivering?",
|
||||
"enableDisablingDescription": "Tillad brugere at aktivere/deaktivere individuelle fieldsets."
|
||||
"enableDisablingDescription": "Tillad brugere at aktivere/deaktivere individuelle fieldsets.",
|
||||
"deepDatatypeRequest":"Enable Deep Datatype Requests?",
|
||||
"deepDatatypeRequestDescription":"Allows for easier datatype interception at the cost of caching performance.",
|
||||
"overrideDefaultConverterDescription":"Check this if you wish to use your own custom property value converter.",
|
||||
"overrideDefaultConverter":"Override Default Property Value Converter?",
|
||||
"enableCloning":"Enable Cloning?",
|
||||
"enableCloningDescription":"Enable Fieldset Cloning."
|
||||
}
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
{
|
||||
"label": "Label",
|
||||
"alias": "Alias",
|
||||
"hideFieldsetControls": "Skjul fieldsets?",
|
||||
"hideFieldsetControlsDescription": "Skjuler kontrollerne tilføj/fjern/sortér.",
|
||||
"toggleAdvanced": "Slå avancerede muligheder til/fra",
|
||||
"toggleAdvancedDescription": "Vis avancerede muligheder.",
|
||||
"hidePropertyLabels": "Skjul labels på egenskaber?",
|
||||
"hidePropertyLabelsDescription": "Skjuler labels på egenskaber.",
|
||||
"maxFieldsets": "Maks antal fieldsets",
|
||||
"maxFieldsetsDescription": "Hvor mange fieldsets er tilladt? Hvis der skrives '1' vil deaktivere kontrollerne. Som standard er det ubegrænset.",
|
||||
"enableMultipleFieldsets": "Aktivér flere Fieldsets?",
|
||||
"enableMultipleFieldsetsDescription": "Tillader flere typer af fieldsets i denne archetype.",
|
||||
"hideFieldsetToolbar": "Skjul Fieldset værktøjslinie?",
|
||||
"hideFieldsetToolbarDescription": "Skjuler den fieldset værktøjslinie der fremkommer når der findes mere end ét fieldset.",
|
||||
"customWrapperClass": "Egen Wrapper Class",
|
||||
"customWrapperClassDescription": "(Mulighed) Angiv din egen CSS class som tilføjes på wrapper div'en.",
|
||||
"cssFile": "CSS fil",
|
||||
"cssFileDescription": "(Mulighed) Tilføj en sti til din egen CSS fil der skal inkluderes på siden.",
|
||||
"jsFile": "JavaScript fil",
|
||||
"jsFileDescription": "(Mulighed) Tilføj en sti til din egen JavaScript fil der skal inkluderes på siden.",
|
||||
"toggleDeveloperMode": "Slå udvikler muligheder til/fra.",
|
||||
"toggleDeveloperModeDescription": "Aktivér på udvikler muligheder.",
|
||||
"configModel": "Konfigurationsmodel",
|
||||
"configModelDescription": "Vær forsigt med at redigere teksten for neden, den kontrollerer skemaet for denne archetype.",
|
||||
"helpText": "Hjælpe tekst",
|
||||
"defaultValue": "Standard værdi",
|
||||
"dataType": "Datatype",
|
||||
"required": "Påkrævet",
|
||||
"regEx": "RegEx validering",
|
||||
"properties": "Egenskaber",
|
||||
"labelTemplate": "Label skabelon",
|
||||
"select": "Vælg",
|
||||
"icon": "Ikon",
|
||||
"enableDisabling": "Aktivér fieldset-deaktivering?",
|
||||
"enableDisablingDescription": "Tillad brugere at aktivere/deaktivere individuelle fieldsets.",
|
||||
"deepDatatypeRequest":"Enable Deep Datatype Requests?",
|
||||
"deepDatatypeRequestDescription":"Allows for easier datatype interception at the cost of caching performance.",
|
||||
"overrideDefaultConverterDescription":"Check this if you wish to use your own custom property value converter.",
|
||||
"overrideDefaultConverter":"Override Default Property Value Converter?",
|
||||
"enableCloning":"Enable Cloning?",
|
||||
"enableCloningDescription":"Enable Fieldset Cloning."
|
||||
}
|
||||
+7
-1
@@ -33,5 +33,11 @@
|
||||
"select": "Select",
|
||||
"icon": "Icon",
|
||||
"enableDisabling": "Enable Fieldset Disabling?",
|
||||
"enableDisablingDescription": "Allows fieldsets to be individually enabled/disabled."
|
||||
"enableDisablingDescription": "Allows fieldsets to be individually enabled/disabled.",
|
||||
"deepDatatypeRequest":"Enable Deep Datatype Requests?",
|
||||
"deepDatatypeRequestDescription":"Allows for easier datatype interception at the cost of caching performance.",
|
||||
"overrideDefaultConverterDescription":"Check this if you wish to use your own custom property value converter.",
|
||||
"overrideDefaultConverter":"Override Default Property Value Converter?",
|
||||
"enableCloning":"Enable Cloning?",
|
||||
"enableCloningDescription":"Enable Fieldset Cloning."
|
||||
}
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
{
|
||||
"label": "Label",
|
||||
"alias": "Alias",
|
||||
"hideFieldsetControls": "Hide Fieldset Controls?",
|
||||
"hideFieldsetControlsDescription": "Hides the fieldset add/remove/sort controls.",
|
||||
"toggleAdvanced": "Toggle Advanced Options",
|
||||
"toggleAdvancedDescription": "Show advanced options.",
|
||||
"hidePropertyLabels": "Hide Property Labels?",
|
||||
"hidePropertyLabelsDescription": "Hides the property labels.",
|
||||
"maxFieldsets": "Max Fieldsets",
|
||||
"maxFieldsetsDescription": "How many Fieldsets are allowed? Entering '1' will disable the controls. Default is unlimited.",
|
||||
"enableMultipleFieldsets": "Enable Multiple Fieldsets?",
|
||||
"enableMultipleFieldsetsDescription": "Allows multiple types of fieldsets within this archetype.",
|
||||
"hideFieldsetToolbar": "Hide Fieldset Toolbar?",
|
||||
"hideFieldsetToolbarDescription": "Hides the fieldset toolbar that appears when more than one fieldset model appears.",
|
||||
"customWrapperClass": "Custom Wrapper Class",
|
||||
"customWrapperClassDescription": "(Optional) Enter a custom CSS class that will be applied to the wrapper div.",
|
||||
"cssFile": "CSS File",
|
||||
"cssFileDescription": "(Optional) Enter a path for a custom CSS file to be included on the page.",
|
||||
"jsFile": "JS File",
|
||||
"jsFileDescription": "(Optional) Enter a path for a custom JS file to be included on the page.",
|
||||
"toggleDeveloperMode": "Toggle Developer Mode",
|
||||
"toggleDeveloperModeDescription": "Turn on for developer options.",
|
||||
"configModel": "Config Model",
|
||||
"configModelDescription": "Be careful editing the text below, it controls the schema for this archetype.",
|
||||
"helpText": "Help Text",
|
||||
"defaultValue": "Default Value",
|
||||
"dataType": "DataType",
|
||||
"required": "Required",
|
||||
"regEx": "RegEx Validation",
|
||||
"properties": "Properties",
|
||||
"labelTemplate": "Label Template",
|
||||
"select": "Select",
|
||||
"icon": "Icon",
|
||||
"enableDisabling": "Enable Fieldset Disabling?",
|
||||
"enableDisablingDescription": "Allows fieldsets to be individually enabled/disabled.",
|
||||
"deepDatatypeRequest":"Enable Deep Datatype Requests?",
|
||||
"deepDatatypeRequestDescription":"Allows for easier datatype interception at the cost of caching performance.",
|
||||
"overrideDefaultConverterDescription":"Check this if you wish to use your own custom property value converter.",
|
||||
"overrideDefaultConverter":"Override Default Property Value Converter?",
|
||||
"enableCloning":"Enable Cloning?",
|
||||
"enableCloningDescription":"Enable Fieldset Cloning."
|
||||
}
|
||||
+8
-1
@@ -7,6 +7,7 @@
|
||||
"toggleAdvancedDescription": "Show advanced options.",
|
||||
"hidePropertyLabels": "Hide Property Labels?",
|
||||
"hidePropertyLabelsDescription": "Hides the property labels.",
|
||||
"minFieldsets": "Min Fieldsets",
|
||||
"maxFieldsets": "Max Fieldsets",
|
||||
"maxFieldsetsDescription": "How many Fieldsets are allowed? Entering '1' will disable the controls. Default is unlimited.",
|
||||
"enableMultipleFieldsets": "Enable Multiple Fieldsets?",
|
||||
@@ -33,5 +34,11 @@
|
||||
"select": "Select",
|
||||
"icon": "Icon",
|
||||
"enableDisabling": "Enable Fieldset Disabling?",
|
||||
"enableDisablingDescription": "Allows fieldsets to be individually enabled/disabled."
|
||||
"enableDisablingDescription": "Allows fieldsets to be individually enabled/disabled.",
|
||||
"deepDatatypeRequest":"Enable Deep Datatype Requests?",
|
||||
"deepDatatypeRequestDescription":"Allows for easier datatype interception at the cost of caching performance.",
|
||||
"overrideDefaultConverterDescription":"Check this if you wish to use your own custom property value converter.",
|
||||
"overrideDefaultConverter":"Override Default Property Value Converter?",
|
||||
"enableCloning":"Enable Cloning?",
|
||||
"enableCloningDescription":"Enable Fieldset Cloning."
|
||||
}
|
||||
|
||||
+8
-1
@@ -7,6 +7,7 @@
|
||||
"toggleAdvancedDescription": "Show advanced options.",
|
||||
"hidePropertyLabels": "Hide Property Labels?",
|
||||
"hidePropertyLabelsDescription": "Hides the property labels.",
|
||||
"minFieldsets": "Min Fieldsets",
|
||||
"maxFieldsets": "Max Fieldsets",
|
||||
"maxFieldsetsDescription": "How many Fieldsets are allowed? Entering '1' will disable the controls. Default is unlimited.",
|
||||
"enableMultipleFieldsets": "Enable Multiple Fieldsets?",
|
||||
@@ -33,5 +34,11 @@
|
||||
"select": "Select",
|
||||
"icon": "Icon",
|
||||
"enableDisabling": "Enable Fieldset Disabling?",
|
||||
"enableDisablingDescription": "Allows fieldsets to be individually enabled/disabled."
|
||||
"enableDisablingDescription": "Allows fieldsets to be individually enabled/disabled.",
|
||||
"deepDatatypeRequest":"Enable Deep Datatype Requests?",
|
||||
"deepDatatypeRequestDescription":"Allows for easier datatype interception at the cost of caching performance.",
|
||||
"overrideDefaultConverterDescription":"Check this if you wish to use your own custom property value converter.",
|
||||
"overrideDefaultConverter":"Override Default Property Value Converter?",
|
||||
"enableCloning":"Enable Cloning?",
|
||||
"enableCloningDescription":"Enable Fieldset Cloning."
|
||||
}
|
||||
|
||||
@@ -0,0 +1,44 @@
|
||||
{
|
||||
"label": "Label",
|
||||
"alias": "Alias",
|
||||
"hideFieldsetControls": "Hide Fieldset Controls?",
|
||||
"hideFieldsetControlsDescription": "Hides the fieldset add/remove/sort controls.",
|
||||
"toggleAdvanced": "Toggle Advanced Options",
|
||||
"toggleAdvancedDescription": "Show advanced options.",
|
||||
"hidePropertyLabels": "Hide Property Labels?",
|
||||
"hidePropertyLabelsDescription": "Hides the property labels.",
|
||||
"minFieldsets": "Min Fieldsets",
|
||||
"maxFieldsets": "Max Fieldsets",
|
||||
"maxFieldsetsDescription": "How many Fieldsets are allowed? Entering '1' will disable the controls. Default is unlimited.",
|
||||
"enableMultipleFieldsets": "Enable Multiple Fieldsets?",
|
||||
"enableMultipleFieldsetsDescription": "Allows multiple types of fieldsets within this archetype.",
|
||||
"hideFieldsetToolbar": "Hide Fieldset Toolbar?",
|
||||
"hideFieldsetToolbarDescription": "Hides the fieldset toolbar that appears when more than one fieldset model appears.",
|
||||
"customWrapperClass": "Custom Wrapper Class",
|
||||
"customWrapperClassDescription": "(Optional) Enter a custom CSS class that will be applied to the wrapper div.",
|
||||
"cssFile": "CSS File",
|
||||
"cssFileDescription": "(Optional) Enter a path for a custom CSS file to be included on the page.",
|
||||
"jsFile": "JS File",
|
||||
"jsFileDescription": "(Optional) Enter a path for a custom JS file to be included on the page.",
|
||||
"toggleDeveloperMode": "Toggle Developer Mode",
|
||||
"toggleDeveloperModeDescription": "Turn on for developer options.",
|
||||
"configModel": "Config Model",
|
||||
"configModelDescription": "Be careful editing the text below, it controls the schema for this archetype.",
|
||||
"helpText": "Help Text",
|
||||
"defaultValue": "Default Value",
|
||||
"dataType": "DataType",
|
||||
"required": "Required",
|
||||
"regEx": "RegEx Validation",
|
||||
"properties": "Properties",
|
||||
"labelTemplate": "Label Template",
|
||||
"select": "Select",
|
||||
"icon": "Icon",
|
||||
"enableDisabling": "Enable Fieldset Disabling?",
|
||||
"enableDisablingDescription": "Allows fieldsets to be individually enabled/disabled.",
|
||||
"deepDatatypeRequest":"Enable Deep Datatype Requests?",
|
||||
"deepDatatypeRequestDescription":"Allows for easier datatype interception at the cost of caching performance.",
|
||||
"overrideDefaultConverterDescription":"Check this if you wish to use your own custom property value converter.",
|
||||
"overrideDefaultConverter":"Override Default Property Value Converter?",
|
||||
"enableCloning":"Enable Cloning?",
|
||||
"enableCloningDescription":"Enable Fieldset Cloning."
|
||||
}
|
||||
+7
-1
@@ -33,5 +33,11 @@
|
||||
"select": "Select",
|
||||
"icon": "Icon",
|
||||
"enableDisabling": "Enable Fieldset Disabling?",
|
||||
"enableDisablingDescription": "Allows fieldsets to be individually enabled/disabled."
|
||||
"enableDisablingDescription": "Allows fieldsets to be individually enabled/disabled.",
|
||||
"deepDatatypeRequest":"Enable Deep Datatype Requests?",
|
||||
"deepDatatypeRequestDescription":"Allows for easier datatype interception at the cost of caching performance.",
|
||||
"overrideDefaultConverterDescription":"Check this if you wish to use your own custom property value converter.",
|
||||
"overrideDefaultConverter":"Override Default Property Value Converter?",
|
||||
"enableCloning":"Enable Cloning?",
|
||||
"enableCloningDescription":"Enable Fieldset Cloning."
|
||||
}
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
{
|
||||
"label": "Label",
|
||||
"alias": "Alias",
|
||||
"hideFieldsetControls": "Hide Fieldset Controls?",
|
||||
"hideFieldsetControlsDescription": "Hides the fieldset add/remove/sort controls.",
|
||||
"toggleAdvanced": "Toggle Advanced Options",
|
||||
"toggleAdvancedDescription": "Show advanced options.",
|
||||
"hidePropertyLabels": "Hide Property Labels?",
|
||||
"hidePropertyLabelsDescription": "Hides the property labels.",
|
||||
"maxFieldsets": "Max Fieldsets",
|
||||
"maxFieldsetsDescription": "How many Fieldsets are allowed? Entering '1' will disable the controls. Default is unlimited.",
|
||||
"enableMultipleFieldsets": "Enable Multiple Fieldsets?",
|
||||
"enableMultipleFieldsetsDescription": "Allows multiple types of fieldsets within this archetype.",
|
||||
"hideFieldsetToolbar": "Hide Fieldset Toolbar?",
|
||||
"hideFieldsetToolbarDescription": "Hides the fieldset toolbar that appears when more than one fieldset model appears.",
|
||||
"customWrapperClass": "Custom Wrapper Class",
|
||||
"customWrapperClassDescription": "(Optional) Enter a custom CSS class that will be applied to the wrapper div.",
|
||||
"cssFile": "CSS File",
|
||||
"cssFileDescription": "(Optional) Enter a path for a custom CSS file to be included on the page.",
|
||||
"jsFile": "JS File",
|
||||
"jsFileDescription": "(Optional) Enter a path for a custom JS file to be included on the page.",
|
||||
"toggleDeveloperMode": "Toggle Developer Mode",
|
||||
"toggleDeveloperModeDescription": "Turn on for developer options.",
|
||||
"configModel": "Config Model",
|
||||
"configModelDescription": "Be careful editing the text below, it controls the schema for this archetype.",
|
||||
"helpText": "Help Text",
|
||||
"defaultValue": "Default Value",
|
||||
"dataType": "DataType",
|
||||
"required": "Required",
|
||||
"regEx": "RegEx Validation",
|
||||
"properties": "Properties",
|
||||
"labelTemplate": "Label Template",
|
||||
"select": "Select",
|
||||
"icon": "Icon",
|
||||
"enableDisabling": "Enable Fieldset Disabling?",
|
||||
"enableDisablingDescription": "Allows fieldsets to be individually enabled/disabled.",
|
||||
"deepDatatypeRequest":"Enable Deep Datatype Requests?",
|
||||
"deepDatatypeRequestDescription":"Allows for easier datatype interception at the cost of caching performance.",
|
||||
"overrideDefaultConverterDescription":"Check this if you wish to use your own custom property value converter.",
|
||||
"overrideDefaultConverter":"Override Default Property Value Converter?",
|
||||
"enableCloning":"Enable Cloning?",
|
||||
"enableCloningDescription":"Enable Fieldset Cloning."
|
||||
}
|
||||
+7
-1
@@ -33,5 +33,11 @@
|
||||
"select": "Select",
|
||||
"icon": "Icon",
|
||||
"enableDisabling": "Enable Fieldset Disabling?",
|
||||
"enableDisablingDescription": "Allows fieldsets to be individually enabled/disabled."
|
||||
"enableDisablingDescription": "Allows fieldsets to be individually enabled/disabled.",
|
||||
"deepDatatypeRequest":"Enable Deep Datatype Requests?",
|
||||
"deepDatatypeRequestDescription":"Allows for easier datatype interception at the cost of caching performance.",
|
||||
"overrideDefaultConverterDescription":"Check this if you wish to use your own custom property value converter.",
|
||||
"overrideDefaultConverter":"Override Default Property Value Converter?",
|
||||
"enableCloning":"Enable Cloning?",
|
||||
"enableCloningDescription":"Enable Fieldset Cloning."
|
||||
}
|
||||
|
||||
+7
-1
@@ -33,5 +33,11 @@
|
||||
"select": "Select",
|
||||
"icon": "Icon",
|
||||
"enableDisabling": "Enable Fieldset Disabling?",
|
||||
"enableDisablingDescription": "Allows fieldsets to be individually enabled/disabled."
|
||||
"enableDisablingDescription": "Allows fieldsets to be individually enabled/disabled.",
|
||||
"deepDatatypeRequest":"Enable Deep Datatype Requests?",
|
||||
"deepDatatypeRequestDescription":"Allows for easier datatype interception at the cost of caching performance.",
|
||||
"overrideDefaultConverterDescription":"Check this if you wish to use your own custom property value converter.",
|
||||
"overrideDefaultConverter":"Override Default Property Value Converter?",
|
||||
"enableCloning":"Enable Cloning?",
|
||||
"enableCloningDescription":"Enable Fieldset Cloning."
|
||||
}
|
||||
|
||||
+7
-1
@@ -33,5 +33,11 @@
|
||||
"select": "Select",
|
||||
"icon": "Icon",
|
||||
"enableDisabling": "Enable Fieldset Disabling?",
|
||||
"enableDisablingDescription": "Allows fieldsets to be individually enabled/disabled."
|
||||
"enableDisablingDescription": "Allows fieldsets to be individually enabled/disabled.",
|
||||
"deepDatatypeRequest":"Enable Deep Datatype Requests?",
|
||||
"deepDatatypeRequestDescription":"Allows for easier datatype interception at the cost of caching performance.",
|
||||
"overrideDefaultConverterDescription":"Check this if you wish to use your own custom property value converter.",
|
||||
"overrideDefaultConverter":"Override Default Property Value Converter?",
|
||||
"enableCloning":"Enable Cloning?",
|
||||
"enableCloningDescription":"Enable Fieldset Cloning."
|
||||
}
|
||||
|
||||
+7
-1
@@ -33,5 +33,11 @@
|
||||
"select": "Select",
|
||||
"icon": "Icon",
|
||||
"enableDisabling": "Enable Fieldset Disabling?",
|
||||
"enableDisablingDescription": "Allows fieldsets to be individually enabled/disabled."
|
||||
"enableDisablingDescription": "Allows fieldsets to be individually enabled/disabled.",
|
||||
"deepDatatypeRequest":"Enable Deep Datatype Requests?",
|
||||
"deepDatatypeRequestDescription":"Allows for easier datatype interception at the cost of caching performance.",
|
||||
"overrideDefaultConverterDescription":"Check this if you wish to use your own custom property value converter.",
|
||||
"overrideDefaultConverter":"Override Default Property Value Converter?",
|
||||
"enableCloning":"Enable Cloning?",
|
||||
"enableCloningDescription":"Enable Fieldset Cloning."
|
||||
}
|
||||
|
||||
+7
-1
@@ -33,5 +33,11 @@
|
||||
"select": "Select",
|
||||
"icon": "Icon",
|
||||
"enableDisabling": "Enable Fieldset Disabling?",
|
||||
"enableDisablingDescription": "Allows fieldsets to be individually enabled/disabled."
|
||||
"enableDisablingDescription": "Allows fieldsets to be individually enabled/disabled.",
|
||||
"deepDatatypeRequest":"Enable Deep Datatype Requests?",
|
||||
"deepDatatypeRequestDescription":"Allows for easier datatype interception at the cost of caching performance.",
|
||||
"overrideDefaultConverterDescription":"Check this if you wish to use your own custom property value converter.",
|
||||
"overrideDefaultConverter":"Override Default Property Value Converter?",
|
||||
"enableCloning":"Enable Cloning?",
|
||||
"enableCloningDescription":"Enable Fieldset Cloning."
|
||||
}
|
||||
|
||||
+7
-1
@@ -33,5 +33,11 @@
|
||||
"select": "Select",
|
||||
"icon": "Icon",
|
||||
"enableDisabling": "Enable Fieldset Disabling?",
|
||||
"enableDisablingDescription": "Allows fieldsets to be individually enabled/disabled."
|
||||
"enableDisablingDescription": "Allows fieldsets to be individually enabled/disabled.",
|
||||
"deepDatatypeRequest":"Enable Deep Datatype Requests?",
|
||||
"deepDatatypeRequestDescription":"Allows for easier datatype interception at the cost of caching performance.",
|
||||
"overrideDefaultConverterDescription":"Check this if you wish to use your own custom property value converter.",
|
||||
"overrideDefaultConverter":"Override Default Property Value Converter?",
|
||||
"enableCloning":"Enable Cloning?",
|
||||
"enableCloningDescription":"Enable Fieldset Cloning."
|
||||
}
|
||||
|
||||
+7
-1
@@ -33,5 +33,11 @@
|
||||
"select": "Select",
|
||||
"icon": "Icon",
|
||||
"enableDisabling": "Enable Fieldset Disabling?",
|
||||
"enableDisablingDescription": "Allows fieldsets to be individually enabled/disabled."
|
||||
"enableDisablingDescription": "Allows fieldsets to be individually enabled/disabled.",
|
||||
"deepDatatypeRequest":"Enable Deep Datatype Requests?",
|
||||
"deepDatatypeRequestDescription":"Allows for easier datatype interception at the cost of caching performance.",
|
||||
"overrideDefaultConverterDescription":"Check this if you wish to use your own custom property value converter.",
|
||||
"overrideDefaultConverter":"Override Default Property Value Converter?",
|
||||
"enableCloning":"Enable Cloning?",
|
||||
"enableCloningDescription":"Enable Fieldset Cloning."
|
||||
}
|
||||
|
||||
+7
-1
@@ -33,5 +33,11 @@
|
||||
"select": "Select",
|
||||
"icon": "Icon",
|
||||
"enableDisabling": "Enable Fieldset Disabling?",
|
||||
"enableDisablingDescription": "Allows fieldsets to be individually enabled/disabled."
|
||||
"enableDisablingDescription": "Allows fieldsets to be individually enabled/disabled.",
|
||||
"deepDatatypeRequest":"Enable Deep Datatype Requests?",
|
||||
"deepDatatypeRequestDescription":"Allows for easier datatype interception at the cost of caching performance.",
|
||||
"overrideDefaultConverterDescription":"Check this if you wish to use your own custom property value converter.",
|
||||
"overrideDefaultConverter":"Override Default Property Value Converter?",
|
||||
"enableCloning":"Enable Cloning?",
|
||||
"enableCloningDescription":"Enable Fieldset Cloning."
|
||||
}
|
||||
|
||||
+7
-1
@@ -33,5 +33,11 @@
|
||||
"select": "Select",
|
||||
"icon": "Icon",
|
||||
"enableDisabling": "Enable Fieldset Disabling?",
|
||||
"enableDisablingDescription": "Allows fieldsets to be individually enabled/disabled."
|
||||
"enableDisablingDescription": "Allows fieldsets to be individually enabled/disabled.",
|
||||
"deepDatatypeRequest":"Enable Deep Datatype Requests?",
|
||||
"deepDatatypeRequestDescription":"Allows for easier datatype interception at the cost of caching performance.",
|
||||
"overrideDefaultConverterDescription":"Check this if you wish to use your own custom property value converter.",
|
||||
"overrideDefaultConverter":"Override Default Property Value Converter?",
|
||||
"enableCloning":"Enable Cloning?",
|
||||
"enableCloningDescription":"Enable Fieldset Cloning."
|
||||
}
|
||||
|
||||
+7
-1
@@ -33,5 +33,11 @@
|
||||
"select": "Select",
|
||||
"icon": "Icon",
|
||||
"enableDisabling": "Enable Fieldset Disabling?",
|
||||
"enableDisablingDescription": "Allows fieldsets to be individually enabled/disabled."
|
||||
"enableDisablingDescription": "Allows fieldsets to be individually enabled/disabled.",
|
||||
"deepDatatypeRequest":"Enable Deep Datatype Requests?",
|
||||
"deepDatatypeRequestDescription":"Allows for easier datatype interception at the cost of caching performance.",
|
||||
"overrideDefaultConverterDescription":"Check this if you wish to use your own custom property value converter.",
|
||||
"overrideDefaultConverter":"Override Default Property Value Converter?",
|
||||
"enableCloning":"Enable Cloning?",
|
||||
"enableCloningDescription":"Enable Fieldset Cloning."
|
||||
}
|
||||
|
||||
+7
-1
@@ -33,5 +33,11 @@
|
||||
"select": "Select",
|
||||
"icon": "Icon",
|
||||
"enableDisabling": "Enable Fieldset Disabling?",
|
||||
"enableDisablingDescription": "Allows fieldsets to be individually enabled/disabled."
|
||||
"enableDisablingDescription": "Allows fieldsets to be individually enabled/disabled.",
|
||||
"deepDatatypeRequest":"Enable Deep Datatype Requests?",
|
||||
"deepDatatypeRequestDescription":"Allows for easier datatype interception at the cost of caching performance.",
|
||||
"overrideDefaultConverterDescription":"Check this if you wish to use your own custom property value converter.",
|
||||
"overrideDefaultConverter":"Override Default Property Value Converter?",
|
||||
"enableCloning":"Enable Cloning?",
|
||||
"enableCloningDescription":"Enable Fieldset Cloning."
|
||||
}
|
||||
|
||||
+7
-1
@@ -33,5 +33,11 @@
|
||||
"select": "Select",
|
||||
"icon": "Icon",
|
||||
"enableDisabling": "Enable Fieldset Disabling?",
|
||||
"enableDisablingDescription": "Allows fieldsets to be individually enabled/disabled."
|
||||
"enableDisablingDescription": "Allows fieldsets to be individually enabled/disabled.",
|
||||
"deepDatatypeRequest":"Enable Deep Datatype Requests?",
|
||||
"deepDatatypeRequestDescription":"Allows for easier datatype interception at the cost of caching performance.",
|
||||
"overrideDefaultConverterDescription":"Check this if you wish to use your own custom property value converter.",
|
||||
"overrideDefaultConverter":"Override Default Property Value Converter?",
|
||||
"enableCloning":"Enable Cloning?",
|
||||
"enableCloningDescription":"Enable Fieldset Cloning."
|
||||
}
|
||||
|
||||
+272
-273
@@ -1,8 +1,17 @@
|
||||
.archetypeEditor {
|
||||
/* TODO: clean this up */
|
||||
|
||||
.archetypeEditor {
|
||||
width: 98%;
|
||||
|
||||
.open {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.dropdown-menu {
|
||||
top: auto;
|
||||
> li > a {
|
||||
border-radius: 6px;
|
||||
}
|
||||
}
|
||||
|
||||
.controls-no-label {
|
||||
@@ -10,110 +19,204 @@
|
||||
}
|
||||
|
||||
a+ul.dropdown-menu {
|
||||
margin-left: 25px;
|
||||
margin-left: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.archetypeEditor fieldset{
|
||||
border: 1px solid #dddddd;
|
||||
padding: 0;
|
||||
margin-bottom: 5px;
|
||||
background-color: #f1f1f1;
|
||||
clear: both;
|
||||
display: inline-block;
|
||||
width: 100%;
|
||||
}
|
||||
.icon {
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.archetypeEditor .archetypeFieldsetLabel {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
.fieldsetIcon {
|
||||
float: left;
|
||||
padding-right: 4px;
|
||||
}
|
||||
|
||||
.label-sub {
|
||||
padding: 8px 0;
|
||||
fieldset {
|
||||
border: 1px solid #dddddd;
|
||||
padding: 0;
|
||||
margin-bottom: 5px;
|
||||
background-color: #f1f1f1;
|
||||
clear: both;
|
||||
display: inline-block;
|
||||
&.module-label {
|
||||
width: 100%;
|
||||
|
||||
.archetypeProperty {
|
||||
clear: both;
|
||||
overflow: visible;
|
||||
margin-top: 3px;
|
||||
|
||||
label {
|
||||
padding-left: 5px !important;
|
||||
|
||||
span {
|
||||
color: #343434;
|
||||
}
|
||||
&.dimmed span {
|
||||
color: #d9d9d9;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
.archetypeFieldsetLabel {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
min-height: 42px;
|
||||
|
||||
.label-sub {
|
||||
padding: 8px 0 4px 0;
|
||||
display: inline-block;
|
||||
&.module-label {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.dropdown-menu {
|
||||
position: relative;
|
||||
padding: 0;
|
||||
border-radius: 0;
|
||||
box-shadow: none;
|
||||
margin-top: -10px;
|
||||
}
|
||||
|
||||
span {
|
||||
font-weight: bold;
|
||||
|
||||
&.menu-label { font-weight: normal; }
|
||||
}
|
||||
|
||||
label:hover {
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
&.enableCollapsing:hover {
|
||||
cursor: pointer;
|
||||
|
||||
label {
|
||||
span {
|
||||
text-decoration: underline;
|
||||
}
|
||||
&:hover {
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.caret {
|
||||
margin: 8px 1px 0 15px;
|
||||
position: absolute;
|
||||
|
||||
&.caret-right {
|
||||
border-bottom: 4px solid transparent;
|
||||
border-top: 4px solid transparent;
|
||||
border-left: 4px solid #000000;
|
||||
content: "";
|
||||
margin-top: 6px;
|
||||
}
|
||||
}
|
||||
|
||||
label {
|
||||
margin-bottom: 0;
|
||||
margin-left: 38px;
|
||||
white-space: nowrap;
|
||||
padding: 0;
|
||||
width: ~"calc(100% - 132px)";
|
||||
position: absolute;
|
||||
span {
|
||||
display: block;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
&.dimmed {
|
||||
color: #d9d9d9;
|
||||
}
|
||||
}
|
||||
|
||||
.archetypeEditorControls {
|
||||
float: none;
|
||||
position: absolute;
|
||||
right: 15px;
|
||||
top: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.archetypePropertyError {
|
||||
margin-bottom: 5px;
|
||||
padding-top: 3px;
|
||||
padding-bottom: 3px;
|
||||
|
||||
label {
|
||||
|
||||
span {
|
||||
color: #b94a48;
|
||||
font-weight: bold;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.archetypeCollapser {
|
||||
clear: both;
|
||||
height: 100%;
|
||||
padding-top: 12px;
|
||||
background-color: #fff;
|
||||
border-top: 1px solid silver;
|
||||
border-radius: 0 0 0 5px;
|
||||
|
||||
form {
|
||||
margin-left:20px;
|
||||
|
||||
.control-label {
|
||||
padding-top: 0 !important;
|
||||
}
|
||||
}
|
||||
|
||||
.archetypeFieldsetHelpText {
|
||||
clear:both;
|
||||
margin-bottom: 3px;
|
||||
font-size: 12px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.dropdown-menu {
|
||||
position: relative;
|
||||
padding: 0;
|
||||
border-radius: 0;
|
||||
box-shadow: none;
|
||||
margin-top: -10px;
|
||||
/*margin-left: -200px;*/
|
||||
.archetypeDeveloperModel
|
||||
{
|
||||
font-family: monospace;
|
||||
width: 98%;
|
||||
min-height: 100px;
|
||||
margin-bottom: 10px;
|
||||
border: 1px solid red;
|
||||
}
|
||||
|
||||
span {
|
||||
font-weight: bold;
|
||||
|
||||
&.menu-label { font-weight: normal; }
|
||||
.archetypeFieldsetError {
|
||||
border: 1px solid #b94a48;
|
||||
}
|
||||
|
||||
label:hover {
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
&.enableCollapsing:hover {
|
||||
.archetypeAddButton:hover {
|
||||
text-decoration: none;
|
||||
cursor: pointer;
|
||||
|
||||
label {
|
||||
span {
|
||||
text-decoration: underline;
|
||||
}
|
||||
&:hover {
|
||||
cursor: pointer;
|
||||
}
|
||||
.archetypeAddButtonText {
|
||||
text-decoration: underline;
|
||||
}
|
||||
}
|
||||
|
||||
.caret {
|
||||
margin: 8px 1px 0 15px;
|
||||
|
||||
&.caret-right {
|
||||
border-bottom: 4px solid transparent;
|
||||
border-top: 4px solid transparent;
|
||||
border-left: 4px solid #000000;
|
||||
content: "";
|
||||
margin-top: 6px;
|
||||
}
|
||||
.multiPropertyTextbox {
|
||||
margin-bottom: 3px;
|
||||
}
|
||||
|
||||
label{
|
||||
margin-bottom: 0;
|
||||
margin-left: 5px;
|
||||
padding: 0;
|
||||
ul {
|
||||
list-style: none;
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
.show-validation.ng-invalid .control-group.error .control-label {
|
||||
span {
|
||||
display: inline-block;
|
||||
}
|
||||
&.dimmed {
|
||||
color: #d9d9d9;
|
||||
color: #343434;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.archetypeEditor .archetypeCollapser{
|
||||
clear: both;
|
||||
height: 100%;
|
||||
padding-top: 12px;
|
||||
background-color: #fff;
|
||||
border-top: 1px solid silver;
|
||||
border-radius: 0 0 0 5px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.archetypeEditor .multiPropertyTextbox{
|
||||
margin-bottom: 3px;
|
||||
}
|
||||
|
||||
.archetypeEditor ul{
|
||||
list-style: none;
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
.archetypeEditor,
|
||||
.archetypeConfig {
|
||||
.archetypeEditor, .archetypeConfig {
|
||||
.archetypeEditorControls {
|
||||
float: right;
|
||||
|
||||
@@ -129,213 +232,123 @@
|
||||
}
|
||||
}
|
||||
|
||||
.archetypeEditor .archetypeEditorControls {
|
||||
float: none;
|
||||
position: absolute;
|
||||
right: 15px;
|
||||
top: 0;
|
||||
}
|
||||
|
||||
.archetypeConfig .archetypeEditorControls {
|
||||
float: right;
|
||||
}
|
||||
|
||||
.archetypeEditor form {
|
||||
margin-left:20px;
|
||||
|
||||
.control-label {
|
||||
padding-top: 0 !important;
|
||||
}
|
||||
}
|
||||
|
||||
.archetypeEditor .archetypeProperty{
|
||||
clear: both;
|
||||
overflow: visible;
|
||||
margin-top: 3px;
|
||||
}
|
||||
|
||||
.archetypeEditor .archetypeDeveloperModel
|
||||
{
|
||||
font-family: monospace;
|
||||
width: 98%;
|
||||
min-height: 100px;
|
||||
margin-bottom: 10px;
|
||||
border: 1px solid red;
|
||||
}
|
||||
|
||||
.archetypeEditor .archetypeFieldsetToolbar {
|
||||
margin-bottom: 10px;
|
||||
overflow: hidden;
|
||||
|
||||
li {
|
||||
float: left;
|
||||
padding: 2px 4px;
|
||||
margin-right: 10px;
|
||||
border: 1px solid #ddd;
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
|
||||
.archetypeEditor .archetypeFieldsetHeaderText{
|
||||
clear:both;
|
||||
margin-bottom: 3px;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.archetypeEditor .archetypeFieldsetFooterText{
|
||||
clear:both;
|
||||
margin-bottom: 3px;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.archetypeEditor .archetypeFieldsetHelpText{
|
||||
clear:both;
|
||||
margin-bottom: 3px;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.archetypeConfig {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.archetypeConfig ul{
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
.archetypeConfig li{
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.archetypeConfig label{
|
||||
width: 120px;
|
||||
}
|
||||
|
||||
.archetypeConfig .archetypeFieldsetWrapper{
|
||||
border: 1px solid #ccc;
|
||||
padding: 10px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.archetypeConfig .archetypeFieldsetOption{
|
||||
margin-bottom: 15px;
|
||||
input[type=text]{
|
||||
max-width: 300px;
|
||||
}
|
||||
}
|
||||
|
||||
.archetypeConfig .archetypeDeveloperModel {
|
||||
font-family: monospace;
|
||||
width: 88%;
|
||||
margin: 5px 10px 10px;
|
||||
height: 130px;
|
||||
}
|
||||
|
||||
.archetypeConfig .archetypePropertiesWrapper {
|
||||
border: 1px solid #ddd;
|
||||
padding: 8px;
|
||||
margin: -40px 10px 10px 140px;
|
||||
max-width: 475px;
|
||||
|
||||
ul {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
li {
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
label {
|
||||
width: 120px;
|
||||
}
|
||||
|
||||
.archetypeEditorControls {
|
||||
float: right;
|
||||
}
|
||||
|
||||
.archetypeFieldsets {
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
.archetypeFieldsetWrapper {
|
||||
border: 1px solid #ccc;
|
||||
padding: 10px;
|
||||
margin-bottom: 10px;
|
||||
background-color: #eee;
|
||||
}
|
||||
|
||||
input[type=text] {
|
||||
max-width: 190px;
|
||||
width: auto;
|
||||
}
|
||||
.archetypeFieldsetTitle {
|
||||
cursor: pointer;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
select {
|
||||
max-width: 160px;
|
||||
.archetypeFieldsetOption {
|
||||
margin-bottom: 15px;
|
||||
input[type=text]{
|
||||
max-width: 300px;
|
||||
}
|
||||
}
|
||||
|
||||
li:last-child {
|
||||
margin-bottom: 0;
|
||||
.archetypeDeveloperModel {
|
||||
font-family: monospace;
|
||||
width: 88%;
|
||||
margin: 5px 10px 10px;
|
||||
height: 130px;
|
||||
}
|
||||
}
|
||||
|
||||
.archetypeConfig .archetypeFieldsets {
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
.archetypeConfig .archetypeFieldsetTitle {
|
||||
cursor: pointer;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.archetypeConfig .archetypeOptions label{
|
||||
width: 400px;
|
||||
}
|
||||
|
||||
.archetypeConfig .archetypeAdvancedOptions {
|
||||
margin-top: 15px;
|
||||
div {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
label {
|
||||
.archetypeOptions label{
|
||||
width: 400px;
|
||||
}
|
||||
}
|
||||
|
||||
.archetypeConfig .archetypeMaxFieldsets{
|
||||
border: 1px solid #ddd;
|
||||
width: 40px;
|
||||
text-align: right;
|
||||
}
|
||||
.archetypePropertiesWrapper {
|
||||
border: 1px solid #ddd;
|
||||
padding: 8px;
|
||||
margin: -40px 10px 10px 140px;
|
||||
max-width: 475px;
|
||||
|
||||
.archetypeConfig .archetypePropertyTitle {
|
||||
cursor: pointer;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.archetypeConfig .archetypePropertyCollapser{
|
||||
margin-top: 10px;
|
||||
div {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
.archetypeEditor .archetypeFieldsetError{
|
||||
border: 1px solid #b94a48;
|
||||
}
|
||||
|
||||
.archetypeEditor .archetypeProperty {
|
||||
label {
|
||||
span {
|
||||
color: #343434;
|
||||
}
|
||||
&.dimmed span {
|
||||
color: #d9d9d9;
|
||||
ul {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
.archetypeEditor .archetypePropertyError{
|
||||
margin-bottom: 5px;
|
||||
padding-top: 3px;
|
||||
padding-bottom: 3px;
|
||||
li {
|
||||
padding: 10px;
|
||||
margin-bottom: 10px;
|
||||
background-color: #eee;
|
||||
|
||||
label {
|
||||
input[type=text] {
|
||||
max-width: 190px;
|
||||
width: auto;
|
||||
}
|
||||
|
||||
span {
|
||||
color: #b94a48;
|
||||
font-weight: bold;
|
||||
select {
|
||||
max-width: 160px;
|
||||
}
|
||||
}
|
||||
|
||||
li:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.archetypeEditor .archetypeAddButton:hover {
|
||||
text-decoration: none;
|
||||
.archetypeAdvancedOptions {
|
||||
margin-top: 15px;
|
||||
div {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
label {
|
||||
width: 400px;
|
||||
}
|
||||
}
|
||||
|
||||
.archetypeAddButtonText {
|
||||
text-decoration: underline;
|
||||
.archetypeMaxFieldsets, .archetypeMinFieldsets {
|
||||
border: 1px solid #ddd;
|
||||
width: 40px;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.archetypePropertyTitle {
|
||||
cursor: pointer;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.archetypePropertyCollapser {
|
||||
margin-top: 10px;
|
||||
div {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
.archetypeFieldsetCollapser {
|
||||
margin-top: 15px;
|
||||
}
|
||||
|
||||
.fieldsetIcon {
|
||||
margin-right: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -343,17 +356,3 @@
|
||||
visibility: visible !important;
|
||||
background-color: #d0e7f1 !important;
|
||||
}
|
||||
|
||||
.archetypeConfig .archetypeFieldsetCollapser {
|
||||
margin-top: 15px;
|
||||
}
|
||||
|
||||
.archetypeConfig .fieldsetIcon {
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
.archetypeEditor .show-validation.ng-invalid .control-group.error .control-label {
|
||||
span {
|
||||
color: #343434;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
angular.module('umbraco.resources').factory('archetypePropertyEditorResource', function($q, $http, umbRequestHelper){
|
||||
return {
|
||||
getAllDataTypes: function() {
|
||||
// Hack - grab DataTypes from Tree API, as `dataTypeService.getAll()` isn't implemented yet
|
||||
return umbRequestHelper.resourcePromise(
|
||||
$http.get("backoffice/ArchetypeApi/ArchetypeDataType/GetAll"), 'Failed to retrieve datatypes from tree service'
|
||||
);
|
||||
},
|
||||
getDataType: function (guid, useDeepDatatypeLookup, contentTypeAlias, propertyTypeAlias, archetypeAlias, nodeId) {
|
||||
if(useDeepDatatypeLookup) {
|
||||
return umbRequestHelper.resourcePromise(
|
||||
$http.get("backoffice/ArchetypeApi/ArchetypeDataType/GetByGuid?guid=" + guid + "&contentTypeAlias=" + contentTypeAlias + "&propertyTypeAlias=" + propertyTypeAlias + "&archetypeAlias=" + archetypeAlias + "&nodeId=" + nodeId), 'Failed to retrieve datatype'
|
||||
);
|
||||
}
|
||||
else {
|
||||
return umbRequestHelper.resourcePromise(
|
||||
$http.get("backoffice/ArchetypeApi/ArchetypeDataType/GetByGuid?guid=" + guid , { cache: true }), 'Failed to retrieve datatype'
|
||||
);
|
||||
}
|
||||
},
|
||||
getPropertyEditorMapping: function(alias) {
|
||||
return umbRequestHelper.resourcePromise(
|
||||
$http.get("backoffice/ArchetypeApi/ArchetypeDataType/GetAllPropertyEditors", { cache: true }), 'Failed to retrieve datatype mappings'
|
||||
).then(function (data) {
|
||||
var result = _.find(data, function(d) {
|
||||
return d.alias === alias;
|
||||
});
|
||||
|
||||
if (result != null)
|
||||
return result;
|
||||
|
||||
return "";
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -1,29 +0,0 @@
|
||||
angular.module('umbraco.resources').factory('archetypePropertyEditorResource', function($q, $http, umbRequestHelper){
|
||||
return {
|
||||
getAllDataTypes: function() {
|
||||
// Hack - grab DataTypes from Tree API, as `dataTypeService.getAll()` isn't implemented yet
|
||||
return umbRequestHelper.resourcePromise(
|
||||
$http.get("/umbraco/backoffice/ArchetypeApi/ArchetypeDataType/GetAll"), 'Failed to retrieve datatypes from tree service'
|
||||
);
|
||||
},
|
||||
getDataType: function(guid) {
|
||||
return umbRequestHelper.resourcePromise(
|
||||
$http.get("/umbraco/backoffice/ArchetypeApi/ArchetypeDataType/GetByGuid?guid=" + guid), 'Failed to retrieve datatype'
|
||||
);
|
||||
},
|
||||
getPropertyEditorMapping: function(alias) {
|
||||
return umbRequestHelper.resourcePromise(
|
||||
$http.get("/umbraco/backoffice/ArchetypeApi/ArchetypeDataType/GetAllPropertyEditors"), 'Failed to retrieve datatype mappings'
|
||||
).then(function (data) {
|
||||
var result = _.find(data, function(d) {
|
||||
return d.alias === alias;
|
||||
});
|
||||
|
||||
if (result != null)
|
||||
return result;
|
||||
|
||||
return "";
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -0,0 +1,149 @@
|
||||
angular.module('umbraco.services').factory('archetypeCacheService', function (archetypePropertyEditorResource, notificationsService) {
|
||||
//private
|
||||
|
||||
var isEntityLookupLoading = false;
|
||||
var entityCache = [];
|
||||
|
||||
var isDatatypeLookupLoading = false;
|
||||
var datatypeCache = [];
|
||||
|
||||
var notificationQueue = [];
|
||||
var notificationCache = [];
|
||||
|
||||
var invalidationCache = [];
|
||||
|
||||
function findItem(array, item) {
|
||||
return _.find(array, function(value){
|
||||
return value == item;
|
||||
});
|
||||
}
|
||||
|
||||
return {
|
||||
notifyEditor: function() {
|
||||
console.log("queue-v");
|
||||
console.log(notificationQueue);
|
||||
console.log("sent-v");
|
||||
console.log(notificationCache);
|
||||
|
||||
if(this.shouldBeNotified("minFieldsets") && !this.hasBeenNotified("minFieldsets")) {
|
||||
notificationsService.error("Error", "Some of your properties do not contain enough fieldsets.");
|
||||
|
||||
this.removeNotification("minFieldsets");
|
||||
|
||||
notificationCache.push("minFieldsets");
|
||||
}
|
||||
},
|
||||
|
||||
clearInvalidations: function() {
|
||||
invalidationCache = [];
|
||||
},
|
||||
|
||||
addInvalidation: function(key) {
|
||||
if(!this.hasBeenInvalidated(invalidationCache, key)) {
|
||||
invalidationCache.push(key);
|
||||
}
|
||||
},
|
||||
|
||||
removeInvalidation: function(key) {
|
||||
invalidationCache = _.reject(invalidationCache, function(value){
|
||||
return value == key;
|
||||
});
|
||||
},
|
||||
|
||||
hasBeenInvalidated: function(key) {
|
||||
return (typeof findItem(invalidationCache, key) != 'undefined');
|
||||
},
|
||||
|
||||
clearNotifications: function() {
|
||||
notificationCache = [];
|
||||
|
||||
},
|
||||
|
||||
addNotification: function(key) {
|
||||
if(!this.shouldBeNotified(key) && !this.hasBeenNotified(notificationCache, key)) {
|
||||
notificationQueue.push(key);
|
||||
}
|
||||
},
|
||||
|
||||
removeNotification: function(key) {
|
||||
notificationQueue = _.reject(notificationQueue, function(value){
|
||||
return value == key;
|
||||
});
|
||||
},
|
||||
|
||||
shouldBeNotified: function(key) {
|
||||
return (typeof findItem(notificationQueue, key) != 'undefined');
|
||||
},
|
||||
|
||||
hasBeenNotified: function(key) {
|
||||
return (typeof findItem(notificationCache, key) != 'undefined');
|
||||
},
|
||||
|
||||
getDataTypeFromCache: function(guid) {
|
||||
return _.find(datatypeCache, function (dt){
|
||||
return dt.dataTypeGuid == guid;
|
||||
});
|
||||
},
|
||||
|
||||
addDatatypeToCache: function(datatype, dataTypeGuid) {
|
||||
var cachedDatatype = this.getDataTypeFromCache(dataTypeGuid);
|
||||
|
||||
if(!cachedDatatype) {
|
||||
datatype.dataTypeGuid = dataTypeGuid;
|
||||
datatypeCache.push(datatype);
|
||||
}
|
||||
},
|
||||
|
||||
getDatatypeByGuid: function(guid) {
|
||||
var cachedDatatype = this.getDataTypeFromCache(guid);
|
||||
|
||||
if(cachedDatatype) {
|
||||
return cachedDatatype;
|
||||
}
|
||||
|
||||
//go get it from server, but this should already be pre-populated from the directive, but I suppose I'll leave this in in case used ad-hoc
|
||||
if (!isDatatypeLookupLoading) {
|
||||
isDatatypeLookupLoading = true;
|
||||
|
||||
archetypePropertyEditorResource.getDataType(guid).then(function(datatype) {
|
||||
|
||||
datatype.dataTypeGuid = guid;
|
||||
|
||||
datatypeCache.push(datatype);
|
||||
|
||||
isDatatypeLookupLoading = false;
|
||||
|
||||
return datatype;
|
||||
});
|
||||
}
|
||||
|
||||
return null;
|
||||
},
|
||||
|
||||
getEntityById: function(scope, id, type) {
|
||||
var cachedEntity = _.find(entityCache, function (e){
|
||||
return e.id == id;
|
||||
});
|
||||
|
||||
if(cachedEntity) {
|
||||
return cachedEntity;
|
||||
}
|
||||
|
||||
//go get it from server
|
||||
if (!isEntityLookupLoading) {
|
||||
isEntityLookupLoading = true;
|
||||
|
||||
scope.resources.entityResource.getById(id, type).then(function(entity) {
|
||||
|
||||
entityCache.push(entity);
|
||||
|
||||
isEntityLookupLoading = false;
|
||||
|
||||
return entity;
|
||||
});
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -0,0 +1,265 @@
|
||||
angular.module('umbraco.services').factory('archetypeLabelService', function (archetypeCacheService) {
|
||||
//private
|
||||
|
||||
function executeFunctionByName(functionName, context) {
|
||||
var args = Array.prototype.slice.call(arguments).splice(2);
|
||||
|
||||
var namespaces = functionName.split(".");
|
||||
var func = namespaces.pop();
|
||||
|
||||
for(var i = 0; i < namespaces.length; i++) {
|
||||
context = context[namespaces[i]];
|
||||
}
|
||||
|
||||
if(context && context[func]) {
|
||||
return context[func].apply(this, args);
|
||||
}
|
||||
|
||||
return "";
|
||||
}
|
||||
|
||||
function getNativeLabel(datatype, value, scope) {
|
||||
|
||||
switch (datatype.selectedEditor) {
|
||||
case "Imulus.UrlPicker":
|
||||
return imulusUrlPicker(value, scope, {});
|
||||
case "Umbraco.TinyMCEv3":
|
||||
return coreTinyMce(value, scope, {});
|
||||
case "Umbraco.MultiNodeTreePicker":
|
||||
return coreMntp(value, scope, datatype);
|
||||
case "Umbraco.MediaPicker":
|
||||
return coreMediaPicker(value, scope, datatype);
|
||||
case "Umbraco.DropDown":
|
||||
return coreDropdown(value, scope, datatype);
|
||||
default:
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
||||
function coreDropdown(value, scope, args) {
|
||||
|
||||
if(!value)
|
||||
return "";
|
||||
|
||||
var prevalue = args.preValues[0].value[value];
|
||||
|
||||
if(prevalue) {
|
||||
return prevalue.value;
|
||||
}
|
||||
|
||||
return "";
|
||||
}
|
||||
|
||||
function coreMntp(value, scope, args) {
|
||||
var ids = value.split(',');
|
||||
var type = "Document";
|
||||
|
||||
switch(args.preValues[0].value.type) {
|
||||
case 'content':
|
||||
type = 'Document';
|
||||
break;
|
||||
case 'media':
|
||||
type = 'media';
|
||||
break;
|
||||
case 'member':
|
||||
type = 'member';
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
var entityArray = [];
|
||||
|
||||
_.each(ids, function(id){
|
||||
if(id) {
|
||||
|
||||
var entity = archetypeCacheService.getEntityById(scope, id, type);
|
||||
|
||||
if(entity) {
|
||||
entityArray.push(entity.name);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
return entityArray.join(', ');
|
||||
}
|
||||
|
||||
function coreMediaPicker(value, scope, args) {
|
||||
if(value) {
|
||||
var entity = archetypeCacheService.getEntityById(scope, value, "media");
|
||||
|
||||
if(entity) {
|
||||
return entity.name;
|
||||
}
|
||||
}
|
||||
|
||||
return "";
|
||||
}
|
||||
|
||||
function imulusUrlPicker(value, scope, args) {
|
||||
|
||||
if(!args.propertyName) {
|
||||
args = {propertyName: "name"}
|
||||
}
|
||||
|
||||
var entity;
|
||||
|
||||
switch (value.type) {
|
||||
case "content":
|
||||
if(value.typeData.contentId) {
|
||||
entity = archetypeCacheService.getEntityById(scope, value.typeData.contentId, "Document");
|
||||
}
|
||||
break;
|
||||
|
||||
case "media":
|
||||
if(value.typeData.mediaId) {
|
||||
entity = archetypeCacheService.getEntityById(scope, value.typeData.mediaId, "Media");
|
||||
}
|
||||
break;
|
||||
|
||||
case "url":
|
||||
return value.typeData.url;
|
||||
|
||||
default:
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
if(entity) {
|
||||
return entity[args.propertyName];
|
||||
}
|
||||
|
||||
return "";
|
||||
}
|
||||
|
||||
function coreTinyMce(value, scope, args) {
|
||||
|
||||
if(!args.contentLength) {
|
||||
args = {contentLength: 50}
|
||||
}
|
||||
|
||||
var suffix = "";
|
||||
var strippedText = $(value).text();
|
||||
|
||||
if(strippedText.length > args.contentLength) {
|
||||
suffix = "…";
|
||||
}
|
||||
|
||||
return strippedText.substring(0, args.contentLength) + suffix;
|
||||
}
|
||||
|
||||
return {
|
||||
getFieldsetTitle: function(scope, fieldsetConfigModel, fieldsetIndex) {
|
||||
|
||||
//console.log(scope.model.config);
|
||||
|
||||
if(!fieldsetConfigModel)
|
||||
return "";
|
||||
|
||||
var fieldset = scope.model.value.fieldsets[fieldsetIndex];
|
||||
var fieldsetConfig = scope.getConfigFieldsetByAlias(fieldset.alias);
|
||||
var template = fieldsetConfigModel.labelTemplate;
|
||||
|
||||
if (template.length < 1)
|
||||
return fieldsetConfig.label;
|
||||
|
||||
var rgx = /({{(.*?)}})*/g;
|
||||
var results;
|
||||
var parsedTemplate = template;
|
||||
|
||||
var rawMatches = template.match(rgx);
|
||||
|
||||
var matches = [];
|
||||
|
||||
_.each(rawMatches, function(match){
|
||||
if(match) {
|
||||
matches.push(match);
|
||||
}
|
||||
});
|
||||
|
||||
_.each(matches, function (match) {
|
||||
|
||||
// split the template in case it consists of multiple property aliases and/or functions
|
||||
var templates = match.replace("{{", '').replace("}}", '').split("|");
|
||||
var templateLabelValue = "";
|
||||
|
||||
for(var i = 0; i < templates.length; i++) {
|
||||
// stop looking for a template label value if a previous template part already yielded a value
|
||||
if(templateLabelValue != "") {
|
||||
break;
|
||||
}
|
||||
|
||||
var template = templates[i];
|
||||
|
||||
//test for function
|
||||
var beginParamsIndexOf = template.indexOf("(");
|
||||
var endParamsIndexOf = template.indexOf(")");
|
||||
|
||||
//if passed a function
|
||||
if(beginParamsIndexOf != -1 && endParamsIndexOf != -1)
|
||||
{
|
||||
var functionName = template.substring(0, beginParamsIndexOf);
|
||||
var propertyAlias = template.substring(beginParamsIndexOf + 1, endParamsIndexOf).split(',')[0];
|
||||
|
||||
var args = {};
|
||||
|
||||
var beginArgsIndexOf = template.indexOf(',');
|
||||
|
||||
if(beginArgsIndexOf != -1) {
|
||||
|
||||
var argsString = template.substring(beginArgsIndexOf + 1, endParamsIndexOf).trim();
|
||||
|
||||
var normalizedJsonString = argsString.replace(/(\w+)\s*:/g, '"$1":');
|
||||
|
||||
args = JSON.parse(normalizedJsonString);
|
||||
}
|
||||
|
||||
templateLabelValue = executeFunctionByName(functionName, window, scope.getPropertyValueByAlias(fieldset, propertyAlias), scope, args);
|
||||
}
|
||||
//normal {{foo}} syntax
|
||||
else {
|
||||
propertyAlias = template;
|
||||
var rawValue = scope.getPropertyValueByAlias(fieldset, propertyAlias);
|
||||
|
||||
templateLabelValue = rawValue;
|
||||
|
||||
//determine the type of editor
|
||||
var propertyConfig = _.find(fieldsetConfigModel.properties, function(property){
|
||||
return property.alias == propertyAlias;
|
||||
});
|
||||
|
||||
if(propertyConfig) {
|
||||
var datatype = archetypeCacheService.getDatatypeByGuid(propertyConfig.dataTypeGuid);
|
||||
|
||||
if(datatype) {
|
||||
|
||||
//try to get built-in label
|
||||
var label = getNativeLabel(datatype, templateLabelValue, scope);
|
||||
|
||||
if(label) {
|
||||
templateLabelValue = label;
|
||||
}
|
||||
else {
|
||||
templateLabelValue = templateLabelValue;
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
return templateLabelValue;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
if(!templateLabelValue) {
|
||||
templateLabelValue = "";
|
||||
}
|
||||
|
||||
parsedTemplate = parsedTemplate.replace(match, templateLabelValue);
|
||||
});
|
||||
|
||||
return parsedTemplate;
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -24,7 +24,7 @@ angular.module('umbraco.services').factory('archetypeLocalizationService', funct
|
||||
initLocalizedResources:function () {
|
||||
var deferred = $q.defer();
|
||||
userService.getCurrentUser().then(function(user){
|
||||
$http.get("/App_plugins/Archetype/langs/" + user.locale + ".js")
|
||||
$http.get("../App_plugins/Archetype/langs/" + user.locale + ".js", { cache: true })
|
||||
.then(function(response){
|
||||
service.resourceFileLoaded = true;
|
||||
service.dictionary = response.data;
|
||||
@@ -0,0 +1,114 @@
|
||||
angular.module('umbraco.services').factory('archetypeService', function (archetypeCacheService) {
|
||||
//public
|
||||
return {
|
||||
//helper that returns a JS ojbect from 'value' string or the original string
|
||||
jsonOrString: function (value, developerMode, debugLabel){
|
||||
if(value && typeof value == 'string'){
|
||||
try{
|
||||
if(developerMode == '1'){
|
||||
console.log("Trying to parse " + debugLabel + ": " + value);
|
||||
}
|
||||
value = JSON.parse(value);
|
||||
}
|
||||
catch(exception)
|
||||
{
|
||||
if(developerMode == '1'){
|
||||
console.log("Failed to parse " + debugLabel + ".");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(value && developerMode == '1'){
|
||||
console.log(debugLabel + " post-parsing: ");
|
||||
console.log(value);
|
||||
}
|
||||
|
||||
return value;
|
||||
},
|
||||
getFieldsetByAlias: function (fieldsets, alias)
|
||||
{
|
||||
return _.find(fieldsets, function(fieldset){
|
||||
return fieldset.alias == alias;
|
||||
});
|
||||
},
|
||||
getPropertyIndexByAlias: function(properties, alias){
|
||||
for (var i in properties)
|
||||
{
|
||||
if (properties[i].alias == alias) {
|
||||
return i;
|
||||
}
|
||||
}
|
||||
},
|
||||
getPropertyByAlias: function (fieldset, alias){
|
||||
return _.find(fieldset.properties, function(property){
|
||||
return property.alias == alias;
|
||||
});
|
||||
},
|
||||
getUniquePropertyAlias: function (currentScope, propertyAliasParts) {
|
||||
if (currentScope.hasOwnProperty('fieldsetIndex') && currentScope.hasOwnProperty('property') && currentScope.hasOwnProperty('propertyConfigIndex'))
|
||||
{
|
||||
var currentPropertyAlias = "f" + currentScope.fieldsetIndex + "-" + currentScope.property.alias + "-p" + currentScope.propertyConfigIndex;
|
||||
propertyAliasParts.push(currentPropertyAlias);
|
||||
}
|
||||
else if (currentScope.hasOwnProperty('isPreValue')) // Crappy way to identify this is the umbraco property scope
|
||||
{
|
||||
var umbracoPropertyAlias = currentScope.$parent.$parent.property.alias; // Crappy way to get the umbraco host alias once we identify its scope
|
||||
propertyAliasParts.push(umbracoPropertyAlias);
|
||||
}
|
||||
|
||||
if (currentScope.$parent)
|
||||
this.getUniquePropertyAlias(currentScope.$parent, propertyAliasParts);
|
||||
|
||||
return _.unique(propertyAliasParts).reverse().join("-");
|
||||
},
|
||||
getFieldset: function(scope) {
|
||||
return scope.archetypeRenderModel.fieldsets[scope.fieldsetIndex];
|
||||
},
|
||||
getFieldsetProperty: function (scope) {
|
||||
return this.getFieldset(scope).properties[scope.renderModelPropertyIndex];
|
||||
},
|
||||
setFieldsetValidity: function (fieldset) {
|
||||
// mark the entire fieldset as invalid if there are any invalid properties in the fieldset, otherwise mark it as valid
|
||||
fieldset.isValid =
|
||||
_.find(fieldset.properties, function (property) {
|
||||
return property.isValid == false
|
||||
}) == null;
|
||||
},
|
||||
validateProperty: function (fieldset, property, configFieldsetModel) {
|
||||
var propertyConfig = this.getPropertyByAlias(configFieldsetModel, property.alias);
|
||||
|
||||
if (propertyConfig) {
|
||||
// use property.value !== property.value to check for NaN values on numeric inputs
|
||||
if (propertyConfig.required && (property.value == null || property.value === "" || property.value !== property.value)) {
|
||||
property.isValid = false;
|
||||
}
|
||||
// issue 116: RegEx validate property value
|
||||
// Only validate the property value if anything has been entered - RegEx is considered a supplement to "required".
|
||||
if (property.isValid == true && propertyConfig.regEx && property.value) {
|
||||
var regEx = new RegExp(propertyConfig.regEx);
|
||||
if (regEx.test(property.value) == false) {
|
||||
property.isValid = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
this.setFieldsetValidity(fieldset);
|
||||
},
|
||||
// called when the value of any property in a fieldset changes
|
||||
propertyValueChanged: function (fieldset, property) {
|
||||
// it's the Umbraco way to hide the invalid state when altering an invalid property, even if the new value isn't valid either
|
||||
property.isValid = true;
|
||||
this.setFieldsetValidity(fieldset);
|
||||
},
|
||||
validateMinFieldsets: function(scope) {
|
||||
//ngModelCtrl.$setValidity('propertyForm', true);
|
||||
archetypeCacheService.removeInvalidation("minFieldsets");
|
||||
|
||||
if(scope.archetypeConfig.minFieldsets && scope.archetypeRenderModel.fieldsets.length < scope.archetypeConfig.minFieldsets) {
|
||||
//ngModelCtrl.$setValidity('propertyForm', false);
|
||||
archetypeCacheService.addInvalidation("minFieldsets");
|
||||
archetypeCacheService.addNotification("minFieldsets");
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -97,6 +97,10 @@
|
||||
<label for="archetypeAdvancedOptionsHideLabels"><archetype-localize key="hidePropertyLabels">Hide Property Labels?</archetype-localize><small><archetype-localize key="hidePropertyLabelsDescription">Hides the property labels.</archetype-localize></small></label>
|
||||
<input type="checkbox" id="archetypeAdvancedOptionsHideLabels" ng-model="archetypeConfigRenderModel.hidePropertyLabels"/>
|
||||
</div>
|
||||
<div>
|
||||
<label for="archetypeAdvancedOptionsMinFieldsets"><archetype-localize key="minFieldsets">Min Fieldsets</archetype-localize><small><archetype-localize key="minFieldsetsDescription">How many Fieldsets are required? Leaving blank will disable the control. Default is unlimited.</archetype-localize></small></label>
|
||||
<input type="number" id="archetypeAdvancedOptionsMinFieldsets" class="archetypeMinFieldsets" ng-model="archetypeConfigRenderModel.minFieldsets"/>
|
||||
</div>
|
||||
<div>
|
||||
<label for="archetypeAdvancedOptionsMaxFieldsets"><archetype-localize key="maxFieldsets">Max Fieldsets</archetype-localize><small><archetype-localize key="maxFieldsetsDescription">How many Fieldsets are allowed? Entering '1' will disable the controls. Default is unlimited.</archetype-localize></small></label>
|
||||
<input type="number" id="archetypeAdvancedOptionsMaxFieldsets" class="archetypeMaxFieldsets" ng-model="archetypeConfigRenderModel.maxFieldsets"/>
|
||||
@@ -108,6 +112,10 @@
|
||||
<div>
|
||||
<label for="archetypeAdvancedOptionsCollapsing"><archetype-localize key="enableCollapsing">Enable Collapsing?</archetype-localize><small><archetype-localize key="enableCollapsingDescription">Enable fieldset collapsing.</archetype-localize></small></label>
|
||||
<input type="checkbox" id="archetypeAdvancedOptionsCollapsing" ng-model="archetypeConfigRenderModel.enableCollapsing"/>
|
||||
</div>
|
||||
<div>
|
||||
<label for="archetypeAdvancedOptionsCloning"><archetype-localize key="enableCloning">Enable Cloning?</archetype-localize><small><archetype-localize key="enableCloningDescription">Enable fieldset cloning.</archetype-localize></small></label>
|
||||
<input type="checkbox" id="archetypeAdvancedOptionsCloning" ng-model="archetypeConfigRenderModel.enableCloning"/>
|
||||
</div>
|
||||
<div>
|
||||
<label for="archetypeAdvancedOptionsDisabling"><archetype-localize key="enableDisabling">Enable Fieldset Disabling?</archetype-localize><small><archetype-localize key="enableDisablingDescription">Allows fieldsets to be individually enabled/disabled.</archetype-localize></small></label>
|
||||
@@ -134,9 +142,17 @@
|
||||
<input type="text" id="archetypeAdvancedOptionsCustomView" ng-model="archetypeConfigRenderModel.customViewPath"/>
|
||||
</div>
|
||||
<div>
|
||||
<label for="archetypeAdvancedOptionsDeveloperMode"><archetype-localize key="toggleDeveloperMode">Toggle Developer Mode</archetype-localize><small><archetype-localize key="toggleDeveloperModeDescription">Toggle Developer Mode</archetype-localize></small></label>
|
||||
<label for="archetypeAdvancedOptionsDeepDatatypeRequest"><archetype-localize key="deepDatatypeRequest">Enable Deep Datatype Requests?</archetype-localize><small><archetype-localize key="deepDatatypeRequestDescription">Allows for easier datatype interception at the cost of caching performance.</archetype-localize></small></label>
|
||||
<input type="checkbox" id="archetypeAdvancedOptionsDeepDatatypeRequest" ng-model="archetypeConfigRenderModel.enableDeepDatatypeRequests"/>
|
||||
</div>
|
||||
<div>
|
||||
<label for="archetypeAdvancedOptionsDeveloperMode"><archetype-localize key="toggleDeveloperMode">Enable Developer Mode?</archetype-localize><small><archetype-localize key="toggleDeveloperModeDescription">Toggle Developer Mode</archetype-localize></small></label>
|
||||
<input type="checkbox" id="archetypeAdvancedOptionsDeveloperMode" ng-model="archetypeConfigRenderModel.developerMode"/>
|
||||
</div>
|
||||
<div>
|
||||
<label for="archetypeOverrideDefaultConverter"><archetype-localize key="overrideDefaultConverter">Override Default Property Value Converter?</archetype-localize><small><archetype-localize key="overrideDefaultConverterDescription">Check this if you wish to use your own custom property value converter.</archetype-localize></small></label>
|
||||
<input type="checkbox" id="archetypeOverrideDefaultConverter" ng-model="archetypeConfigRenderModel.overrideDefaultPropertyValueConverter" />
|
||||
</div>
|
||||
<div>
|
||||
<label for="archetypeAdvancedOptionsConfigModel"><archetype-localize key="configModel">Config Model</archetype-localize><small><archetype-localize key="configModelDescription">Be careful editing the text below, it controls the schema for this archetype.</archetype-localize></small></label>
|
||||
<textarea class="archetypeDeveloperModel" id="archetypeAdvancedOptionsConfigModel" ng-model="archetypeConfigRenderModel"></textarea>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<textarea class="archetypeDeveloperModel" ng-show="model.config.developerMode" ng-model="model.value"></textarea>
|
||||
<ul ui-sortable="sortableOptions" ng-model="model.value.fieldsets" ng-show="!showAddButton()">
|
||||
<li ng-repeat="fieldset in model.value.fieldsets">
|
||||
<fieldset ng-class="[fieldset.alias, (getFieldsetValidity(fieldset) == false ? 'archetypeFieldsetError' : '')]" ng-init="fieldsetConfigModel = getConfigFieldsetByAlias(fieldset.alias)">
|
||||
<fieldset ng-class="['archetype-fieldset-' + fieldset.alias, (getFieldsetValidity(fieldset) == false ? 'archetypeFieldsetError' : '')]" ng-init="fieldsetConfigModel = getConfigFieldsetByAlias(fieldset.alias)">
|
||||
<div class="archetypeFieldsetLabel" ng-class="{enableCollapsing: model.config.enableCollapsing}">
|
||||
<div ng-click="focusFieldset(fieldset)" class="label-sub module-label">
|
||||
<span class="caret" ng-hide="fieldset.collapse || !model.config.enableCollapsing"></span>
|
||||
@@ -22,14 +22,15 @@
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
<i class="icon icon-documents" ng-click="cloneRow($index)" ng-show="canClone()"></i>
|
||||
<i class="icon icon-remove" ng-click="removeRow($index)" ng-show="canRemove()"></i>
|
||||
<i class="icon icon-power" ng-class="{dimmed: fieldset.disabled}" ng-click="enableDisable(fieldset)" ng-show="canDisable()"></i>
|
||||
<i class="icon icon-navigation handle" ng-show="canSort()"></i>
|
||||
</div>
|
||||
</div>
|
||||
<div class="archetypeCollapser animate-hide" ng-hide="isCollapsed(fieldset)">
|
||||
<div class="archetypeCollapser animate-hide" ng-hide="model.config.enableCollapsing && isCollapsed(fieldset)">
|
||||
<form class="form-inline">
|
||||
<div ng-class="[property.alias, (getPropertyValidity($parent.$index, property.alias) === false ? 'archetypePropertyError' : '')]" class="archetypeProperty control-group" ng-repeat="property in fieldsetConfigModel.properties">
|
||||
<div ng-class="[('archetype-property-' + property.alias), (getPropertyValidity($parent.$index, property.alias) === false ? 'archetypePropertyError' : '')]" class="archetypeProperty control-group" ng-repeat="property in fieldsetConfigModel.properties">
|
||||
<label ng-hide="model.config.hidePropertyLabels == '1'" class="control-label" for="archetype-property-{{model.alias}}-{{$parent.$index}}-{{$index}}">
|
||||
<span>{{property.label}}</span>
|
||||
<div class="archetypeFieldsetHelpText" ng-show="property.helpText">
|
||||
@@ -38,7 +39,8 @@
|
||||
</label>
|
||||
|
||||
<div ng-class="[(model.config.hidePropertyLabels == '1' ? 'controls-no-label' : 'controls')]">
|
||||
<archetype-property class="archetypeEditor" property="property" fieldset-index="$parent.$index" fieldset="fieldset" archetype-config="model.config" property-config-index="$index" archetype-render-model="model.value" umbraco-form = "form"></archetype-property>
|
||||
<archetype-property class="archetypeEditor" property="property" property-editor-alias="model.alias" fieldset-index="$parent.$index" fieldset="fieldset" archetype-config="model.config" property-config-index="$index" archetype-render-model="model.value" umbraco-form="form"></archetype-property>
|
||||
<archetype-submit-watcher active-submit-watcher="activeSubmitWatcher" load-callback="submitWatcherOnLoad" submit-callback="submitWatcherOnSubmit"></archetype-submit-watcher>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
@@ -47,7 +49,7 @@
|
||||
</li>
|
||||
</ul>
|
||||
<div ng-show="showAddButton()">
|
||||
<a data-toggle="{{ model.config.fieldsets.length > 1 ? 'dropdown' : ''}}" ng-click="model.config.fieldsets.length == 1 ? addRow(model.config.fieldsets[0].alias, 0) : return" prevent-default>
|
||||
<a class="archetypeAddButton" data-toggle="{{ model.config.fieldsets.length > 1 ? 'dropdown' : ''}}" ng-click="model.config.fieldsets.length == 1 ? addRow(model.config.fieldsets[0].alias, 0) : return" prevent-default>
|
||||
<i class="icon icon-add dropdown-toggle"></i>
|
||||
<localize key="general_add" class="archetypeAddButtonText">Add</localize>
|
||||
</a>
|
||||
|
||||
+2
-2
@@ -1,8 +1,8 @@
|
||||
{
|
||||
"name": "Archetype",
|
||||
"version": "1.4.0-beta",
|
||||
"version": "1.9",
|
||||
"url": "http://github.com/imulus/archetype/",
|
||||
"author": "Imulus",
|
||||
"author": "Imulus - Kevin Giszewski - Tom Fulton - Lee Kelleher - Matt Brailsford - Kenn Jacobsen - Et. Al.",
|
||||
"authorUrl": "http://imulus.com/",
|
||||
"license": "MIT",
|
||||
"licenseUrl": "http://opensource.org/licenses/MIT"
|
||||
|
||||
+15
-12
@@ -1,15 +1,18 @@
|
||||
<?xml version="1.0"?>
|
||||
<package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
|
||||
<metadata>
|
||||
<id>Archetype</id>
|
||||
<version><%= version %></version>
|
||||
<title><%= name %></title>
|
||||
<authors>imulus, kgiszewski, tomfulton</authors>
|
||||
<owners>imulus, kgiszewski, tomfulton</owners>
|
||||
<projectUrl>http://github.com/imulus/archetype</projectUrl>
|
||||
<description><![CDATA[Archetype for Umbraco]]></description>
|
||||
<tags>umbraco</tags>
|
||||
<iconUrl>http://github.com/imulus/archetype/raw/master/assets/logo.png</iconUrl>
|
||||
<licenseUrl><%= licenseUrl %></licenseUrl>
|
||||
</metadata>
|
||||
<metadata>
|
||||
<id>Archetype</id>
|
||||
<version><%= version %></version>
|
||||
<title><%= name %></title>
|
||||
<authors>imulus, kgiszewski, tomfulton</authors>
|
||||
<owners>imulus, kgiszewski, tomfulton</owners>
|
||||
<projectUrl>http://github.com/imulus/archetype</projectUrl>
|
||||
<description><![CDATA[Archetype for Umbraco]]></description>
|
||||
<tags>umbraco</tags>
|
||||
<iconUrl>http://github.com/imulus/archetype/raw/master/assets/logo.png</iconUrl>
|
||||
<licenseUrl><%= licenseUrl %></licenseUrl>
|
||||
<dependencies>
|
||||
<dependency id="UmbracoCms.Core" version="7.1.6" />
|
||||
</dependencies>
|
||||
</metadata>
|
||||
</package>
|
||||
+1
-1
@@ -22,7 +22,7 @@
|
||||
"grunt-msbuild": "~0.1.9",
|
||||
"grunt-dotnet-assembly-info": "~1.0.9",
|
||||
"load-grunt-tasks": "~0.4.0",
|
||||
"grunt-umbraco-package": "0.0.5"
|
||||
"grunt-umbraco-package": "0.0.6"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
||||
Reference in New Issue
Block a user