Wednesday 12th August, 2015

Editor 1.5.0 release notes

Editor 1.5.0 introduces a number of fantastic new features - primarily:

  • Multi-row editing
  • Server-side events
  • Upload plug-in is now integrated into the core.

The release notes below give a full run down of the new features, changes and fixes that are included in this release.

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

Javascript

New

  • New: Multi-row editing
  • New: i18n options for multi-row editing:
  • New: Multi-row editing aware form level APIs:
    • multiGet() - get the multi-row editing values for one or more fields
    • multiSet() - get the multi-row editing values for one or more fields
  • New - JS: API methods:
  • New - JS: Field type plug-ins can be attached to $.fn.DataTable.ext.editorFields which is a plain object that can be created if it is not already available. This allows field type plug-ins to be loaded before Editor itself. This load order independence is important for the DataTables download builder.
  • New - JS: Integration with the Buttons and Select extensions for DataTables
  • New - JS: The form options have been harmonised and now provide similar basic functionality. The behaviour actions (see form-options) all now start with on and what they do when activated is now defined by a string. This is a backwards compatible change the old options (such as submitOnBlur will still function, but the new names provide great control, consistency and future enhancement options.
  • New - JS: The message given for message() and field().message() can now be a function, executed as the message is displayed
  • New - JS: The title given for title() can now be a function, executed as the title is displayed
  • New - JS: Upload and upload collection field types operate correctly with Bootstrap, Foundation and jQuery UI styling frameworks
  • New - JS: drawType option for form-options which can be used to control the type of draw that DataTables makes when the table is updated. This allows edited data to remain in place until the end user resorts the table.
  • New - JS: file() and files() API methods attached to DataTables by Editor to provide information about files that have been uploaded on a table.
  • New - JS: uploadMany - one-to-many file upload support - providing the ability to have multiple files uploaded. This is done through Editor one-to-many join support
  • New - JS: upload and uploadMany field types will emit the event upload.editor from the input element when the field's value changes which can be used in place of a change event listener for these two field types
  • New - JS: upload now included in Editor by default (was previously a plug-in).
  • New - JS: submit option for form-options which provides the ability to not perform an Ajax request if no values have changed. Inline and bubble editing now have this option set to changed by default (i.e. submit only if there are changed values). The main form is set to all (i.e. submit all editing fields). This can be controlled by the form options parameter for the editing methods and also the formOptions options.
  • New - JS: Ability to not show the editing bubble when using bubble() allowing programmatic control of the bubble editing form
  • New - JS: displayNode() method to get the display container node for the display controller. This is typically a modal element, although it depends upon the display controller used.
  • New - JS: inError() method that can be used to determine if any part of the form is showing an error message
  • New - JS: displayOrder event which is triggered when the fields in the form are reordered
  • New - JS: preOpen and open both are now passed mode and action parameters to inform what type of form is being displayed
  • New - JS: fields.className can now be used to control the field layout using two built in options full and block which will make use of the whitespace available in the form to allow more complex inputs and data controls to be shown nicely in the form's grid.
  • New - JS: legacyAjax option to alter the Ajax data format submitted and received to match the 1.4- format.

  • Updates

  • Update - JS: If a DELETE method is used to delete a row, the data should be sent in the query string since many servers will strip or throw an error if body data is submitted.

  • Update - JS: When a message is hidden, it is now also cleared. This is safe as the was no way to reshow the old message without needing to set it again.
  • Update - JS: When reading JSON data for options, if options were specified for a field that did not have an update method an error would be throw. Now the options are ignored

  • Fixes

  • Fix - JS: Allow the mouse to give focus to form buttons on mousedown

  • Fix - JS: Error would be thrown if a DataTables Ajax call did not successfully complete
  • Fix - JS: Fields added using add() while the form was visible were not immediately being drawn into the form
  • Fix - JS: Fix a lightbox was closed and then immediately shown, it would continue to animate out and could not be shown again
  • Fix - JS: If an error occurs twice in a row on submission, the error could be clear of flash in display due to overlapping animations
  • Fix - JS: In IE(11-) if you use arrow keys to move focus between fields while inline editing, only every second row would be focused.
  • Fix - JS: enable() and disable() could throw errors if called without any arguments
  • Fix - JS: jQuery UI integration - Allow onEsc option to operate correctly. Previously it would always automatically close the form.
  • Fix - JS: 'Unable to automatically determine field from source' error message updated to link to DataTables tech note on the topic
  • Fix - JS: Allow return key to submit when focused on radio, checkbox and select elements
  • Fix - JS: When using jQuery UI, a manual call of close() would cause the close event to be triggered twice
  • Fix - JS: i18n.remove.confirm could not be given as a string
  • Fix - JS: jQuery UI integration - jQuery UI dialogues perform their own focus capture and it supports multi-layer dialog windows, which the Editor implementation does not. This change disables Editor focus capture for jQuery UI (and in general display controls can trigger this by setting captureFocus on their host object).

  • Styling

  • Fixes

  • Fix - CSS: Alignment of select field wasn't quite right

  • Fix - CSS: Button focus animation wasn't working due to an incompatibility with the SCSS syntax used and the latest versions of SASS.
  • Fix - CSS: Remove star hack for very legacy IE

  • PHP

  • New

  • New - PHP: Callback events which are triggered when Editor performs a create, edit or delete action, allowing external operations to be easily performed on these actions.

  • New - PHP: Provide the ability to get a specific field instance from Editor using the Editor->field() method by passing in a string (the field's name). In combination with the new events, which provides the ability to easily modify fields in the pre* event handlers to be suitable for the action submitted.
  • New - PHP: Mjoin->link() method which is used to describe the join type in a method a lot more SQL like (and like Editor->leftJoin()) than the previous join() method with its arrays. join() can still be used, but link() is now the recommended method and is what will be documented and shown in the Editor examples.
  • New - PHP: Mjoin class which is basically the same as the Join class, but the default join data type is array (the object) type is redundant due to Editor->leftJoin(). This matches the .NET implementation.
  • New - PHP: Query->set() values can be set to not bind, thus treating the values like a function

  • Updates

  • Update - PHP: Add a check to ensure that the driver type given is valid

  • Update - PHP: When editing joined table information (i.e. modifying the data in the joined table) you can now submit the primary key value of the joined table. Previously you had to submit the host row's value that would also contain that same information. This makes it a little more intuitive and increases flexibility.

  • Fixes

  • Fix - PHP: Oracle driver would have failed queries field if they had a table name that was aliased

  • Fix - PHP: Column filters only applied when they are not empty strings in server-side processing mode
  • Fix - PHP: Fields should not be included in the set data set if they are not submitted and do not have a value assigned to them using setValue(). Previously they would still be if a set formatter had been specified.
  • Fix - PHP: If the primary key was submitted, but set as set(false) it would still be used as the row id that was retrieved from the database, even although the value hadn't been changed in the database. This would result in the row disappearing from the DataTable. Now it is only used if set.
  • Fix - PHP: On error in the default upload action, the error message was incorrectly assigned and wouldn't be displayed to the end user.
  • Fix - PHP: Editor::action() method did not include the upload data type

  • .NET

  • New

    • New - .NET: Fully support for Editor's multi-row editing abilities
    • New - .NET: Provide the ability to get a specific field instance from Editor using the Editor.Field() method by passing in a string (the field's name). In combination with the new events, which provides the ability to easily modify fields in the pre* event handlers to be suitable for the action submitted.
    • New - .NET: Events which are triggered when Editor performs a create, edit or delete action, allowing external operations to be easily performed on these actions.
    • New - .NET: Editor.TryCatch() method which can be used to disable the try/catch that the Process method performs. This can make it easier to debug any issues that occur inside the DataTables dll.
    • New - .NET: Query.Set() values can be set to not bind, thus treating the values like a function
    • New - .NET: Upload->DbClean() method to remove orphand files from the file system and database when uplaoded table data is updated.
    • New - .NET: Full support for new Editor upload field types
  • Updates

    • Updated - .NET: When editing joined table information (i.e. modifying the data in the joined table) you can now submit the primary key value of the joined table. Previously you had to submit the host row's value that would also contain that same information. This makes it a little more intuative and increases flexibility.
  • Fixes

    • Fix - .NET: Transactions could only occurs sequenctually as the transaction holding parameter was incorrectly marked as static.
    • Fix - .NET: Database connections not correctly closed if the DataReader were to fail during its read.
    • Fix - .NET: If the primary key was submitted, but set as set(false) it would still be used as the row id that was retrieved from the database, even although the value hadn't been changed in the database. This would result in the row disppearing from the DataTable. Now it is only used if set.
    • Fix - .NET: Fields should not be included in the set data set if they are not submitted and do not have a value assigned to them using Field.SetValue(). Previously they would still be if a set formatter had been specified.
    • Fix - .NET: 'NullEmpty()' formatter casting to a string for non-string based data would throw an error.
  • SQL

  • Fix - SQL: Use datetime rather than timestamp for MySQL

  • Documentation

  • Updates

  • Update - docs: Update i18n docs to refer to the new Buttons buttons

  • Update - docs: Update existing value get / set methods to specify their behaviour when multi-row editing

  • Fixes

  • Fix - docs: Typo in the dependent() documentation causing incorrect code highlighting

  • Fix - docs: date examples updated to refer specifically to jQuery UI where used