<commit_before>require([
    'jquery', 'underscore', 'orotranslation/js/translator', 'oroui/js/modal', 'oroui/js/mediator', 'routing'
], function($, _, __, Modal, mediator, routing) {
    'use strict';

    $(function() {
        $(document).on('click', '.entity-extend-apply', function(e) {
            var el = $(this);
            var title = __('Schema update confirmation');
            var content = '<p>' + __('Your config changes will be applied to schema.') + '</p>' +
                    '</p>' + __('It may take few minutes...') + '</p>';
            /** @type oro.Modal */
            var confirmUpdate = new Modal({
                allowCancel: true,
                cancelText: __('Cancel'),
                okText: __('Yes, Proceed'),
                title: title,
                content: content
            });

            function execute() {
                var url = $(el).data('url');
                var progress = $('#progressbar').clone();
                progress.removeAttr('id').find('h3').remove();

                var modal = new Modal({
                    allowCancel: false,
                    title: title,
                    content: content
                });
                modal.open();
                modal.$el.find('.modal-footer').html(progress);
                progress.show();

                $.post(url, function() {
                    modal.close();
                    mediator.execute('showFlashMessage', 'success', __('oro.entity_extend.schema_updated'), {afterReload: true});
                    mediator.execute('showMessage', 'info', __('Please wait until page will be reloaded...'));
                    mediator.execute('showLoading');
                    // force reload of the application to make sure 'js/routes' is reloaded
                    window.location.href = routing.generate('oro_entityconfig_index');
                }).fail(function() {
                    modal.close();
                    mediator.execute('showFlashMessage', 'error', __('oro.entity_extend.schema_update_failed'));
                });
            }

            confirmUpdate.on('ok', execute);
            confirmUpdate.open();

            return false;
        });
    });
});
<commit_msg>BAP-7171: Implement assets version  for our JS files. Fix CS<commit_after>require([
    'jquery', 'underscore', 'orotranslation/js/translator', 'oroui/js/modal', 'oroui/js/mediator', 'routing'
], function($, _, __, Modal, mediator, routing) {
    'use strict';

    $(function() {
        $(document).on('click', '.entity-extend-apply', function(e) {
            var el = $(this);
            var title = __('Schema update confirmation');
            var content = '<p>' + __('Your config changes will be applied to schema.') + '</p>' +
                    '</p>' + __('It may take few minutes...') + '</p>';
            /** @type oro.Modal */
            var confirmUpdate = new Modal({
                allowCancel: true,
                cancelText: __('Cancel'),
                okText: __('Yes, Proceed'),
                title: title,
                content: content
            });

            function execute() {
                var url = $(el).data('url');
                var progress = $('#progressbar').clone();
                progress.removeAttr('id').find('h3').remove();

                var modal = new Modal({
                    allowCancel: false,
                    title: title,
                    content: content
                });
                modal.open();
                modal.$el.find('.modal-footer').html(progress);
                progress.show();

                $.post(url, function() {
                    modal.close();
                    mediator.execute(
                        'showFlashMessage',
                        'success',
                        __('oro.entity_extend.schema_updated'),
                        {afterReload: true}
                    );
                    mediator.execute('showMessage', 'info', __('Please wait until page will be reloaded...'));
                    mediator.execute('showLoading');
                    // force reload of the application to make sure 'js/routes' is reloaded
                    window.location.href = routing.generate('oro_entityconfig_index');
                }).fail(function() {
                    modal.close();
                    mediator.execute('showFlashMessage', 'error', __('oro.entity_extend.schema_update_failed'));
                });
            }

            confirmUpdate.on('ok', execute);
            confirmUpdate.open();

            return false;
        });
    });
});

{'fraction_non_alphanumeric': 0.14445640473627558, 'fraction_numerical': 0.0012917115177610333, 'mean_word_length': 1.4647214854111406, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, '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': '3231947', 'n_tokens_mistral': 1184, 'n_tokens_neox': 1098, 'n_words': 258}