KOBENDigital / ConditionalDisplayers

Collection of modified Umbraco property editors to make them able to control the display of other properties in the same document type.
9 stars 14 forks source link

include parent property alias in data element attribute #11

Closed jezmaghuyop closed 5 years ago

jezmaghuyop commented 5 years ago

I've added the parent property alias as part of the value for data element attribute so that it can properly locate the DOM element, This is the fixed I've made for my project using Umbraco v7.15.3.

image

image

skartknet commented 5 years ago

Nice, thanks for that. Is this to fix the issue with nested content? Do you think it will work with v8 as well?

jezmaghuyop commented 5 years ago

@skartknet I've added a check now to identify if the property is in Nested Content or not.

skartknet commented 5 years ago

Great, I'll try to take a look this weekend and release a new version.

skartknet commented 5 years ago

I hit a case where it doesn't work:

image

In this line: var parentPropertyAlias = $scope.model.alias.toString().replace($scope.model.propertyAlias, '');

the $scope.model.alias is cdnestedcd and the replace method remove the first 'cd', it should always remove whatever is after the ''.