Sunday 8th November, 2015

Editor 1.5.2 release notes

The latest in the 1.5.x series of Editor releases sees a number of useful new features being added to Editor along with bug fixes and other general updates. Of particular note:

  • Editor now has a built in calendar date picker in the datetime field type. The examples have been updated to use this field type for date inputs and a number of new date / time examples have been added.
  • The Field->options() / Field.Options() method has been updated in PHP and .NET to be far more flexible, allowing conditional selection and multiple fields to be used in the label.
  • Editor now has built in and automatic XSS prevention.

Editor 1.5.2 is a strongly recommended upgrade for all developers using Editor.

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 - JS: datetime field type. Editor now has a calendar and time picker UI built into to facilite easy date/time data entry without requiring external plug-ins. By default it will work with the ISO8601 format, but Moment.js can be used to provide complex formatting options.
    • This is designed to effectively replace the date input type, although that will be retained and supported for the full v1.x series.
    • The calendar picker was included due to the lack of support for input type="date" in desktop browsers and to ensure that a lightweight calendar is easily available.
  • New - JS: An error is now thrown with a link to a detailed DataTables tech note (14) explaining the error and how to fix it, if a unique id is not found for a row.
  • New - JS: When using CommonJS allow jQuery and window objects to be passed in
  • New - JS: AMD and CommonJS loading options for the styling integration Javascript files

Fixes

  • Fix - JS: Remove items from the data object to submit to the server which have no properties to set (for example if submitting only changed values and nothing has actually changed). This doesn't change the data that is submitted to the server, but does change the rows given in the preSubmit event
  • Fix - JS: Table was being redrawn twice on row creation
  • Fix - JS: If a 204 was returned from a delete a Javascript error would occur
  • Fix - JS: Using enable and disable methods on a hidden field type would cause a JS error
  • Fix - JS: Matching the AMD and CommonJS require loading names to DataTables core and the other extensions
  • Fix - JS: Update DataTables version requirement to 1.10.7
  • Fix - JS: When inline editing with more than two tables on a single page a Javascript error would occur when switching from one to the other.
  • Fix - JS: Upload many's file remove button could cause the field to be closed when inline editing
  • Fix - JS: The formTitle option of the three CRUD buttons could not be set to be a function
  • Fix - JS: Upload progress was not being shown
  • Fix - JS: checkbox did not operate correctly with boolean values
  • Fix - JS: Throw an informative error if an unknown field type is added
  • Fix - JS: Add btn-default for improved styling of buttons in the Editor form in Bootstrap
  • Fix - JS: Improved styling using Bootstrap field error condition on validation error
  • Fix - JS: Password fields were not correctly styled in Bootstrap
  • Fix - JS: AutoFill with Editor would cause a Javascript error when the mouse was released
  • Fix - JS: If using a non-DOM numeric id parameter the edit could fail to update the row due to a strict match against a string parameter

Styling

  • Fix - Styling: Foundation integration would listen for all Foundation modal background clicks, not just the Editor controlled modal
  • Fix - Styling: Nicer styling for Bootstrap integration where checkboxes and radio buttons are used

PHP

New

  • New - PHP: Built in XSS prevention. On data submission, each field will now be automatically passed through an anti-XSS method to improve security of applications using Editor. The built in method uses the HtmLawed library, although the new Field->xss() method can be used to specify a custom option such as HTMLPurifier.
  • New - PHP: Greatly increase the flexibility of the Field->options() method:
    • Now accepts an option for applying WHERE conditions
    • Output formatting
    • Multiple field selection
    • Improved documentation
  • New - PHP: preCreate and preEdit events occur before validation, so these events can now be used to add validation to fields if required for the data submitted.

Fixes

  • Fix - PHP: Documentation comments updated and validated
  • Fix - PHP: Correct the documentation for the Database::raw() method which allows escaping of user data with a custom SQL query.
  • Fix - PHP: Error in unique validation. A value could incorrectly report itself as unique
  • Fix - PHP: PHP 5.3 compatibility in Upload class. PHP 5.4 syntax had been used to create an array.

.NET

New

  • New - .NET: preCreate and preEdit events occur before validation, so these events can now be used to add validation to fields if required for the data submitted.
  • New - .NET: Built in XSS prevention extending the default .NET protection. On data submission, each field will now be automatically passed through an anti-XSS method to improve security of applications using Editor. The built in method uses the the Microsoft security library, although the new Field->xss() method can be used to specify a custom option such as HtmlSanitizer.
  • New - .NET: Date and time example models and controllers for .NET
  • New - .NET: Greatly increase the flexibility of the Field.Options() method:
    • Now accepts an option for applying WHERE conditions
    • Output formatting
    • Multiple field selection
    • Improved documentation

Fixes

  • Fix - .NET: If an nvarchar was used as a table's primary key, Editor would throw an exception when inserting a row into an SQL Server database.
  • Fix - .NET: In the automatic type detection, data submitted with a leading zero should not be cast as a numeric value.
  • Fix - .NET: Unique validation was not being applied
  • Fix - .NET: Checkbox example controller and model were missing
  • Fix - .NET: Database.Select method was not correctly retrieving all fields if a null field value was given

Examples

  • New - example: Inline editing for specific columns
  • Update - examples: Use datetime rather than date
  • Fix - examples: Write the code to be displayed in the sent / recevied parameters as text so any HTML entities will be escaped
  • Fix - examples: Remove old references to TableTools and replace with Buttons
  • Fix - example: localStorage example had a typo

Documentation

  • New - docs: Documentation of the internationalisation options for the new datetime input type. Refer to i18n.datetime for information about the base object.
  • Update - docs: Updating the field documentation to display the additional options and methods that the various field types use to augment the basic API in a much more readable manner.
  • Update - docs: date updated to not that the new datetime field is generally perferred, but the exisiting field type will continue to be supported for v1.x
  • Fix - docs: Layout error in fields.labelInfo
  • Fix - docs: Link to fields.label was incorrect from field().label()
  • Fix - docs: form-options typo for textarea reference
  • Fix - docs: Form options typo