<commit_before>/**
 * @property Bootstrap.ButtonDropdown
 * @type {Ember.View}
 */
Bootstrap.ButtonDropdown = Ember.View.extend({

    /**
     * @property label
     * @type {String}
     */
    label: null,

    /**
     * @property items
     * @type {Array}
     */
    items: [],

    /**
     * @property classNames
     * @type {Array}
     */
    classNames: ['btn-group'],

    /**
     * @property layout
     * @type {Function}
     */
    layout: Ember.Handlebars.compile('<a {{bindAttr class="view.typeClass :btn :dropdown-toggle" }} data-toggle="dropdown" href="javascript:void(0);">{{view.label}}<span class="caret"></span></a>' +
                                     '<ul class="dropdown-menu">{{yield}}</ul>'),

    /**
     * @property template
     * @type {Function}
     */
    template: Ember.Handlebars.compile('{{#if view.items}} {{#each item in view.items}}' +
                                       '<li {{bindAttr class="item.disabled:disabled"}}>{{view view.Item contextBinding="item"}}</li>' +
                                       '{{/each}} {{/if}}'),

    /**
     * @method didInsertElement
     * @return {void}
     */
    didInsertElement: function() {

        var items   = Ember.get(this, 'items'),
            forEach = Ember.EnumerableUtils.forEach;

        forEach(items, function(item) {

            // Iterate over the items, and if the `disabled` property changes, notify the
            // view of an update.
            Ember.addObserver(item, 'disabled', function() {
                this.notifyPropertyChange('view.items');
            });

        }, this);

    },

    /**
     * @property Item
     * @type {Ember.View}
     */
    Item: Ember.View.extend({

        /**
         * @property tagName
         * @type {String}
         * @default "a"
         */
        tagName: 'a',

        /**
         * @attributeBindings
         * @type {Array}
         */
        attributeBindings: ['href'],

        /**
         * @property template
         * @type {Function}
         */
        template: Ember.Handlebars.compile('{{label}}'),

        /**
         * @property href
         * @type {Object}
         * @return {String}
         */
        href: Ember.computed(function() {
            return 'javascript:void(0);';
        }),
<commit_msg>Small correction in the YUIDoc comment<commit_after>/**
 * @property Bootstrap.ButtonDropdown
 * @type {Ember.View}
 */
Bootstrap.ButtonDropdown = Ember.View.extend({

    /**
     * @property label
     * @type {String}
     */
    label: null,

    /**
     * @property items
     * @type {Array}
     */
    items: [],

    /**
     * @property classNames
     * @type {Array}
     */
    classNames: ['btn-group'],

    /**
     * @property layout
     * @type {Function}
     */
    layout: Ember.Handlebars.compile('<a {{bindAttr class="view.typeClass :btn :dropdown-toggle" }} data-toggle="dropdown" href="javascript:void(0);">{{view.label}}<span class="caret"></span></a>' +
                                     '<ul class="dropdown-menu">{{yield}}</ul>'),

    /**
     * @property template
     * @type {Function}
     */
    template: Ember.Handlebars.compile('{{#if view.items}} {{#each item in view.items}}' +
                                       '<li {{bindAttr class="item.disabled:disabled"}}>{{view view.Item contextBinding="item"}}</li>' +
                                       '{{/each}} {{/if}}'),

    /**
     * @method didInsertElement
     * @return {void}
     */
    didInsertElement: function() {

        var items   = Ember.get(this, 'items'),
            forEach = Ember.EnumerableUtils.forEach;

        forEach(items, function(item) {

            // Iterate over the items, and if the `disabled` property changes, notify the
            // view of an update.
            Ember.addObserver(item, 'disabled', function() {
                this.notifyPropertyChange('view.items');
            });

        }, this);

    },

    /**
     * @property Item
     * @type {Ember.View}
     */
    Item: Ember.View.extend({

        /**
         * @property tagName
         * @type {String}
         * @default "a"
         */
        tagName: 'a',

        /**
         * @property attributeBindings
         * @type {Array}
         */
        attributeBindings: ['href'],

        /**
         * @property template
         * @type {Function}
         */
        template: Ember.Handlebars.compile('{{label}}'),

        /**
         * @property href
         * @type {Object}
         * @return {String}
         */
        href: Ember.computed(function() {
            return 'javascript:void(0);';
        }),

{'fraction_non_alphanumeric': 0.1654490760636012, 'fraction_numerical': 0.0008594757198109154, 'mean_word_length': 1.661520869068039, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 19, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 10, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7145963', 'n_tokens_mistral': 1363, 'n_tokens_neox': 1310, 'n_words': 260}