Lines Matching defs:container

684             this.container = this.createContainer();
695 this.container.attr("id", this.containerId);
700 syncCssClasses(this.container, this.opts.element, this.opts.adaptContainerCssClass);
702 this.container.attr("style", opts.element.attr("style"));
703 this.container.css(evaluate(opts.containerCss));
704 this.container.addClass(evaluate(opts.containerCssClass));
708 // swap container for the element
712 .before(this.container)
715 this.container.data("select2", this);
717 this.dropdown = this.container.find(".select2-drop");
725 this.results = results = this.container.find(resultsSelector);
726 this.search = search = this.container.find("input.select2-input");
732 // initialize the container
735 this.container.on("click", killEvent);
747 $(this.container).on("change", ".select2-input", function(e) {e.stopPropagation();});
824 select2.container.remove();
882 populateResults: function(container, results, query) {
885 populate=function(results, container, depth) {
889 results = opts.sortResults(results, container, query);
930 container.append(node);
936 populate(results, container, 0);
1063 syncCssClasses(this.container, this.opts.element, this.opts.adaptContainerCssClass);
1064 this.container.addClass(evaluate(this.opts.containerCssClass));
1133 this.container.toggleClass("select2-container-disabled", disabled);
1167 return this.container.hasClass("select2-dropdown-open");
1173 offset = this.container.offset(),
1174 height = this.container.outerHeight(false),
1175 width = this.container.outerWidth(false),
1213 offset = this.container.offset();
1214 height = this.container.outerHeight(false);
1215 width = this.container.outerWidth(false);
1236 this.container.removeClass('select2-drop-auto-width');
1250 dropLeft = offset.left + this.container.outerWidth(false) - dropWidth;
1261 this.container.addClass("select2-drop-above");
1267 this.container.removeClass("select2-drop-above");
1291 this.container.removeClass("select2-drop-above");
1322 this.container.addClass("select2-dropdown-open").addClass("select2-container-active");
1372 // attach listeners to events that can change the position of the container and thus require
1373 // the position of the dropdown to be updated as well so it does not come unglued from the container
1375 this.container.parents().add(window).each(function () {
1394 this.container.parents().add(window).each(function () { $(this).off(scroll).off(resize).off(orient); });
1401 this.container.removeClass("select2-dropdown-open").removeClass("select2-container-active");
1617 lastTerm = $.data(this.container, "select2-last-term"),
1624 $.data(this.container, "select2-last-term", term);
1761 this.container.removeClass("select2-container-active");
1817 * Get the desired width for the container element. This is
1864 this.container.css("width", width);
1874 var container = $(document.createElement("div")).attr({
1875 "class": "select2-container"
1892 return container;
1971 return this.container.hasClass("select2-container-active");
1995 container = this.container,
2006 this.selection = selection = container.find(".select2-choice");
2008 this.focusser = container.find(".select2-focusser");
2132 if (!this.container.hasClass("select2-container-active")) {
2152 if (!this.container.hasClass("select2-container-active")) {
2155 this.container.addClass("select2-container-active");
2158 this.container.removeClass("select2-container-active");
2163 if (!this.container.hasClass("select2-container-active")) {
2166 this.container.addClass("select2-container-active");
2290 this.container.removeClass("select2-allowclear");
2334 //add "select2-with-searchbox" to the container if search box is shown
2335 $(this.dropdown, this.container).toggleClass("select2-with-searchbox", showSearchInput);
2366 var container=this.selection.find(".select2-chosen"), formatted, cssClass;
2370 container.empty();
2372 formatted=this.opts.formatSelection(data, container, this.opts.escapeMarkup);
2375 container.append(formatted);
2377 cssClass=this.opts.formatSelectionCssClass(data, container);
2379 container.addClass(cssClass);
2385 this.container.addClass("select2-allowclear");
2477 var container = $(document.createElement("div")).attr({
2478 "class": "select2-container select2-container-multi"
2490 return container;
2554 var selected = this.container.find(".select2-search-choice-focus");
2582 this.searchContainer = this.container.find(".select2-search-field");
2583 this.selection = selection = this.container.find(selector);
2713 this.container.removeClass("select2-container-active");
2721 this.container.on("click", selector, this.bind(function (e) {
2729 if (!this.container.hasClass("select2-container-active")) {
2737 this.container.on("focus", selector, this.bind(function () {
2739 if (!this.container.hasClass("select2-container-active")) {
2742 this.container.addClass("select2-container-active");
2790 // stretch the search box to full width of the container so as much of the placeholder is visible as possible
2792 this.search.width(maxWidth > 0 ? maxWidth : this.container.css("width"));
2975 this.container.addClass("select2-container-active");
3206 // collapse search field into 0 width so its container can be collapsed as well
3208 // hide the container
3219 // make sure the search container is the last item in the list
3260 allowedMethods = ["val", "destroy", "opened", "open", "close", "focus", "isFocused", "container", "dropdown", "onSortStart", "onSortEnd", "enable", "disable", "readonly", "positionDropdown", "data", "search"],
3261 valueMethods = ["opened", "isFocused", "container", "dropdown"],
3291 if (method === "container") {
3292 value = select2.container;
3321 formatResult: function(result, container, query, escapeMarkup) {
3326 formatSelection: function (data, container, escapeMarkup) {
3329 sortResults: function (results, container, query) {
3333 formatSelectionCssClass: function(data, container) {return undefined;},