Commit da4c58c0 authored by Dries's avatar Dries

- Patch #667074 by casey, Kiphaas7, David_Rothstein: the spinner's visibility...

- Patch #667074 by casey, Kiphaas7, David_Rothstein: the spinner's visibility can be defined in CSS rather than JS.
parent 8a07a789
......@@ -97,6 +97,10 @@ body.overlay-autofit {
overflow: hidden;
width: 100%;
height: 100%;
visibility: hidden;
.overlay-loaded #overlay-element {
visibility: visible;
......@@ -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
// 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
.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', '');
else {
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment