Compare commits

...

3 Commits

Author SHA1 Message Date
kgiszewski e640a9b4f4 This depends on a core PR. 2015-12-14 09:53:01 -05:00
kgiszewski bb056a01dd Update dll to v1.12.1 2015-12-03 08:44:40 -05:00
kgiszewski 608b12aa10 Revert "Fix #304"
This reverts commit f4e449f030.

Conflicts:
	app/Umbraco/Umbraco.Archetype/Models/ArchetypeModel.cs
2015-12-03 08:43:23 -05:00
6 changed files with 15 additions and 29 deletions
@@ -4,7 +4,6 @@ using System.Collections.Generic;
using System.Linq;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using Umbraco.Core.Logging;
namespace Archetype.Models
{
@@ -48,22 +47,6 @@ namespace Archetype.Models
/// <returns></returns>
public string SerializeForPersistence()
{
//clean out any properties with a null datatype
foreach (var fieldset in Fieldsets)
{
var properties = fieldset.Properties.ToList();
foreach (var property in fieldset.Properties)
{
if (property.DataTypeGuid == null)
{
properties.Remove(property);
}
}
fieldset.Properties = properties;
}
var json = JObject.Parse(JsonConvert.SerializeObject(this, new JsonSerializerSettings() { ReferenceLoopHandling = ReferenceLoopHandling.Ignore }));
var propertiesToRemove = new String[] { "propertyEditorAlias", "dataTypeId", "dataTypeGuid", "hostContentType", "editorState" };
@@ -1,4 +1,4 @@
using System.Reflection;
[assembly: AssemblyVersion("1.12.0")]
[assembly: AssemblyFileVersion("1.12.0")]
[assembly: AssemblyVersion("1.12.1")]
[assembly: AssemblyFileVersion("1.12.1")]
+2 -2
View File
@@ -468,7 +468,7 @@ angular.module("umbraco").controller("Imulus.ArchetypeController", function ($sc
$scope.activeSubmitWatcher++;
return $scope.activeSubmitWatcher;
}
$scope.submitWatcherOnSubmit = function () {
$scope.$broadcast("archetypeFormSubmitting");
$scope.submitWatcherOnSubmit = function (args) {
$scope.$broadcast("archetypeFormSubmitting", args);
}
});
+8 -6
View File
@@ -115,14 +115,16 @@ angular.module("umbraco.directives").directive('archetypeProperty', function ($c
});
scope.$on('archetypeFormSubmitting', function (ev, args) {
// validate all fieldset properties
_.each(scope.fieldset.properties, function (property) {
archetypeService.validateProperty(scope.fieldset, property, configFieldsetModel);
});
if(args.action !== 'save') {
// validate all fieldset properties
_.each(scope.fieldset.properties, function (property) {
archetypeService.validateProperty(scope.fieldset, property, configFieldsetModel);
});
var validationKey = "validation-f" + scope.fieldsetIndex;
var validationKey = "validation-f" + scope.fieldsetIndex;
ngModelCtrl.$setValidity(validationKey, scope.fieldset.isValid);
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);
+2 -1
View File
@@ -3,9 +3,10 @@ angular.module("umbraco.directives").directive('archetypeSubmitWatcher', functio
// 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();
scope.submitCallback(args);
}
});
}
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "Archetype",
"version": "1.12.0",
"version": "1.12.1",
"url": "http://github.com/imulus/archetype/",
"author": "Imulus - Kevin Giszewski - Tom Fulton - Lee Kelleher - Matt Brailsford - Kenn Jacobsen - Et. Al.",
"authorUrl": "http://imulus.com/",