mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
BUGFIX fix the field generated by choser with 0 width in an iFrame popup
This commit is contained in:
parent
a95b11d004
commit
7a27832297
@ -18,6 +18,16 @@ jQuery.noConflict();
|
||||
spinner.show();
|
||||
};
|
||||
|
||||
// apply an select element only when it is ready, ie. when it is rendered into a template
|
||||
// with css applied and got a width value.
|
||||
var applyChosen = function(el){
|
||||
if(el.outerWidth()){
|
||||
el.chosen().addClass("has-chzn");
|
||||
} else {
|
||||
setTimeout(function() {applyChosen(el);},500);
|
||||
}
|
||||
};
|
||||
|
||||
$(window).bind('resize', positionLoadingSpinner).trigger('resize');
|
||||
|
||||
// global ajax error handlers
|
||||
@ -456,8 +466,8 @@ jQuery.noConflict();
|
||||
// Explicitly disable default placeholder if no custom one is defined
|
||||
if(!this.data('placeholder')) this.data('placeholder', ' ');
|
||||
|
||||
// Apply chosen
|
||||
this.chosen().addClass("has-chzn");
|
||||
// Apply Chosen
|
||||
applyChosen(this);
|
||||
|
||||
this._super();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user