Editor 1.2.3 released

Editor 1.2.3 released

allanallan Posts: 54,738Questions: 1Answers: 8,564 Site admin
edited February 2013 in Announcements
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

Replies

  • vinod_ccvvinod_ccv Posts: 75Questions: 0Answers: 0
    Congrats Allan,
    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
  • burncharburnchar Posts: 118Questions: 12Answers: 0
    The DT_RowId enhancement is actually really handy. In previous projects, I had to run every single query through a transform function which would rename whatever the unique row ID was named into DT_RowID. This wasn't a big deal, but it made the code more coupled with Editor.

    Thank you for a great product and support, Allan!
  • psenechalpsenechal Posts: 32Questions: 2Answers: 0
    Hey 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 =)
  • allanallan Posts: 54,738Questions: 1Answers: 8,564 Site admin
    `DT_RowId` is there as a helper in DataTables - if you can format your data to use it, then I would suggest you do so. Otherwise you might wan tot consider using fnRowCreated to add an ID to the row based on some custom parameter.

    Allan
  • vinod_ccvvinod_ccv Posts: 75Questions: 0Answers: 0
    Please let us know which version of jquery.dataTables and jquery this release supports. i am using jQuery v1.7.1 , dataTables1.9.3, ColVis.js Version:1.0.8, TableTools.js Version: 2.1.3, ZeroClipboard_TableTools version: "1.0.4-TableTools2" Let me know is there any compactability issue?
  • allanallan Posts: 54,738Questions: 1Answers: 8,564 Site admin
    Can you open support issues for Editor in a new thread as noted in my original post please? Otherwise we end up with overlapping conversations and I might miss things.

    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
This discussion has been closed.