Author: max
Date: 2007-08-31 18:52:31 -0700 (Fri, 31 Aug 2007)
New Revision: 6316

Modified:
   openlaszlo/branches/legals/WEB-INF/lps/lfc/kernel/dhtml/LzSprite.js
   openlaszlo/branches/legals/WEB-INF/lps/templates/html-response.xslt
   openlaszlo/branches/legals/WEB-INF/lps/templates/html-response_jp.xslt
   openlaszlo/branches/legals/lps/includes/source/embednew.js
Log:
Change 20070831-maxcarlson-S by [EMAIL PROTECTED] on 2007-08-31 14:15:19 PDT
    in /Users/maxcarlson/openlaszlo/legals-clean
    for http://svn.openlaszlo.org/openlaszlo/branches/legals

Summary: Use onload mechanism to hide splash

New Features:

Bugs Fixed: LPP-4578 - Add API to find out when an LZX app has been loaded

Technical Reviewer: promanik
QA Reviewer: jcrowley
Doc Reviewer: (pending)

Documentation:

Release Notes:

Details: LzSprite.js - Pass reference to canvas object to Lz.appid._ready().  
Don't hide splash.

html-response.xslt - Register for Lz.appid.onload to hide the splash div.

embednew.js - _ready() stores the canvas ref, if passed - currently only used 
in DHTML.

Tests: DHTML splash animation works as before.

Files:
M      WEB-INF/lps/lfc/kernel/dhtml/LzSprite.js
M      WEB-INF/lps/templates/html-response.xslt
M      lps/includes/source/embednew.js


Modified: openlaszlo/branches/legals/WEB-INF/lps/lfc/kernel/dhtml/LzSprite.js
===================================================================
--- openlaszlo/branches/legals/WEB-INF/lps/lfc/kernel/dhtml/LzSprite.js 
2007-08-31 23:31:35 UTC (rev 6315)
+++ openlaszlo/branches/legals/WEB-INF/lps/lfc/kernel/dhtml/LzSprite.js 
2007-09-01 01:52:31 UTC (rev 6316)
@@ -381,10 +381,9 @@
         if (this.quirks['safari_visibility_instead_of_display']) {
             this.__LZdiv.style.visibility = 'visible';
         }
-
-        var s = document.getElementById('lzsplash');
-        if (s) LzSprite.prototype.__discardElement(s);
-        if (this._id) Lz[this._id]._ready();
+        if (this._id) {
+            Lz[this._id]._ready(this.owner);
+        }
     }
 }
 

Modified: openlaszlo/branches/legals/WEB-INF/lps/templates/html-response.xslt
===================================================================
--- openlaszlo/branches/legals/WEB-INF/lps/templates/html-response.xslt 
2007-08-31 23:31:35 UTC (rev 6315)
+++ openlaszlo/branches/legals/WEB-INF/lps/templates/html-response.xslt 
2007-09-01 01:52:31 UTC (rev 6316)
@@ -133,6 +133,10 @@
             <div id="lzsplash" style="z-index: 10000000; top: 0; left: 0; 
width: {$canvaswidth}; height: {$canvasheight}; position: fixed; display: 
table"><p style="display: table-cell; vertical-align: middle;"><img 
src="{/canvas/request/@lps}/lps/includes/spinner.gif" style="display: block; 
margin: 20% auto"/></p></div>
             <script type="text/javascript">
               Lz.dhtmlEmbed({url: '<xsl:value-of 
select="/canvas/request/@url"/>?lzt=object<xsl:value-of 
select="/canvas/request/@query_args"/>&amp;_canvas_debug=<xsl:value-of 
select="/canvas/@debug"/>', bgcolor: '<xsl:value-of 
select="/canvas/@bgcolor"/>', width: '<xsl:value-of select="/canvas/@width"/>', 
height: '<xsl:value-of select="/canvas/@height"/>', id: '<xsl:value-of 
select="/canvas/@id"/>'});
+              Lz.<xsl:value-of select="/canvas/@id"/>.onload = function 
loaded() {
+                var s = document.getElementById('lzsplash');
+                if (s) LzSprite.prototype.__discardElement(s);
+              }
             </script>
           </xsl:when>
           <xsl:otherwise>

Modified: openlaszlo/branches/legals/WEB-INF/lps/templates/html-response_jp.xslt
===================================================================
--- openlaszlo/branches/legals/WEB-INF/lps/templates/html-response_jp.xslt      
2007-08-31 23:31:35 UTC (rev 6315)
+++ openlaszlo/branches/legals/WEB-INF/lps/templates/html-response_jp.xslt      
2007-09-01 01:52:31 UTC (rev 6316)
@@ -133,6 +133,10 @@
             <div id="lzsplash" style="z-index: 10000000; top: 0; left: 0; 
width: {$canvaswidth}; height: {$canvasheight}; position: fixed; display: 
table"><p style="display: table-cell; vertical-align: middle;"><img 
src="{/canvas/request/@lps}/lps/includes/spinner.gif" style="display: block; 
margin: 20% auto"/></p></div>
             <script type="text/javascript">
               Lz.dhtmlEmbed({url: '<xsl:value-of 
select="/canvas/request/@url"/>?lzt=object<xsl:value-of 
select="/canvas/request/@query_args"/>&amp;_canvas_debug=<xsl:value-of 
select="/canvas/@debug"/>', bgcolor: '<xsl:value-of 
select="/canvas/@bgcolor"/>', width: '<xsl:value-of select="/canvas/@width"/>', 
height: '<xsl:value-of select="/canvas/@height"/>', id: '<xsl:value-of 
select="/canvas/@id"/>'});
+              Lz.<xsl:value-of select="/canvas/@id"/>.onload = function 
loaded() {
+                var s = document.getElementById('lzsplash');
+                if (s) LzSprite.prototype.__discardElement(s);
+              }
             </script>
           </xsl:when>
           <xsl:otherwise>

Modified: openlaszlo/branches/legals/lps/includes/source/embednew.js
===================================================================
--- openlaszlo/branches/legals/lps/includes/source/embednew.js  2007-08-31 
23:31:35 UTC (rev 6315)
+++ openlaszlo/branches/legals/lps/includes/source/embednew.js  2007-09-01 
01:52:31 UTC (rev 6316)
@@ -394,10 +394,11 @@
         }
     }
     ,/** @access private */
-    _ready: function () {
+    _ready: function (cref) {
         if (this._setCanvasAttributeQ) {
             this._setCanvasAttributeDequeue();
         }
+        if (cref) this.canvas = cref;
         if (this.onload && typeof this.onload == 'function') {
             this.onload();
         }


_______________________________________________
Laszlo-checkins mailing list
[email protected]
http://www.openlaszlo.org/mailman/listinfo/laszlo-checkins

Reply via email to