Lines Matching refs:self

423             self = this;
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;
447 $.extend(params, options.params.call(self));
463 handler = transport.call(self, params);
663 var self = this;
665 func.apply(self, arguments);
864 var element, select, idKey, ajaxUrl, self = this;
906 node.addClass(self.opts.formatResultCssClass(result));
914 formatted=opts.formatResult(result, label, query, self.opts.escapeMarkup);
962 collection.push(self.optionToData(element));
965 group=self.optionToData(element);
1341 var dropdown = $("#select2-drop"), self;
1343 self=dropdown.data("select2");
1344 if (self.opts.selectOnBlur) {
1345 self.selectHighlighted({noFocus: true});
1347 self.close();
1560 self=this,
1578 if (!self.opened()) return;
1581 self.opts.populateResults.call(this, results, data.results, {term: term, page: page, context:context});
1582 self.postprocessResults(data, false, false);
1585 more.detach().appendTo(results).text(evaluate(self.opts.formatLoadMore, page+1));
1586 window.setTimeout(function() { self.loadMoreIfNeeded(); }, 10);
1590 self.positionDropdown();
1591 self.resultsPage = page;
1592 self.context = data.context;
1614 self = this,
1633 self.positionDropdown();
1635 self.liveRegion.text(results.text());
1638 self.liveRegion.text(self.opts.formatMatches(results.find('.select2-result-selectable').length));
1717 def = this.opts.createSearchChoice.call(self, search.val(), data.results);
1718 if (def !== undefined && def !== null && self.id(def) !== undefined && self.id(def) !== null) {
1721 return equal(self.id(this), self.id(def));
1734 self.opts.populateResults.call(this, results, data.results, {term: search.val(), page: this.resultsPage, context:null});
1737 results.append("<li class='select2-more-results'>" + self.opts.escapeMarkup(evaluate(opts.formatLoadMore, this.resultsPage)) + "</li>");
1738 window.setTimeout(function() { self.loadMoreIfNeeded(); }, 10);
2208 var self = this;
2211 self.updateSelection(selected);
2212 self.close();
2213 self.setPlaceholder();
2214 self.nextSearchTerm = self.opts.nextSearchTerm(selected, self.search.val());
2232 self=this;
2239 callback(self.optionToData(selected));
2296 var selected = 0, self = this, showSearchInput = true;
2301 if (equal(self.id(elm.data("select2-data")), self.opts.element.val())) {
2394 self = this,
2411 data = self.optionToData(elm);
2430 self.opts.element.val(!data ? "" : self.id(data));
2431 self.updateSelection(data);
2432 self.setPlaceholder();
2434 self.triggerChange({added: data, removed:oldData});
2496 self=this;
2507 data.push(self.optionToData(elm));
2771 var self = this;
2774 self.updateSelection(data);
2775 self.close();
2777 self.clearSearch();
2847 var ids = [], filtered = [], self = this;
2851 if (indexOf(self.id(this), ids) < 0) {
2852 ids.push(self.id(this));
2860 self.addSelectedChoice(this);
2862 self.postprocessResults();
3034 self = this;
3037 var id = self.id(choice.data("select2-data"));
3054 self.highlight(0);
3060 if (checkFormatter(self.opts.formatNoMatches, "formatNoMatches")) {
3061 this.results.append("<li class='select2-no-results'>" + evaluate(self.opts.formatNoMatches, self.search.val()) + "</li>");
3154 var oldData, self=this;
3188 var ids=$.map(data, self.id);
3189 self.setVal(ids);
3190 self.updateSelection(data);
3191 self.clearSearch();
3193 self.triggerChange(self.buildChangeDetails(oldData, self.data()));
3215 var val=[], self=this;
3226 val.push(self.opts.id($(this).data("select2-data")));
3234 var self=this, ids, old;
3243 ids = $.map(values, function(e) { return self.opts.id(e); });