Sha256: e587ec9e1a2276d8a02ab6cfcebff739377cabfedfb979798903437963505c2b

Contents?: true

Size: 927 Bytes

Versions: 3

Compression:

Stored size: 927 Bytes

Contents

I"“(function() {
  $(document).on('ready page:load', function() {
    return $('select', '.relation, .node, .taxonomy').selectize({
      plugins: ['remove_button'],
      hideSelected: false,
      onInitialize: function() {
        var items, options, sel;
        sel = this;
        options = sel.$input.data('options');
        items = sel.$input.data('items');
        $.each(options, function() {
          return sel.addOption(this);
        });
        if ($.isArray(items)) {
          return $.each(items, function() {
            return sel.addItem(this);
          });
        } else {
          return sel.addItem(items);
        }
      },
      render: {
        option: function(item, esc) {
          var pre;
          pre = item.depth > 0 ? '- '.repeat(item.depth) : '';
          return "<div class=\"option\">" + pre + (esc(item.text)) + "</div>";
        }
      }
    });
  });

}).call(this);
:ET

Version data entries

3 entries across 3 versions & 3 rubygems

Version Path
push_type_wysiwyg-0.6.0.beta.1 test/dummy/tmp/cache/assets/development/sprockets/v3.0/oPvGci8wIDxeMOWgaH9tg9cmiw_uXWAnEgNSB1G36C4.cache
push_type_auth-0.6.0.beta.1 test/dummy/tmp/cache/assets/test/sprockets/v3.0/oPvGci8wIDxeMOWgaH9tg9cmiw_uXWAnEgNSB1G36C4.cache
push_type_admin-0.6.0.beta.1 test/dummy/tmp/cache/assets/test/sprockets/v3.0/oPvGci8wIDxeMOWgaH9tg9cmiw_uXWAnEgNSB1G36C4.cache