{"size": 723, "ext": "js", "max_stars_repo_path": "src/icemac/addressbook/browser/resources/js/masterdata_fields.js", "max_stars_repo_name": "icemac/icemac.addressbook", "max_stars_repo_stars_event_min_datetime": "2020-03-26T20:16:44.000Z", "max_stars_repo_stars_event_max_datetime": "2020-03-26T20:16:44.000Z", "max_issues_repo_path": "src/icemac/addressbook/browser/resources/js/masterdata_fields.js", "max_issues_repo_name": "icemac/icemac.addressbook", "max_issues_repo_issues_event_min_datetime": "2020-02-21T13:04:23.000Z", "max_issues_repo_issues_event_max_datetime": "2020-02-21T13:06:10.000Z", "max_forks_repo_path": "src/icemac/addressbook/browser/resources/js/masterdata_fields.js", "max_forks_repo_name": "icemac/icemac.addressbook", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": 1, "max_issues_count": 2, "max_forks_count": null, "avg_line_length": 28.92, "max_line_length": 80, "alphanum_fraction": 0.5739972337}
(function($) {
    "use strict";

    // Return a helper with preserved width of cells
    var fixHelper = function(e, ui) {
	    ui.children().each(function() {
		    $(this).width($(this).width());
	    });
	    return ui;
    };

    $("table#entity-fields tbody").sortable({
        helper: fixHelper,
        axis: "y",
        cursor: 'row-resize'
    }).disableSelection();

    $("button#entity-fields-save").click(function() {
        var fields_array = $("table#entity-fields tbody").sortable('toArray');
        var query = '?f:list=' + fields_array.join('&f:list=');
        var submit_url = window.location.href + '/@@save-sortorder.html'+ query;
        window.location.href = submit_url;
    });
})(jQuery);
