{"size": 1454, "ext": "js", "max_stars_repo_path": "static/js/product_statistics.js", "max_stars_repo_name": "Memorydemoeric/syc", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "static/js/product_statistics.js", "max_issues_repo_name": "Memorydemoeric/syc", "max_issues_repo_issues_event_min_datetime": "2021-05-13T07:35:51.000Z", "max_issues_repo_issues_event_max_datetime": "2021-05-13T07:35:51.000Z", "max_forks_repo_path": "static/js/product_statistics.js", "max_forks_repo_name": "Memorydemoeric/syc", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": 1, "max_forks_count": null, "avg_line_length": 31.6086956522, "max_line_length": 111, "alphanum_fraction": 0.5694635488}
$(function () {
    var body_section_width = $('#report_statistics_title').parent('section').width();
    $('#report_statistics_body_section').css('width', parseFloat(body_section_width) + 45.00 + 'px');

    $(window).resize(function () {
        var body_section_width = $('#report_statistics_title').parent('section').width();
        $('#report_statistics_body_section').css('width', parseFloat(body_section_width) + 45.00 + 'px');
    });

    $('#start_date')[0].select();

    $('#order_by_button').on('click', function (e) {
        e.preventDefault();
        var start_date = $('#start_date').val();
        var end_date = $('#end_date').val();
        var order_by = $(this).attr('data-order_by');
        window.location.href = '?start_date=' + start_date + '&end_date=' + end_date + '&order_by=' + order_by;
    });

    $('#start_date').on('keypress', function (e) {
        if (e.charCode == 13) {
            $('#end_date').select();
        }
    });

    $('#end_date').on('keypress', function (e) {
        if (e.charCode == 13) {
            search_statistics_by_date();
        }
    });


    $('#submit_search_statistics').on('click', function () {
        search_statistics_by_date();
    });


    function search_statistics_by_date() {
        var start_date = $('#start_date').val();
        var end_date = $('#end_date').val();
        window.location.href = '?start_date=' + start_date + '&end_date=' + end_date;
    }


});
