All files / web/bundles/pimui/js pim-ui.js

81.82% Statements 9/11
0% Branches 0/2
75% Functions 3/4
81.82% Lines 9/11

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 311183x         1183x   4896x     4896x     4896x     4896x 32x 32x     4896x                  
define(
    ['jquery', 'pim/initselect2', 'wysiwyg', 'bootstrap'],
    function ($, initSelect2, wysiwyg) {
        'use strict';
 
        return function ($target) {
            // Apply Select2
            initSelect2.init($target);
 
            // Initialize tooltip
            $target.find('[data-toggle="tooltip"]').tooltip();
 
            // Initialize popover
            $target.find('[data-toggle="popover"]').popover();
 
            // Activate a form tab
            $target.find('li.tab.active a').each(function () {
                var paneId = $(this).attr('href');
                $(paneId).addClass('active');
            });
 
            $target.find('textarea.wysiwyg[id]:not([aria-hidden])').each(function () {
                if (!$(this).closest('.attribute-field').hasClass('scopable')) {
                    wysiwyg.init($(this));
                }
            });
        };
    }
);