Wednesday 3rd December, 2014

Editor 1.4.0 beta release notes

This is an exciting update for Editor that introduces full .NET support for DataTables and Editor on the server-side using C# based libraries. These libraries have feature parity with the existing PHP libraries, and they will both be developed in parallel in future. For information about the new .NET libraries please refer to the .NET manual for Editor.

Although the primary focus for this release has been the .NET libraries, there are a number of other smaller changes in the Javascript and PHP, which add useful new features (the new Options() method and a visual processing indicator for inline editing for example) which build on the existing foundation of Editor.

This is a beta release primarily to allow feedback on the new .NET libraries. If you do run into any issues, please get in touch so the issue can be resolved for the final release.

Details of all changes are available below.

Release notes

Javascript

New
  • New: Visual processing indicator for inline and bubble editing when the form is submitted
  • New: Inline editing support for Responsive
  • New: displayed() and field().displayed() methods to determine which fields are shown in an editing form
  • New: onEsc option for form-options. With this option you can now define what action Editor is to take when the esc key is pressed when a form is shown. This can be 'submit', 'blur', 'close' or 'none'
  • New: optionsPair option for select, radio and checkbox that can be used to define the properties to read the label / value pair from for the input, if the data is given as an array of objects.
  • New: $.fn.dataTable.Editor.pairs() static method that can be used by plug-in authors to provide the same label / value iteration options as Editor's built in options do.
  • New: The field to be edited by inline or bubble editing for a cell can now be specified using the editField option in a DataTable column. This is useful for cases when using joined tables where the display data in the table does not match the name of the field in Editor.
Fixes
  • Fix: As position:fixed is not well supported for mobile browsers, a content wrapper is put around the elements on the page, but this can cause problems with FixedColumns. The wrapper is now only used for mobile devices.
  • Fix: Error messages were not cleared when bubble and inline editing were closed without submitting
  • Fix: Version check for old versions of DataTables was using a static method defined in 1.10, so it just threw an error for DataTables 1.9-
  • Fix: Joined fields could have invalid IDs assigned to them due to the use of the . character in the field names. There is now an $.fn.dataTable.Editor.safeId method which can be used to make an id safe, and is done so for all built in field types now.
  • Fix: When deferRender was enabled, edit() and remove() could only operate on rows which had been rendered
  • Fix: When passing in a DataTables API instance to the remove() method an error would occur due to double wrapping of an array.
  • Fix: The initRemove when used in a standalone editor was throwing an error as it couldn't access the data for the fields
  • Fix - jQuery UI: Tabbing didn't include buttons
  • FIx - jQuery UI: Modify date field CSS slightly for layout of calendar image

PHP

New
  • New - PHP: Field->options() to vastly simplify getting data for select, radio and checkbox options. Previously to populate the list of options for these fields you would need to use ipOpts or the update() method of the field. Now the PHP libraries will get the list information for you, as defined by this method, and the client-side will automatically populate the list. This means there is no need to use initComplete any more to populate these field types. This is particularly useful when working with join tables.
  • New - PHP: jsonp() method that will output JSONP in much the same way as json() will output JSON.
  • New - PHP: Field getValue() and setValue() methods which provide the ability to set a value for use on data read, or write. This value is used regardless of the data read from the database, or set by the client (depending on if it is get or set). It is designed for use with the new ability to specify if a field should be written to the database on create, edit or both - for example you might have a timestamp as a value on a created field which is not submitted by the client but assigned directly in the server-side code. Example: new Field( 'created' )->set( Field::ACTION_CREATE )->setValue( time() );
  • New - PHP: Fields can be specified to write to the database on only create or edit actions now (extending the previous two options of never and both). This provides the ability (for example) to set a created time stamp when a new row is inserted, and never have it edited again. This option is provided through the Field->set() method which accepts Field::SET_NONE, Field::SET_BOTH, Field::SET_CREATE and Field::SET_EDIT options. For backwards compatibility it will also still accept boolean values with true being the same as Field::SET_BOTH and false the same as Field::SET_NONE
  • New - PHP: Add static Editor::action() method to allow easy checking of what action an Editor instance is taking based on a request via a documented API. The examples have been updated to use this new function.
  • New - PHP: Deprecate the whereSet() option.
  • New - PHP: Ability to use DT_RowId as an option for columns.data when using server-side processing
  • New - PHP: Improved where queries by being able to use a closure to define the where conditions directly using the Query instance. This allows OR, grouping of conditions and other operations not available before
  • New - PHP: Query conditions (where) can check for null and not null values now using the where(), and_where() and or_where() methods
  • New - PHP: Multiple validators can be applied to a single field by using the validator method multiple times on that field.
Updates
  • Update - PHP: as field alias is now case insensitive
Fixes
  • Fix - PHP: Improved error condition for whereSet if field found to be submitted
  • Fix - PHP: push() method should not use the wkere values to overwrite the set fields if there is a conflict
  • Fix - PHP: If whereSet was used without a join, it would throw an error.
  • Fix - PHP: SQLite driver would trigger an error if an array of options was passed in

.NET

New
  • Initial release
  • Feature parity with the PHP libraries

Examples

New
  • New - example: Showing the use of editField in a joined table
  • New - example: Always visible checkbox
Updates
  • Update - example: The HTML sourced example now reads data into objects rather than arrays - a new feature in DataTables 1.10.3 that makes working with DOM sourced data more intuitive
  • Update - examples: All now use the new Field->options() method when working with joined tables.
Fixes
  • Fix - example: Client-side validation example should have the validation check only on create and edit actions
  • Fix - example: Validation for date example's register date was incorrect for leading zeros on the day part
  • Fix - examples: Inline and bubble editing examples with checkboxes in the first column shouldn't show the checkbox on loading or when there are no records in the table
  • Fix - example: Postgres SQL didn't do a full reload if loaded more than once

Docs

Fixes
  • Fix - docs: submit() documentation updated to reflect the parameter passed into the success callback
  • Fix - docs: Correct typo in postSubmit