Monday 17th April, 2017

Editor 1.6.2 release notes

Editor 1.6.2 is primarily a bug fix release that addresses a number of issues that have been found in the Javascript, PHP and .NET libraries. It is a recommended upgrade for all developers using Editor.

There are also a few minor new features such as the template() method to programmatically set the template element, and data-editor-template attribute support as an alternative to custom tags for templates. On the server side the addition of writeCreate and writeEdit events increases the utility of the server-side events, allowing the database to be updated after Editor has written updates to it, but before it reads information back for the client-side.

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
    • Templates can use data-editor-template attributes to determine where Editor should insert fields, rather than (or in addition to) the custom <editor-field> elements.
    • When used in local table editing mode (i.e. without ajax) a row id can now be assigned in preSubmit rather than the id always being created by Editor when creating a new row.
    • ajax.deleteBody option which can be used for DELETE verb requests. By default Editor will submit parameters as part of the query string for compatibility with all HTTP servers, but this can optionally be disabled now, allowing the DELETE request to have parameters in the body (which is not supported by all HTTP servers).
    • template() method that can be used to programmatically get and set the template element that Editor will use to display its main form.
    • Ability to provide attributes for input / option elements in select, checkbox and radio field types. This can be used to provide additional meta information for each option for event handlers. These attributes are added by providing an attr option in the object that describes each option.
  • PHP
    • The Upload class now has the option of a where condition being specified allowing the files being returned as a list to be limited to the exact set required.
    • Add a DB_READ_ONLY option for uploaded files to allow information to be obtained from a database about a file, but not written to it (for example if the field's value is written by a trigger)
    • preUpload and postUpload events that can be subscribed to to let you know when the form has performed an upload action.
    • writeCreate and writeEdit events which are triggered after Editor has written the data to the database, but before it is then read back, giving the opportunity to update the database before the DataTable is updated
  • .NET
    • Static Editor.Action() method which can be used to determine what the request type is (e.g. get, create, edit, remove, upload). The overloads available match Editor.Process().
    • PreUpload and PostUpload events that can be subscribed to to let you know when the form has performed an upload action.
    • WriteCreate and WriteEdit events which are triggered after Editor has written the data to the database, but before it is then read back, giving the opportunity to up
    • The Upload class now has the option of a Where condition being specified allowing the files being returned as a list to be limited to the exact set required.
    • Add Upload.DbType.ReadOnly option to allow database values to be read but not written by the upload class.

Fixes

  • Javascript
    • If using number based ids for rows (i.e. typeof ... === number) rows would not be removed from the table upon delete due to strong type checking against the string stored key value.
    • When using columns.editField the name given should be checked against the field name and not its data source.
    • dependent() wouldn't work with complex fields where the input is not visible, but rather controlled via Javascript - such as Selectize.
    • Allow server-side processing requests to update the table's display for an edit if the draw type is set to none
    • Bootstrap styling should add Bootstrap styling to all input elements, regardless of type, with the exception of radio and checkbox inputs.
    • File upload would cause an error if the ajax.data option was given as a function
    • Disabled fields could cause a JS error when inline editing
    • Correct error when select is used as a multiple select with a string based value (separator) and a null value is given as the value.
    • Adding cancelOpen to be able to know when an open action has been cancelled by a preOpen handler.
    • Clean up internal event handling if preOpen cancels the opening action
    • Detection of changed values at submit time wouldn't find any enforced changes due to a change in the options available (e.g. in a select list).
    • Multiple row editing would incorrectly always show fields as having different values if they were array based (i.e. Mjoin).
    • Fields added using add() that use an integer for their fields.name parameter would not be shown immediately in the form (string based names correctly were).
    • Accept an empty array as a successful JSON response
    • jQuery UI date picker - refocus the input when selecting a date
    • Improved support for Moment locale formats in datetime
    • Correct error in detection of Editor instance being created with new
    • Add support for Moment's locale specific format option (L) in datetime.
    • The date time picker could incorrectly display the wrong date as selected when changing from a value such as 31st January to any date in February (since 31st does not exist in February).
    • Changing the date picker between months which have a different number of days, when the selected day is not in the new months range, could require two clicked.
    • fields.multiEditable would incorrectly show a field as not editable when only editing a single row.
    • Use datatables.net-se for Semantic UI require when using AMD loaders
    • JSONP sourced data would result in an error (ajax). To use JSONP with Editor you now must use jQuery 1.12.0 or newer.
  • PHP
    • Compatibility with PHP 5.3 was off in a few places (server-side processing and file upload)
    • Improved error handling with Oracle. SQL error messages now displayed
    • Deleting records from linked tables would result in an SQL error
    • Support for server-side processing in Oracle with 12c+
    • Oracle upload was not returning a newly created file id
    • Store SQL queries in the debug cache before they are prepared, in case the preparation throws an error.
    • maxNum and minMaxNum validators could throw an error if the decimal option was not specified.
    • Mjoin delete without a link table would result in a PHP error.
    • Compatibility with PHP 5.3 when there is an error inserting a compound key
    • Reinitialise the response array every time ->process() is called
    • Improve performance on create / edit action by not querying the database for options (if specified) only for them to be discarded.
    • Set Oracle connection to UTF8 character set by default. Oracle will convert to and from the database's character set to this user defined character set.
  • .NET
    • Demo SQL for SQL Server wouldn't correctly to a cascade delete
    • Post* events emitted by Editor should not have Cancellable properties. These were being incorrectly inherited.
    • Compatibility with .NET Framework 4.0.
    • Reinitialise the response array every time .Process() is called
    • Improve performance on create / edit action by not querying the database for options (if specified) only for them to be discarded.
    • Default renderer for multiple labels in the Options class would not be concatenated together
    • Deleting records from linked tables would result in an SQL error
    • Support for server-side processing in Oracle with 12c+
    • REST example controllers should not have used /{id} for edit and delete when multi-row editing support is enabled (which it is by default in Editor).
  • CSS
    • Bootstrap and Bootstrap 4 integration did not fade the edited row's background
  • Examples
    • RowReorder example should allow the sequence to be edited only via drag and drop
    • Consistent use of this in client-side validation example
    • MySQL 5.7 compatibility for demo SQL
  • Docs
    • Remove incorrect example of field() method
    • Error in template example initialisation demo code
    • Note that initComplete is deprecated