diff options
author | Angie Byron <webchick@24967.no-reply.drupal.org> | 2010-03-07 06:31:48 +0000 |
---|---|---|
committer | Angie Byron <webchick@24967.no-reply.drupal.org> | 2010-03-07 06:31:48 +0000 |
commit | 6eb529d37d28c2f332cd29fbc1d3b8a74c90b55a (patch) | |
tree | 0ae2cc462fb085b8a6181ca19d5822a4e85604c1 /modules | |
parent | 9ea09ace775c67e8a7d6bae8d49d8ac6e38b8220 (diff) | |
download | brdo-6eb529d37d28c2f332cd29fbc1d3b8a74c90b55a.tar.gz brdo-6eb529d37d28c2f332cd29fbc1d3b8a74c90b55a.tar.bz2 |
#684610 by Jacine: Fixed IE bug: No table-striping in Seven.
Diffstat (limited to 'modules')
-rw-r--r-- | modules/overlay/overlay-parent.css | 7 | ||||
-rw-r--r-- | modules/overlay/overlay-parent.js | 31 | ||||
-rw-r--r-- | modules/overlay/overlay.module | 3 |
3 files changed, 16 insertions, 25 deletions
diff --git a/modules/overlay/overlay-parent.css b/modules/overlay/overlay-parent.css index e9cc0cc2c..edb1d4ef9 100644 --- a/modules/overlay/overlay-parent.css +++ b/modules/overlay/overlay-parent.css @@ -88,19 +88,12 @@ body.overlay-autofit { padding: 0; width: 100%; overflow: visible; - background: #fff url(images/loading.gif) no-repeat 50% 50%; -} -.overlay-loaded #overlay-container { background: #fff; } .overlay #overlay-element { overflow: hidden; width: 100%; height: 100%; - display: none; -} -.overlay-loaded #overlay-element { - display: block; } /** diff --git a/modules/overlay/overlay-parent.js b/modules/overlay/overlay-parent.js index 02fa8ab51..78efe9088 100644 --- a/modules/overlay/overlay-parent.js +++ b/modules/overlay/overlay-parent.js @@ -277,10 +277,6 @@ Drupal.overlay.load = function (url) { self.$iframeDocument = null; self.$iframeBody = null; - // Reset lastHeight so the overlay fits user's viewport and the loading - // spinner is centered. - self.lastHeight = 0; - self.outerResize(); // No need to resize while loading. clearTimeout(self.resizeTimeoutID); @@ -594,26 +590,25 @@ Drupal.overlay.isAdminLink = function (url) { * Note, though, that the size of the iframe itself may affect the size of the * child document, especially on fluid layouts. */ -Drupal.overlay.innerResize = function () { +Drupal.overlay.innerResize = function (height) { var self = Drupal.overlay; // Proceed only if the dialog still exists. - if (!self.isOpen || self.isClosing || self.isLoading) { + if (!self.isOpen || self.isClosing) { return; } - var height; - // Only set height when iframe content is loaded. - if ($.isObject(self.$iframeBody)) { + // When no height is given try to get height when iframe content is loaded. + if (!height && $.isObject(self.$iframeBody)) { height = self.$iframeBody.outerHeight() + 25; - - // Only resize when height actually is changed. - if (height != self.lastHeight) { - - // Resize the container. - self.$container.height(height); - // Keep the dim background grow or shrink with the dialog. - $.ui.dialog.overlay.resize(); - } + } + + // Only resize when height actually is changed. + if (height && height != self.lastHeight) { + // Resize the container. + self.$container.height(height); + // Keep the dim background grow or shrink with the dialog. + $.ui.dialog.overlay.resize(); + self.lastHeight = height; } }; diff --git a/modules/overlay/overlay.module b/modules/overlay/overlay.module index fc44f2ef0..6212ae0f1 100644 --- a/modules/overlay/overlay.module +++ b/modules/overlay/overlay.module @@ -462,6 +462,9 @@ function overlay_set_mode($mode = NULL) { case 'child': drupal_add_library('overlay', 'child'); + // Pass child's document height on to parent document as quickly as + // possible so it can be updated accordingly. + drupal_add_js('if (jQuery.isObject(parent.Drupal) && jQuery.isObject(parent.Drupal.overlay)) { parent.Drupal.overlay.innerResize(jQuery(document.body).outerHeight()); }', array('type' => 'inline', 'scope' => 'footer')); // Allow modules to act upon overlay events. module_invoke_all('overlay_child_initialize'); |