[dev] [patch] enhancement: redbox loading animation on login

Jan Schneider jan at horde.org
Tue Sep 4 08:52:09 UTC 2007


Zitat von Sönke Schwardt <schwardt at univention.de>:

> Am Donnerstag 30 August 2007 20:21 schrieb Chuck Hagenbuch:
>> Quoting Sönke Schwardt <schwardt at univention.de>:
>> > We experienced a long delay while login resp while loading the
>> > frameset. During this time the browser window is empty and the user has
>> > no idea what happens next. Especially with a huge amount of folders the
>> > sidebar takes quite some time to load.
>> > So the attached patch adds some eye candy while login. The first
>> > (smaller) part of this patch add RedBox.loading() after pressing login
>> > button on login form.
>> > Using RedBox.loading() within frameset file was not that easy so we
>> > replaced the contents of the two frames with a special preloader page.
>> > This page contains an IFrame filling the whole frame and calls
>> > RedBox.loading() right after loading the preload page has been finished
>> > but before the IFrame has been loaded. If the IFrame content is complete
>> > the RedBox animation is stopped.
>> > We testet it with Firefox 2, IE6 and IE7. Maybe the code requires some
>> > adjustment for other browsers. Would be nice if the patch (or a successor
>> > of it) mades it into CVS.
>>
>> I think it's a fine idea to show the loading... on submitting the
>> login form, but this seems really complex just to hide the sidebar.
>> Why not just show it in the frame the login form is in (if the login
>> form is even in a frame, which it isn't necessarily)?
>
> the "loading..." on login form is displayed until the server sends the html
> containing the horde frameset. That normally takes only one or two seconds.
> Loading the content for the frames of the new frameset takes up to 20 seconds
> (depending on server power and number of folders).
> Placing the "loading..." within the html of the sidebar (or start  
> page) is not
> an option because the server sends the html only as a whole. The user
> wouldn't see anything for 20 seconds and then the animation occurs for about
> a second (page/image transfer and rendering time).
> If I'm right it is not possible to place javascript within the frameset html
> and place an overlay over the two frames (sidebar and main frame). Most
> (all?) browsers refuse to do that because of anti phishing/security reasons.
>
> But yes, it gets more complex but we tried to keep it as simple as possible.
> Maybe there is an easier way to get to the same result. Ideas?

The solution is to load the resource intensive parts in the  
background. It probably the easiest to do with the portal since the  
portal blocks already allow re-loading in the background.
It's harder with Horde_Tree since it doesn't allow updates in the  
background yet.

> For those who don't like those animations:
> It's not that hard to add some lines to switch them off by a config  
> option. We
> experienced that users like that animation and know that it could take some
> extra time.
>
>  Sönke
> --
> ** Besuchen Sie uns auf der Systems vom 23.-26. Oktober 2007 in München **
>    ** Themenpark "Perspektive Open Source" - Halle B2 - Stand 110-17 **
>
> Sönke Schwardt          Entwicklung               schwardt at univention.de
> Univention GmbH         Linux for your business    fon: +49 421 22232-40
> Mary-Somerville-Str.1   28359 Bremen               fax: +49 421 22232-99
>                                                 http://www.univention.de
>



Jan.

-- 
Do you need professional PHP or Horde consulting?
http://horde.org/consulting/



More information about the dev mailing list