Browse Source

Added zindex options to dropdown so we can make sure it presents itself on top of whatever is existing in the DOM

Pier-Olivier Thibault 13 năm trước cách đây
mục cha
commit
277ae4ff5a
1 tập tin đã thay đổi với 3 bổ sung1 xóa
  1. 3 1
      select2.js

+ 3 - 1
select2.js

@@ -539,6 +539,7 @@
                 formatInputTooShort: function (input, min) { return "Please enter " + (min - input.length) + " more characters"; },
                 formatInputTooShort: function (input, min) { return "Please enter " + (min - input.length) + " more characters"; },
                 minimumResultsForSearch: 0,
                 minimumResultsForSearch: 0,
                 minimumInputLength: 0,
                 minimumInputLength: 0,
+                zIndex: 2000,
                 id: function (e) { return e.id; },
                 id: function (e) { return e.id; },
                 matcher: function(term, text) {
                 matcher: function(term, text) {
                     return text.toUpperCase().indexOf(term.toUpperCase()) >= 0;
                     return text.toUpperCase().indexOf(term.toUpperCase()) >= 0;
@@ -653,7 +654,8 @@
             this.dropdown.css({
             this.dropdown.css({
                 top: offset.top + height,
                 top: offset.top + height,
                 left: offset.left,
                 left: offset.left,
-                width: width
+                width: width,
+                "z-index": this.opts.zIndex
             });
             });
         },
         },