Sha256: a33663aee8ee06626efdc9f1cecec0b4a7a012b03514f5021c983fcc9d020c5f
Contents?: true
Size: 785 Bytes
Versions: 50
Compression:
Stored size: 785 Bytes
Contents
$.fn.userAutocomplete = function () { 'use strict'; this.select2({ minimumInputLength: 1, multiple: true, initSelection: function (element, callback) { $.get(Spree.routes.user_search, { ids: element.val() }, function (data) { callback(data); }); }, ajax: { url: Spree.routes.user_search, datatype: 'json', data: function (term) { return { q: term }; }, results: function (data) { return { results: data }; } }, formatResult: function (user) { return user.email; }, formatSelection: function (user) { return user.email; } }); }; $(document).ready(function () { $('.user_picker').userAutocomplete(); });
Version data entries
50 entries across 50 versions & 1 rubygems