mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
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:
commit
0004b1a4c4
@ -22,7 +22,9 @@ jQuery.noConflict();
|
|||||||
// with css applied and got a width value.
|
// with css applied and got a width value.
|
||||||
var applyChosen = function(el){
|
var applyChosen = function(el){
|
||||||
if(el.outerWidth()){
|
if(el.outerWidth()){
|
||||||
el.chosen().addClass("has-chzn");
|
el.chosen({
|
||||||
|
'allow_single_deselect': true
|
||||||
|
}).addClass("has-chzn");
|
||||||
// Copy over title attribute if required
|
// Copy over title attribute if required
|
||||||
if(el.attr('title')) el.siblings('.chzn-container').attr('title', el.attr('title'));
|
if(el.attr('title')) el.siblings('.chzn-container').attr('title', el.attr('title'));
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user