<commit_before>(function ($) {
    var fixHelper = function (e, ui) {
        ui.children().each(function () {
            $(this).width($(this).width());
        });
        return ui;
    };

    $.fn.SortableGridView = function (id, action) {
        var grid = $('#' + id);
        $('tbody', grid).sortable({
            forcePlaceholderSize: true,
            forceHelperSize: true,
            items: 'tr',
            update: function () {
                var serialData = $('tbody', grid).sortable('serialize', {
                    key: 'items[]',
                    attribute: 'class',
                    expression: 'items\\[\\]_(\\d+)'
                });
                $.ajax({
                    'url': action,
                    'type': 'post',
                    'data': serialData,
                    'error': function (request, status, error) {
                        alert(status + ' ' + error);
                    }
                });
            },
            helper: fixHelper
        }).disableSelection();
    };
})(jQuery);<commit_msg>id может быть и varchar типа<commit_after>(function ($) {
    var fixHelper = function (e, ui) {
        ui.children().each(function () {
            $(this).width($(this).width());
        });
        return ui;
    };

    $.fn.SortableGridView = function (id, action) {
        var grid = $('#' + id);
        $('tbody', grid).sortable({
            forcePlaceholderSize: true,
            forceHelperSize: true,
            items: 'tr',
            update: function () {
                var serialData = $('tbody', grid).sortable('serialize', {
                    key: 'items[]',
                    attribute: 'class',
                    expression: 'items\\[\\]_(\\w+)'
                });
                $.ajax({
                    'url': action,
                    'type': 'post',
                    'data': serialData,
                    'error': function (request, status, error) {
                        alert(status + ' ' + error);
                    }
                });
            },
            helper: fixHelper
        }).disableSelection();
    };
})(jQuery);
{'fraction_non_alphanumeric': 0.15826006478482185, 'fraction_numerical': 0.0, 'mean_word_length': 1.1750503018108651, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4316221', 'n_tokens_mistral': 562, 'n_tokens_neox': 528, 'n_words': 114}