Skip to content

v3.3.0

Compare
Choose a tag to compare
@michmech michmech released this 09 Apr 10:51
· 90 commits to master since this release

Bug fixes and changes

  • Fixed an issue which caused shy attributes to sometimes fail to roll out automatically after the user has added them. Thanks to Brandon Ryan of Mainstream Technologies for reporting.

  • The mustBeBefore and mustBeAfter constraints of an element specification can now be functions as well as literal arrays. This is documented in chapter 14.2 of the Xonomy documentation.

  • Up till now, Xonomy always imposed the mustBeBefore and mustBeAfter constraints when rendering the document and then whenever the document changed. This meant that Xonomy sometimes silently reordered elements if they happened to be in an order that violated the mustBeBefore and mustBeAfter constraints. This new version of Xonomy no longer does this: it leaves elements in the order in which they are, even if that violates the mustBeBefore and mustBeAfter constraints. The only time when the constraints are imposed is (a) when a new child element has been appended to a parent element and (b) when dragging and dropping elements around the document. In other words, if you now ask Xonomy to render a document which is invalid because some child elements are in an incorrect order, Xonomy will not attempt to "correct" the problem but will simply render the document as is. This is consistent with how Xonomy handles invalid documents in general: it does not attempt to fix them but renders them as they are. Chapter 5 has been updated to reflect this small change in behaviour.

  • Laic mode has been redesigned.

  • Xonomy now has cool new features for accessing server-side data, check them out in the newly written Chapter 13 in the Xonomy manual!

New features for fixing invalid documents

  • It is now possible to create default specifications for unknown elements and attributes. Xonomy will use these as defaults for elements and attributes that are not defined in the document specification. This is described in section 14.1 of the Xonomy documentation.

  • When an element is not allowed to have text nodes but has one, and when the text node becomes empty, Xonomy removes it.

Fixes and features contributed by Kim Lindhardt Madsen

  • Fixed a bug which caused the surrogate functions getChildElements() and getDescendantElements() to throw exceptions when the surrogate element had text nodes.

  • Element specifications and attribute specifications can now have a title property which is displayed as a tooltip when the user mouse-overs the element name or attribute name. The property can be a (multilingual) string, or a function that returns a (multilingual) string. If it is a function, it takes an argument which is a surrogate object representing the element or attribute. Documented in chapter 14 of the Xonomy manual.

  • Clicking the name of an element or attribute will now trigger a jQuery event called xonomy-click-element and xonomy-click-attribute. The event handler is given the surrogate object as an argument. This is documented in chapter 15 of the Xonomy manual.