Editor 1.2.3 release notes
A relatively small number of changes in this release, with focus primarily on addressing all known issues and adding two new features to enhance the capabilities of Editor. The first of these two is for most of the built in field types to accept a new configuration parameter - attr
which is an object of key/value pairs which will be applied to the input element. This allows easy addition of attributes such as maxlength
, required
etc.
The second new feature is to relax the constraint of requiring a row ID to be set in the DataTable (typically this was done with DT_RowId
). Now it is possible to read any object property as the unique identifier for a row with the new srcId
option. DT_RowId
is is still used as the default.
Release notes
New
- New: The readonly, text, password, textarea, select, and date built in form field types now accept an
attr
option which is an object of attribute name / value pairs which are applied to the input element for the field. This allows any attribute such asmaxlength
to be added easily to fields. - New: New configuration option option -
srcId
can now be used to read the row id from the data source object rather than the DOM row's ID property, effectively making the DT_RowId option in the JSON data source optional. This is handy for cases where you might not want to modify the JSON data source to include DT_RowId, or if the id is already included and need not be included again as redundant information.
Updates
- Update: Update Date example to use jQuery 1.10.0
- Update: Bootstrap integration example updated to latest DataTables integration code
Fixes
- Fix: api:clear - Fix ordering issue, where ordering wasn't updated on a clear - 13566
- Fix: api:clear - Fix clearing field
0
- 13566 - Fix: api:documentation - Example for
fields
didn't actually use the method that it was supposed to be showing! - Fix: PHP - When submitting an empty array (i.e. a checkbox array with no items set) the HTTP parameter isn't sent to the server, resulting in an error being reported - 12820.
- Fix: examples - Missing the 'title' field from the formOnlyData example so the title input was completely ignored - 12644
- Fix: integration:bootstrap - If the user exited the Bootstrap modal using the esc key, the Editor for could not be brought back onto screen as it thought it was still open.
- Fix: Add type="text" to the text input fields.
- Fix: When multiple instances of Editor were used, the display controllers were both attaching multiple events (one for each instance) rather than just using events for the instance that was being worked with. This would result in display events (such as close) being fired multiple times. The fix is to attach events, not at init time as was done before, but rather the events are attached, for a single instance on each display, and removed on close ensuring that the events only apply to the active instance. It is worth noting that the display controller DOM elements are still shared between the instances to help keep memory usage to a minimum - this works here as the two built in display controllers can only show one instance at a time, but if a display controller were to provide the ability to interact with multiple tables at the same time (a modal for example) it would need to use an individual DOM element for each instance. See thread 12563 for the original bug report.