Sha256: d09a53dc65254d3a0d2d99b92e6e1a1941b54b5fc467b1aa5f54f4a0c2000117

Contents?: true

Size: 903 Bytes

Versions: 13

Compression:

Stored size: 903 Bytes

Contents

define([
  'jquery',
  './utils'
], function ($, Utils) {
  function Dropdown ($element, options) {
    this.$element = $element;
    this.options = options;

    Dropdown.__super__.constructor.call(this);
  }

  Utils.Extend(Dropdown, Utils.Observable);

  Dropdown.prototype.render = function () {
    var $dropdown = $(
      '<span class="select2-dropdown">' +
        '<span class="select2-results"></span>' +
      '</span>'
    );

    $dropdown.attr('dir', this.options.get('dir'));

    this.$dropdown = $dropdown;

    return $dropdown;
  };

  Dropdown.prototype.bind = function () {
    // Should be implemented in subclasses
  };

  Dropdown.prototype.position = function ($dropdown, $container) {
    // Should be implemented in subclasses
  };

  Dropdown.prototype.destroy = function () {
    // Remove the dropdown from the DOM
    this.$dropdown.remove();
  };

  return Dropdown;
});

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
card-mod-bootstrap-0.18.1 vendor/select2/src/js/select2/dropdown.js
card-mod-bootstrap-0.18.0 vendor/select2/src/js/select2/dropdown.js
card-mod-bootstrap-0.17.0 vendor/select2/src/js/select2/dropdown.js
card-mod-bootstrap-0.16.0 vendor/select2/src/js/select2/dropdown.js
card-mod-bootstrap-0.15.6 vendor/select2/src/js/select2/dropdown.js
card-mod-bootstrap-0.15.5 vendor/select2/src/js/select2/dropdown.js
card-mod-bootstrap-0.15.4 vendor/select2/src/js/select2/dropdown.js
card-mod-bootstrap-0.15.3 vendor/select2/src/js/select2/dropdown.js
card-mod-bootstrap-0.15.1.2 vendor/select2/src/js/select2/dropdown.js
card-mod-bootstrap-0.15.2.pre1 vendor/select2/src/js/select2/dropdown.js
card-mod-bootstrap-0.15.1.1 vendor/select2/src/js/select2/dropdown.js
card-mod-bootstrap-0.15.1 vendor/select2/src/js/select2/dropdown.js
card-mod-bootstrap-0.15.0 vendor/select2/src/js/select2/dropdown.js