summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAngie Byron2009-12-15 05:28:59 (GMT)
committerAngie Byron2009-12-15 05:28:59 (GMT)
commitc3080a04019a7c15ad5bb47634be15aae97240d7 (patch)
tree6595513d77ebbae1532108ebc94926cce099a0f6
parente14a263914c5c78aac0f8f723be5b66328991f0e (diff)
#659486 by Kiphaas7 and xmacinfo: Add back the 'loading' image to the Overlay in a way that does not kill performance.
-rw-r--r--modules/overlay/overlay-parent.css4
-rw-r--r--modules/overlay/overlay-parent.js6
2 files changed, 10 insertions, 0 deletions
diff --git a/modules/overlay/overlay-parent.css b/modules/overlay/overlay-parent.css
index 115977b..7095976 100644
--- a/modules/overlay/overlay-parent.css
+++ b/modules/overlay/overlay-parent.css
@@ -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;
}
diff --git a/modules/overlay/overlay-parent.js b/modules/overlay/overlay-parent.js
index 88dd43a..c79276f 100644
--- a/modules/overlay/overlay-parent.js
+++ b/modules/overlay/overlay-parent.js
@@ -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);