Issue 143: Images loading late with initAjax
Status:  Verified
Owner:
Closed:  Dec 2010
Reported by ggerr...@gmail.com, Apr 21, 2010
I've first implemented the tree with <ul>/<il> which works slow but fine.

changed everything to json and loading with initAjax does the job, but 
there seems to be an issue when the skin images are loaded (see pic 
attached):

- Site starts showing the DialogUI (1)
- after 'success' of 'initAjax', the DialogUI is closed (2) and the tree 
is shown (3) -> Images are missing
- ca. five seconds later, the images show up (4)

I think the problem is, that 'success' should only be fired AFTER the 
images and everything is loaded. Also tried 'onPostInit'. Same problem 
(and onPostInit has still this open issue, that its crashing when used 
together with Ajax's "error: function..." - or "success:...").

working with dynatree v0.5.3 rev313 and the problem occrus in FF 3.6.2. 
the problem does not occur in IE7 (cant check with IE8). 

Keep it up :-)
G
code.js
1.0 KB   View   Download
dynatreegifs.jpg
326 KB   View   Download
Nov 20, 2010
Project Member #1 moo...@wwwendt.de
(No comment was entered for this change.)
Status: Accepted
Labels: Milestone-Release1.1
Nov 21, 2010
Project Member #2 moo...@wwwendt.de
There are a lot of plugins that handle image preloading.

This sample uses jQuery.Preload plugin by Ariel Flesler (http://flesler.blogspot.com/2008/01/jquerypreload.html):
  
https://code.google.com/p/dynatree/source/browse/trunk/doc/test-preload.html

Still looking for some ideas if and how this could be integrated into Dynatree core.
Labels: -Type-Defect -Milestone-Release1.1 Type-Enhancement Milestone-Discussion
Nov 21, 2010
#3 prana001
How about using CSS sprites?

Just like how the jQuery-UI Themes-images are stored in ui-icons_*.png files?

Nov 22, 2010
Project Member #4 moo...@wwwendt.de
I played with that a few weeks ago, but was too lazy to finish.
Some of the icons (with v-lines) rely on repeating, but it should be possible to design a skin that uses this technique...
Dec 7, 2010
Project Member #5 moo...@wwwendt.de
(No comment was entered for this change.)
Owner: moo...@wwwendt.de
Labels: -Milestone-Discussion Milestone-Release1.1
Dec 10, 2010
Project Member #6 moo...@wwwendt.de
Added CSS sprite skins (and using it by default)
Status: Fixed
Dec 12, 2010
Project Member #7 moo...@wwwendt.de
(No comment was entered for this change.)
Labels: Milestone-Release1.0.3
Jul 17, 2012
Project Member #8 moo...@wwwendt.de
considered verified
Jul 17, 2012
Project Member #9 moo...@wwwendt.de
(No comment was entered for this change.)
Status: Verified