Updating to latest version of chosen / css.

gh-pages
Patrick Filler 2011-06-28 16:30:05 -04:00
parent 2d4430be99
commit a82baf9fec
5 changed files with 105 additions and 112 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 258 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

BIN
chosen/chosen-sprite.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

View File

@ -1,13 +1,12 @@
/* line 3, sass/chosen.scss */
div.chzn-container { div.chzn-container {
font-size: 82.5%; font-size: 13px;
position: relative; position: relative;
} }
div.chzn-container input { div.chzn-container input {
background: #fff; background: #fff;
background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0.85, white), color-stop(0.99, #eeeeee)); background: -webkit-gradient(linear, left bottom, left top, color-stop(0.85, white), color-stop(0.99, #eeeeee));
background-image: -moz-linear-gradient(center bottom, white 85%, #eeeeee 99%); background: -moz-linear-gradient(center bottom, white 85%, #eeeeee 99%);
border: 1px solid #aaa; border: 1px solid #aaa;
font-family: sans-serif; font-family: sans-serif;
font-size: 1em; font-size: 1em;
@ -23,15 +22,15 @@ div.chzn-container input {
} }
div.chzn-container textarea:focus { div.chzn-container textarea:focus {
border-color: #058cf5; border-color: #058cf5;
-moz-box-shadow: 0px 0px 5px #999; -moz-box-shadow: 0px 0px 3px #aaa;
-webkit-box-shadow: 0px 0px 5px #999; -webkit-box-shadow: 0px 0px 3px #aaa;
box-shadow: 0px 0px 5px #999; box-shadow: 0px 0px 3px #aaa;
} }
/* line 6, sass/chosen.scss */
div.chzn-container div.chzn-drop { div.chzn-container div.chzn-drop {
background: #FFF; background: #FFF;
border: 1px solid #BBB; border: 1px solid #aaa;
border-width: 0 1px 1px; border-width: 0 1px 1px;
left: 0; left: 0;
position: absolute; position: absolute;
@ -41,54 +40,62 @@ div.chzn-container div.chzn-drop {
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: 20;
} }
/* line 19, sass/chosen.scss */ div.chzn-container-single div.chzn-drop {
-moz-border-radius: 0 0 4px 4px;
-webkit-border-radius: 0 0 4px 4px;
-o-border-radius: 0 0 4px 4px;
-ms-border-radius: 0 0 4px 4px;
-khtml-border-radius: 0 0 4px 4px;
border-radius: 0 0 4px 4px;
}
/* SINGLE */
div.chzn-container a.chzn-single { div.chzn-container a.chzn-single {
background: #FFF; background: #FFF;
background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0, #eeeeee), color-stop(0.5, white)); background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0, #eeeeee), color-stop(0.5, white));
background-image: -moz-linear-gradient(center bottom, #eeeeee 0%, white 50%); background-image: -moz-linear-gradient(center bottom, #eeeeee 0%, white 50%);
border: 1px solid #BBB; border: 1px solid #aaa;
display: block; display: block;
overflow: hidden; overflow: hidden;
-moz-border-radius: 3px; -moz-border-radius: 4px;
-webkit-border-radius: 3px; -webkit-border-radius: 4px;
-o-border-radius: 3px; -o-border-radius: 4px;
-ms-border-radius: 3px; -ms-border-radius: 4px;
-khtml-border-radius: 3px; -khtml-border-radius: 4px;
border-radius: 3px; border-radius: 4px;
height: 28px; height: 25px;
color: #666; color: #444;
line-height: 28px; line-height: 26px;
padding: 0px 0px 0px 8px; padding: 0px 0px 0px 8px;
position: relative; position: relative;
text-decoration: none; text-decoration: none;
z-index: 19; z-index: 19;
white-space: nowrap; white-space: nowrap;
} }
/* line 35, sass/chosen.scss */
div.chzn-container a.chzn-single span { div.chzn-container a.chzn-single span {
display: block; display: block;
margin-right: 26px; margin-right: 26px;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
} }
/* line 41, sass/chosen.scss */
div.chzn-container a.chzn-single div { div.chzn-container a.chzn-single div {
-moz-border-radius-topright: 2px; -moz-border-radius-topright: 4px;
-webkit-border-top-right-radius: 2px; -webkit-border-top-right-radius: 4px;
-o-border-top-right-radius: 2px; -o-border-top-right-radius: 4px;
-ms-border-top-right-radius: 2px; -ms-border-top-right-radius: 4px;
-khtml-border-top-right-radius: 2px; -khtml-border-top-right-radius: 4px;
border-top-right-radius: 2px; border-top-right-radius: 4px;
-moz-border-radius-bottomright: 2px; -moz-border-radius-bottomright: 4px;
-webkit-border-bottom-right-radius: 2px; -webkit-border-bottom-right-radius: 42px;
-o-border-bottom-right-radius: 2px; -o-border-bottom-right-radius: 4px;
-ms-border-bottom-right-radius: 2px; -ms-border-bottom-right-radius: 4px;
-khtml-border-bottom-right-radius: 2px; -khtml-border-bottom-right-radius: 4px;
border-bottom-right-radius: 2px; border-bottom-right-radius: 4px;
background: #EEE; background: #ccc;
background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0, white), color-stop(0.5, #eeeeee)); background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0, #ccc), color-stop(0.6, #eee));
background-image: -moz-linear-gradient(center bottom, white 0%, #eeeeee 50%); background-image: -moz-linear-gradient(center bottom, #ccc 0%, #eee 60%);
border-left: 1px solid #BBB; border-left: 1px solid #aaa;
display: block; display: block;
height: 100%; height: 100%;
position: absolute; position: absolute;
@ -96,35 +103,33 @@ div.chzn-container a.chzn-single div {
top: 0; top: 0;
width: 18px; width: 18px;
} }
/* line 53, sass/chosen.scss */
div.chzn-container a.chzn-single div b { div.chzn-container a.chzn-single div b {
background: url('chosen-arrows.png') no-repeat left center; background: url('chosen-sprite.png') no-repeat 0 1px;
display: block; display: block;
width: 100%; width: 100%;
height: 100%; height: 100%;
} }
/* line 62, sass/chosen.scss */
div.chzn-container div.chzn-search { div.chzn-container div.chzn-search {
padding: 4px 3px; padding: 3px 4px;
margin: 0px; margin: 0px;
white-space: nowrap; white-space: nowrap;
} }
/* line 66, sass/chosen.scss */
div.chzn-container div.chzn-search input { div.chzn-container div.chzn-search input {
padding: 0 3px; background: url('chosen-sprite.png') no-repeat 97% -35px, #ffffff;
background: url('chosen-sprite.png') no-repeat 97% -35px, -webkit-gradient(linear, left bottom, left top, color-stop(0.85, white), color-stop(0.99, #eeeeee));
background: url('chosen-sprite.png') no-repeat 97% -35px, -moz-linear-gradient(center bottom, white 85%, #eeeeee 99%);
-moz-border-radius: 0px; -moz-border-radius: 0px;
-webkit-border-radius: 0px; -webkit-border-radius: 0px;
-o-border-radius: 0px; -o-border-radius: 0px;
-ms-border-radius: 0px; -ms-border-radius: 0px;
-khtml-border-radius: 0px; -khtml-border-radius: 0px;
border-radius: 0px; border-radius: 0px;
color: #666;
background: transparent !important;
padding: 5px;
margin: 1px 0; margin: 1px 0;
outline: 0; outline: 0;
} }
/* line 78, sass/chosen.scss */
/* Multi */
div.chzn-container ul.chzn-choices { div.chzn-container ul.chzn-choices {
background: #fff; background: #fff;
background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0.85, white), color-stop(0.99, #eeeeee)); background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0.85, white), color-stop(0.99, #eeeeee));
@ -137,30 +142,23 @@ div.chzn-container ul.chzn-choices {
height: 1%; height: 1%;
padding: 0; padding: 0;
position: relative; position: relative;
-moz-border-radius: 3px;
-webkit-border-radius: 3px;
border-radius: 3px;
} }
/* line 93, sass/chosen.scss */
div.chzn-container ul.chzn-choices:focus { div.chzn-container ul.chzn-choices:focus {
border-color: #058cf5; border-color: #058cf5;
-moz-box-shadow: 0px 0px 5px #999; -moz-box-shadow: 0px 0px 5px #999;
-webkit-box-shadow: 0px 0px 5px #999; -webkit-box-shadow: 0px 0px 5px #999;
box-shadow: 0px 0px 5px #999; box-shadow: 0px 0px 5px #999;
} }
/* line 99, sass/chosen.scss */
div.chzn-container ul.chzn-choices li { div.chzn-container ul.chzn-choices li {
float: left; float: left;
list-style-type: none; list-style-type: none;
margin: 0px; margin: 0px;
} }
/* line 103, sass/chosen.scss */
div.chzn-container ul.chzn-choices li.search-field { div.chzn-container ul.chzn-choices li.search-field {
margin: 0px; margin: 0px;
white-space: nowrap; white-space: nowrap;
padding: 0px; padding: 0px;
} }
/* line 107, sass/chosen.scss */
div.chzn-container ul.chzn-choices li.search-field input { div.chzn-container ul.chzn-choices li.search-field input {
color: #666; color: #666;
background: transparent !important; background: transparent !important;
@ -172,119 +170,116 @@ div.chzn-container ul.chzn-choices li.search-field input {
-moz-box-shadow: none; -moz-box-shadow: none;
box-shadow: none; box-shadow: none;
} }
/* line 118, sass/chosen.scss */
div.chzn-container ul.chzn-choices li.search-field input.default { div.chzn-container ul.chzn-choices li.search-field input.default {
color: #999; color: #999;
} }
/* line 123, sass/chosen.scss */
div.chzn-container ul.chzn-choices li.search-choice { div.chzn-container ul.chzn-choices li.search-choice {
-moz-border-radius: 3px; -moz-border-radius: 3px;
-webkit-border-radius: 3px; -webkit-border-radius: 3px;
border-radius: 3px; border-radius: 3px;
background: #e6f0f8; background: #e4e4e4;
background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0, #dae8f3), color-stop(0.9, #e9f2fa)); background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0, #e4e4e4), color-stop(0.7, #eeeeee));
background-image: -moz-linear-gradient(center bottom, #dae8f3 0%, #e9f2fa 90%); background-image: -moz-linear-gradient(center bottom, #e4e4e4 0%, #eeeeee 70%);
color: #333; color: #333;
border: 1px solid #b3c9db; border: 1px solid #b4b4b4;
font-weight: bold;
line-height: 13px; line-height: 13px;
padding: 3px 18px 3px 6px; padding: 3px 19px 3px 6px;
position: relative; position: relative;
margin: 3px 0px 3px 5px; margin: 3px 0px 3px 5px;
text-shadow: 0px 1px 0px #e9f2fa;
} }
/* line 138, sass/chosen.scss */
div.chzn-container ul.chzn-choices li.search-choice span { div.chzn-container ul.chzn-choices li.search-choice span {
cursor: default; cursor: default;
} }
/* line 141, sass/chosen.scss */
div.chzn-container ul.chzn-choices li.search-choice.search-choice-focus { div.chzn-container ul.chzn-choices li.search-choice.search-choice-focus {
background: #DDD; background: #d4d4d4;
} }
/* line 144, sass/chosen.scss */
div.chzn-container ul.chzn-choices li.search-choice a.search-choice-close { div.chzn-container ul.chzn-choices li.search-choice a.search-choice-close {
position: absolute; position: absolute;
right: 4px; right: 5px;
top: 6px; top: 6px;
display: block; display: block;
width: 8px; width: 8px;
height: 9px; height: 9px;
font-size: 1px; font-size: 1px;
background: url(chosen-close.png) no-repeat; background: url(chosen-sprite.png) right top no-repeat;
} }
/* line 153, sass/chosen.scss */
div.chzn-container ul.chzn-choices li.search-choice a.search-choice-close:hover { div.chzn-container ul.chzn-choices li.search-choice a.search-choice-close:hover {
background-position: 0 -9px; background-position: right -9px;
} }
/* line 161, sass/chosen.scss */ div.chzn-container ul.chzn-choices li.search-choice.search-choice-focus a.search-choice-close {
background-position: right -9px;
}
/* Results */
div.chzn-container ul.chzn-results { div.chzn-container ul.chzn-results {
margin: 0; margin: 0 4px 4px 0;
max-height: 196px; max-height: 190px;
padding: 0; padding: 0 0 0 4px;
position: relative; position: relative;
overflow-x: hidden; overflow-x: hidden;
overflow-y: auto; overflow-y: auto;
z-index: 20; z-index: 20;
} }
/* line 169, sass/chosen.scss */ div.chzn-container-multi ul.chzn-results {
margin: -1px 0 0;
padding: 0;
}
div.chzn-container-multi ul.chzn-results li {
border-left: 0px !important;
border-right: 0px !important;
}
div.chzn-container ul.chzn-results li { div.chzn-container ul.chzn-results li {
padding: 7px 10px; line-height: 80%;
padding: 7px 7px 8px;
z-index: 22; z-index: 22;
margin: 0; margin: 0;
list-style-type: none; list-style-type: none;
} }
/* line 174, sass/chosen.scss */
div.chzn-container ul.chzn-results li.active-result { div.chzn-container ul.chzn-results li.active-result {
cursor: pointer; cursor: pointer;
} }
/* line 177, sass/chosen.scss */
div.chzn-container ul.chzn-results li em { div.chzn-container ul.chzn-results li em {
font-weight: bold;
font-style: normal; font-style: normal;
background: #FEFFDC; background: #FEFFDC;
} }
/* line 182, sass/chosen.scss */
div.chzn-container ul.chzn-results li.highlighted { div.chzn-container ul.chzn-results li.highlighted {
background: #066bb9; background: #3875d7;
background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0, #066bb9), color-stop(0.5, #2482cb));
background-image: -moz-linear-gradient(center bottom, #066bb9 0%, #2482cb 70%);
color: #fff; color: #fff;
} }
/* line 187, sass/chosen.scss */
div.chzn-container ul.chzn-results li.highlighted em { div.chzn-container ul.chzn-results li.highlighted em {
color: #066bb9; background: transparent;
} }
/* line 191, sass/chosen.scss */
div.chzn-container ul.chzn-results li.no-results { div.chzn-container ul.chzn-results li.no-results {
background: #F4F4F4; background: #F4F4F4;
} }
/* line 194, sass/chosen.scss */
div.chzn-container ul.chzn-results li.group-result { div.chzn-container ul.chzn-results li.group-result {
cursor: default; cursor: default;
color: #999; color: #999;
font-weight: bold; font-weight: bold;
} }
/* line 199, sass/chosen.scss */
div.chzn-container ul.chzn-results li.group-option { div.chzn-container ul.chzn-results li.group-option {
padding-left: 20px; padding-left: 20px;
} }
/* line 213, sass/chosen.scss */
div.chzn-container-multi div.chzn-drop li.result-selected { div.chzn-container-multi div.chzn-drop li.result-selected {
display: none; display: none;
} }
/* line 218, sass/chosen.scss */
/* Active */
div.chzn-container-active a.chzn-single { div.chzn-container-active a.chzn-single {
border-color: #058cf5; -webkit-box-shadow: 0px 0px 5px rgba(0, 0, 0, 0.3);
-moz-box-shadow: 0px 0px 5px #999; -moz-box-shadow: 0px 0px 5px rgba(0, 0, 0, 0.3);
-webkit-box-shadow: 0px 0px 5px #999; box-shadow: 0px 0px 5px rgba(0, 0, 0, 0.3);
box-shadow: 0px 0px 5px #999; border: 1px solid #5897fb;
} }
/* line 224, sass/chosen.scss */
div.chzn-container-active a.chzn-single-with-drop { div.chzn-container-active a.chzn-single-with-drop {
border: 1px solid #BBB; border: 1px solid #aaa;
border-width: 1px 1px 1px; border-width: 1px 1px 1px;
-moz-box-shadow: 0px 1px 0px #FFF inset;
-webkit-box-shadow: 0px 1px 0px #FFF inset;
box-shadow: 0px 1px 0px #FFF inset; box-shadow: 0px 1px 0px #FFF inset;
background: #EEE; background: #EEE;
background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0, white), color-stop(0.5, #eeeeee)); background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0, white), color-stop(0.5, #eeeeee));
@ -296,24 +291,20 @@ div.chzn-container-active a.chzn-single-with-drop {
border-bottom-left-radius: 0px; border-bottom-left-radius: 0px;
border-bottom-right-radius: 0px; border-bottom-right-radius: 0px;
} }
/* line 237, sass/chosen.scss */
div.chzn-container-active a.chzn-single-with-drop div { div.chzn-container-active a.chzn-single-with-drop div {
background: transparent; background: transparent;
border-left: none; border-left: none;
} }
/* line 240, sass/chosen.scss */
div.chzn-container-active a.chzn-single-with-drop div b { div.chzn-container-active a.chzn-single-with-drop div b {
background-position: right center; background-position: -18px 1px;
} }
/* line 245, sass/chosen.scss */
div.chzn-container-active ul.chzn-choices { div.chzn-container-active ul.chzn-choices {
z-index: 21; z-index: 21;
border-color: #058cf5; -webkit-box-shadow: 0px 0px 5px rgba(0, 0, 0, 0.3);
-moz-box-shadow: 0px 0px 5px #999; -moz-box-shadow: 0px 0px 5px rgba(0, 0, 0, 0.3);
-webkit-box-shadow: 0px 0px 5px #999; box-shadow: 0px 0px 5px rgba(0, 0, 0, 0.3);
box-shadow: 0px 0px 5px #999; border: 1px solid #5897fb;
} }
/* line 247, sass/chosen.scss */
div.chzn-container-active ul.chzn-choices input { div.chzn-container-active ul.chzn-choices input {
color: #111 !important; color: #111 !important;
} }

View File

@ -96,7 +96,7 @@ Chosen.prototype = {
if( !this.is_multiple ){ if( !this.is_multiple ){
this.search_container = this.container.down('div.chzn-search'); this.search_container = this.container.down('div.chzn-search');
this.selected_item = this.container.down('.chzn-single'); this.selected_item = this.container.down('.chzn-single');
var sf_width = (dd_width - get_side_border_padding(this.search_container) - get_side_border_padding(this.search_field)); var sf_width = (dd_width - get_side_border_padding(this.search_container));
this.search_field.setStyle( {"width" : sf_width + "px"} ); this.search_field.setStyle( {"width" : sf_width + "px"} );
} }
else{ else{
@ -274,6 +274,9 @@ Chosen.prototype = {
this.search_choices.select("li.search-choice").invoke("remove"); this.search_choices.select("li.search-choice").invoke("remove");
this.choices = 0; this.choices = 0;
} }
else if( !this.is_multiple ){
this.selected_item.down("span").update(this.default_text);
}
var i, content=''; var i, content='';
for( i = 0; i<this.results_data.length; i++){ for( i = 0; i<this.results_data.length; i++){
@ -293,6 +296,7 @@ Chosen.prototype = {
results_update_field: function(){ results_update_field: function(){
this.result_clear_highlight(); this.result_clear_highlight();
this.result_single_selected = null;
this.results_build(); this.results_build();
}, },
@ -334,10 +338,8 @@ Chosen.prototype = {
else if( high_top < visible_top ){ this.search_results.scrollTop = high_top; } else if( high_top < visible_top ){ this.search_results.scrollTop = high_top; }
}, },
result_clear_highlight: function(){ result_clear_highlight: function(){
if( this.result_highlight ){ if( this.result_highlight ){ this.result_highlight.removeClassName('highlighted'); }
this.result_highlight.removeClassName('highlighted'); this.result_highlight = null;
this.result_highlight = null;
}
}, },
result_select: function(){ result_select: function(){