From 9afaa024c022d5a35262659fd7a3aad51a8689de Mon Sep 17 00:00:00 2001 From: Jeroen Breuer Date: Wed, 30 Jul 2014 16:30:42 +0200 Subject: [PATCH 1/2] Fix 2 for #187 --- app/directives/archetypeproperty.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/app/directives/archetypeproperty.js b/app/directives/archetypeproperty.js index 21baea7..64fb95b 100644 --- a/app/directives/archetypeproperty.js +++ b/app/directives/archetypeproperty.js @@ -1,4 +1,4 @@ -angular.module("umbraco.directives").directive('archetypeProperty', function ($compile, $http, archetypePropertyEditorResource, umbPropEditorHelper, $timeout, $rootScope, $q) { +angular.module("umbraco.directives").directive('archetypeProperty', function ($compile, $http, archetypePropertyEditorResource, umbPropEditorHelper, $timeout, $rootScope, $q, editorState) { function getFieldsetByAlias(fieldsets, alias) { @@ -66,7 +66,7 @@ angular.module("umbraco.directives").directive('archetypeProperty', function ($c defaultValue = jsonOrString(defaultValue, scope.archetypeConfig.developerMode, "defaultValue"); //grab info for the selected datatype, prepare for view - archetypePropertyEditorResource.getDataType(dataTypeGuid).then(function (data) { + archetypePropertyEditorResource.getDataType(dataTypeGuid, editorState.current.contentTypeAlias, scope.propertyEditorAlias, alias).then(function (data) { //transform preValues array into object expected by propertyeditor views var configObj = {}; _.each(data.preValues, function(p) { @@ -235,6 +235,7 @@ angular.module("umbraco.directives").directive('archetypeProperty', function ($c scope: { property: '=', propertyConfigIndex: '=', + propertyEditorAlias: '=', archetypeConfig: '=', fieldset: '=', fieldsetIndex: '=', @@ -243,4 +244,4 @@ angular.module("umbraco.directives").directive('archetypeProperty', function ($c umbracoForm: '=' } } -}); \ No newline at end of file +}); From c20aa64af27c631104f4971c9e286a415f9a701e Mon Sep 17 00:00:00 2001 From: Jeroen Breuer Date: Thu, 31 Jul 2014 12:11:02 +0200 Subject: [PATCH 2/2] Added node id --- app/directives/archetypeproperty.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/directives/archetypeproperty.js b/app/directives/archetypeproperty.js index 64fb95b..57cc61f 100644 --- a/app/directives/archetypeproperty.js +++ b/app/directives/archetypeproperty.js @@ -66,7 +66,7 @@ angular.module("umbraco.directives").directive('archetypeProperty', function ($c defaultValue = jsonOrString(defaultValue, scope.archetypeConfig.developerMode, "defaultValue"); //grab info for the selected datatype, prepare for view - archetypePropertyEditorResource.getDataType(dataTypeGuid, editorState.current.contentTypeAlias, scope.propertyEditorAlias, alias).then(function (data) { + archetypePropertyEditorResource.getDataType(dataTypeGuid, 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) {