<commit_before>define(function(require) {
    'use strict';

    var EmailAttachmentSelectView;
    var _ = require('underscore');
    var $ = require('jquery');
    var EmailAttachmentListRowView = require('oroemail/js/app/views/email-attachment-list-row-view');
    var BaseCollectionView = require('oroui/js/app/views/base/collection-view');

    EmailAttachmentSelectView = BaseCollectionView.extend({
        itemView: EmailAttachmentListRowView,
        listSelector: '.attachment-list',
        fallbackSelector: '.no-items',
        isShowed: false,
        fileNameFilter: '',
        attachedCollection: null,

        events: {
            'click .cancel':                 'cancelClick',
            'click .upload-new':             'uploadNewClick',
            'click .attach':                 'attachClick',
            'input input.filter':            'filterChange'
        },

        initialize: function (options) {
            if (!_.has(options, 'attachedCollection')) {
                throw new Error('Required option "attachedCollection" not found.');
            }

            EmailAttachmentSelectView.__super__.initialize.apply(this, arguments);
            this.attachedCollection = options.attachedCollection;
        },

        resolveListSelector: function(model) {
            if (model.get('type') === 1) {
                return '.entity-attachments-list';<commit_msg>CRM-4891: Attachment works incorrectly when user forward emails<commit_after>define(function(require) {
    'use strict';

    var EmailAttachmentSelectView;
    var _ = require('underscore');
    var $ = require('jquery');
    var EmailAttachmentListRowView = require('oroemail/js/app/views/email-attachment-list-row-view');
    var BaseCollectionView = require('oroui/js/app/views/base/collection-view');

    EmailAttachmentSelectView = BaseCollectionView.extend({
        itemView: EmailAttachmentListRowView,
        listSelector: '.attachment-list',
        fallbackSelector: '.no-items',
        isShowed: false,
        fileNameFilter: '',
        attachedCollection: null,

        events: {
            'click .cancel':                 'cancelClick',
            'click .upload-new':             'uploadNewClick',
            'click .attach':                 'attachClick',
            'input input.filter':            'filterChange'
        },

        initialize: function(options) {
            if (!_.has(options, 'attachedCollection')) {
                throw new Error('Required option "attachedCollection" not found.');
            }

            EmailAttachmentSelectView.__super__.initialize.apply(this, arguments);
            this.attachedCollection = options.attachedCollection;
        },

        resolveListSelector: function(model) {
            if (model.get('type') === 1) {
                return '.entity-attachments-list';
{'fraction_non_alphanumeric': 0.11620581029051452, 'fraction_numerical': 0.0021001050052502626, 'mean_word_length': 2.255125284738041, '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': '7254271', 'n_tokens_mistral': 721, 'n_tokens_neox': 713, 'n_words': 135}