Lines Matching refs:query

403      * Produces an ajax-based query function
409 * @param options.data a function(searchTerm, pageNumber, context) that should return an object containing query string parameters for the above url.
425 return function (query) {
440 data = data ? data.call(self, query.term, query.page, query.context) : null;
441 url = (typeof url === 'function') ? url.call(self, query.term, query.page, query.context) : url;
458 // TODO - replace query.page with query so users have access to term, page, etc.
459 var results = options.results(data, query.page);
460 query.callback(results);
469 * Produces a query function that works with a local array
508 return function (query) {
509 var t = query.term, filtered = { results: [] }, process;
511 query.callback(data());
525 if (group.children.length || query.matcher(t, text(group), datum)) {
529 if (query.matcher(t, text(datum), datum)) {
536 query.callback(filtered);
543 return function (query) {
544 var t = query.term, filtered = {results: []};
548 if (t === "" || query.matcher(t, text)) {
552 query.callback(filtered);
874 $.each(["id", "multiple", "ajax", "query", "createSearchChoice", "initSelection", "data", "tags"], function () {
882 populateResults: function(container, results, query) {
889 results = opts.sortResults(results, container, query);
914 formatted=opts.formatResult(result, label, query, self.opts.escapeMarkup);
953 opts.query = this.bind(function (query) {
955 term = query.term,
961 if (query.matcher(term, element.text(), element)) {
985 query.callback(data);
990 if (!("query" in opts)) {
997 opts.query = ajax.call(opts.element, opts.ajax);
999 opts.query = local(opts.data);
1001 opts.query = tags(opts.tags);
1022 if (typeof(opts.query) !== "function") {
1023 throw "query function not defined for Select2 " + opts.element.attr("id");
1569 this.opts.query({
1693 opts.query({
2247 opts.query({
2517 opts.query({
3321 formatResult: function(result, container, query, escapeMarkup) {
3323 markMatch(result.text, query.term, markup, escapeMarkup);
3329 sortResults: function (results, container, query) {
3381 query: {