<commit_before>$(function() {
    PushManager = window.PushManager || {};
    PushManager.NewRequestDialog = PushManager.NewRequestDialog || {};

    PushManager.NewRequestDialog.element = $('#create-new-request-dialog');
    PushManager.NewRequestDialog.element.dialog({
        autoOpen: false,
        title: 'Create/Edit Push Request',
        width: 650,
        minWidth: 650,
        height: 805,
        maxHeight: 805,
        minHeight: 805
    });

    PushManager.NewRequestDialog.validate = function() {
        var d = PushManager.NewRequestDialog.element;

        // Validate ReviewBoard ID
        if(!/^\d*$/.test(d.find('#request-form-review').val())) {
            alert("Invalid review # - only integer ReviewBoard IDs are allowed.");
            return false;
        }

        // Validate l10n-only request
        if(d.find('#request-form-tags').val().match('[ ]?l10n-only[ ]?') && d.find('#request-form-branch').val() !== '') {
            alert("l10n-only request should not have a branch. " +
                  "Use l10n request tag if you have a repository change to be pushed. " +
                  "Please remove l10n-only tag or branch name from your request.");
            return false;
        }

        return true;
    };
    $('#request-info-form').submit(PushManager.NewRequestDialog.validate);

    PushManager.NewRequestDialog.open_new_request = function(title, branch, repo, review, comments, description, watchers, tags, requestid, requestuser, notyours) {
        var d = PushManager.NewRequestDialog.element;<commit_msg>New Request no longer auto-closes when pressing esc.<commit_after>$(function() {
    PushManager = window.PushManager || {};
    PushManager.NewRequestDialog = PushManager.NewRequestDialog || {};

    PushManager.NewRequestDialog.element = $('#create-new-request-dialog');
    PushManager.NewRequestDialog.element.dialog({
        autoOpen: false,
        title: 'Create/Edit Push Request',
        width: 650,
        minWidth: 650,
        height: 805,
        maxHeight: 805,
        minHeight: 805,
        closeOnEscape: false
    });

    PushManager.NewRequestDialog.validate = function() {
        var d = PushManager.NewRequestDialog.element;

        // Validate ReviewBoard ID
        if(!/^\d*$/.test(d.find('#request-form-review').val())) {
            alert("Invalid review # - only integer ReviewBoard IDs are allowed.");
            return false;
        }

        // Validate l10n-only request
        if(d.find('#request-form-tags').val().match('[ ]?l10n-only[ ]?') && d.find('#request-form-branch').val() !== '') {
            alert("l10n-only request should not have a branch. " +
                  "Use l10n request tag if you have a repository change to be pushed. " +
                  "Please remove l10n-only tag or branch name from your request.");
            return false;
        }

        return true;
    };
    $('#request-info-form').submit(PushManager.NewRequestDialog.validate);

    PushManager.NewRequestDialog.open_new_request = function(title, branch, repo, review, comments, description, watchers, tags, requestid, requestuser, notyours) {
        var d = PushManager.NewRequestDialog.element;
{'fraction_non_alphanumeric': 0.13120899718837864, 'fraction_numerical': 0.015620118712902219, 'mean_word_length': 2.5657015590200447, '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': '7368423', 'n_tokens_mistral': 934, 'n_tokens_neox': 866, 'n_words': 206}