<commit_before>/*

 This file is part of the Sonata package.

 (c) <NAME> <<EMAIL>>

 For the full copyright and license information, please view the LICENSE
 file that was distributed with this source code.

 */

jQuery(document).ready(function() {
    jQuery('html').removeClass('no-js');
    if (window.SONATA_CONFIG && window.SONATA_CONFIG.CONFIRM_EXIT) {
        jQuery('.sonata-ba-form form').confirmExit();
    }

    Admin.setup_per_page_switcher(document);

    Admin.shared_setup(document);
});

jQuery(document).on('sonata-admin-append-form-element', function(e) {
    Admin.setup_select2(e.target);
    Admin.setup_icheck(e.target);
});

var Admin = {

    /**
     * This function must called when a ajax call is done, to ensure
     * retrieve html is properly setup
     *
     * @param subject<commit_msg>confirm exit did not work correctly for multiple forms on one page because the serialized data are generated over an collection and not over the single forms<commit_after>/*

 This file is part of the Sonata package.

 (c) <NAME> <<EMAIL>>

 For the full copyright and license information, please view the LICENSE
 file that was distributed with this source code.

 */

jQuery(document).ready(function() {
    jQuery('html').removeClass('no-js');
    if (window.SONATA_CONFIG && window.SONATA_CONFIG.CONFIRM_EXIT) {
        jQuery('.sonata-ba-form form').each( function () { $(this).confirmExit(); } );
    }

    Admin.setup_per_page_switcher(document);

    Admin.shared_setup(document);
});

jQuery(document).on('sonata-admin-append-form-element', function(e) {
    Admin.setup_select2(e.target);
    Admin.setup_icheck(e.target);
});

var Admin = {

    /**
     * This function must called when a ajax call is done, to ensure
     * retrieve html is properly setup
     *
     * @param subject
{'fraction_non_alphanumeric': 0.12149532710280374, 'fraction_numerical': 0.0010995052226498076, 'mean_word_length': 3.6192893401015227, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, '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': '6241452', 'n_tokens_mistral': 539, 'n_tokens_neox': 528, 'n_words': 157}