{"size": 950, "ext": "js", "max_stars_repo_path": "src/main/resources/tab-b/js/EditTeamRow.js", "max_stars_repo_name": "holysheep/REST-table-plugin", "max_stars_repo_stars_event_min_datetime": "2016-04-08T13:50:06.000Z", "max_stars_repo_stars_event_max_datetime": "2021-07-27T16:37:36.000Z", "max_issues_repo_path": "src/main/resources/tab-b/js/EditTeamRow.js", "max_issues_repo_name": "holysheep/REST-table-plugin", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "src/main/resources/tab-b/js/EditTeamRow.js", "max_forks_repo_name": "holysheep/REST-table-plugin", "max_forks_repo_forks_event_min_datetime": "2019-06-06T09:04:22.000Z", "max_forks_repo_forks_event_max_datetime": "2021-04-29T20:18:23.000Z"}
{"max_stars_count": 7, "max_issues_count": null, "max_forks_count": 2, "avg_line_length": 30.6451612903, "max_line_length": 78, "alphanum_fraction": 0.5305263158}
jQuery.namespace("JIRA.Admin.Team.EditTeamRow");

JIRA.Admin.Team.EditTeamRow = AJS.RestfulTable.EditRow.extend({
    submit: function () {
        var input = document.getElementById('project-config-team-name-input');
        var input2 = document.getElementById('demo-range-always');

        AJS.$.ajax({
            url: contextPath + '/rest/teams/1.0/teams.json',
            type: 'POST',
            contentType: "application/json; charset=utf-8",
            data: JSON.stringify({
                name: input.value,
                created: input2.value
            }),
            dataType: 'json'
        }).done(function (data) {
            JIRA.Admin.TeamTable.addRow(data);
            input.value = '';
        });
    },
    render: function () {
        var data = this.model.toJSON(),
            $el = this.$el;
        $el.html(JIRA.Templates.Team.editTeamRow({
            team: data
        }));
        return this;
    }
});
