Saturday 11th August, 2012

Editor 1.2.0 release notes

Release notes

New

  • New - PHP: Database abstraction layer to provide a consistent API for the Editor classes. Drivers are required for each supported Database engine.
  • New - PHP: SQLite3 added as a support database engine (MySQL and Postgres are also still available).
  • New - PHP: When unable to establish a connection to the DB, return a DataTables JSON error.
  • New - PHP: Show an error message is using a PHP version older than v5.3 stating why this is error occurs.
  • New - PHP: Editor PHP libraries have transactions support now. If a query fails the db will be rolled back to its previous state, which is what would be expected. This ensure greater data integrity and is particularly important when working with join tales.
  • New: i18n initialisation options - Editor can now be fully initialised. The TableTools buttons used by Editor have always been capable of being fully customised, albeit not in a trivial manner. This new feature allows the language strings used by Editor to be passed in as initialisation parameters, making access to changing the language of Editor's interface very easy.
  • New: 'row' parameter can be returned by the server on 'create' and 'remove' commands, containing the data that DataTables should use to render the row. This provides an alternative to pulling in data from the form and using only that to render the table. This can be much simpler than the dynamic get method that was previously used, particularly when working with join tables.
  • New: 'radio' field now also have an 'update' method. This means that the three built in 'list' types (select, radio and checkbox) now all have update methods. The other built in fields don't need such a method since a simple 'set' will change the value (for example 'text' input field)
  • New: 'checkbox' field control gets and 'update' method just like the select list already does
  • New: Field element node is now publicly documented and available for interaction. It used to be a private variable, but it is actually useful to have it accessible for dynamic manipulation.
  • New example: French interface for Editor and DataTables showing the new i18n initialisation options of Editor.
  • New example: SQL join example showing how the server and client-side work

Documentation

  • Docs: PHP server-side implementation documentation is now included in the generated documentation. Redesigned the docs landing page a little to provide links to the JSDoc documentation and the ApiGen documentation.

Fixes

  • Update: The date formatting functions have been updated to remove the db engine name - SQL engines should all pick up the same format, or be able to use it by default
  • Update: Server-side implementable will now always use the new 'row' parameter as it is a lot more bullet proof than the dynamic gets.
  • Update: Use DataTables abilities to set complex objects based on a "mData" style string, including arrays etc, to create the data object that Editor sends to the server. This means that Editors ability to read information in from a complex source is now matched in its output. For simple cases, there will be no "visible" change - but it extends Editors abilities with regard to the dataProp options. Really nice for join tables!
  • Update: 'Shortcut' variable for the TableTools buttons object - allows code size to be reduced by around 120 bytes
  • Update: Harmonise the 'ipOpts' option for the radio, select and checkbox field types to provide exactly the same options between all three of these field types. When an object is given for an option we expect at least the 'label' parameter, val can optionally be set. If an object is not given, then what is given is used for both value and label.
  • Update: When editing a field which has an 'undefined' value (i.e. not found in the data source object) then use the 'default' value for the field if there is one. If there isn't then 'undefined' is used as the value as was the case before (probably not what is intended, but it does highlight that a default should be set).
  • Update: requires tags to indicate what other libraries Editors requires
  • Update: Add link to new i18n example from all other examples
  • Update - examples: DOM table example updated to work off arrays only, since we want an array coming back from the server

Fixes

  • Fix - docs: Error in the 'ajax' method example where 'method' was missing
  • Fix: When working with checkboxes and switching between different editing records, old checked checkboxes were not cleared, resulting in checkboxes being incorrectly checked for a record.
  • Fix: 'update' method for the select list incorrectly used the old set of options rather than the new set passed in.
  • Fix: If no options are passed into the select field it would generate an error. Now you simply get an empty list (the idea being that you would use the 'update' field method to add items at some point after initialisation