Friday 5th October, 2018

Editor 1.8.0 release notes

Editor 1.8 is a major update for Editor and sees primary focus on improving Editor's packaging and integration with the most common packaging libraries for each library supported:

  • Composer for PHP
  • NuGet for .NET Framework and .NET Core
  • npm for NodeJS (this package already existed for earlier versions of Editor)

You might have noticed in the list above that we've expanded our supported platforms to include .NET Core! Its awesome to see the .NET package for Editor running seamlessly on Linux and MacOS.

Performance improvements have been applied for one-to-many joins (Mjoin) and file meta information, which show a major improvement in response times, particularly when using server-side processing.

Behind the scenes we've been working on harmonising and expanding our testing of Editor and its server-side libraries. It is now tested in every combination of multiple browsers, all four platforms and four supported databases - the tests take a while to run! We are really pleased with the results and this should lead to faster development of Editor.

While Editor is primarily a client-side library, the front-end has only seen relatively minor updates in this release. The features that have been added are none-the-less welcome additions to rounding off the capabilities of the API, alongside a number of fixed.

Please see the notes below for full details.

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

New

  • Javascript
    • ajax() method that can be used to update the Ajax configuration after initialisation.
    • dependent() functions can now return a Promise. The object used to resolve the promise (if one is given) will be used to update the form.
    • field().processing() method which is used to indicate an individual field as being in a processing state. This is automatically used by dependent() now.
    • create, edit and remove (plus their pre and post counterparts) now have the row id that is being operated on being passed into the event handler. This makes it much easier to then use the DataTables API to get the row node and modify it if needed.
    • uploadMany now supports a limit option which can be used to allow the end user to upload only a certain number of files for the input. The default is unlimited (0) as it was before.
    • uploadMany now supports the selection of multiple files from the "browse" dialogue box.
    • fields.submit option can be used to prevent a field's value from being submitted to the server. This can be useful for readonly and display only fields.
    • init* event in Editor's Javascript libraries can now return a Promise (native or jQuery) which can be used to effectively halt Editor's code execution until the Promise has been resolved. This can be useful for any async action such as Ajax getting values, row locking or validation.
    • Subsets of a row's data can now be returned by the server and Editor will automatically merge the existing data for the row with the subset of data.
    • Support for jQuery slim. This is primarily support for the fact that the animation module was removed in jQuery slim. Editor typically uses a lot of Ajax, so you might need to use ajax as a function with the fetch object to perform Ajax operations.
  • PHP
    • Ability to log debug messages to a file. Use Editor->debug( true, path ); to specify the path to write to.
    • Editor->readTable() method which can be used to tell the instance to read information from a different table (or more typically a VIEW). This allows complex select expressions to be created in the database, and Editor can read them, while writing updates to the data to the original table.
    • Options->add() method which can be used to manually define options in addition to those available from the database.
    • PHP libraries are now psr-4 compliant for auto-name space loading (https://www.php-fig.org/psr/psr-4/). This is particularly useful with composer. The built in autoloader has been updated, so if you load the libraries directly it will continue to work as expected.
    • Support for PSR-4 auto loader file naming. This involves changing the name and position of files in the PHP libraries for Editor. No external interface changes.
    • The SQL Server integration for Editor's PHP libraries will now use PDO's dblib driver to make the database connection. On Windows sqlsrv will still be used.
  • .NET
    • .NET Core 2.1 support for Editor. The Editor .NET libraries will now build for .NET Framework 4.5 or newer and .NET Core 2.1 or newer.
    • Editor.ReadTable() method which can be used to tell the instance to read information from a different table (or more typically a VIEW). This allows complex select expressions to be created in the database, and Editor can read them, while writing updates to the data to the original table.
    • Options.Add() method which can be used to manually define options in addition to those available from the database.
  • Node

    • Editor.readTable() method which can be used to tell the instance to read information from a different table (or more typically a VIEW). This allows complex select expressions to be created in the database, and Editor can read them, while writing updates to the data to the original table.
    • Options.add() method which can be used to manually define options in addition to those available from the database.
  • Javascript

    • All styling integrations now place a "DTED" (DataTables Editor Display) class on the display controller host element (typically a modal) allowing styling to be applied to the display controller specifically for Editor.
  • PHP
    • Ability to run custom legacy formatting and validation functions
    • Large performance improvement when using Mjoin (one-to-many) joins when using server-side processing or a filtered data set. This is done by restricting the many join query to only the items that are needed for display.
    • Performance improvement for retrieving file meta information from the database. Rather than getting information about all files, only those currently in the data set are retrieved. This makes server-side processing in particular much faster.
  • .NET
    • Large performance improvement when using Mjoin (one-to-many) joins when using server-side processing or a filtered data set. This is done by restricting the many join query to only the items that are needed for display.
    • Performance improvement for retrieving file meta information from the database. Rather than getting information about all files, only those currently in the data set are retrieved. This makes server-side processing in particular much faster.
  • NodeJS

    • Large performance improvement when using Mjoin (one-to-many) joins when using server-side processing or a filtered data set. This is done by restricting the many join query to only the items that are needed for display.
    • Performance improvement for retrieving file meta information from the database. Rather than getting information about all files, only those currently in the data set are retrieved. This makes server-side processing in particular much faster.
  • Javascript

    • Arrays wouldn't trigger submit changed calculations to see if a field has changed values.
    • Disable autocomplete for datetime fields
    • inError() would report the form was in error while the error message was animating out if just cleared.
    • Edge would increase the column widths when using inline editing
    • If a field which is not visible causes a validation error, previously the error would just be hidden as well. Now it will be attached to the global error message. This sometimes crops up with inline editing, although it does mean that invalid data is already in the database.
    • If destroy() was called during the 10mS window for a tidy up and error would be thrown.
    • Return key wouldn't insert a line break in textarea fields
    • Unable to override the automatically assigned id using preSubmit for local editing tables.
    • Using datetime with a minDate and a value which was not at the start of the month would make it impossible to get the first calender month in the data range available without using the select inputs.
  • PHP
    • Make the include of the Bootstrap.php file a require so it fails with an error if not found.
    • Oracle and Db2 (experimental) drivers failed in 1.7.4 with an error
    • Using an empty option in the ValidateOptions constructor configuration object would cause an error
    • SQL expressions with nested brackets would cause an SQL syntax error. Note that this change means that multiple fields cannot be defined using a single string in the PHP libraries now. This was never done in Editor anyway, so it is unlikely to cause any issues.
    • Don't delete rows from left joined tables by default when removing a row. The new Editor->leftJoinRemove() method can be used to re-enable this if it is required, but it is an option that will be removed in Editor v2.
    • Performance improvement when updating a database record. Instead of doing a select * to determine if there is a record to update (or if it should be inserted) it will now select only the primary key column.
    • Postgres wouldn't work with upload-many to a link table
    • Support for inserting new rows when using a table name alias on the Editor instance.
  • .NET
    • DbType.FileName could give the full path if uploaded from Edge
    • Docs - missing doc comment for Database.Debug with an action overload
    • Don't delete rows from left joined tables by default when removing a row. The new Editor.LeftJoinRemove() method can be used to re-enable this if it is required, but it is an option that will be removed in Editor v2.
    • Hyphens at the end of a string would in correctly be detected as a negative number, causing the string to be reformatted.
    • Performance improvement when updating a database record. Instead of doing a select * to determine if there is a record to update (or if it should be inserted) it will now select only the primary key column(s).
    • Postgres support wasn't handling types well.
    • Support for inserting new rows when using a table name alias on the Editor instance.
    • Using Microsoft.Data.Sqlite for the SQLite database provider
  • NodeJS
    • Compound key with postgres example would error out due to the fact that node postgres uses Date objects for date fields. Converting to a string for the primary key addresses this.
    • Create action with MJoin could be unreliable for reading back the selected options immediately due to a missing await check.
    • dbUnique() was not executing correctly
    • Don't delete rows from left joined tables by default when removing a row. The new Editor.leftJoinRemove() method can be used to re-enable this if it is required, but it is an option that will be removed in Editor v2.
    • Error when using server-side processing - table names weren't resolving properly.
    • File upload won't work
    • When using a database which allows return or output types, and joined tabl es, we need to remove the table name from the primary key value
  • CSS
    • Radio buttons used when inline or bubble editing would take 100% width, causing visual discontinuity.
    • Remove legacy CSS hacks for IE6 and 7.
  • Examples
    • Confirm close example needs to check for the preClose event
    • Don't default sort on the checkbox column
    • Server-side processing example for inline editing should use searchable:false for the first column
    • Sqlite demo file errors