MINOR Only disable chosen.js placeholder if no custom one exists

This commit is contained in:
Ingo Schommer 2012-03-05 16:26:28 +01:00
parent 2abb021efb
commit 94d985e0c4

View File

@ -367,7 +367,11 @@ jQuery.noConflict();
onmatch: function() {
if(this.is('.no-chzn')) return;
this.data('placeholder', ' ').chosen().addClass("has-chzn");
// Explicitly disable default placeholder if no custom one is defined
if(!this.data('placeholder')) this.data('placeholder', ' ');
// Apply chosen
this.chosen().addClass("has-chzn");
this._super();
}