Thursday 10th December, 2015
Editor 1.5.4 release notes
This release focusing primarily on addressing any issues that have been found since the 1.5.3 release with improvements specifically in the datetime
input type among others.
This release also introduces a few new features - a placeholder
option for the select
type and easy database validation methods for joined tables.
Editor 1.5.4 is a 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
New
- Javascript
placeholder
option forselect
field type. This allows a placeholder option to be inserted into an options list - it can also double as a default value.minDate
andmaxDate
methods for thedatetime
field type allowing the min and max selectable date to be controlled via the API.ajaxData
option for theupload
anduploadMany
field types. This option can be used to submit additional data to the server when uploading a file.
- PHP
dbValues
validator that can be used to validate that a value exists in a database table. This is specifically designed for use with joined tables, but it could also be used in other situations.- 'Format::ifEmpty()' method - allows the value that will be written to the database if an empty value is submitted to be specified.
Validate::values
method which can be used to ensure the submitted value is present in a list of predefined values. This is useful if you want to ensure that only certain values can be submitted.
- .NET
- 'Format.IfEmpty()' method - allows the value that will be written to the database if an empty value is submitted to be specified.
DbValues
validator that can be used to validate that a value exists in a database table. This is specifically designed for use with joined tables, but it could also be used in other situations. The join example has been updated to use this validator.
Updates
- Javascript
displayOrder
now has the form display element passed as the fourth parameter so it can be easily accessed.- Compatibility with Foundation 6 reveal (modal)
- PHP
- The
empty
option which is common to all built in validators can now benull
to indicate that the common validation should not take account of the empty field at all - validation of the empty value is left to the validation function that is being run.
- The
- .NET
- The
ValidationOpts.Empty
option which is common to all built in validators can now benull
to indicate that the common validation should not take account of the empty option at all - validation of the empty value is left to the validation function that is being run.
- The
Fixes
- Javascript
- Hide the date picker if shown when the return key is pressed (which submits the form), otherwise the calendar would still be shown without the form.
datetime
could show the current date / time in place of anull
or empty string value if the same row was edited multiple times rather than an empty field value.datetime
would not close automatically if navigating through the form using the tab keydatetime
'schange()
event should trigger async like the other field change events on set.- Don't automatically focus on the
datetime
field if its value is set externally. select
when used withmultiple
andseparator
could result in a Javascript error- If the escape key was pressed while
datetime
was shown the Editor form would close, but the date time calendar would remain. It is now also removed. $.fn.dataTable.Editor.safeId()
would only replace the first dot in a string- Calendar dates in
datetime
could be shown as the wrong week day when observing DST val()
(and similar methods) could fail depending on the field order if used in achange
event handler as the event was being executed synchronously - it needs to be asynchronous to allow all fields to have their values set from the row to be edited before the change events can then operate.- Change event was being triggered once for each item in the select list (
select
) rather than just once for the whole list when a value was set. - Prevent JS error from occurring if setting a field which has not yet been initialised for an edit
- Possible lock up of Editor is stressing the inline input mode (rapidly changing elements which are inline editing while updating input) due to a possible async error.
- Bootstrap integration would incorrectly select and enhance all form elements on the page
- JSHint errors (missing semi-colon)
- PHP
- Upload without a
db()
method would result in an error on data load. Mjoin
with a self referencing join could select values from the parent referenced table, rather than the target table.MJoin
with a table alias didn't resolve table names correctly, resulting in an SQL error.Validate::datetime
should returnnull
on error rather than an empty string since an empty string is not valid in an SQL datetime field. This means that fields which are submitted with an empty value will now write null to the database if an empty value is allowed (which is also part of the validator).
- Upload without a
- .NET
- Upload without a
Db()
method would result in an exception on data load. - Missing documentation comments on some methods.
Format.DateTime
should returnnull
for empty data rather than an empty string since an empty string is not valid in an SQL datetime field. This means that fields which are submitted with an empty value will now write null to the database if an empty value is allowed (which is part of the validator).- StaffController example should ensure that the extension is not empty. The other option would be to use a set formatter to write null to the database for empty values.
- null values in a
Where
method's value would result in an exception. - Oracle's ODP driver will use position as the default binding mechanism rather than name, which the Editor libraries require.
- Upload without a
- Examples
- KeyTable and Editor examples should have KeyTable disabled while the main Editor lightbox is shown.
- Missing description for foundation example
- Postgres example SQL contained an escaping error
- Demo MySQL script updated to work with MySQL 5.5 (requires 5.6 previously)
- Allow the
reigstered_date
to be submitted as an empty value in the date and time example. - Date format string in .NET example specified minutes rather than months
- Documentation
- Add documentation for
$.fn.dataTable.Editor.safeId()
. - Syntax error in example for
fields
.
- Add documentation for