"Insert Media" dialog: Prevent loading indicator in IE8+

Fixes https://github.com/silverstripe/silverstripe-cms/issues/782
This commit is contained in:
Ingo Schommer 2013-06-24 17:14:32 +02:00
parent 8c9ef8feb9
commit 1046530ff6

View File

@ -153,7 +153,7 @@
iframe.bind('load', function(e) { iframe.bind('load', function(e) {
if($(this).attr('src') == 'about:blank') return; if($(this).attr('src') == 'about:blank') return;
$(this).show(); iframe.addClass('loaded').show(); // more reliable than 'src' attr check (in IE)
self._resizeIframe(); self._resizeIframe();
self.uiDialog.removeClass('loading'); self.uiDialog.removeClass('loading');
}).hide(); }).hide();
@ -170,7 +170,7 @@
var self = this, iframe = this.element.children('iframe'); var self = this, iframe = this.element.children('iframe');
// Load iframe // Load iframe
if(!iframe.attr('src') || this.options.reloadOnOpen) { if(this.options.iframeUrl && (!iframe.hasClass('loaded') || this.options.reloadOnOpen)) {
iframe.hide(); iframe.hide();
iframe.attr('src', this.options.iframeUrl); iframe.attr('src', this.options.iframeUrl);
this.uiDialog.addClass('loading'); this.uiDialog.addClass('loading');