#659486 by Kiphaas7 and xmacinfo: Add back the 'loading' image to the Overlay in a way that does not kill performance.
parent
e14a263914
commit
c3080a0401
|
@ -67,10 +67,14 @@
|
|||
margin: 0;
|
||||
padding: 0;
|
||||
overflow: visible;
|
||||
background: #fff url(images/loading.gif) no-repeat 50% 50%;
|
||||
-webkit-box-shadow: 8px 8px 8px rgba(0,0,0,.5);
|
||||
-moz-box-shadow: 8px 8px 8px rgba(0,0,0,.5);
|
||||
box-shadow: 8px 8px 8px rgba(0,0,0,.5);
|
||||
}
|
||||
.overlay-loaded #overlay-container {
|
||||
background: none;
|
||||
}
|
||||
.overlay #overlay-element {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
|
|
@ -254,6 +254,12 @@ Drupal.overlay.create = function () {
|
|||
Drupal.overlay.load = function (url) {
|
||||
var self = this;
|
||||
var iframe = self.iframe.$element.get(0);
|
||||
|
||||
// Add a loaded class to the overlay once the iframe is loaded.
|
||||
$(iframe).load(function () {
|
||||
$('.overlay').addClass('overlay-loaded');
|
||||
});
|
||||
|
||||
// Get the document object of the iframe window.
|
||||
// @see http://xkr.us/articles/dom/iframe-document/
|
||||
var doc = (iframe.contentWindow || iframe.contentDocument);
|
||||
|
|
Loading…
Reference in New Issue