Tuesday 9th March, 2021

Editor 2.0.0 release notes

Editor 2 comes 9 years after Editor was initially launched and increased the utility of the library with new features such as:

  • DataTable as an input
  • Nested editing
  • Inline editing with multiple fields
  • Bootstrap 5 support

And of course more - please see the release notes before for full details of the changes.

We've also taken the opertunity to remove legacy features - many of which haven't been relevent since v1.3. They were all previously marked as deprecated in the documentation and have now been removed to keep the library size as slim as possible. Please refer to the "Removed" section below.

Finally, if you use the datetime field type, please note that we have split the date / time input picker into its own library. To use datetime with Editor 2, you must now also include the new DateTime library. This was done to increase reusability of the library - e.g. it is also used in our SearchBuilder extension for DataTables.

Downloads

Downloads of specific versions of Editor are only available to license holders. Please see the download page for information about the current release version.

Release notes

Core

New

  • JS: Add fields.getFormatter and fields.setFormatter options to provide the ability to transform data inside Editor fields between setting the value, the input element and then reading it back.
  • JS: datatable input type which can be used as a replacement for select, radio and checkbox if you'd like to show tabular information to the user. Select2 and the like could also be replaced with this tool.
  • JS: Field formatters can accept values via an array - the function name to use (from $.fn.dataTable.Editor.Field.formatters) and then the arguments to pass to the function.
  • JS: Allow minDate and maxDate to be given as ISO strings, not just Date objects
  • JS: field().enable() and field().show() now accept optional toggle parameters.
  • JS: inline() now supported editing multiple fields at the same time! This is done by passing in a selector of all the cells in a row you wish to make editable.
  • JS: Editor buttons (create, edit and remove) now support a formOptions parameter which is an optional form-options object to provide control over the form on a per button basis.
  • JS: datatable field type which uses a DataTable for user input selection.
  • JS: ajax.replacements option which can be used to modify the submission URL based on data being submitted. Updated - JS: In keeping with the style of the new ajax.replacements option, the default id replacement format in Editor's REST URL handling is now {id}. The previous _id_ will still work correctly.
  • JS: fields.nullDefault - ability to replace null values with the field's default value on edit.
  • JS: Highlighting of newly created rows and edited rows will now work when using server-side processing just as it did when using client-side processing.
  • JS: Inline editing now has the ability to display multiple fields at the same time in a row.
  • JS: Inline creation of rows is now possible with Editor through the inlineCreate() method.
  • JS: Inline editing now supports showing multiple cells at a time!
  • JS: Nested editing. This makes it easy to create, edit and delete options from a joined list of options without leaving the form for another page.
  • JS: Show an error message in the console if submitting a form that is in the processing state (Editor will cancel the submit and the linked tech note will explain why and how to resolve).
  • JS: Support for loading language strings from a JSON file via Ajax, through DataTables' language.url option. Editor will now automatically look for an editor property in the JSON returned and use that as required. Example added showing this.
  • JS: The dependent() callback function is now passed the event object that triggered the dependent action.
  • Example: Bootstrap 5 support and example
  • Examples: Add DataTables field input type examples

Fixes

  • CSS: Chrome 83 styling is really ugly
  • CSS: Vertical alignment correction for checkbox and radio inputs
  • Docs: Documentation could incorrectly refer to $.fn.Editor - it should be $.fn.dataTable.Editor.
  • Example: CSV import was not able to reselect the same file twice in a row for import
  • Example: Oracle SQL had an error in it
  • Example: Improve styling of close icon for the DataTables styling lightbox
  • Examples: Inline editing controls now uses FontAwesome to make a more attractive UI
  • JS: Empty default when using wireFormat would cause an Invalid time error
  • JS: Clicking on scrollbar shouldn't cause modal to hide
  • JS: Fix for SearchBuilder memory leak to update when changes made with editor
  • JS: Calling remove() with buttons disabled would cause the first field in the form (even although it wasn't visible) to gain focus. If this happened to be a datetime input, the picker would show.
  • JS: Clicking the "12" button in a 12 hour time picker would toggle the AM / PM
  • JS: Time picker was not displaying correctly with jQuery 3.5
  • JS: dependent() would cause an error when url was given as an object
  • JS: focus is assigned to the fields in the bubble editor after any "in" animation is complete
  • JS: In Chrome 86 a click and drag outside of an inline editing cell would cause an immediate blur.
  • JS: In really small windows datetime could trigger a scroll when first displayed, causing it to hide
  • JS: In small documents the lightbox would collapse down much smaller than the window might otherwise allow.
  • JS: processing information for a field is no longer dependent upon the DOM - it uses an internal state now.
  • JS: Remove working around for Chrome 53 error which was causing footer misalignment in Firefox
  • JS: Selecting the same file multiple times in a row wouldn't result in a changed event with the upload and uploadMany field types in Chrome
  • JS: Semantic UI styling for dropdowns wasn't being applied to select elements
  • JS: Remove IE6 zoom hacks

Removed

  • ajaxUrl option - replaced by ajax. The ajaxUrl option was the original way for configuring Ajax with Editor, but was superseded by ajax in Editor 1.3. ajaxUrl has been deprecated since then. If you are still using ajaxUrl then you can simply replace it with ajax.
  • date field type. This depended upon either the jQuery UI library, or the HTML5 date input type which is poorly supported in browsers and offers little flexibility. The built-in datetime input type should be used instead, which has been available since Editor 1.5. If you require to use the HTML5 date input type use:
  • DateTime library has been separated into its own library (DateTime). To use datetime you must now include that library, otherwise an error will be thrown (with a message explaining what is wrong and a link detailing the issue and how to fix it).
  • dbTable option. This was deprecated in Editor 1.3 and has not been documented since. It was used to provide a database table name to the server - ajax.data should be used now if you wish to send extra information to the server in Ajax requests.
  • fields.dataProp option - fields.data is the direct replacement. The old naming hasn't been used since Editor 1.3, but has been mapped to fields.data if provided.
  • Support for the legacy DataTables extension "TableTools" which was replaced by Buttons and Select in 2015.
  • HTML5 date input type example
  • legacyAjax option. Editor prior to v1.5 used a "flat" data structure when submitting to the server. The support for multi-row editing meant that was no longer suitable and was replaced by a new standard. The old style could be invoked using the legacyAjax option which has now been removed. If you require to still use the legacy for for any reason, the following preSubmit and postSubmit event handlers can be used:

.NET

New

  • Support for complex join expressions for left joins

Fixes

  • Tidy doc parameters
  • Let SearchPanes work on the client side when using editor sourced data

NodeJS

New

  • Add support for complex joins using Knex's callback options

Fixes

  • Let SearchPanes work on the client side when using editor sourced data
  • Empty string date / time values should be given as null to the database

PHP

New

  • Support for complex left join expressions.
  • Update to use PHPDocumentor for reference docs

Fixes

  • Let SearchPanes work on the client side when using editor sourced data
  • DB2 connection string simplified
  • When using setValue with a compound key, it wasn't possible to read the data from the created row back.
  • Remove use of deprecated case_insesitive parameter
  • Pass database object to a custom Options function