Editor 1.2.3 released
Editor 1.2.3 released
allan
Posts: 61,972Questions: 1Answers: 10,160 Site admin
Hello all,
A relatively small number of changes in this release, before larger new features are added in 1.3, with focus primarily on addressing all known issues and adding two new features to enhance the capabilities of Editor.
The first of these two is for most of the built in field types to accept a new configuration parameter - `attr` which is an object of key/value pairs which will be applied to the input element. This allows easy addition of attributes such as `maxlength` , `required` , `placeholder` etc.
The second new feature is to relax the constraint of requiring a row ID to be set in the DataTable (typically this was done with `DT_RowId` ). Now it is possible to read any object property as the unique identifier for a row with the new `srcId` option. `DT_RowId` is is still used as the default.
The full release notes for this release are available here: http://editor.datatables.net/download/release-notes-1.2.3
Editor 1.2.3 is a free upgrade for all Editor licensees and can be downloaded from its download page: http://editor.datatables.net/download/ . If you haven't yet purchased an Editor license, try it out free for 15 days (follow the download link and it will let you start the trial).
If you have any questions about Editor, its licensing or other issues, please open a new thread in the forum so we can keep track of individual issues and ensure that they each get resolved!
Enjoy!
Allan
A relatively small number of changes in this release, before larger new features are added in 1.3, with focus primarily on addressing all known issues and adding two new features to enhance the capabilities of Editor.
The first of these two is for most of the built in field types to accept a new configuration parameter - `attr` which is an object of key/value pairs which will be applied to the input element. This allows easy addition of attributes such as `maxlength` , `required` , `placeholder` etc.
The second new feature is to relax the constraint of requiring a row ID to be set in the DataTable (typically this was done with `DT_RowId` ). Now it is possible to read any object property as the unique identifier for a row with the new `srcId` option. `DT_RowId` is is still used as the default.
The full release notes for this release are available here: http://editor.datatables.net/download/release-notes-1.2.3
Editor 1.2.3 is a free upgrade for all Editor licensees and can be downloaded from its download page: http://editor.datatables.net/download/ . If you haven't yet purchased an Editor license, try it out free for 15 days (follow the download link and it will let you start the trial).
If you have any questions about Editor, its licensing or other issues, please open a new thread in the forum so we can keep track of individual issues and ensure that they each get resolved!
Enjoy!
Allan
This discussion has been closed.
Replies
Great to see that the check-box array with out any selection does not give any error with new release.
Expecting more for making in multilevel chain-able drop-down fields in next release.
Thanking you
Thank you for a great product and support, Allan!
The srcId is a great feature and actually would allow me to eliminate quite a bit of code. Quick question regarding this new feature:
I use the id for a couple of things (mainly drag & drop reordering and to pass a variable when a link in the row is clicked). Using the new srcId feature works great for the editor, but unfortunately without a DT_RowID, the other functions no longer work.
Is there a way of accessing the new srcID in a custom link on each row?
[code]
// Configure
$('.datatable').on('click', 'a.editor_config', function (e) {
e.preventDefault();
var row = $(this).closest('tr'),
data = oTable._(row),
id = data[0].id;
window.location = '/Setup/Reports/Configure/' + id;
});
[/code]
and also in a .sortable function?
[code]
$('.datatable tbody').sortable({
handle: '.handle',
placeholder: 'sortable-placeholder',
cursor: 'move',
start: function (event, ui) {
var colCount = 0;
$('tbody tr:nth-child(1) td').each(function () {
if ($(this).attr('colspan')) {
colCount += +$(this).attr('colspan');
} else {
colCount++;
}
});
ui.placeholder.height(ui.helper.outerHeight());
ui.placeholder.html(' ');
},
update: function(e, ui) {
var oSettings = oTable.fnSettings();
var i = oSettings._iDisplayStart;
var p = Math.ceil( oSettings._iDisplayStart / oSettings._iDisplayLength );
var order = new Array();
$(this).parents('table').find('tr').each(function() {
if (!isNaN($(this).attr('id'))) {
oTable.fnUpdate($(this).index() + 1 + i, oTable.fnGetPosition($(this)[0]), 0, false, false);
order.push($(this).attr('id'));
}
});
oTable.fnDraw();
oTable.fnPageChange(p);
$.ajax({
type: 'POST',
traditional: true,
url: '/Setup/Report/Order',
data: {
order: order,
displayStart: i
}
});
},
helper: function(e, tr) {
var $originals = tr.children();
var $helper = tr.clone();
$helper.children().each(function(index) {
// Set helper cell sizes to match the original sizes
$(this).width($originals.eq(index).width())
});
return $helper;
},
}).disableSelection();
[/code]
or do you think I'm better off sticking with the DT_RowID method?
thanks for the input =)
Allan
However, that set of versions should be fine. If you are having an issue with it, please open a new thread. I would always recommend using the latest versions of all software related to DataTables.
Allan