Change 20100730-bargull-NCH by barg...@bargull02 on 2010-07-30 17:42:58
in /home/anba/src/svn/openlaszlo/trunk
for http://svn.openlaszlo.org/openlaszlo/trunk
Summary: fix append-div location for applications
Bugs Fixed: LPP-9254 (dguide examples don't show up)
Technical Reviewer: max
QA Reviewer: lou
Details:
lz.embed.swf():
I've split lz.embed.swf() in two parts, the new function _setSWF() calls
the dojo-embed related functions, which are only available after
flash.js has been loaded. The reason for this change is to make swf()
and dhtml() more consistent: After calling dhtml(), the
lz.embed.applications object was already added, but this wasn't the case
for swf().
This also makes sure the append-div is created right away, without the
change it was created on the 2nd call of swf() after flash.js was
loaded. That led to the bug where append-divs were added after the
flash.js script element.
lz.embed.lfc():
Don't delete __appqueue, just set it to an empty array. See the added
TODO about calling lfc() multiple times.
lz.embed.loadJSLib():
Adjusted the code so js-libs aren't loaded multiple times. Without the
change, flash.js is requested for each dguide example. Note that
callbacks must always be enqueued.
lz.embed._getAppendDiv():
Add append-div after last non-deferred script element, because of
dynamically added js-libs like flash.js
And only consider script elements from body, otherwise you might end up
adding the div to the head element
Tests:
recompile embednew.js and open docs, note all examples show up properly
Files:
M lps/includes/source/embednew.js
Changeset:
http://svn.openlaszlo.org/openlaszlo/patches/20100730-bargull-NCH.tar