summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDries Buytaert2010-01-06 19:01:43 (GMT)
committerDries Buytaert2010-01-06 19:01:43 (GMT)
commitda4c58c010e80e51881e004136322c97a5739f8c (patch)
tree9b331f988bc637f9f521c74d26ec4fd79dd2ce61
parent8a07a7895cc509f6cf850c9ebfeb8c3ca6182614 (diff)
- Patch #667074 by casey, Kiphaas7, David_Rothstein: the spinner's visibility can be defined in CSS rather than JS.
-rw-r--r--modules/overlay/overlay-parent.css4
-rw-r--r--modules/overlay/overlay-parent.js10
2 files changed, 8 insertions, 6 deletions
diff --git a/modules/overlay/overlay-parent.css b/modules/overlay/overlay-parent.css
index 0cbfc6d..99f18eb 100644
--- a/modules/overlay/overlay-parent.css
+++ b/modules/overlay/overlay-parent.css
@@ -97,6 +97,10 @@ body.overlay-autofit {
overflow: hidden;
width: 100%;
height: 100%;
+ visibility: hidden;
+}
+.overlay-loaded #overlay-element {
+ visibility: visible;
}
/**
diff --git a/modules/overlay/overlay-parent.js b/modules/overlay/overlay-parent.js
index b2f0b16..1cb4f03 100644
--- a/modules/overlay/overlay-parent.js
+++ b/modules/overlay/overlay-parent.js
@@ -283,19 +283,17 @@ Drupal.overlay.load = function (url) {
// Change the overlay title.
self.$container.dialog('option', 'title', Drupal.t('Loading...'));
- // When a new overlay is opened and loaded, we add a loaded class to the
- // dialog. The loaded class is not removed and added back again while
- // switching between pages with the overlay already open, due to
- // performance issues (see http://drupal.org/node/615130).
+ // While the overlay is loading, we remove the loaded class from the dialog.
+ // After the loading is finished, the loaded class is added back. The loaded
+ // class is being used to hide the iframe while loading.
+ // @see overlay-parent.css .overlay-loaded #overlay-element
self.$dialog.removeClass('overlay-loaded');
self.$iframe
- .css('visibility', 'hidden')
.bind('load.overlay-event', function () {
self.isLoading = false;
// Only continue when overlay is still open and not closing.
if (self.isOpen && !self.isClosing) {
- self.$iframe.css('visibility', '');
self.$dialog.addClass('overlay-loaded');
}
else {