Author: max Date: 2006-12-04 19:20:39 -0800 (Mon, 04 Dec 2006) New Revision: 2856
Modified: openlaszlo/branches/legals/WEB-INF/lps/templates/html-response.xslt openlaszlo/branches/legals/lps/includes/source/flash.js Log: Change 20061204-maxcarlson-B by [EMAIL PROTECTED] on 2006-12-04 13:20:25 PST in /Users/maxcarlson/openlaszlo/legals Summary: Fix wrapper pages to allow percentages for swf New Features: Bugs Fixed: LPP-3170 - canvas height="80%" is too short in swf Technical Reviewer: promanik QA Reviewer: ptw Doc Reviewer: (pending) Documentation: Release Notes: Details: html-response.xml no longer sets the body height of the css. This allows the swf to flow to the full size of the window. flash.js now sets the container div's size to 100% for axes with percentages to allow flash to scale fully. Tests: Files: M WEB-INF/lps/templates/html-response.xslt M lps/includes/source/flash.js Changeset: http://svn.openlaszlo.org/openlaszlo/patches/20061204-maxcarlson-B.tar Modified: openlaszlo/branches/legals/WEB-INF/lps/templates/html-response.xslt =================================================================== --- openlaszlo/branches/legals/WEB-INF/lps/templates/html-response.xslt 2006-12-05 02:54:05 UTC (rev 2855) +++ openlaszlo/branches/legals/WEB-INF/lps/templates/html-response.xslt 2006-12-05 03:20:39 UTC (rev 2856) @@ -115,8 +115,6 @@ body { - height: <xsl:value-of select="$canvasheight"/>; - width: <xsl:value-of select="$canvaswidth"/>; background-color: <xsl:value-of select="/canvas/@bgcolor"/>; } Modified: openlaszlo/branches/legals/lps/includes/source/flash.js =================================================================== --- openlaszlo/branches/legals/lps/includes/source/flash.js 2006-12-05 02:54:05 UTC (rev 2855) +++ openlaszlo/branches/legals/lps/includes/source/flash.js 2006-12-05 03:20:39 UTC (rev 2856) @@ -714,6 +714,15 @@ } }, + __getCSSValue: function(val){ + if (val.indexOf('%') != -1) { + // scale container to 100% to allow the Flash player to scale appropraitely + return '100%'; + } else { + return val + 'px'; + } + }, + write: function(/* String */ flashVer, /* Boolean? */ doExpressInstall){ // summary: Writes the Flash into the page. // description: @@ -732,15 +741,14 @@ // determine our container div's styling var containerStyle = ''; - containerStyle+= ("width: " + this.width + "px; "); - containerStyle+=("height: " + this.height + "px; "); + containerStyle+= ("width: " + this.__getCSSValue(this.width) + ';'); + containerStyle+=("height: " + this.__getCSSValue(this.height)+ ';' ); if(this._visible == false){ containerStyle+=("position: absolute; "); containerStyle+=("z-index: 10000; "); containerStyle+=("top: -1000px; "); containerStyle+=("left: -1000px; "); } - containerStyle = containerStyle.toString(); // figure out the SWF file to get and how to write out the correct HTML // for this Flash version _______________________________________________ Laszlo-checkins mailing list Laszlo-checkins@openlaszlo.org http://www.openlaszlo.org/mailman/listinfo/laszlo-checkins