Entity editing:
- Terminology: midgardEditable is now known as an editable entity widget, and the editors it runs for various properties are known as property editor widgets
- Entity editing widget now accepts two callbacks for instantiating decorators for entities and their properties in the DOM. This is handy for CMSs that want to visualize what can be edited
decorateEditableEntity
callback is called for the entity loaded to the editable widgetdecoratePropertyEditor
callback is called for each property of the entity
- Entity editables are now able to run without VIE Collection view being defined
- Events emitted by the editing widgets now carry the new terminology. The old event data keys are still available as fallbacks:
entity
: VIE entity instance (Backbone.js model)editableEntity
: midgardEditable widget instanceentityElement
: DOM element containing the entity
- Events emitted by the property editing widgets now carry the new terminology. The old event data keys are still available as fallbacks:
predicate
: name of the property being editedpropertyEditor
: editor instancepropertyElement
: DOM element containing the property
- The state model for entity editing was clarified, with the following different states instead of enabled, disabled, and active:
- Inactive: editable is loaded but disabled
- Candidate: editable is enabled but not activated
- Highlight: user is hovering over the editable (not set by Editable widget directly)
- Activating: an editor widget is being activated for user to edit with it (skipped for editors that activate instantly)
- Active: user is actually editing something inside the editable
- Changed: user has made changes to the editable
- Invalid: the contents of the editable have validation errors
- The
modified
event was renamed tochanged
to follow the new states - New public methods
setState
andgetState
were added for manipulating the state from the application controller- States are passed as strings corresponding to the new editing states (for example,
inactive
orchanged
) - The
setState
method has an optionalpredicate
parameter for targeting a particular property editor with the state change
- States are passed as strings corresponding to the new editing states (for example,
- Initial integration was added for CKEditor 4
Metadata editing:
-
New midgardMetadata widget was added to act as the controller for all different metadata editors
-
midgardTags was refactored to run inside the metadata editing widget
This changes tags initialization from:
jQuery('body').midgardCreate({ tags: true });
to:
jQuery('body').midgardCreate({ metadata: { midgardTags: {} } });
Storage:
- The
revertChanges
method was made public, allowing external UIs to trigger reverting entities to their original states - The
hasLocal
andreadLocal
methods were made public to allow manipulating localStorage from the application controller - The
saveRemote
method was made public, allowing the application controller to trigger saving for a single entity - new
save
andsaved
events are triggered for the whole set of entities being saved - new
saveentity
andsavedentity
events are triggered for each entity being saved - Options used when calling
saveRemote
are now passed on in the save-related events - key prefix used with localStorage is now configurable
Create.js internals:
- The whole library has been migrated to use jQuery
on
andoff
methods instead ofbind
andunbind
- All widgets were migrated to the Midgard namespace to maintain consistency
- New build option for creating a smaller edit-only version of Create.js:
$ cake editonly
- The build process was improved to work also on Mac OS X
Dependencies:
- VIE was updated to 2.1.0
- Hallo was updated to the latest git version
- jQuery-Tags-Input -- used by the midgardTags widget -- was updated to latest git version
- jQuery was updated to version 1.9.1 and jQuery UI to version 1.10.2. Some compatibiity work still remains
Development:
- The build environment of Create.js was switched to Grunt
Localization:
- Hebrew and Romanian translations were added
Thanks to the Drupal Edit team for major contributions to this release!
Collection editing:
- Add buttons are now shown only for collections VIE is able to add views for
- New midgardCollectionAddBetween widget for more flexible collection editing
- Collection widgets are now able to ask the user for the type to add in case of collections that can multiple types inside them
- Collection widgets are aware of possible size constraints in VIE collections. If a collection is full, the Add buttons are not shown
User interface:
- Support for keyboard shortcuts if the Mousetrap library is available:
- Ctrl-e: enter editing mode
- Esc: leave editing mode
- Ctrl-s: save changes
- Ctrl-Shift-i: ignore local modifications (when entering edit mode)
- Ctrl-Shift-r: revert to local modifications (when entering edit mode)
Localization:
- Support for localizing the Create.js user interface. You can pass custom localization callbacks using the
localize
option of the widgets - First batch of languages:
- Swedish
- Bulgarian
- Spanish
- Czech
- Russian
- Polish
- Dutch
- Danish
- Italian
- Norwegian
- German
- French
- Brazilian Portuguese
- Finnish
Storage:
- Autosaving now saves changes using Backbone's
silent
option so that it doesn't modify the DOM elements user is editing - The
checkRestore
method was made public to allow external web applications to restore content - The
saveRemoteAll
method was made public
Create.js internals:
- The VIE DOM service used with Create.js is now configurable. You can replace the default RDFa Service with your own implementation to support custom mark-up
- The custom DOM service can be passed via the
domService
key of Create.js widget options
- The custom DOM service can be passed via the
- All Create.js code is now being run in JavaScript strict mode
- Continuous Integration of Create.js was switched to using PhantomJS with QUnit
- Create's HTML output was changed to use Underscore Templates for better configurability
Dependencies:
- VIE was updated to latest git version
- Hallo was updated to the latest git version
- Hallo now depends on the Rangy library
- The Modernizr dependency was removed
Thanks to the TYPO3 Neos team for great collaboration on this release! We're also grateful for the translation contributions from all around the world.