Change display property of groups to list-item when results match. Fixes #344 & Fixes #354.

This commit is contained in:
Patrick Filler 2011-11-15 11:19:03 -05:00
parent 16b6f5047a
commit 31cd33f22b
6 changed files with 8 additions and 6 deletions

View file

@ -725,7 +725,7 @@
result.html(text);
this.result_activate(result);
if (option.group_array_index != null) {
$("#" + this.results_data[option.group_array_index].dom_id).css('display', 'auto');
$("#" + this.results_data[option.group_array_index].dom_id).css('display', 'list-item');
}
} else {
if (this.result_highlight && result_id === this.result_highlight.attr('id')) {

File diff suppressed because one or more lines are too long

View file

@ -728,7 +728,9 @@
}
this.result_activate($(result_id));
if (option.group_array_index != null) {
$(this.results_data[option.group_array_index].dom_id).show();
$(this.results_data[option.group_array_index].dom_id).setStyle({
display: 'list-item'
});
}
} else {
if ($(result_id) === this.result_highlight) {

File diff suppressed because one or more lines are too long

View file

@ -416,7 +416,7 @@ class Chosen extends AbstractChosen
result.html(text)
this.result_activate result
$("#" + @results_data[option.group_array_index].dom_id).css('display', 'auto') if option.group_array_index?
$("#" + @results_data[option.group_array_index].dom_id).css('display', 'list-item') if option.group_array_index?
else
this.result_clear_highlight() if @result_highlight and result_id is @result_highlight.attr 'id'
this.result_deactivate result

View file

@ -407,7 +407,7 @@ class Chosen extends AbstractChosen
this.result_activate $(result_id)
$(@results_data[option.group_array_index].dom_id).show() if option.group_array_index?
$(@results_data[option.group_array_index].dom_id).setStyle({display: 'list-item'}) if option.group_array_index?
else
this.result_clear_highlight() if $(result_id) is @result_highlight
this.result_deactivate $(result_id)