By tracking the fieldsets that have been expanded (loaded), we can make
sure the submit watchers fire appropriately, even when the fieldsets are
collapsed down again.
Apart from hopefully fixing the publishing issues for collapsed
fieldsets, this also adds a performance gain if the users expand and
collapse the same fieldsets more than once, since the fieldsets now only
load the first time they're expanded (instead of every time).
This also - at least partially - fixes the validation issue #325
introduced by #301
I've had a big performance problem when loading big child archetypes in
an archetype, by adding a ng-if the digest cycle isn't called directly
when loading the directive
Added class "archetypeAddButton" to the button so it can make use of the
CSS that is writen for it.
The button should also have a cursor: pointer on hover.
Add a watch to the "formSubmitting" event for each property added to a
fieldset, to make sure Archetype gets the last say in the
"formSubmitting" event.
The fieldset.isValid property isn't necessarily initialized when the
view looks for it to determine fieldset validity. I've introduced a
validation method that counters this problem.
The validation method also ensures that any validation errors in nested
Archetypes are highlighted on the parent/root Archetype
Old: archetype-property-<umbracoPropertyAlias>-<fieldsetIndex>-<propertyIndex>
New: archetype-property-<umbracoPropertyAlias>-<archetypePropertyAlias>-<fieldsetIndex>
Basically, this adds the archetypePropertyAlias into the mix, to fix a case where you might have the same Archetype nested on a host Archetype twice (ie box 1 links, box 2 links within the same Archetype - there was no uniqueness)
It also adds in the Property Alias in place of the Property "Index" (unintended side effect, but seems cool :))