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.
selectfield type. This allows a placeholder option to be inserted into an options list - it can also double as a default value.
maxDatemethods for the
datetimefield type allowing the min and max selectable date to be controlled via the API.
ajaxDataoption for the
uploadManyfield types. This option can be used to submit additional data to the server when uploading a file.
dbValuesvalidator 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::valuesmethod 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.
- 'Format.IfEmpty()' method - allows the value that will be written to the database if an empty value is submitted to be specified.
DbValuesvalidator 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.
displayOrdernow has the form display element passed as the fourth parameter so it can be easily accessed.
- Compatibility with Foundation 6 reveal (modal)
emptyoption which is common to all built in validators can now be
nullto 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.
ValidationOpts.Emptyoption which is common to all built in validators can now be
nullto 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.
- 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.
datetimecould show the current date / time in place of a
nullor empty string value if the same row was edited multiple times rather than an empty field value.
datetimewould not close automatically if navigating through the form using the tab key
change()event should trigger async like the other field change events on set.
- Don't automatically focus on the
datetimefield if its value is set externally.
selectwhen used with
- If the escape key was pressed while
datetimewas 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
datetimecould be shown as the wrong week day when observing DST
val()(and similar methods) could fail depending on the field order if used in a
changeevent 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)
- Upload without a
db()method would result in an error on data load.
Mjoinwith a self referencing join could select values from the parent referenced table, rather than the target table.
MJoinwith a table alias didn't resolve table names correctly, resulting in an SQL error.
nullon 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
- Upload without a
Db()method would result in an exception on data load.
- Missing documentation comments on some methods.
nullfor 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
Wheremethod'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
- 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_dateto be submitted as an empty value in the date and time example.
- Date format string in .NET example specified minutes rather than months