Sha256: 61d404fe4233b71b75bbb5ecf2a4620c51e2fd9236a8ff1a6e143e09d126a1e5

Contents?: true

Size: 725 Bytes

Versions: 1

Compression:

Stored size: 725 Bytes

Contents

/**
 * @namespace WORKAREA.selects
 */
WORKAREA.registerModule('selects', (function () {
    'use strict';

    /**
     * @method
     * @name init
     * @memberof WORKAREA.selects
     */
    var getConfig = function (select) {
            var config = _.assign({}, $(select).data('select'));

            if ( ! _.isUndefined(config.dropdownParent)) {
                config.dropdownParent = $(config.dropdownParent);
            }

            return config;
        },

        setup = function(index, select) {
            $(select).select2(getConfig(select));
        },

        init = function ($scope) {
            $('[data-select]', $scope).each(setup);
        };

    return {
        init: init
    };
}()));

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
workarea-admin-3.5.0.beta.1 app/assets/javascripts/workarea/admin/modules/selects.js