As the animation ( loading.gif ) is assigend to the dialog-wrapper ( wrapper of the iframe ) and never removed, it is shown even after the dialog finishing his loading-process.

this patch adds a new lass ui-dialog-loading ..where the animation has moved to...this class gets removed after the dialog binds to the parent..so finished loading.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

markus_petrux’s picture

Status: Reviewed & tested by the community » Needs work

hmm... the background of the iframe wrapper is not visible when the iframe is loaded, so I do not see the need for this patch.

If it was to be applied, then we may also need to add the class when a new page is loaded inside the modal frame dialog. Still, I do not see the need for this patch. Could you please elaborate?

EugenMayer’s picture

it IS visible :)

It will mostly depend on the browser. here on FF 3.0.14 it is visible on top of the dialog..which current should be what i have expected, as the iframe is wrapped into it.

This patch is simply fixing this bug..it is not enaugh telling, it could not be vissble. I dont want to think about what IE6 might do with this.

markus_petrux’s picture

LOL, if it was visible I think I would have noticed it. :)

In fact, I coded it like this because I wanted to provide a slight animation when the content of the iframe is shown or hidden. Note the iframe element is hidden while loading, and it is made visible using a fadeIn() animation in bindChild() method.

The iframe itself and the iframe wrapper are resized dynamically so they both have the same dimensions. If the document loaded within the iframe is not transparent, it overlaps the loading icon in the iframe wrapper background, so there should not be an issue as far as the child document is not transparent.

You'll be able to see what I mean using Firebug extension.

I also tested this in FF (I'm now using 3.5.3), Opera 9 and 10, IE6, IE7 and IE8, and I haven't seen any problems with the loading icon... so if the loading icon is visible for you, then I would guess there's something not usual in your case.

Is it possible that your child documents are transparent? If not, then I would like to understand what's happening in your case, why the loading icon is visible when the child document is not transparent?

EugenMayer’s picture

Yes the background of the body of the iframe is transparent or more specific, there is no background set. This is quite common.

I cant seen why the animation should be shown, if it should not be visible.

Iam currently rewriting main parts of the module, as also buttons integration is missing..the way options are implemented is quite unhandy(i cant see why you dont use jquery.expand)..and stuff. I will give you a patch when iam done in a different.

But this is a different issue, i will open a task on this

markus_petrux’s picture

Category: bug » feature
Status: Needs work » Closed (won't fix)

1) So it's a theme issue, so far so good. Then this is not a bug report, but a feature request.

2) I do not like the idea to change the way this module works in regards to the loading animation, specially without a reason (not just a theme issue that you can fix yourself). This is a modal dialog and its contents should overlap the whole region of the parent window. This is something that you can fix in the theme layer, please redefine the proper CSS classes used by modalframe to fit your theme look and feel. Hence, this f.r. is won't fix.

3) I do not know what jquery.expand is, and I feel I just need jQuery core and jQuery UI here. Nothing more and nothing less. That's why I do not use it, whatever it is. :)

4) I'm fine if you do not like how this module has been coded, maybe you can find something else that better fits your needs. AFAICT no one forces you to use it, or use it as-is. This is open source and you can do whatever you wish with the code. I don't care. ;-)

mbutcher’s picture

FileSize
638 bytes

I'm becoming a huge fan of this module. I've wasted countless hours on other similar modules, and with modalframe I've gotten things done in a fraction of the time. At Palantir.net, it's likely that we will start using this module on all of our sites.

This one issue is causing us grief, though. Granted, this is a tiny issue, and is not a huge deal. But I think it should be fixed, as it does introduced unanticipated (and basically hard to correct) behavior into the code. If I don't have access to change the background color of the content loaded into the iframe, this bug is really distracting.

This is a bug because:

a) modalframe introduces the behavior.
b) it is not desirable to have an active progress bar *anywhere* after the load. The whole idea of a progress meter is to display it only when something is in progress.
c) it eats memory needlessly (the throbber still is on the active thread in the browser)
d) it cannot be themed out because there are no callbacks from load() in parent.js. Thus, there is no easy way to display the loading status only during load, and then get rid of it when load is done.

Here's a simple one-line patch that gets rid of the issue. EugenMayer's patch is actually cleaner because it gives themers more control, and I'd be perfectly happy if you applied that or some variant of it.

Again, thanks for the module. We've had tremendous success with it.

Matt

markus_petrux’s picture

Status: Closed (won't fix) » Fixed

Ok, I have committed a patch using a slightly different approach.

http://drupal.org/cvs?commit=306178

The stylesheets for the parent include the following class:

#modalframe-container.modalframe-loaded {
  background: none;
}

Then, addClass('modalframe-loaded') is applied to the iframe container as soon as the child document has been completely loaded, and removeClass('modalframe-loaded') is applied from unbindChild() method, which is invoked from the child when the document is unloaded (the unbindChild() method needs onBeforeUnload API, as it happened before).

I think this patch will cover this issue. Please, re-open if you still find troubles with this. Thanks!

markus_petrux’s picture

Title: Loading-Animation is show, eventhough the dialog has been loaded » Hide loading animation as soon as the child document is loaded, restore the animation on page transitions

Better title.

arunms’s picture

Version: 6.x-1.4 » 6.x-1.x-dev
Status: Fixed » Active
FileSize
12.76 KB

Still having the same issue. It seemed to work with Jquery 1.2, Jquery UI 1.6 and the patch provided in #6. But I had to upgrade to Jquery 1.3, Jquery UI 1.7 for a different reason and it is broken again. Now, none of the patches would fix the issue.

markus_petrux’s picture

Status: Active » Fixed

@arunms: The patch in #6 has not been applied to CVS, but a different method, as described out in #7. I'm using a CSS class now that overrides the background property of the modalframe container style, and this is something that does not depend on jQuery/jQuery UI versions. In fact, I'm using jQuery 1.3.x + jQuery UI 1.7.x to develop and it works like a charm.

I'm think your issue is a different thing. Please, open a separate issue describing which problem you see and a step by step method to reproduce. Thanks

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.