Friday 3rd April, 2015

Editor 1.4.1 release notes

Editor 1.4.1 is primarily a maintenance release that addresses the known issues that have been found since Editor 1.4's release. One significant new feature is the Upload class for PHP and .NET which provides support for the new upload field type plug-in.

Please note, if you are updating the .NET libraries and you have used custom delegates for validation of formatting methods, a backwards incompatible change has been made in this version. The value to be validated or formatted is now passed in as an object rather than dynamic. If you are using the validations and formatting methods from the libraries you will see no different. Apologies for any inconvenience caused, the change was made to help improve compatibility and it was felt that it was better to make the change now rather than to wait.

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

JS

New

  • New - JS: dependent() now can control field labels, messages errors and enablement state to provide a lot more additional control over the form.
  • New - JS: mode() method - determine programmatically which mode of operation the Editor form is operating in.
  • New - JS: Add Zurb Foundation styling support

Fixes

  • Fix - JS: editField option in DataTables wasn't working if used on an array data source for index 0
  • Fix - JS: displayed() didn't work correctly with Bootstrap as the modal wasn't being removed from the DOM on close
  • Fix - JS: Bootstrap integration now styles textarea inputs as well as text inputs
  • Fix - JS: Focus could incorrectly be triggered twice when focusing on a specific field
  • Fix - JS: Missing Semi-colon (JSHint error)
  • Fix - JS: Incompatibility with jQuery 1.8 for removing the focus listener event
  • Fix - JS: preOpen was not cancellable for the main form
  • Fix - JS: Using a function as the selector for the row to be edited would trigger an error on submit
  • Fix - JS: Standalone Editors could error when created a new row if no target HTML element existed
  • Fix - JS: Switching between cells when using inline editing and submitOnBlur could cause errors as the callbacks were not waiting on the DataTables redraw completing. Note that you still need to pass in the cell index into the inline() method for this to work fully (since the original cell is removed from the DOM in server-side processing mode).
  • Fix - JS: jQuery UI DatePicker fields require a small delay on initialisation, so it was possible to try and set a date on a newly created instance before the date picker had been initialised. Editor will now check that the field is a date picker first.
  • Fix - JS: An error could occur when there was no active element and checking if the focus should be blurred
  • Fix - JS: HTML5 date field type could not be disabled using the API

PHP

New

  • New - PHP: The $sql_details array can be given a pdo option to use an existing PDO connection
  • New - PHP: Add support for yajra\Pdo\Oci8 user space PDO driver for Oracle
  • New - PHP: If you define $sql_details before including the Bootstrap.php file, it will no longer attempt to include config.php. This is done to provide additional flexibility so you can use any other method of including database access information that you wish.
  • New - PHP: Database Query class now has a bind() method which can be used to bind external inputs in a query safely.
  • New - PHP: Upload class which will operate with the new Upload plug-in.

Updates

  • Update - PHP: Expression strings with a space in them are not automatically escaped as db identifiers. This can make it easier to use functions and complex expressions in query conditions.

Fixes

  • Fix - PHP: One-to-many validation was not running
  • Fix - PHP: If a table has no fields which are settable then there should be no delete attempted on that table when removing a row.
  • Fix - PHP: Checking in Join class that the link field was not settable was broken

.NET

New

  • New - .NET: 'Upload()' class to handle file uploads.
  • New - .NET: Database Query class now has a bind() method which can be used to bind external inputs in a query safely.

Updates

  • Update - .NET: Field values are now stored using 'object' rather than 'dynamic'. This is a backwards incompatible change if you are using custom formatters or validators!
  • Update - .NET: Use lambda expressions for anonymous functions in staff html and self joining demos.
  • Update - .NET: Database class now implements IDisposable so it can be used with a 'using() {}' statement.
  • Update - .NET: Example controllers all now create a new Database instance (i.e. a db connection for each http request) rather than sharing one over the whole application. The previous approach meant that it was impossible for two Ajax requests to be made together.
  • Update - .NET: Expression strings with a space in them are not automatically escaped as db identifiers. This can make it easier to use functions and complex expressions in query conditions.
  • Update - .NET: Remove the need for a model to extend the EditorModel class. The class is still there should it be used in existing code, but it is no longer required for models.

Fixes

  • Fix - .NET: DataReader not being correctly closed
  • Fix - .NET: Null values wouldn't be written correctly to the database
  • Fix - .NET: DateTime formatting method didn't handle empty strings
  • Fix - .NET: MJoin fields now currently support validation.
  • Fix - .NET: Inserting into tables without a primary key using the Database class could result in an error when using SQL server or Postgres
  • Fix - .NET: If a table has no fields which are settable then there should be no delete attempted on that table when removing a row.
  • Fix - .NET: Update examples to consistently use HttpContext.Current.Request as the data source as that is required in the file upload case where we need to access the files

Documentation

  • Fix - docs: Correct function signature for postRemove and preRemove
  • Fix - docs: Correct function signature for remove
  • Fix - docs: Note that fields.data can be given as an integer

Examples

  • Update - examples: Use the rows().every() method for the display controller plug-in example
  • Update - examples: Add date type to Bootstrap example
  • Update - examples: Add Upload to the default use statement
  • Fix - example: Back / next API example's logic for checking if there were previous / next rows was incorrect
  • Fix - example: Typo in inline join description