Merge changes from #149
This commit is contained in:
parent
528d77bc04
commit
57fcc576c3
|
@ -1,9 +1,4 @@
|
||||||
/* @group Base */
|
/* @group Base */
|
||||||
select.chzn-select {
|
|
||||||
visibility: hidden;
|
|
||||||
height: 28px !important;
|
|
||||||
min-height: 28px !important;
|
|
||||||
}
|
|
||||||
.chzn-container {
|
.chzn-container {
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
|
|
@ -17,6 +17,9 @@
|
||||||
$ = jQuery;
|
$ = jQuery;
|
||||||
$.fn.extend({
|
$.fn.extend({
|
||||||
chosen: function(data, options) {
|
chosen: function(data, options) {
|
||||||
|
if ($.browser === "msie" && ($.browser.version === "6.0" || $.browser.version === "7.0")) {
|
||||||
|
return this;
|
||||||
|
}
|
||||||
return $(this).each(function(input_field) {
|
return $(this).each(function(input_field) {
|
||||||
if (!($(this)).hasClass("chzn-done")) {
|
if (!($(this)).hasClass("chzn-done")) {
|
||||||
return new Chosen(this, data, options);
|
return new Chosen(this, data, options);
|
||||||
|
|
2
chosen/chosen.jquery.min.js
vendored
2
chosen/chosen.jquery.min.js
vendored
File diff suppressed because one or more lines are too long
|
@ -693,8 +693,16 @@
|
||||||
return Chosen;
|
return Chosen;
|
||||||
})();
|
})();
|
||||||
root.Chosen = Chosen;
|
root.Chosen = Chosen;
|
||||||
|
if (Prototype.Browser.IE) {
|
||||||
|
if (/MSIE (\d+\.\d+);/.test(navigator.userAgent)) {
|
||||||
|
Prototype.BrowserFeatures['Version'] = new Number(RegExp.$1);
|
||||||
|
}
|
||||||
|
}
|
||||||
document.observe('dom:loaded', function(evt) {
|
document.observe('dom:loaded', function(evt) {
|
||||||
var select, selects, _i, _len, _results;
|
var select, selects, _i, _len, _results;
|
||||||
|
if (Prototype.Browser.IE && (Prototype.BrowserFeatures['Version'] === 6 || Prototype.BrowserFeatures['Version'] === 7)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
selects = $$(".chzn-select");
|
selects = $$(".chzn-select");
|
||||||
_results = [];
|
_results = [];
|
||||||
for (_i = 0, _len = selects.length; _i < _len; _i++) {
|
for (_i = 0, _len = selects.length; _i < _len; _i++) {
|
||||||
|
|
2
chosen/chosen.proto.min.js
vendored
2
chosen/chosen.proto.min.js
vendored
File diff suppressed because one or more lines are too long
|
@ -7,6 +7,8 @@ $ = jQuery
|
||||||
|
|
||||||
$.fn.extend({
|
$.fn.extend({
|
||||||
chosen: (data, options) ->
|
chosen: (data, options) ->
|
||||||
|
# Do no harm and return as soon as possible for unsupported browsers, namely IE6 and IE7
|
||||||
|
return this if $.browser is "msie" and ($.browser.version is "6.0" or $.browser.version is "7.0")
|
||||||
$(this).each((input_field) ->
|
$(this).each((input_field) ->
|
||||||
new Chosen(this, data, options) unless ($ this).hasClass "chzn-done"
|
new Chosen(this, data, options) unless ($ this).hasClass "chzn-done"
|
||||||
)
|
)
|
||||||
|
|
|
@ -574,7 +574,16 @@ class Chosen
|
||||||
|
|
||||||
root.Chosen = Chosen
|
root.Chosen = Chosen
|
||||||
|
|
||||||
|
# Prototype does not support version numbers so we add it ourselves
|
||||||
|
if Prototype.Browser.IE
|
||||||
|
if /MSIE (\d+\.\d+);/.test(navigator.userAgent)
|
||||||
|
Prototype.BrowserFeatures['Version'] = new Number(RegExp.$1);
|
||||||
|
|
||||||
|
|
||||||
document.observe 'dom:loaded', (evt) ->
|
document.observe 'dom:loaded', (evt) ->
|
||||||
|
# Do no harm and return as soon as possible for unsupported browsers, namely IE6 and IE7
|
||||||
|
return if Prototype.Browser.IE and (Prototype.BrowserFeatures['Version'] is 6 or Prototype.BrowserFeatures['Version'] is 7)
|
||||||
|
|
||||||
selects = $$(".chzn-select")
|
selects = $$(".chzn-select")
|
||||||
new Chosen select for select in selects
|
new Chosen select for select in selects
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue