<commit_before>// go.campaign.bulkMessage
// ==============================
// Models, Views and other stuff for the bulk message composition screen

(function(exports) {

    var TextareaView = Backbone.View.extend({
        SMS_MAX_CHARS: 160,

        events: {
            'keyup': 'render'
        },

        initialize: function() {
            _.bindAll(this, 'render');
        },
        render: function() {
            var $p = this.$el.next();
            if (!$p.hasClass('textarea-char-count')) {
                $p = $('<p class="textarea-char-count"/>');
                this.$el.after($p);
            }
            this.totalChars = this.$el.text().length;
            this.totalSMS = Math.ceil(this.totalChars / this.SMS_MAX_CHARS);
            $p.html(this.totalChars + ' characters used<br>' + this.totalSMS + ' smses');

            return this;
        }
    });
    exports.TextareaView = TextareaView;

})(go.campaign.bulkMessage = {});<commit_msg>quick fix for issue #267<commit_after>// go.campaign.bulkMessage
// ==============================
// Models, Views and other stuff for the bulk message composition screen

(function(exports) {

    var TextareaView = Backbone.View.extend({
        SMS_MAX_CHARS: 160,

        events: {
            'keyup': 'render'
        },

        initialize: function() {
            _.bindAll(this, 'render');
        },
        render: function() {
            var $p = this.$el.next();
            if (!$p.hasClass('textarea-char-count')) {
                $p = $('<p class="textarea-char-count"/>');
                this.$el.after($p);
            }
            this.totalChars = this.$el.val().length;
            this.totalSMS = Math.ceil(this.totalChars / this.SMS_MAX_CHARS);
            $p.html(this.totalChars + ' characters used<br>' + this.totalSMS + ' smses');

            return this;
        }
    });
    exports.TextareaView = TextareaView;

})(go.campaign.bulkMessage = {});
{'fraction_non_alphanumeric': 0.17926455566905006, 'fraction_numerical': 0.004596527068437181, 'mean_word_length': 1.9636913767019668, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '2358201', 'n_tokens_mistral': 606, 'n_tokens_neox': 563, 'n_words': 108}