Update CSS / JS to latest versions.
This commit is contained in:
parent
32a1b719f6
commit
67ba16b47d
3 changed files with 18 additions and 20 deletions
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
||||||
|
.DS_Store
|
|
@ -42,7 +42,7 @@ div.chzn-container div.chzn-drop {
|
||||||
-webkit-box-shadow: 0px 4px 5px rgba(0, 0, 0, 0.15);
|
-webkit-box-shadow: 0px 4px 5px rgba(0, 0, 0, 0.15);
|
||||||
-moz-box-shadow: 0px 4px 5px rgba(0, 0, 0, 0.15);
|
-moz-box-shadow: 0px 4px 5px rgba(0, 0, 0, 0.15);
|
||||||
box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.15);
|
box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.15);
|
||||||
z-index: 20;
|
z-index: 999;
|
||||||
}
|
}
|
||||||
div.chzn-container-single div.chzn-drop {
|
div.chzn-container-single div.chzn-drop {
|
||||||
-moz-border-radius: 0 0 4px 4px;
|
-moz-border-radius: 0 0 4px 4px;
|
||||||
|
@ -78,7 +78,6 @@ div.chzn-container a.chzn-single {
|
||||||
padding: 0px 0px 0px 8px;
|
padding: 0px 0px 0px 8px;
|
||||||
position: relative;
|
position: relative;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
z-index: 19;
|
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
div.chzn-container a.chzn-single span {
|
div.chzn-container a.chzn-single span {
|
||||||
|
@ -243,7 +242,6 @@ div.chzn-container ul.chzn-results {
|
||||||
position: relative;
|
position: relative;
|
||||||
overflow-x: hidden;
|
overflow-x: hidden;
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
z-index: 20;
|
|
||||||
}
|
}
|
||||||
div.chzn-container-multi ul.chzn-results {
|
div.chzn-container-multi ul.chzn-results {
|
||||||
margin: -1px 0 0;
|
margin: -1px 0 0;
|
||||||
|
@ -256,7 +254,6 @@ div.chzn-container-multi ul.chzn-results li {
|
||||||
div.chzn-container ul.chzn-results li {
|
div.chzn-container ul.chzn-results li {
|
||||||
line-height: 80%;
|
line-height: 80%;
|
||||||
padding: 7px 7px 8px;
|
padding: 7px 7px 8px;
|
||||||
z-index: 22;
|
|
||||||
margin: 0;
|
margin: 0;
|
||||||
list-style-type: none;
|
list-style-type: none;
|
||||||
}
|
}
|
||||||
|
@ -327,7 +324,6 @@ div.chzn-container-active a.chzn-single-with-drop div b {
|
||||||
background-position: -18px 1px;
|
background-position: -18px 1px;
|
||||||
}
|
}
|
||||||
div.chzn-container-active ul.chzn-choices {
|
div.chzn-container-active ul.chzn-choices {
|
||||||
z-index: 21;
|
|
||||||
-webkit-box-shadow: 0px 0px 5px rgba(0, 0, 0, 0.3);
|
-webkit-box-shadow: 0px 0px 5px rgba(0, 0, 0, 0.3);
|
||||||
-moz-box-shadow: 0px 0px 5px rgba(0, 0, 0, 0.3);
|
-moz-box-shadow: 0px 0px 5px rgba(0, 0, 0, 0.3);
|
||||||
box-shadow: 0px 0px 5px rgba(0, 0, 0, 0.3);
|
box-shadow: 0px 0px 5px rgba(0, 0, 0, 0.3);
|
||||||
|
|
|
@ -216,7 +216,7 @@
|
||||||
if (data.selected && this.is_multiple) {
|
if (data.selected && this.is_multiple) {
|
||||||
this.choice_build(data);
|
this.choice_build(data);
|
||||||
} else if (data.selected && !this.is_multiple) {
|
} else if (data.selected && !this.is_multiple) {
|
||||||
this.selected_item.down("span").update(data.text);
|
this.selected_item.down("span").update(data.html);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -244,7 +244,7 @@
|
||||||
if (option.group_array_index != null) {
|
if (option.group_array_index != null) {
|
||||||
classes.push("group-option");
|
classes.push("group-option");
|
||||||
}
|
}
|
||||||
return '<li id="' + option.dom_id + '" class="' + classes.join(' ') + '">' + option.text.escapeHTML() + '</li>';
|
return '<li id="' + option.dom_id + '" class="' + classes.join(' ') + '">' + option.html + '</li>';
|
||||||
} else {
|
} else {
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
@ -365,9 +365,9 @@
|
||||||
this.choices += 1;
|
this.choices += 1;
|
||||||
this.search_container.insert({
|
this.search_container.insert({
|
||||||
before: this.choice_temp.evaluate({
|
before: this.choice_temp.evaluate({
|
||||||
"id": choice_id,
|
id: choice_id,
|
||||||
"choice": item.text,
|
choice: item.html,
|
||||||
"position": item.array_index
|
position: item.array_index
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
link = $(choice_id).down('a');
|
link = $(choice_id).down('a');
|
||||||
|
@ -407,7 +407,7 @@
|
||||||
if (this.is_multiple) {
|
if (this.is_multiple) {
|
||||||
this.choice_build(item);
|
this.choice_build(item);
|
||||||
} else {
|
} else {
|
||||||
this.selected_item.down("span").update(item.text);
|
this.selected_item.down("span").update(item.html);
|
||||||
}
|
}
|
||||||
this.results_hide();
|
this.results_hide();
|
||||||
this.search_field.value = "";
|
this.search_field.value = "";
|
||||||
|
@ -449,7 +449,7 @@
|
||||||
startTime = new Date();
|
startTime = new Date();
|
||||||
this.no_results_clear();
|
this.no_results_clear();
|
||||||
results = 0;
|
results = 0;
|
||||||
searchText = this.search_field.value === this.default_text ? "" : this.search_field.value.strip();
|
searchText = this.search_field.value === this.default_text ? "" : this.search_field.value.strip().escapeHTML();
|
||||||
regex = new RegExp('^' + searchText.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&"), 'i');
|
regex = new RegExp('^' + searchText.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&"), 'i');
|
||||||
zregex = new RegExp(searchText.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&"), 'i');
|
zregex = new RegExp(searchText.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&"), 'i');
|
||||||
_ref = this.results_data;
|
_ref = this.results_data;
|
||||||
|
@ -461,11 +461,11 @@
|
||||||
} else if (!(this.is_multiple && option.selected)) {
|
} else if (!(this.is_multiple && option.selected)) {
|
||||||
found = false;
|
found = false;
|
||||||
result_id = option.dom_id;
|
result_id = option.dom_id;
|
||||||
if (regex.test(option.text)) {
|
if (regex.test(option.html)) {
|
||||||
found = true;
|
found = true;
|
||||||
results += 1;
|
results += 1;
|
||||||
} else if (option.text.indexOf(" ") >= 0 || option.text.indexOf("[") === 0) {
|
} else if (option.html.indexOf(" ") >= 0 || option.html.indexOf("[") === 0) {
|
||||||
parts = option.text.replace(/\[|\]/g, "").split(" ");
|
parts = option.html.replace(/\[|\]/g, "").split(" ");
|
||||||
if (parts.length) {
|
if (parts.length) {
|
||||||
for (_j = 0, _len2 = parts.length; _j < _len2; _j++) {
|
for (_j = 0, _len2 = parts.length; _j < _len2; _j++) {
|
||||||
part = parts[_j];
|
part = parts[_j];
|
||||||
|
@ -478,11 +478,11 @@
|
||||||
}
|
}
|
||||||
if (found) {
|
if (found) {
|
||||||
if (searchText.length) {
|
if (searchText.length) {
|
||||||
startpos = option.text.search(zregex);
|
startpos = option.html.search(zregex);
|
||||||
text = option.text.substr(0, startpos + searchText.length) + '</em>' + option.text.substr(startpos + searchText.length);
|
text = option.html.substr(0, startpos + searchText.length) + '</em>' + option.html.substr(startpos + searchText.length);
|
||||||
text = text.substr(0, startpos) + '<em>' + text.substr(startpos);
|
text = text.substr(0, startpos) + '<em>' + text.substr(startpos);
|
||||||
} else {
|
} else {
|
||||||
text = option.text;
|
text = option.html;
|
||||||
}
|
}
|
||||||
if ($(result_id).innerHTML !== text) {
|
if ($(result_id).innerHTML !== text) {
|
||||||
$(result_id).update(text);
|
$(result_id).update(text);
|
||||||
|
@ -528,7 +528,7 @@
|
||||||
};
|
};
|
||||||
Chosen.prototype.no_results = function(terms) {
|
Chosen.prototype.no_results = function(terms) {
|
||||||
return this.search_results.insert(this.no_results_temp.evaluate({
|
return this.search_results.insert(this.no_results_temp.evaluate({
|
||||||
"terms": terms.escapeHTML()
|
terms: terms
|
||||||
}));
|
}));
|
||||||
};
|
};
|
||||||
Chosen.prototype.no_results_clear = function() {
|
Chosen.prototype.no_results_clear = function() {
|
||||||
|
@ -658,7 +658,7 @@
|
||||||
}
|
}
|
||||||
div = new Element('div', {
|
div = new Element('div', {
|
||||||
'style': style_block
|
'style': style_block
|
||||||
}).update(this.search_field.value);
|
}).update(this.search_field.value.escapeHTML());
|
||||||
document.body.appendChild(div);
|
document.body.appendChild(div);
|
||||||
w = Element.measure(div, 'width') + 25;
|
w = Element.measure(div, 'width') + 25;
|
||||||
div.remove();
|
div.remove();
|
||||||
|
@ -735,6 +735,7 @@
|
||||||
options_index: this.options_index,
|
options_index: this.options_index,
|
||||||
value: option.value,
|
value: option.value,
|
||||||
text: option.text,
|
text: option.text,
|
||||||
|
html: option.innerHTML,
|
||||||
selected: option.selected,
|
selected: option.selected,
|
||||||
disabled: group_disabled === true ? group_disabled : option.disabled,
|
disabled: group_disabled === true ? group_disabled : option.disabled,
|
||||||
group_array_index: group_position
|
group_array_index: group_position
|
||||||
|
|
Loading…
Add table
Reference in a new issue