<commit_before>/**
 * @author <NAME> from Ubrainians for imCode
 * 23.06.18
 */
Imcms.define('imcms-window-tab-builder', ['imcms-bem-builder', 'jquery'], function (BEM, $) {

    var formsBEM = new BEM({
        block: 'imcms-form',
        elements: {'field': 'imcms-field'}
    });

    function setDisplay(tabIndex, displayValue) {
        $('.imcms-tabs__tab[data-window-id=' + tabIndex + ']').css('display', displayValue);
    }

    var WindowTab = function (name) {
        this.name = name;
    };

    WindowTab.prototype = {
        showTab: function () {
            setDisplay(this.tabIndex, 'block');
        },
        hideTab: function () {
            setDisplay(this.tabIndex, 'none');
        },
        /**
         * @returns {Array} array of tab $elements
         */
        tabElementsFactory: function () {
            // override, return array of tab $elements
        },
        buildTab: function (index) {
            this.tabIndex = index;
            var tabElements$ = this.tabElementsFactory.apply(this, arguments);<commit_msg>IMCMS-300 - New design to superadmin-pages: - Cleanup.<commit_after>/**
 * @author <NAME> from Ubrainians for imCode
 * 23.06.18
 */
Imcms.define('imcms-window-tab-builder', ['imcms-bem-builder', 'jquery'], function (BEM, $) {

    var formsBEM = new BEM({
        block: 'imcms-form',
        elements: {'field': 'imcms-field'}
    });

    function setDisplay(tabIndex, displayValue) {
        $('.imcms-tabs__tab[data-window-id=' + tabIndex + ']').css('display', displayValue);
    }

    var WindowTab = function (name) {
        this.name = name;
    };

    WindowTab.prototype = {
        showTab: function () {
            setDisplay(this.tabIndex, 'block');
        },
        hideTab: function () {
            setDisplay(this.tabIndex, 'none');
        },
        /**
         * @returns {Array} array of tab $elements
         */
        tabElementsFactory: function () {
            return [];// override, return array of tab $elements
        },
        buildTab: function (index) {
            this.tabIndex = index;
            var tabElements$ = this.tabElementsFactory.apply(this, arguments);
{'fraction_non_alphanumeric': 0.1507607192254495, 'fraction_numerical': 0.006915629322268326, 'mean_word_length': 2.163265306122449, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '2145383', 'n_tokens_mistral': 669, 'n_tokens_neox': 635, 'n_words': 139}