Because of the lazy loading of property editors, the
submitWatcherOnSubmit method is not necessarily called when an Archetype
is saved. This is indeed the case when all fieldsets are collapsed.
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.
Allow fieldset label templates to contain alternative/fallback property
aliases and/or functions by seperating with "|" - e.g.
{{title|myFunction(text)}}
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 :))
Fix issue #123. Explicitly call $setDirty() on the PE form when
reordering or removing rows, thus ensuring the editor will be prompted
to discard changes if navigating away before saving.