Merge pull request #535 from halkyon/chosen_allow_deselect

BUGFIX #7394: Allow unselect dropdowns in chosen if there's an empty option
This commit is contained in:
Sam Minnée 2012-06-14 19:38:31 -07:00
commit 0004b1a4c4

View File

@ -22,7 +22,9 @@ jQuery.noConflict();
// with css applied and got a width value.
var applyChosen = function(el){
if(el.outerWidth()){
el.chosen().addClass("has-chzn");
el.chosen({
'allow_single_deselect': true
}).addClass("has-chzn");
// Copy over title attribute if required
if(el.attr('title')) el.siblings('.chzn-container').attr('title', el.attr('title'));
} else {