<commit_before>var Oro = Oro || {};

/**
 * Oro extension of Bootstrap Modal wrapper for use with Backbone.
 */
(function($, _, Backbone) {
    /**
     * Implementation of Bootstrap Modal
     *
     * @class   Oro.BootstrapModal
     * @extends Backbone.BootstrapModal
     */
    Oro.BootstrapModal = Backbone.BootstrapModal.extend({
        /** @property {String} */
        className: 'modal oro-modal-danger',

        /** @property {String} */
        okButtonClass: 'btn-danger',

        /** @property {Object} */
        template: _.template('\
            <% if (title) { %>\
              <div class="modal-header">\
                <% if (allowCancel) { %>\
                  <a class="close">×</a>\
                <% } %>\
                <h3><%- title %></h3>\
              </div>\
            <% } %>\
            <div class="modal-body"><%= content %></div>\
            <div class="modal-footer">\
              <a href="#" class="btn ok <%= okButtonClass %>"><%- okText %></a>\
              <% if (allowCancel && cancelText) { %>\
                <a href="#" class="btn cancel"><%- cancelText %></a>\
              <% } %>\
            </div>\
        '),

        /**
         * @param {Object} options
         */
        initialize: function(options) {
            options = _.extend({
                cancelText: _.__('Cancel')
            }, options);

            if (!options.okButtonClass) {
                options.okButtonClass = this.okButtonClass;
            }
            options = _.extend({
                template: this.template,
                className: this.className
            }, options);

            Backbone.BootstrapModal.prototype.initialize.apply(this, arguments);
        },

        open: function() {
            Backbone.BootstrapModal.prototype.open.apply(this, arguments);
            
            this.once('cancel', _.bind(function() {
                this.$el.trigger('hidden');<commit_msg>BAP-158: Grid Mass/Bulk actions - change order of cancel button in dialog<commit_after>var Oro = Oro || {};

/**
 * Oro extension of Bootstrap Modal wrapper for use with Backbone.
 */
(function($, _, Backbone) {
    /**
     * Implementation of Bootstrap Modal
     *
     * @class   Oro.BootstrapModal
     * @extends Backbone.BootstrapModal
     */
    Oro.BootstrapModal = Backbone.BootstrapModal.extend({
        /** @property {String} */
        className: 'modal oro-modal-danger',

        /** @property {String} */
        okButtonClass: 'btn-danger',

        /** @property {Object} */
        template: _.template('\
            <% if (title) { %>\
              <div class="modal-header">\
                <% if (allowCancel) { %>\
                  <a class="close">×</a>\
                <% } %>\
                <h3><%- title %></h3>\
              </div>\
            <% } %>\
            <div class="modal-body"><%= content %></div>\
            <div class="modal-footer">\
              <% if (allowCancel && cancelText) { %>\
                <a href="#" class="btn cancel"><%- cancelText %></a>\
              <% } %>\
              <a href="#" class="btn ok <%= okButtonClass %>"><%- okText %></a>\
            </div>\
        '),

        /**
         * @param {Object} options
         */
        initialize: function(options) {
            options = _.extend({
                cancelText: _.__('Cancel')
            }, options);

            if (!options.okButtonClass) {
                options.okButtonClass = this.okButtonClass;
            }
            options = _.extend({
                template: this.template,
                className: this.className
            }, options);

            Backbone.BootstrapModal.prototype.initialize.apply(this, arguments);
        },

        open: function() {
            Backbone.BootstrapModal.prototype.open.apply(this, arguments);

            this.once('cancel', _.bind(function() {
                this.$el.trigger('hidden');
{'fraction_non_alphanumeric': 0.16186140617096612, 'fraction_numerical': 0.0017703591299949419, 'mean_word_length': 1.4889867841409692, 'pattern_counts': {'":': 0, '<': 53, '<?xml version=': 0, '>': 53, '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': '6648987', 'n_tokens_mistral': 1112, 'n_tokens_neox': 1040, 'n_words': 215}