[Laszlo-checkins] r3937 - in openlaszlo/branches/legals: WEB-INF/lps/lfc/kernel/dhtml WEB-INF/lps/lfc/kernel/swf WEB-INF/lps/lfc/views WEB-INF/lps/templates lps/admin lps/includes/source
max@openlaszlo.org
max at openlaszlo.org
Mon Feb 26 14:30:16 PST 2007
Author: max
Date: 2007-02-26 14:30:01 -0800 (Mon, 26 Feb 2007)
New Revision: 3937
Modified:
openlaszlo/branches/legals/WEB-INF/lps/lfc/kernel/dhtml/LzSprite.js
openlaszlo/branches/legals/WEB-INF/lps/lfc/kernel/swf/LzSprite.as
openlaszlo/branches/legals/WEB-INF/lps/lfc/views/LaszloCanvas.lzs
openlaszlo/branches/legals/WEB-INF/lps/templates/html-response.xslt
openlaszlo/branches/legals/lps/admin/dev-console.lzx.js
openlaszlo/branches/legals/lps/admin/dev-console.lzx.swf
openlaszlo/branches/legals/lps/admin/solo-dhtml-deploy.jsp
openlaszlo/branches/legals/lps/includes/source/embednew.js
openlaszlo/branches/legals/lps/includes/source/flash.js
Log:
Change 20070226-maxcarlson-D by maxcarlson at max-carlsons-computer.local on 2007-02-26 13:11:06 PST
in /Users/maxcarlson/openlaszlo/legals
Summary: Fix spinner centering, opera warnings
New Features:
Bugs Fixed: LPP-3594 - Spinner centering code does not work for 100% canvas, solo deploy for IE DHTML
Technical Reviewer: promanik
QA Reviewer: jcrowley
Doc Reviewer: (pending)
Documentation:
Release Notes:
Details: LzSprite.as - Move scalecanvastopercentage to capabilities hash.
LzSprite.js - Only set clip for non-percentage width and height. Move scalecanvastopercentage to capabilities hash.
LaszloCanvas.lzs - Query capabilities.scalecanvastopercentage.
html-response.xslt - Use $canvaswidth and $canvasheight to center lzsplash for percentage values.
embednew.js - Move url/query splitting logic to __getqueryurl() and clean up surrounding calls. Add support for wmode and accessibility parameters in swf. Add comments and extra error checking.
flash.js - Add support for wmode.
dev-console.lzx.js - Rebuild dev console with latest lfc (fixes warnings in opera)
solo-dhtml-deploy.jsp - Add missing blank.gif for IE DHTML
dev-console.lzs.swf - Rebuild dev console with latest lfc
Tests: Spinner now centered for canvases with percentage heights in DHTML (all browsers), all startup warnings eliminated in Opera 9.1, http://localhost:8080/legals/demos/lzpix/app.lzx?lzt=html&lzr=dhtml canvas clipped - can't see toolbars on right.
Files:
M WEB-INF/lps/lfc/kernel/swf/LzSprite.as
M WEB-INF/lps/lfc/kernel/dhtml/LzSprite.js
M WEB-INF/lps/lfc/views/LaszloCanvas.lzs
M WEB-INF/lps/templates/html-response.xslt
M lps/includes/source/embednew.js
M lps/includes/source/flash.js
M lps/admin/dev-console.lzx.js
M lps/admin/solo-dhtml-deploy.jsp
M lps/admin/dev-console.lzx.swf
Changeset: http://svn.openlaszlo.org/openlaszlo/patches/20070226-maxcarlson-D.tar
Modified: openlaszlo/branches/legals/WEB-INF/lps/lfc/kernel/dhtml/LzSprite.js
===================================================================
--- openlaszlo/branches/legals/WEB-INF/lps/lfc/kernel/dhtml/LzSprite.js 2007-02-26 21:58:09 UTC (rev 3936)
+++ openlaszlo/branches/legals/WEB-INF/lps/lfc/kernel/dhtml/LzSprite.js 2007-02-26 22:30:01 UTC (rev 3937)
@@ -24,7 +24,7 @@
if (window.bgcolor) root.style.backgroundColor = window.bgcolor;
if (window.width) root.style.width = window.width;
if (window.height) root.style.height = window.height;
- if (window.width && window.height) {
+ if (window.width && window.width.indexOf('%') == -1 && window.height && window.height.indexOf('%') == -1 ) {
root.style.clip = 'rect(0px ' + window.width + ' ' + window.height + ' 0px)';
root.style.overflow = 'hidden';
}
@@ -155,9 +155,6 @@
LzSprite.prototype.uid = 0;
-// Scale canvas to percentage values
-LzSprite.prototype.scalecanvastopercentage = true;
-
LzSprite.prototype.quirks = {
fix_clickable: true
,fix_ie_background_height: false
@@ -178,7 +175,9 @@
}
LzSprite.prototype.capabilities = {
- rotation: false
+ rotation: false,
+ // Scale canvas to percentage values
+ scalecanvastopercentage: true
}
if (window['Lz']) {
Modified: openlaszlo/branches/legals/WEB-INF/lps/lfc/kernel/swf/LzSprite.as
===================================================================
--- openlaszlo/branches/legals/WEB-INF/lps/lfc/kernel/swf/LzSprite.as 2007-02-26 21:58:09 UTC (rev 3936)
+++ openlaszlo/branches/legals/WEB-INF/lps/lfc/kernel/swf/LzSprite.as 2007-02-26 22:30:01 UTC (rev 3937)
@@ -31,7 +31,9 @@
}
LzSprite.prototype.capabilities = {
- rotation: true
+ rotation: true,
+ // Avoid scaling canvas to percentage values - SWF already scales the viewport size, so take window size literally to avoid scaling twice
+ scalecanvastopercentage: false
}
/**
@@ -41,8 +43,6 @@
_root._focusrect = accessible == true ? true : 0;
}
-// Avoid scaling canvas to percentage values - SWF already scales the viewport size, so take window size literally to avoid scaling twice
-LzSprite.prototype.scalecanvastopercentage = false;
// FIRST_SUBVIEW_DEPTH: This is so that default objects (such as
// buttons, and in swf6 masks) can be attached above the view's
Modified: openlaszlo/branches/legals/WEB-INF/lps/lfc/views/LaszloCanvas.lzs
===================================================================
--- openlaszlo/branches/legals/WEB-INF/lps/lfc/views/LaszloCanvas.lzs 2007-02-26 21:58:09 UTC (rev 3936)
+++ openlaszlo/branches/legals/WEB-INF/lps/lfc/views/LaszloCanvas.lzs 2007-02-26 22:30:01 UTC (rev 3937)
@@ -109,7 +109,7 @@
if (args.width.charAt(args.width.length-1) == '%') {
var percent = Number(args.width.substr(0, args.width.length-1));
this.__canvaswidthratio = percent/100;
- if (this.sprite.scalecanvastopercentage != true) {
+ if (this.sprite.capabilities.scalecanvastopercentage != true) {
// some runtimes already scale the viewport size, so take the reported size literally to avoid scaling twice
this.__canvaswidthratio = 1;
}
@@ -128,7 +128,7 @@
if (args.height.charAt(args.height.length-1) == '%') {
var percent = Number(args.height.substr(0, args.height.length-1));
this.__canvasheightratio = percent/100;
- if (this.sprite.scalecanvastopercentage != true) {
+ if (this.sprite.capabilities.scalecanvastopercentage != true) {
// some runtimes already scale the viewport size, so take the reported size literally to avoid scaling twice
this.__canvasheightratio = 1;
}
Modified: openlaszlo/branches/legals/WEB-INF/lps/templates/html-response.xslt
===================================================================
--- openlaszlo/branches/legals/WEB-INF/lps/templates/html-response.xslt 2007-02-26 21:58:09 UTC (rev 3936)
+++ openlaszlo/branches/legals/WEB-INF/lps/templates/html-response.xslt 2007-02-26 22:30:01 UTC (rev 3937)
@@ -130,7 +130,7 @@
</OBJECT>
</xsl:when>
<xsl:when test="/canvas/@runtime = 'dhtml'">
- <div id="lzsplash" style="z-index: 10000000; top: 0; left: 0; width: {/canvas/@width}px; height: {/canvas/@height}px; 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>
+ <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>
<div id="lzdhtmlappdiv" style="position: absolute;">
</div>
<script type="text/javascript">
Modified: openlaszlo/branches/legals/lps/admin/dev-console.lzx.js
===================================================================
--- openlaszlo/branches/legals/lps/admin/dev-console.lzx.js 2007-02-26 21:58:09 UTC (rev 3936)
+++ openlaszlo/branches/legals/lps/admin/dev-console.lzx.js 2007-02-26 22:30:01 UTC (rev 3937)
@@ -1,23 +1,16 @@
-/**
- * dev-console.lzx.js
- *
- * @copyright Copyright 2006 Laszlo Systems, Inc. All Rights Reserved.
- * Use is subject to license terms.
- *
- */
var $dhtml=true
var $as3=false
+var $js1=true
var $swf9=false
-var $js1=true
var $swf7=false
var $profile=false
+var $swf8=false
var $runtime="dhtml"
-var $swf8=false
var $svg=false
var $as2=false
var $debug=false
var $j2me=false
-var _Copyright="Portions of this file are copyright (c) 2001-2006 by Laszlo Systems, Inc. All rights reserved."
+var _Copyright="Portions of this file are copyright (c) 2001-2007 by Laszlo Systems, Inc. All rights reserved."
Function.prototype.make=function(){
var $1
$1=function(){
@@ -245,12 +238,12 @@
$7.initialize.apply($7,arguments)
return $7
}
-var NewClass={prototype:Instance.make(),addProperty:function($1,$2){
+var Class={prototype:Instance.make(),addProperty:function($1,$2){
var $3=this.prototype
$3.addProperty.apply($3,arguments)
},addStaticProperty:function($1,$2){
this[$1]=$2
-},_dbg_name:"NewClass",allClasses:{},make:function($1,$2,$3,$4){
+},_dbg_name:"Class",allClasses:{Instance:Instance},make:function($1,$2,$3,$4){
var nc=function(){
this.constructor=arguments.callee
}
@@ -303,7 +296,7 @@
this.allClasses[$1]=nc
return nc
}}
-var Trait={prototype:Instance.make(),allTraits:{},_dbg_typename:NewClass._dbg_name,_dbg_name:"Trait",addProperty:function($1,$2){
+var Trait={prototype:Instance.make(),allTraits:{},_dbg_typename:Class._dbg_name,_dbg_name:"Trait",addProperty:function($1,$2){
this.prototype[$1]=$2
var $3=this.implementations
for(var $4 in $3){
@@ -314,29 +307,29 @@
this[$1]=$2
},makeInterstitial:function($1,$2){
var $3=this.implementations
-var $4=$1.constructor.classname
+var $4=this.classname+"+"+$1.constructor.classname
+if(false){
if($3.hasOwnProperty($4)){
return $3[$4]
}
-var $5=function(){
+}
+var $5=this.prototype
+for(var $6 in $5){
+$1.addProperty.call($1,$6,$5[$6])
+}
+var $7=function(){
this.constructor=arguments.callee
}
-$5.prototype=$1
+$7.prototype=$1
if(this.hasOwnProperty("initialize")){
-$5.initialize=this.initialize
+$7.initialize=this.initialize
}
-$5.classname=this.classname+"+"+$4
-$5._dbg_typename="Interstitial Constructor"
-$5._dbg_name=$5.classname
-var $6=(new $5())
-var $7=this.prototype
-for(var $8 in $7){
-$6.addProperty.call($6,$8,$7[$8])
-}
-if(false){
-$3[$4]=$6
-}
-return $6
+$7.classname=$4
+$7._dbg_typename="Interstitial Constructor"
+$7._dbg_name=$7.classname
+var $8=(new $7())
+$3[$4]=$8
+return $8
},make:function($1,$2,$3,$4){
var $5={constructor:this,classname:$1,_dbg_typename:this._dbg_name,_dbg_name:$1,prototype:$2?$2.make():(new Object),implementations:{}}
this.addStaticProperty.call($5,"addStaticProperty",this.addStaticProperty)
@@ -354,102 +347,129 @@
this.allTraits[$1]=$5
return $5
}}
-var LzNode=NewClass.make("LzNode",null,{initialize:function($1,$2,$3,$4){
+var LzNode=Class.make("LzNode",null,{initialize:function($1,$2,$3,$4){
+if(LzNode.__LZhenryWasRight==true){
+this.__LZdeferDelegates=true
+var $5=LzDelegate.__LZdelegatesQueue.length
+}
this.nextMethod(arguments.callee,"initialize").apply(this,arguments)
-var $6
+var $7
if($2&&$2["$hasdefaultattrs"]){
-$6=$2
+$7=$2
}else{
-$6=LzInheritedHash.make(this.defaultattrs)
+$7=LzInheritedHash.make(this.defaultattrs)
if($2){
-var $7=this.defaultattrs
-var $8="$refs" in $7&&$7.$refs
-var $9=null
-for(var $10 in $2){
-var $11=$2[$10]
-if($8&&$8[$10]){
-if(!$9){
-$9={}
+var $8=this.defaultattrs
+var $9="$refs" in $8&&$8.$refs
+var $10=null
+for(var $11 in $2){
+var $12=$2[$11]
+if($9&&$9[$11]){
+if(!$10){
+$10={}
}
-$9[$10]=true
+$10[$11]=true
}
-if($11 instanceof Object){
-var $12=$7[$10]
if($12 instanceof Object){
-if($11 instanceof Array){
-$6[$10]=$11.concat($12)
+var $13=$8[$11]
+if($13 instanceof Object){
+if($12 instanceof Array){
+$7[$11]=$12.concat($13)
continue
}else{
-if(typeof $11=="object"){
-var $13=LzInheritedHash.make($12)
-for(var $14 in $11){
-$13[$14]=$11[$14]
+if(typeof $12=="object"){
+var $14=LzInheritedHash.make($13)
+for(var $15 in $12){
+$14[$15]=$12[$15]
}
-$6[$10]=$13
+$7[$11]=$14
continue
}
}
}
}
-$6[$10]=$11
+$7[$11]=$12
}
-if($9){
-if(!$6.hasOwnProperty("$refs")){
-$6.$refs=LzInheritedHash.make($8)
+if($10){
+if(!$7.hasOwnProperty("$refs")){
+$7.$refs=LzInheritedHash.make($9)
}
-var $15=this._ignoreAttribute
-for(var $10 in $9){
-$6.$refs[$10]=$15
+var $16=this._ignoreAttribute
+for(var $11 in $10){
+$7.$refs[$11]=$16
}
}
}
}
-this._instanceAttrs=$6
+this._instanceAttrs=$7
this._instanceChildren=$3
-var $16=LzInheritedHash.make($6)
+var $17=LzInheritedHash.make($7)
this.__LZisnew=!$4
-var $17="classChildren" in this.constructor.prototype?this.constructor.prototype.classChildren:null
-if($17&&$17.length){
-if(!("doneClassRoot" in $17&&$17.doneClassRoot)&&!this.$isstate){
-$17.doneClassRoot=true
-this.__LZassignClassRoot($17,1)
+var $18="classChildren" in this.constructor.prototype?this.constructor.prototype.classChildren:null
+if($18&&$18.length){
+if(!("doneClassRoot" in $18&&$18.doneClassRoot)&&!this.$isstate){
+$18.doneClassRoot=true
+this.__LZassignClassRoot($18,1)
}
if($3&&$3.length){
-$3=$17.concat($3)
+$3=$18.concat($3)
}else{
-$3=$17
+$3=$18
}
}else{
if($3&&$3.length){
$3=$3.concat()
}
}
-this.construct($1,$16)
-this.__LZapplyArgs($16,true)
+this.construct($1,$17)
+this.__LZapplyArgs($17,true)
if(this.__LZdeleted){
return
}
-var $18=this.$styles()
-if($18){
-this.__LZapplyStyleMap($18)
+var $19=this.$styles()
+if($19){
+this.__LZstyleConstraints=this.__LZapplyStyleMap($19,$2)
}
-this.constructWithArgs($16)
+this.constructWithArgs($17)
+if(LzNode.__LZhenryWasRight==true){
+delete this.__LZdeferDelegates
+if($5!=LzDelegate.__LZdelegatesQueue.length){
+LzDelegate.__LZdrainDelegatesQueue($5)
+}
+}
this.onconstruct.sendEvent(this)
if($3&&$3.length){
this.createChildren($3)
}else{
this.__LZinstantiationDone()
}
-},__LZlateinit:null,__LZpreventSubInit:null,__LZresolveDict:null,__LZsourceLocation:null,__LZUID:null,__LZdelegates:null,defaultattrs:{$hasdefaultattrs:true},isinited:false,subnodes:null,datapath:null,initstage:null,$isstate:false,doneClassRoot:false,parent:null,children:null,cloneManager:null,name:null,id:null,defaultplacement:null,placement:null,$cfn:0,__LZdeleted:false,immediateparent:null,dependencies:null,$styles:function(){
+},__LZlateinit:null,__LZpreventSubInit:null,__LZresolveDict:null,__LZsourceLocation:null,__LZUID:null,__LZdelegates:null,defaultattrs:{$hasdefaultattrs:true},isinited:false,subnodes:null,datapath:null,initstage:null,$isstate:false,doneClassRoot:false,parent:null,children:null,cloneManager:null,name:null,id:null,defaultplacement:null,placement:null,$cfn:0,__LZdeleted:false,immediateparent:null,dependencies:null,classroot:null,nodeLevel:null,$styles:function(){
return null
-},__LZapplyStyleMap:function($1){
+},__LZapplyStyleMap:function($1,$2){
+for(var $3 in $1){
+var $4=LzCSSStyle.getPropertyValueFor(this,$1[$3])
+if(typeof $4=="string"&&!isNaN($4)){
+$4=Number($4)
+}
+if(!($3 in $2)){
+if($4 instanceof Function){
+styleConstraints[$3]=$4
+}else{
+if($4!=null){
+this.setAttribute($3,$4)
+}
+}
+}
+}
+return styleConstraints
+},__LZapplyStyleConstraints:function(){
+if(this.hasOwnProperty("__LZstyleConstraints")){
+var $1=this.__LZstyleConstraints
for(var $2 in $1){
-var $3=LzCSSStyle.getPropertyValueFor(this,$1[$2])
-var $4=Number($3)
-if($3==$4){
-$3=$4
+var $3=$1[$2]
+var $4=$3.call(this)
+this.setAttribute($2,$4)
}
-this.setAttribute($2,$3)
}
},construct:function($1,$2){
var $3=$1
@@ -513,6 +533,7 @@
}
this.isinited=true
this.__LZresolveReferences()
+this.__LZapplyStyleConstraints()
var $1=this.subnodes
if($1){
var $2=0
@@ -702,6 +723,8 @@
}
if("put" in this.setters){
this.setters.put($1,$2)
+}else{
+this.setters[$1]=$2
}
},dataBindAttribute:function($1,$2){
if(!this.datapath){
@@ -826,8 +849,12 @@
}
},setName:function($1){
if(typeof $1=="string"&&$1.length){
+if(this.parent){
this.parent[$1]=this
+}
+if(this.immediateparent){
this.immediateparent[$1]=this
+}
this.name=$1
if(this.parent===canvas){
if(!this.hasOwnProperty("id")){
@@ -1057,13 +1084,7 @@
this.makeChild($1,true)
},constructWithArgs:function($1,$2){
-}},{make:function(){
-global.__LZdeferEvents=true
-var $1=LzNode.prototype.constructor.make.apply(this,arguments)
-global.__LZdeferEvents=false
-__LZdrainEventsQueue()
-return $1
-},tagname:"node",initialize:function($1){
+}},{__LZhenryWasRight:true,tagname:"node",initialize:function($1){
if(this.hasOwnProperty("tagname")){
var $2=this.tagname
if($2){
@@ -1090,7 +1111,7 @@
}
}
})()
-var LzUserClass=NewClass.make("LzUserClass",LzNode,{initialize:function($1,$2){
+var LzUserClass=Class.make("LzUserClass",LzNode,{initialize:function($1,$2){
var $3=$2.initobj
var $4=$3.name
var $5=$3.attrs
@@ -1101,101 +1122,112 @@
}else{
$7=ConstructorMap[$6]
}
-var $8="traits" in $5?$5.traits:null
-var $9=this.userclass=NewClass.make($4,$8?$8.concat($7):$7,null,{tagname:$4})
+var $8=null
+if("with" in $5){
+$8=$5["with"].split(" ").join("").split(",")
+for(var $9=$8.length-1;$9>=0;$9--){
+var $10=$8[$9]
+$8[$9]=global[$10]
+if($8[$9]==null||$8[$9].makeInterstitial==null){
+$8.splice($9,1)
+}
+}
+$8.push($7)
+}
+var $11=this.userclass=Class.make($4,$8?$8:$7,null,{tagname:$4})
if(!($4 in global)){
-global[$4]=$9
+global[$4]=$11
}else{
}
-var $10=$9.prototype
+var $12=$11.prototype
delete $5.name
-$10.addProperty("userclass",true)
-var $11
+$12.addProperty("userclass",true)
+var $13
if("classChildren" in $7.prototype&&$7.prototype.classChildren.length){
-$11=$7.prototype.classChildren.concat()
+$13=$7.prototype.classChildren.concat()
}else{
-$11=[]
+$13=[]
}
if("children" in $3&&$3.children.length){
LzFixTags($3)
-$11=$11.concat($3.children)
+$13=$13.concat($3.children)
}
if("defaultplacement" in $5&&$5.defaultplacement!=null){
-$11.push({name:"__LZUserClassPlacementObject",attrs:$5.defaultplacement})
+$13.push({name:"__LZUserClassPlacementObject",attrs:$5.defaultplacement})
delete $5.defaultplacement
}
-if($11.length){
-$10.addProperty("classChildren",$11)
+if($13.length){
+$12.addProperty("classChildren",$13)
}
-var $12=false
+var $14=false
if("$events" in $5){
-var $13=$5.$events
-var $4=$10.classname
-var $14=$13.length
-for(var $15=0;$15<$14;$15++){
-var $16=$13[$15]
-$10.addProperty($16,LzDeclaredEvent)
+var $15=$5.$events
+var $4=$12.classname
+var $16=$15.length
+for(var $17=0;$17<$16;$17++){
+var $18=$15[$17]
+$12.addProperty($18,LzDeclaredEvent)
}
delete $5.$events
}
-var $17="$setters" in $5?$5.$setters:null
-if($17){
+var $19="$setters" in $5?$5.$setters:null
+if($19){
delete $5.$setters
-for(var $18 in $17){
-var $19="_anonSet"+$18
-$10.addProperty($19,$17[$18])
-$10.setters[$18]=$19
+for(var $20 in $19){
+var $21="_anonSet"+$20
+$12.addProperty($21,$19[$20])
+$12.setters[$20]=$21
}
}
-var $20=$10.defaultattrs
+var $22=$12.defaultattrs
if($5){
-var $21="$refs" in $20&&$20.$refs
-var $22=null
-var $23=$10.setters
-var $24="$isstate" in $10&&$10.$isstate
-for(var $15 in $5){
-var $25=$5[$15]
-if($21&&$21[$15]){
-if(!$22){
-$22={}
+var $23="$refs" in $22&&$22.$refs
+var $24=null
+var $25=$12.setters
+var $26="$isstate" in $12&&$12.$isstate
+for(var $17 in $5){
+var $27=$5[$17]
+if($23&&$23[$17]){
+if(!$24){
+$24={}
}
-$22[$15]=true
+$24[$17]=true
}
-if($23[$15]==null&&!$24){
-if($25 instanceof Object&&!($25 instanceof Function)){
+if($25[$17]==null&&!$26){
+if($27 instanceof Object&&!($27 instanceof Function)){
}
-$10.addProperty($15,$25)
+$12.addProperty($17,$27)
continue
}
-if($25 instanceof Object){
-var $26=$20[$15]
-if($26 instanceof Object){
-if($25 instanceof Array){
-$20[$15]=$25.concat($26)
+if($27 instanceof Object){
+var $28=$22[$17]
+if($28 instanceof Object){
+if($27 instanceof Array){
+$22[$17]=$27.concat($28)
continue
}else{
-if(typeof $25=="object"){
-var $27=LzInheritedHash.make($26)
-for(var $28 in $25){
-$27[$28]=$25[$28]
+if(typeof $27=="object"){
+var $29=LzInheritedHash.make($28)
+for(var $30 in $27){
+$29[$30]=$27[$30]
}
-$20[$15]=$27
+$22[$17]=$29
continue
}
}
}
}
-$20[$15]=$25
+$22[$17]=$27
}
-if($22){
-if(!$20.hasOwnProperty("$refs")){
-$20.$refs=LzInheritedHash.make($21)
+if($24){
+if(!$22.hasOwnProperty("$refs")){
+$22.$refs=LzInheritedHash.make($23)
}
-var $29=LzNode.prototype._ignoreAttribute
-for(var $15 in $22){
-$20.$refs[$15]=$29
+var $31=LzNode.prototype._ignoreAttribute
+for(var $17 in $24){
+$22.$refs[$17]=$31
}
}
}
@@ -1203,18 +1235,7 @@
ConstructorMap.__LZUserClassPlacementObject=function($1,$2){
$1.defaultplacement=$2
}
-global.__LZdeferEvents=false
-global.__LZeventsQueue=[]
-function __LZdrainEventsQueue(){
-var $1=global.__LZeventsQueue
-var $2=$1.length
-for(var $3=0;$3<$2;){
-$1[$3].sendEvent($1[$3+1])
-$3+=2
-}
-global.__LZeventsQueue=[]
-}
-var LzDelegate=NewClass.make("LzDelegate",null,{initialize:function($1,$2,$3,$4){
+var LzDelegate=Class.make("LzDelegate",null,{initialize:function($1,$2,$3,$4){
this.nextMethod(arguments.callee,"initialize").apply(this,arguments)
this.c=$1
this.f=$2
@@ -1222,7 +1243,7 @@
this.register($3,$4)
}
this.__delegateID=LzDelegate.__nextID++
-},lastevent:0,enabled:true,event_called:false,execute:function($1){
+},c:null,f:null,lastevent:0,enabled:true,event_called:false,execute:function($1){
var $2=this.c
if($2){
if($2["__LZdeleted"]){
@@ -1269,8 +1290,19 @@
this.enabled=true
},toString:function(){
return "Delegate for "+this.c+" calls "+this.f+" "+this.__delegateID
-}},{__nextID:1})
-var LzEvent=NewClass.make("LzEvent",null,{initialize:function($1,$2,$3){
+}},{__nextID:1,__LZdelegatesQueue:[],__LZdrainDelegatesQueue:function($1){
+var $2=this.__LZdelegatesQueue
+var $3=$2.length
+var $4=$1
+while($4<$3){
+var $5=$2[$4]
+var $6=$2[$4+1]
+$5.c[$5.f]($6)
+$4+=2
+}
+$2.length=$1
+}})
+var LzEvent=Class.make("LzEvent",null,{initialize:function($1,$2,$3){
this.nextMethod(arguments.callee,"initialize").apply(this,arguments)
var $4=$1._events
if($4==null){
@@ -1290,32 +1322,32 @@
if(this.locked){
return
}
-if(global.__LZdeferEvents){
-var $2=global.__LZeventsQueue
-$2[$2.length]=this
-$2[$2.length]=$1
+var $2=this.delegateList.length
+if($2==0){
return
}
-var $3=this.delegateList.length
-if($3==0){
-return
-}
this.locked=true
-var $5=(new Array)
-var $6
-for(var $7=$3;$7>=0;$7--){
-$6=this.delegateList[$7]
-if($6&&!$6.event_called){
-$6.event_called=true
-$5.push($6)
-if($6.enabled&&$6.c){
-$6.c[$6.f]($1)
+var $4=(new Array)
+var $5
+var $6=LzDelegate.__LZdelegatesQueue
+for(var $7=$2;$7>=0;$7--){
+$5=this.delegateList[$7]
+if($5&&!$5.event_called){
+$5.event_called=true
+$4.push($5)
+if($5.enabled&&$5.c){
+if($5.c.__LZdeferDelegates){
+$6[$6.length]=$5
+$6[$6.length]=$1
+}else{
+$5.c[$5.f]($1)
}
}
}
-while($6=$5.pop()){
-$6.event_called=false
}
+while($5=$4.pop()){
+$5.event_called=false
+}
this.locked=false
},removeDelegate:function($1){
var $2=this.delegateList.length
@@ -1448,7 +1480,10 @@
if($5["alt"]!=$1["altKey"]){
$2["alt"]=$1["altKey"]
$3=true
+if(LzSprite.prototype.quirks["alt_key_sends_control"]){
+$2["control"]=$2["alt"]
}
+}
if($5["control"]!=$1["ctrlKey"]){
$2["control"]=$1["ctrlKey"]
$3=true
@@ -1479,20 +1514,23 @@
},__callback:null,__scope:null,__cancelKeys:true,setCallback:function($1,$2){
this.__scope=$1
this.__callback=$2
-}}
if(lzOptions.dhtmlKeyboardControl!=false){
document.onkeydown=LzKeyboardKernel.__keyboardEvent
document.onkeyup=LzKeyboardKernel.__keyboardEvent
document.onkeypress=LzKeyboardKernel.__keyboardEvent
}
+}}
var LzMouseKernel={__lastMouseDown:null,__x:0,__y:0,owner:null,__mouseEvent:function($1){
if(!$1){
$1=window.event
}
var $2="on"+$1.type
-if(LzKeyboardKernel){
+if(window["LzKeyboardKernel"]){
LzKeyboardKernel.__keyboardEvent($1)
}
+if($2!="onmousemove"&&LzInputTextSprite.prototype.__lastshown!=null){
+LzInputTextSprite.prototype.__hideIfNotFocused()
+}
if($2=="onmouseup"&&LzMouseKernel.__lastMouseDown!=null){
LzMouseKernel.__lastMouseDown.__globalmouseup($1)
}else{
@@ -1509,15 +1547,33 @@
}
}
if(LzMouseKernel.__callback){
-LzMouseKernel.__scope[LzMouseKernel.__callback]($2)
+return LzMouseKernel.__scope[LzMouseKernel.__callback]($2)
}
},__callback:null,__scope:null,setCallback:function($1,$2){
this.__scope=$1
this.__callback=$2
-}}
document.onmousemove=LzMouseKernel.__mouseEvent
document.onmousedown=LzMouseKernel.__mouseEvent
document.onmouseup=LzMouseKernel.__mouseEvent
+document.oncontextmenu=LzMouseKernel.__mouseEvent
+},showHandCursor:function($1){
+var $2=$1==true?"pointer":"default"
+this.__showhand=$2
+LzMouseKernel.setCursorGlobal($2)
+},setCursorGlobal:function($1){
+var $1=LzSprite.prototype.__defaultStyles.hyphenate($1)
+LzSprite.prototype.__setCSSClassProperty(".lzclickdiv","cursor",$1)
+},restoreCursor:function(){
+if(LzMouseKernel.__amLocked){
+return
+}
+LzSprite.prototype.__setCSSClassProperty(".lzclickdiv","cursor",LzMouseKernel.__showhand)
+},lock:function(){
+LzMouseKernel.__amLocked=true
+},unlock:function(){
+LzMouseKernel.__amLocked=false
+LzMouseKernel.restoreCursor()
+}}
var LzSprite=function($1,$2){
if($1==null){
return
@@ -1543,13 +1599,12 @@
if(window.height){
$4.style.height=window.height
}
-if(window.width&&window.height){
+if (window.width && window.width.indexOf('%') == -1 && window.height && window.height.indexOf('%') == -1 ) {
$4.style.clip="rect(0px "+window.width+" "+window.height+" 0px)"
$4.style.overflow="hidden"
}
$4.appendChild($3)
this.__LZdiv=$3
-this.__writeSplash(window.width,window.height)
if(LzSprite.prototype.quirks.fix_clickable){
var $6=document.createElement("div")
$6.className="lzcanvasclickdiv"
@@ -1571,87 +1626,59 @@
this.owner=$1
this.uid=LzSprite.prototype.uid++
}
-LzSprite.prototype.__writeSplash=function($1,$2){
-var $3=document.createElement("div")
-$3.className="lzsplash"
-$1=$1?parseInt($1):document.body.offsetWidth
-$2=$2?parseInt($2):document.body.offsetHeight
-$3.style.left=$1/2-$3.clientWidth/2+"px"
-$3.style.top=$2/2-$3.clientHeight/2+"px"
-$3.innerHTML=lzOptions.splashhtml
-LzSprite.prototype.__LZsplash=$3
-document.body.appendChild($3)
-}
-LzSprite.prototype.__defaultStyles={lzdiv:{position:"absolute"},lzcanvasdiv:{position:"absolute",display:"none"},lzcanvasclickdiv:{zIndex:100000,position:"absolute",display:"none"},lzsplash:{position:"absolute",zIndex:1000000},lztext:{fontFamily:"Verdana,Vera,sans-serif",fontStyle:"normal",fontWeight:"normal",fontSize:"11px",whiteSpace:"normal",position:"absolute"},lzswftext:{fontFamily:"Verdana,Vera,sans-serif",fontStyle:"normal",fontWeight:"normal",fontSize:"11px",whiteSpace:"normal",position:"absolute",marginTop:"2px",marginLeft:"2px"},lzinputtext:{fontFamily:"Verdana,Vera,sans-serif",fontStyle:"normal",fontWeight:"normal",fontSize:"11px",width:"100%",height:"100%",borderWidth:0,backgroundColor:"transparent"},lzswfinputtext:{fontFamily:"Verdana,Vera,sans-serif",fontStyle:"normal",fontWeight:"normal",fontSize:"11px",width:"100%",height:"100%",borderWidth:0,backgroundColor:"transparent",marginTop:"1px",marginLeft:"2px"},lzswfinputtextmultiline:{fontFamily:"Verdana,Vera,sans-serif",fontStyle:"normal",fontWeight:"normal",fontSize:"11px",width:"100%",height:"100%",borderWidth:0,backgroundColor:"transparent",marginTop:"2px",marginLeft:"2px"},writeCSS:function(){
+LzSprite.prototype.__defaultStyles={lzdiv:{position:"absolute"},lzclickdiv:{position:"absolute"},lzinputclickdiv:{position:"absolute"},lzcanvasdiv:{position:"absolute",display:"none"},lzcanvasclickdiv:{zIndex:100000,position:"absolute",display:"none"},lztext:{fontFamily:"Verdana,Vera,sans-serif",fontStyle:"normal",fontWeight:"normal",fontSize:"11px",whiteSpace:"normal",position:"absolute"},lzswftext:{fontFamily:"Verdana,Vera,sans-serif",fontStyle:"normal",fontWeight:"normal",fontSize:"11px",whiteSpace:"normal",position:"absolute",marginTop:"2px",marginLeft:"2px"},lzinputtext:{fontFamily:"Verdana,Vera,sans-serif",fontStyle:"normal",fontWeight:"normal",fontSize:"11px",width:"100%",height:"100%",borderWidth:0,backgroundColor:"transparent"},lzswfinputtext:{fontFamily:"Verdana,Vera,sans-serif",fontStyle:"normal",fontWeight:"normal",fontSize:"11px",width:"100%",height:"100%",borderWidth:0,backgroundColor:"transparent",marginTop:"1px",marginLeft:"2px"},lzswfinputtextmultiline:{fontFamily:"Verdana,Vera,sans-serif",fontStyle:"normal",fontWeight:"normal",fontSize:"11px",width:"100%",height:"100%",borderWidth:0,backgroundColor:"transparent",marginTop:"2px",marginLeft:"2px"},writeCSS:function(){
var $1=""
-var $2=(new RegExp("[A-Z]"))
-for(var $3 in this){
-if($3=="writeCSS"){
+for(var $2 in this){
+if($2=="writeCSS"||$2=="hyphenate"||$2=="_re"){
continue
}
-$1+="."+$3+"{"
-for(var $4 in this[$3]){
-var $5=this[$3][$4]
-var $6=$4.search($2)
-if($6!=-1){
-var $7=$4.substring($6,$6+1)
-$4=$4.substring(0,$6)+"-"+$7.toLowerCase()+$4.substring($6+1,$4.length)
+$1+="."+$2+"{"
+for(var $3 in this[$2]){
+var $4=this[$2][$3]
+$1+=this.hyphenate($3)+":"+$4+";"
}
-$1+=$4+":"+$5+";"
-}
$1+="}"
}
document.write('<style type="text/css">'+$1+"</style>")
+},__re:(new RegExp("[A-Z]")),hyphenate:function($1){
+var $2=$1.search(this.__re)
+if($2!=-1){
+var $3=$1.substring($2,$2+1)
+$1=$1.substring(0,$2)+"-"+$3.toLowerCase()+$1.substring($2+1,$1.length)
+}
+return $1
}}
LzSprite.prototype.uid=0
-LzSprite.prototype.quirks={__BrowserDetect:{init:function(){
-this.browser=this.searchString(this.dataBrowser)||"An unknown browser"
-this.version=this.searchVersion(navigator.userAgent)||this.searchVersion(navigator.appVersion)||"an unknown version"
-this.OS=this.searchString(this.dataOS)||"an unknown OS"
-},searchString:function($1){
-for(var $2=0;$2<$1.length;$2++){
-var $3=$1[$2].string
-var $4=$1[$2].prop
-this.versionSearchString=$1[$2].versionSearch||$1[$2].identity
-if($3){
-if($3.indexOf($1[$2].subString)!=-1){
-return $1[$2].identity
-}
-}else{
-if($4){
-return $1[$2].identity
-}
-}
-}
-},searchVersion:function($1){
-var $2=$1.indexOf(this.versionSearchString)
-if($2==-1){
-return
-}
-return parseFloat($1.substring($2+this.versionSearchString.length+1))
-},dataBrowser:[{string:navigator.vendor,subString:"Apple",identity:"Safari"},{prop:window.opera,identity:"Opera"},{string:navigator.vendor,subString:"iCab",identity:"iCab"},{string:navigator.vendor,subString:"KDE",identity:"Konqueror"},{string:navigator.userAgent,subString:"Firefox",identity:"Firefox"},{string:navigator.userAgent,subString:"Netscape",identity:"Netscape"},{string:navigator.userAgent,subString:"MSIE",identity:"Explorer",versionSearch:"MSIE"},{string:navigator.userAgent,subString:"Gecko",identity:"Mozilla",versionSearch:"rv"},{string:navigator.userAgent,subString:"Mozilla",identity:"Netscape",versionSearch:"Mozilla"}],dataOS:[{string:navigator.platform,subString:"Win",identity:"Windows"},{string:navigator.platform,subString:"Mac",identity:"Mac"},{string:navigator.platform,subString:"Linux",identity:"Linux"}]},fix_clickable:true,fix_ie_background_height:false,fix_ie_clickable:false,ie_alpha_image_loader:false,ie_leak_prevention:false,invisible_parent_image_sizing_fix:false,disable_opacity:false,emulate_flash_font_metrics:true,inner_html_strips_newlines:false,inner_html_no_entity_apos:false,css_hide_canvas_during_init:true,firefox_autocomplete_bug:false}
-LzSprite.prototype.quirks.__BrowserDetect.init()
-if(LzSprite.prototype.quirks.__BrowserDetect.browser=="Explorer"){
+LzSprite.prototype.quirks={fix_clickable:true,fix_ie_background_height:false,fix_ie_clickable:false,ie_alpha_image_loader:false,ie_leak_prevention:false,invisible_parent_image_sizing_fix:false,disable_opacity:false,emulate_flash_font_metrics:true,inner_html_strips_newlines:true,inner_html_no_entity_apos:false,css_hide_canvas_during_init:true,firefox_autocomplete_bug:false,hand_pointer_for_clickable:true,alt_key_sends_control:false,safari_textarea_subtract_scrollbar_height:false}
+LzSprite.prototype.capabilities={rotation:false,scalecanvastopercentage:true}
+if(window["Lz"]){
+Lz.__BrowserDetect.init()
+if(Lz.__BrowserDetect.browser=="Explorer"){
LzSprite.prototype.quirks["ie_alpha_image_loader"]=true
LzSprite.prototype.quirks["ie_leak_prevention"]=true
LzSprite.prototype.quirks["fix_ie_clickable"]=true
LzSprite.prototype.quirks["fix_ie_background_height"]=true
-LzSprite.prototype.quirks["inner_html_strips_newlines"]=true
LzSprite.prototype.quirks["inner_html_no_entity_apos"]=true
}
-if(LzSprite.prototype.quirks.__BrowserDetect.browser=="Safari"){
+if(Lz.__BrowserDetect.browser=="Safari"){
LzSprite.prototype.quirks["invisible_parent_image_sizing_fix"]=true
+LzSprite.prototype.quirks["alt_key_sends_control"]=true
+LzSprite.prototype.quirks["safari_textarea_subtract_scrollbar_height"]=true
}
-if(LzSprite.prototype.quirks.__BrowserDetect.browser=="Opera"){
+if(Lz.__BrowserDetect.browser=="Opera"){
LzSprite.prototype.quirks["invisible_parent_image_sizing_fix"]=true
}
-if(LzSprite.prototype.quirks.__BrowserDetect.browser=="Firefox"&&LzSprite.prototype.quirks.__BrowserDetect.version<2){
+if(Lz.__BrowserDetect.browser=="Firefox"&&Lz.__BrowserDetect.version<2){
LzSprite.prototype.quirks["firefox_autocomplete_bug"]=true
}
+}
if(LzSprite.prototype.quirks["css_hide_canvas_during_init"]){
LzSprite.prototype.__defaultStyles.lzcanvasdiv.display="none"
LzSprite.prototype.__defaultStyles.lzcanvasclickdiv.display="none"
}
+if(LzSprite.prototype.quirks["hand_pointer_for_clickable"]){
+LzSprite.prototype.__defaultStyles.lzclickdiv.cursor="pointer"
+}
LzSprite.prototype.__defaultStyles.writeCSS()
LzSprite.prototype.__LZdiv=null
LzSprite.prototype.__LZimg=null
@@ -1674,15 +1701,19 @@
LzSprite.prototype.stretches=null
LzSprite.prototype.resourceWidth=null
LzSprite.prototype.resourceHeight=null
+LzSprite.prototype.cursor=null
LzSprite.prototype.setAccessible=function($1){
}
LzSprite.prototype.init=function($1){
this.setVisible($1)
-if(this.isroot&&this.__LZsplash){
-LzSprite.prototype.__discardElement(this.__LZsplash)
+if(this.isroot){
+var $2=document.getElementById("lzsplash")
+if($2){
+LzSprite.prototype.__discardElement($2)
}
}
+}
LzSprite.prototype.__topZ=1
LzSprite.prototype.__parent=null
LzSprite.prototype.__children=null
@@ -1777,6 +1808,12 @@
}
}
}
+if($2==null){
+$2=this.width==null?"100%":this.width
+}
+if($3==null){
+$3=this.height==null?"100%":this.height
+}
if($2==null||$3==null){
return
}
@@ -1790,6 +1827,10 @@
this.fontname=$1
}
LzSprite.prototype.setClickable=function($1){
+$1=$1==true
+if(this.clickable==$1){
+return
+}
if(this.__LZimg!=null){
if(this.__LZdiv._clickable){
this.__setClickable(false,this.__LZdiv)
@@ -1802,7 +1843,7 @@
this.__LZclick=document.createElement("div")
}
this.__LZclick.owner=this
-this.__LZclick.className="lzdiv"
+this.__LZclick.className="lzclickdiv"
this.__LZclick.style.width=this.__LZdiv.style.width
this.__LZclick.style.height=this.__LZdiv.style.height
if(LzSprite.prototype.quirks.fix_clickable){
@@ -1813,8 +1854,15 @@
}
this.__setClickable($1,this.__LZclick)
if(LzSprite.prototype.quirks.fix_clickable){
+if(LzSprite.prototype.quirks.fix_ie_clickable){
+if($1!=true){
+this.__LZclick.style.display="none"
+}
+this.__LZclick.style.display=$1?"":"none"
+}else{
this.__LZclick.style.display=$1?"block":"none"
}
+}
}else{
if(LzSprite.prototype.quirks.fix_clickable){
if(!this.__LZclick){
@@ -1825,13 +1873,17 @@
this.__LZclick=document.createElement("div")
}
this.__LZclick.owner=this
-this.__LZclick.className="lzdiv"
+this.__LZclick.className="lzclickdiv"
this.__LZclick.style.width=this.__LZdiv.style.width
this.__LZclick.style.height=this.__LZdiv.style.height
this.__LZclickdiv.appendChild(this.__LZclick)
}
this.__setClickable($1,this.__LZclick)
+if(LzSprite.prototype.quirks.fix_ie_clickable){
+this.__LZclick.style.display=$1?"":"none"
+}else{
this.__LZclick.style.display=$1?"block":"none"
+}
}else{
this.__setClickable($1,this.__LZdiv)
}
@@ -1884,11 +1936,14 @@
if(!$1){
$1=window.event
}
-if(LzKeyboardKernel){
+if(window["LzKeyboardKernel"]){
LzKeyboardKernel.__keyboardEvent($1)
}
var $2=false
var $3="on"+$1.type
+if($3=="onmouseover"&&LzInputTextSprite.prototype.__lastshown!=null){
+LzInputTextSprite.prototype.__hideIfNotFocused()
+}
if($3=="onmousedown"){
$1.cancelBubble=true
this.__mousedown=true
@@ -1914,9 +1969,10 @@
}
}
LzSprite.prototype.setX=function($1){
-if($1==null||$1==this.x){
+if($1==null||$1==this.x||isNaN($1)){
return
}
+this.__poscache=null
this.x=$1
this.__LZdiv.style.left=this.CSSDimension($1)
if(LzSprite.prototype.quirks.fix_clickable){
@@ -1940,9 +1996,10 @@
}
}
LzSprite.prototype.setY=function($1){
-if($1==null||$1==this.y){
+if($1==null||$1==this.y||isNaN($1)){
return
}
+this.__poscache=null
this.y=$1
this.__LZdiv.style.top=this.CSSDimension($1)
if(LzSprite.prototype.quirks.fix_clickable){
@@ -1974,12 +2031,6 @@
LzSprite.prototype.__LZsetClickRegion=function($1){
}
-LzSprite.prototype.__LZsetXOffset=function($1){
-
-}
-LzSprite.prototype.__LZsetYOffset=function($1){
-
-}
LzSprite.prototype.setVisible=function($1){
if(this.visible==$1){
return
@@ -1987,9 +2038,13 @@
this.visible=$1
this.__LZdiv.style.display=$1?"block":"none"
if(LzSprite.prototype.quirks.fix_clickable){
+if(this.__LZclick&&LzSprite.prototype.quirks.fix_ie_clickable){
+this.__LZclick.style.display=$1?"":"none"
+}else{
this.__LZclickdiv.style.display=$1?"block":"none"
}
}
+}
LzSprite.prototype.setColor=function($1){
if(this.color==$1){
return
@@ -2096,7 +2151,7 @@
var $1=this.frames.length
for(var $2=0;$2<$1;$2++){
var $3=this.frames[$2]
-var $4=this.__ImgPool.get($3,$2!=0)
+var $4=this.__ImgPool.get($3,true)
if(LzSprite.prototype.quirks.ie_alpha_image_loader){
this.__updateIEAlpha($4)
}
@@ -2209,7 +2264,7 @@
}
LzSprite.prototype.__updateClip=function(){
if(this.clip&&this.width!=null&&this.width>=0&&this.height!=null&&this.height>=0){
-this.__LZdiv.style.clip="rect(0px "+this.width+"px "+this.height+"px 0px)"
+this.__LZdiv.style.clip="rect(0px "+this.CSSDimension(this.width)+" "+this.CSSDimension(this.height)+" 0px)"
}else{
if(this.__LZdiv.style.clip){
this.__LZdiv.style.clip="rect(auto auto auto auto)"
@@ -2247,6 +2302,9 @@
}
}
}
+LzSprite.prototype.predestroy=function(){
+
+}
LzSprite.prototype.destroy=function($1){
if(this.destroyed==true){
return
@@ -2273,9 +2331,14 @@
this.__discardElement(this.__LzInputDiv)
}
if(this.__LZdiv){
+this.__LZdiv.onselectstart=null
this.__setClickable(false,this.__LZdiv)
this.__discardElement(this.__LZdiv)
}
+if(this.__LZinputclickdiv){
+this.__LZinputclickdiv.onmousedown=null
+this.__discardElement(this.__LZinputclickdiv)
+}
if(this.__LZclickdiv){
this.__discardElement(this.__LZclickdiv)
}
@@ -2299,6 +2362,9 @@
}
}
LzSprite.prototype.__getPos=function(){
+if(this.__poscache){
+return this.__poscache
+}
var $1=this.__LZdiv
var $2=null
var $3={}
@@ -2342,6 +2408,7 @@
$2=null
}
}
+this.__poscache=$3
return $3
}
LzSprite.prototype.getWidth=function(){
@@ -2352,9 +2419,24 @@
var $1=this.__LZdiv.clientHeight
return $1==0?this.height:$1
}
+LzSprite.prototype.setCursor=function($1){
+if($1==this.cursor){
+return
+}
+if(this.clickable!=true){
+this.setClickable(true)
+}
+this.cursor=$1
+var $1=LzSprite.prototype.__defaultStyles.hyphenate($1)
+this.__LZclick.style.cursor=$1
+}
LzSprite.prototype.setShowHandCursor=function($1){
-
+if($1==true){
+this.setCursor("pointer")
+}else{
+this.setCursor("default")
}
+}
LzSprite.prototype.getMCRef=function(){
return this.__LZdiv
}
@@ -2494,6 +2576,32 @@
LzSprite.prototype.getZ=function(){
return this.__z
}
+LzSprite.prototype.unload=function(){
+if(this.__ImgPool){
+this.__ImgPool.destroy()
+this.__ImgPool=null
+}
+}
+LzSprite.prototype.__setCSSClassProperty=function($1,$2,$3){
+var $4=document.all?"rules":"cssRules"
+var $5=document.styleSheets
+var $6=$5.length-1
+for(var $7=$6;$7>=0;$7--){
+var $8=$5[$7][$4]
+var $9=$8.length-1
+for(var $10=$9;$10>=0;$10--){
+if($8[$10].selectorText==$1){
+$8[$10].style[$2]=$3
+}
+}
+}
+}
+LzSprite.prototype.setDefaultContextMenu=function($1){
+
+}
+LzSprite.prototype.setContextMenu=function($1){
+
+}
if(LzSprite.prototype.quirks.ie_leak_prevention){
function __cleanUpForIE(){
var $1=document.getElementsByTagName("div")
@@ -2505,8 +2613,12 @@
document.onmousemove=null
document.onmousedown=null
document.onmouseup=null
+document.oncontextmenu=null
document.onkeydown=null
document.onkeyup=null
+document.onkeypress=null
+window.onresize=null
+window.onunload=null
}
window.onunload=__cleanUpForIE
}
@@ -2534,12 +2646,15 @@
this.setFontName($1.font)
this.setFontStyle($1.fontstyle)
this.setFontSize($1.fontsize)
+this.text=$1.text
}
LzTextSprite.prototype._fontStyle="normal"
LzTextSprite.prototype._fontWeight="normal"
LzTextSprite.prototype._fontSize="11px"
LzTextSprite.prototype._fontFamily="Verdana,Vera,sans-serif"
LzTextSprite.prototype._whiteSpace="normal"
+LzTextSprite.prototype.__wpadding=4
+LzTextSprite.prototype.__hpadding=4
LzTextSprite.prototype.setFontSize=function($1){
if($1==null||$1<0){
return
@@ -2591,14 +2706,9 @@
if($2!=true&&this.text==$1){
return
}
-$1+=""
this.text=$1
if(this.multiline&&$1&&$1.indexOf("\n")>=0){
-if(this._whiteSpace!="pre"){
-this._whiteSpace="pre"
-this.__LZdiv.style.whiteSpace="pre"
-}
-if($1&&this.quirks["inner_html_strips_newlines"]){
+if(this.quirks["inner_html_strips_newlines"]){
$1=$1.replace(RegExp("$","mg"),"<br />")
}
}else{
@@ -2617,8 +2727,11 @@
this.fieldHeight=null
}
LzTextSprite.prototype.setMultiline=function($1){
-if(this.multiline!=($1==true)){
-this.multiline=$1==true
+$1=$1==true
+if(this.multiline==$1){
+return
+}
+this.multiline=$1
if($1){
if(this._whiteSpace!="normal"){
this._whiteSpace="normal"
@@ -2634,7 +2747,6 @@
}
this.setText(this.text,true)
}
-}
LzTextSprite.prototype.setPattern=function($1){
}
@@ -2642,7 +2754,7 @@
if(this.text==null||this.text==""){
return 0
}
-return this.getTextSize(this.text).width
+return this.getTextSize(this.text,this.resize).width
}
LzTextSprite.prototype.getTextHeight=function(){
if(this.__LZdiv){
@@ -2656,8 +2768,8 @@
return this.fieldHeight
}
if(this.text==null||this.text==""){
-this.fieldHeight=0
-return 0
+this.fieldHeight=this.getTextSize("Yq_gy").height
+return this.fieldHeight
}
if(this.multiline){
var $1=false
@@ -2666,14 +2778,14 @@
this.__LZdiv.style.height="auto"
}
var $2=this.__LZdiv.clientHeight
-if($2==0){
+if($2==0||$2==null){
$2=this.getTextSize(this.text).height
if($2>0&&LzSprite.prototype.quirks.emulate_flash_font_metrics){
-$2+=4
+$2+=this.__hpadding
}
}else{
if($2>0&&LzSprite.prototype.quirks.emulate_flash_font_metrics){
-$2+=4
+$2+=this.__hpadding
}
this.fieldHeight=$2
}
@@ -2688,67 +2800,78 @@
}
return $2
}
-LzTextSprite.prototype.getTextSize=function($1){
-if(this.text==null||this.text==""){
+LzTextSprite.prototype.getTextSize=function($1,$2){
+if($1==null||$1==""){
return {width:0,height:0}
}
if(!this._textsizecache){
this._textsizecache={}
}
if(!this._textsizecache[$1]){
-var $2={}
-var $3="position: absolute"
-$3+=";visibility: hidden"
-$3+=";font-size: "+this._fontSize
-$3+=";font-style: "+this._fontStyle
-$3+=";font-weight: "+this._fontWeight
-$3+=";font-family: "+this._fontFamily
-if(this.multiline){
+var $3={}
+var $4="position: absolute"
+$4+=";visibility: hidden"
+$4+=";font-size: "+this._fontSize
+$4+=";font-style: "+this._fontStyle
+$4+=";font-weight: "+this._fontWeight
+$4+=";font-family: "+this._fontFamily
+if(this.multiline&&$2!=true){
if(this.width){
-$3+=";width: "+this.width+"px"
+$4+=";width: "+this.width+"px"
}
}
if(document.all&&document.body.insertAdjacentHTML){
-if(this.multiline){
-if($1&&LzSprite.prototype.quirks["inner_html_strips_newlines"]){
+if(this.multiline&&$1&&LzSprite.prototype.quirks["inner_html_strips_newlines"]){
$1=$1.replace(RegExp("$","mg"),"<br />")
}
-$3+="; white-space: "+this._whiteSpace
+if(this.__LzInputDiv!=null){
+var $5="div"
+}else{
+var $5="span"
}
-var $4='<span id="testSpan"'
-$4+=' style="'+$3+'">'
-$4+=$1
-$4+="</span>"
-document.body.insertAdjacentHTML("beforeEnd",$4)
-$2.width=document.all.testSpan.offsetWidth
-$2.height=document.all.testSpan.offsetHeight
+$4+="; white-space: "+this._whiteSpace
+var $6="<"+$5+' id="testSpan"'
+$6+=' style="'+$4+'">'
+$6+=$1
+$6+="</"+$5+">"
+document.body.insertAdjacentHTML("beforeEnd",$6)
+$3.width=document.all.testSpan.offsetWidth
+$3.height=document.all.testSpan.offsetHeight
document.all.testSpan.outerHTML=""
}else{
if(document.getElementById&&document.createElement){
if(this.__LzInputDiv!=null){
-$3+=";white-space: pre"
+$4+=";white-space: pre"
}else{
-$3+=";white-space: "+this._whiteSpace
+$4+=";white-space: "+this._whiteSpace
+if(this.multiline&&$1&&LzSprite.prototype.quirks["inner_html_strips_newlines"]){
+$1=$1.replace(RegExp("$","mg"),"<br />")
}
+}
if(this.multiline){
-var $5=document.createElement("div")
+var $7=document.createElement("div")
}else{
-var $5=document.createElement("span")
+var $7=document.createElement("span")
}
-$5.setAttribute("style",$3)
-$5.innerHTML=$1
-document.body.appendChild($5)
-$2.width=$5.offsetWidth
-$2.height=$5.offsetHeight
-document.body.removeChild($5)
+$7.setAttribute("style",$4)
+$7.innerHTML=$1
+document.body.appendChild($7)
+$3.width=$7.offsetWidth
+$3.height=$7.offsetHeight
+document.body.removeChild($7)
}
}
if(LzSprite.prototype.quirks.emulate_flash_font_metrics){
-$2.height=Math.floor($2.height*1.0000002)+(this.multiline?0:4)
-$2.width=$2.width+(this.multiline?0:4)
+$3.height=Math.floor($3.height*1.0000002)+(this.multiline?0:this.__hpadding)
+$3.width=$3.width+(this.multiline?0:this.__wpadding)
+if(this._whiteSpace=="normal"){
+if(this.multiline){
+$3.width+=this.__wpadding
}
-this._textsizecache[$1]=$2
}
+}
+this._textsizecache[$1]=$3
+}
return this._textsizecache[$1]
}
LzTextSprite.prototype.setSelectable=function($1){
@@ -2767,21 +2890,27 @@
LzTextSprite.prototype.__cancelhandler=function(){
return false
}
-LzTextSprite.prototype.getText=function(){
-return this.text
+LzTextSprite.prototype.setResize=function($1){
+this.resize=$1==true
}
-LzTextSprite.prototype.setResize=function(){
-
+LzTextSprite.prototype.setSelection=function($1,$2){
+Debug.warn("LzTextSprite.setSelection is not implemented yet.")
}
-function setSelection($1,$2){
-Debug.warn("LzTextSprite.setSelection is not supported.")
+LzTextSprite.prototype.getSelectionPosition=function(){
+Debug.warn("LzTextSprite.getSelectionPosition is not implemented yet.")
}
-function getSelectionPosition(){
-Debug.warn("LzTextSprite.getSelectionPosition is not supported.")
+LzTextSprite.prototype.getSelectionSize=function(){
+Debug.warn("LzTextSprite.getSelectionSize is not implemented yet.")
}
-function getSelectionSize(){
-Debug.warn("LzTextSprite.getSelectionSize is not supported.")
+LzTextSprite.prototype.getScroll=function(){
+Debug.warn("LzTextSprite.getScroll is not implemented yet.")
}
+LzTextSprite.prototype.getMaxScroll=function(){
+Debug.warn("LzTextSprite.getMaxScroll is not implemented yet.")
+}
+LzTextSprite.prototype.setScroll=function(){
+Debug.warn("LzTextSprite.setScroll is not implemented yet.")
+}
document.onselectstart=function(){
return false
}
@@ -2841,12 +2970,59 @@
}
this.__LzInputDiv.setAttribute("value",$1)
if(LzSprite.prototype.quirks.fix_clickable){
+if(LzSprite.prototype.quirks.fix_ie_clickable){
+this.__LZinputclickdiv=document.createElement("img")
+this.__LZinputclickdiv.src=LzSprite.prototype.blankimage
+}else{
+this.__LZinputclickdiv=document.createElement("div")
+}
+this.__LZinputclickdiv.className="lzclickdiv"
+this.__LZinputclickdiv.owner=this
+this.__LZinputclickdiv.onmouseover=function(){
+this.owner.__show()
+}
+this.__LZclickdiv.appendChild(this.__LZinputclickdiv)
+}
+this.__LZdiv.appendChild(this.__LzInputDiv)
+this.__setTextEvents(true)
+}
+LzInputTextSprite.prototype.__show=function(){
+if(this.__shown==true||this.disabled==true){
+return
+}
+this.__hideIfNotFocused()
+LzInputTextSprite.prototype.__lastshown=this
+this.__shown=true
+this.__LzInputDiv=this.__LZdiv.removeChild(this.__LzInputDiv)
+if(LzSprite.prototype.quirks.fix_ie_clickable){
this.__LZclickdiv.appendChild(this.__LzInputDiv)
+this.__setCSSClassProperty(".lzclickdiv","display","none")
}else{
+this.__LZinputclickdiv.appendChild(this.__LzInputDiv)
+}
+}
+LzInputTextSprite.prototype.__hideIfNotFocused=function(){
+if(LzInputTextSprite.prototype.__lastshown==null){
+return
+}
+if(LzInputTextSprite.prototype.__focusedSprite!=LzInputTextSprite.prototype.__lastshown){
+LzInputTextSprite.prototype.__lastshown.__hide()
+}
+}
+LzInputTextSprite.prototype.__hide=function(){
+if(this.__shown!=true||this.disabled==true){
+return
+}
+LzInputTextSprite.prototype.__lastshown=null
+this.__shown=false
+if(LzSprite.prototype.quirks.fix_ie_clickable){
+this.__setCSSClassProperty(".lzclickdiv","display","")
+this.__LzInputDiv=this.__LZclickdiv.removeChild(this.__LzInputDiv)
+}else{
+this.__LzInputDiv=this.__LZinputclickdiv.removeChild(this.__LzInputDiv)
+}
this.__LZdiv.appendChild(this.__LzInputDiv)
}
-this.__setTextEvents(true)
-}
LzInputTextSprite.prototype.gotBlur=function(){
if(LzInputTextSprite.prototype.__focusedSprite!=this){
return
@@ -2859,9 +3035,6 @@
}
this.select()
}
-LzInputTextSprite.prototype.getText=function(){
-return this.__LzInputDiv.value
-}
LzInputTextSprite.prototype.setText=function($1){
if($1==null){
return
@@ -2914,21 +3087,23 @@
var $3=$1?$1.keyCode:event.keyCode
if($2=="onfocus"||$2=="onmousedown"){
LzInputTextSprite.prototype.__focusedSprite=this
+this.__show()
if($2=="onfocus"&&this._cancelfocus){
this._cancelfocus=false
return
}
-if(LzKeyboardKernel){
+if(window["LzKeyboardKernel"]){
LzKeyboardKernel.__cancelKeys=false
}
}else{
if($2=="onblur"){
-if(LzKeyboardKernel){
+if(window["LzKeyboardKernel"]){
LzKeyboardKernel.__cancelKeys=true
}
if(LzInputTextSprite.prototype.__focusedSprite==this){
LzInputTextSprite.prototype.__focusedSprite=null
}
+this.__hide()
if(this._cancelblur){
this._cancelblur=false
return
@@ -2940,7 +3115,8 @@
}
}
LzInputTextSprite.prototype.setEnabled=function($1){
-this.__LzInputDiv.disabled=!$1
+this.disabled=!$1
+this.__LzInputDiv.disabled=this.disabled
}
LzInputTextSprite.prototype.setMaxLength=function($1){
if($1==null){
@@ -2950,18 +3126,20 @@
}
LzInputTextSprite.prototype.select=function($1,$2){
this._cancelblur=true
+this.__show()
this.__LzInputDiv.select()
-if(LzKeyboardKernel){
+if(window["LzKeyboardKernel"]){
LzKeyboardKernel.__cancelKeys=false
}
}
LzInputTextSprite.prototype.setSelection=LzInputTextSprite.prototype.select
LzInputTextSprite.prototype.deselect=function(){
this._cancelfocus=true
+this.__hide()
if(this.__LzInputDiv&&this.__LzInputDiv.blur){
this.__LzInputDiv.blur()
}
-if(LzKeyboardKernel){
+if(window["LzKeyboardKernel"]){
LzKeyboardKernel.__cancelKeys=true
}
}
@@ -3001,14 +3179,16 @@
LzInputTextSprite.prototype.setWidth=function($1){
this.__setWidth($1)
if(LzSprite.prototype.quirks.fix_clickable){
-this.__LZclickdiv.style.width=this.__LZdiv.style.width
+this.__LZclickdiv.style.width=this.width-2+"px"
+this.__LZinputclickdiv.style.width=this.width-2+"px"
}
}
LzInputTextSprite.prototype.__setHeight=LzSprite.prototype.setHeight
LzInputTextSprite.prototype.setHeight=function($1){
this.__setHeight($1)
if(LzSprite.prototype.quirks.fix_clickable){
-this.__LZclickdiv.style.height=this.__LZdiv.style.height
+this.__LZclickdiv.style.height=this.height-2+"px"
+this.__LZinputclickdiv.style.height=this.height-2+"px"
}
}
LzInputTextSprite.prototype.setColor=function($1){
@@ -3018,40 +3198,49 @@
this.color=$1
this.__LzInputDiv.style.color=this.getColor($1)
}
+LzInputTextSprite.prototype.getText=function(){
+return this.__LzInputDiv.value
+}
LzInputTextSprite.prototype.getTextfieldHeight=function(){
if(this.fieldHeight!=null){
return this.fieldHeight
}
if(this.text==null||this.text==""){
-this.fieldHeight=0
-return 0
+var $1=true
+this.text="YgjyZT;:"
}
if(this.multiline){
-var $1=false
+var $2=false
if(this.height){
-$1=this.__LzInputDiv.style.height
+$2=this.__LzInputDiv.style.height
this.__LzInputDiv.style.height="auto"
}
-var $2=this.__LzInputDiv.scrollHeight
-if($2==0){
-$2=this.getTextSize(this.text).height
+var $3=this.__LzInputDiv.scrollHeight
+if($3==0||$3==null){
+$3=this.getTextSize(this.text).height
}else{
-this.fieldHeight=$2
+if(LzSprite.prototype.quirks["safari_textarea_subtract_scrollbar_height"]){
+$3+=24
}
+this.fieldHeight=$3
+}
if(this.height){
-this.__LzInputDiv.style.height=$1
+this.__LzInputDiv.style.height=$2
}
}else{
-var $2=this.getTextSize(this.text).height
-if($2!=0){
-this.fieldHeight=$2
+var $3=this.getTextSize(this.text).height
+if($3!=0){
+this.fieldHeight=$3
}
}
if(LzSprite.prototype.quirks.emulate_flash_font_metrics){
-$2+=4
+$3+=4
}
-return $2
+if($1){
+this.text=""
}
+return $3
+}
var LzXMLParser=(new Object)
LzXMLParser.parseXML=function($1,$2,$3){
var $4=(new DOMParser())
@@ -3276,6 +3465,9 @@
if(this.req){
var __pthis__=this
this.req.onreadystatechange=function(){
+if(__pthis__.req==null){
+return
+}
if(__pthis__.req.readyState==4){
if(__pthis__.req.status==200||__pthis__.req.status==304){
var $1=null
@@ -3308,7 +3500,36 @@
}
this.setupTimeout(this,this.timeout)
}
-var LzView=NewClass.make("LzView",LzNode,{construct:function($1,$2){
+var LzScreenKernel={width:null,height:null,__resizeEvent:function(){
+if(window.top.innerHeight){
+var $1=window.top.document.body
+LzScreenKernel.width=$1.scrollWidth
+LzScreenKernel.height=$1.scrollHeight
+}else{
+if(window.top.document.documentElement&&window.top.document.documentElement.clientHeight){
+var $1=window.top.document.documentElement
+LzScreenKernel.width=$1.scrollWidth
+LzScreenKernel.height=$1.scrollHeight
+}else{
+if(window.top.document.body){
+var $1=window.top.document.body
+LzScreenKernel.width=window.top.document.body.scrollWidth
+LzScreenKernel.height=window.top.document.body.clientHeight
+}
+}
+}
+if(LzScreenKernel.__callback){
+LzScreenKernel.__scope[LzScreenKernel.__callback]({width:LzScreenKernel.width,height:LzScreenKernel.height})
+}
+},__init:function(){
+window.onresize=LzScreenKernel.__resizeEvent
+},__callback:null,__scope:null,setCallback:function($1,$2){
+this.__scope=$1
+this.__callback=$2
+this.__init()
+this.__resizeEvent()
+}}
+var LzView=Class.make("LzView",LzNode,{construct:function($1,$2){
this.nextMethod(arguments.callee,"construct").call(this,$1?$1:canvas,$2)
var $3=this.immediateparent
this.mask=$3.mask
@@ -3328,7 +3549,7 @@
}
if("clip" in $2&&$2["clip"]){
if(this.sprite){
-this.sprite.setClip(true)
+this.makeMasked()
}
}
if($2["stretches"]){
@@ -3369,7 +3590,7 @@
},__LZinstantiationDone:function(){
this.immediateparent.addSubview(this)
this.nextMethod(arguments.callee,"__LZinstantiationDone").apply(this,arguments)
-},focusable:false,sprite:null,visible:true,__LZvisibleSet:null,__LZvizO:true,__LZvizDat:true,__LZvizLoad:true,opacity:1,bgcolor:null,x:0,y:0,rotation:0,width:0,height:0,unstretchedwidth:0,unstretchedheight:0,subviews:[],__LZclickregion:"LzMouseEvents",xoffset:0,yoffset:0,__LZrsin:0,__LZrcos:1,__LZcaloffset:false,_xscale:1,_yscale:1,totalframes:0,frame:0,loadperc:0,framesloadratio:0,loadratio:0,hassetheight:false,hassetwidth:false,__LZisView:true,addedToParent:null,checkPlayStatusDel:null,masked:false,pixellock:null,setButtonSize:null,showhandcursor:null,updatePlayDel:null,resource:null,resourcewidth:null,resourceheight:null,__LZbgColorO:null,__LZbgRef:null,__LZbuttonRef:null,__LZcheckwidth:true,__LZcheckheight:true,__LZhasoffset:null,__LZisBackgrounded:null,__LZmaskClip:null,__LZmovieClipRef:null,__LZoutlieheight:null,__LZoutliewidth:null,__LZsubUniqueNum:null,setLayout:function($1){
+},mask:null,focusable:false,focustrap:null,fontstyle:null,fontsize:null,sprite:null,visible:true,__LZvisibleSet:null,__LZvizO:true,__LZvizDat:true,__LZvizLoad:true,opacity:1,bgcolor:null,x:0,y:0,rotation:0,width:0,height:0,unstretchedwidth:0,unstretchedheight:0,subviews:[],__LZclickregion:"LzMouseEvents",xoffset:0,yoffset:0,__LZrsin:0,__LZrcos:1,__LZcaloffset:false,_xscale:1,_yscale:1,totalframes:0,frame:0,loadperc:0,framesloadratio:0,loadratio:0,hassetheight:false,hassetwidth:false,__LZisView:true,addedToParent:null,checkPlayStatusDel:null,masked:false,pixellock:null,setButtonSize:null,showhandcursor:null,updatePlayDel:null,resource:null,resourcewidth:null,resourceheight:null,__LZbgColorO:null,__LZbgRef:null,__LZbuttonRef:null,__LZcheckwidth:true,__LZcheckheight:true,__LZhasoffset:null,__LZisBackgrounded:null,__LZmaskClip:null,__LZmovieClipRef:null,__LZoutlieheight:null,__LZoutliewidth:null,__LZsubUniqueNum:null,setLayout:function($1){
if(!this.isinited){
this.__LZstoreAttr($1,"layout")
return
@@ -3439,33 +3660,28 @@
}
this.__LZhaser=$1=="empty"
this.resource=$1
-if(this.onresource){
this.onresource.sendEvent($1)
-}
return this.sprite.__LZmovieClipRef
},resourceload:function($1){
if("resource" in $1){
this.resource=$1.resource
+this.onresource.sendEvent($1.resource)
}
+if(this.resourcewidth==$1.width&&this.resourceheight==$1.height){
+return
+}
if("width" in $1){
this.resourcewidth=$1.width
+this.onresourcewidth.sendEvent($1.width)
}
if("height" in $1){
this.resourceheight=$1.height
-}
-if("resource" in $1&&this.onresource){
-this.onresource.sendEvent($1.resource)
-}
-if("width" in $1&&this.onresourcewidth){
-this.onresourcewidth.sendEvent($1.width)
-}
-if("height" in $1&&this.onresourceheight){
this.onresourceheight.sendEvent($1.height)
}
-if(!this.hassetwidth&&this.resourcewidth>this.width||this._setrescwidth&&this.unstretchedwidth<this.resourcewidth){
+if(!this.hassetwidth&&this.resourcewidth!=this.width||this._setrescwidth&&this.unstretchedwidth!=this.resourcewidth){
this.updateWidth(this.resourcewidth)
}
-if(!this.hassetheight&&this.resourceheight>this.height||this._setrescheight&&this.unstretchedheight<this.resourceheight){
+if(!this.hassetheight&&this.resourceheight!=this.height||this._setrescheight&&this.unstretchedheight!=this.resourceheight){
this.updateHeight(this.resourceheight)
}
if($1.skiponload!=true&&this.onload){
@@ -3480,7 +3696,9 @@
if(this.__LZdeleted){
return
}
-this.bringToFront()
+if(this.sprite){
+this.sprite.predestroy()
+}
if(this.addedToParent){
var $2=this.immediateparent.subviews
if($2!=null){
@@ -3603,8 +3821,12 @@
},setX:function($1){
this.x=$1
if(this.__LZhasoffset){
+if(this.sprite.capabilities.rotation){
$1-=this.xoffset*this.__LZrcos-this.yoffset*this.__LZrsin
+}else{
+$1-=this.xoffset
}
+}
if(this.pixellock){
$1=Math.floor($1)
}
@@ -3616,8 +3838,12 @@
},setY:function($1){
this.y=$1
if(this.__LZhasoffset){
+if(this.sprite.capabilities.rotation){
$1-=this.xoffset*this.__LZrsin+this.yoffset*this.__LZrcos
+}else{
+$1-=this.yoffset
}
+}
if(this.pixellock){
$1=Math.floor($1)
}
@@ -3662,13 +3888,17 @@
}
}
}
-},__LZsetXOffset:function($1){
-this.sprite.__LZsetXOffset($1)
+},setXOffset:function($1){
+this.__LZhasoffset=$1!=0
this.xoffset=$1
+this.setX(this.x)
+this.setY(this.y)
this.onxoffset.sendEvent($1)
-},__LZsetYOffset:function($1){
-this.sprite.__LZsetYOffset($1)
+},setYOffset:function($1){
+this.__LZhasoffset=$1!=0
this.yoffset=$1
+this.setX(this.x)
+this.setY(this.y)
this.onyoffset.sendEvent($1)
},getBounds:function(){
var $1=[-this.xoffset,-this.yoffset,this.width-this.xoffset,-this.yoffset,-this.xoffset,this.height-this.yoffset,this.width-this.xoffset,this.height-this.yoffset,this.rotation,this.x,this.y]
@@ -3736,9 +3966,9 @@
},getColorTransform:function(){
return this.sprite.getColorTransform()
},getWidth:function(){
-return this.sprite.getWidth()
+return this.width
},getHeight:function(){
-return this.sprite.getHeight()
+return this.height
},__LZcheckSize:function($1,$2,$3){
if($1.addedToParent){
if($1.__LZhasoffset||$1.rotation!=0){
@@ -3912,10 +4142,28 @@
return
}
this.sprite.bringToFront()
+},getDepthList:function(){
+var $1=[]
+var $2=this.subviews
+for(var $3=0;$3<$2.length;$3++){
+$1[$3]=$2[$3]
+}
+$1.sort(this.__zCompare)
+return $1
+},__zCompare:function($1,$2){
+var $3=$1.sprite.getZ()
+var $4=$2.sprite.getZ()
+if($3<$4){
+return -1
+}
+if($3>$4){
+return 1
+}
+return 0
},sendBehind:function($1){
-return this.sprite.sendBehind($1.sprite)
+return $1?this.sprite.sendBehind($1.sprite):false
},sendInFrontOf:function($1){
-return this.sprite.sendInFrontOf($1.sprite)
+return $1?this.sprite.sendInFrontOf($1.sprite):false
},sendToBack:function(){
this.sprite.sendToBack()
},setResourceNumber:function($1){
@@ -3964,19 +4212,7 @@
this.clickable=$1
this.onclickable.sendEvent($1)
},setCursor:function($1){
-if($1==null){
-return
-}
-this._cures=$1
-if(!this._moDel){
-this._moDel=LzDelegate.make(this,"_cursorGotMouseover",this,"onmouseover")
-this._muDel=LzDelegate.make(LzCursor,"unlock",this,"onmouseout")
-}
-if(!this.__LZbuttonRef){
-this.setClickable(true)
-}
-},_cursorGotMouseover:function(){
-LzCursor.setCursorGlobal(this._cures)
+this.sprite.setCursor($1)
},setPlay:function($1){
if($1){
this.play()
@@ -4035,91 +4271,20 @@
},setShowHandCursor:function($1){
this.sprite.setShowHandCursor($1)
},setAAActive:function($1,$2){
-if($2==null||$2=="aaactive"){
-$2=this.getMCRef()
-}
-if($2._accProps==null){
-$2._accProps={}
-}
-$2._accProps.forceSimple=$1==false
-if($2=this.__LZbuttonRef.but){
-if($2._accProps==null){
-$2._accProps={}
-}
-$2._accProps.forceSimple=$1
-}
-this.aaactive=$1
+Debug.warn("setAAActive is not implemented yet.")
},setAAName:function($1,$2){
-if($2==null||$2=="aaname"){
-$2=this.getMCRef()
-}
-if($2._accProps==null){
-$2._accProps={}
-}
-$2._accProps.name=$1
-if($2=this.__LZbuttonRef.but){
-if($2._accProps==null){
-$2._accProps={}
-}
-$2._accProps.name=$1
-}
-this.aaname=$1
+Debug.warn("setAAName is not implemented yet.")
},setAADescription:function($1,$2){
-if($2==null||$2=="aadescription"){
-$2=this.getMCRef()
-}
-if($2._accProps==null){
-$2._accProps={}
-}
-$2._accProps.description=$1
-if($2=this.__LZbuttonRef.but){
-if($2._accProps==null){
-$2._accProps={}
-}
-$2._accProps.description=$1
-}
-this.aadescription=$1
+Debug.warn("setAADescription is not implemented yet.")
},setAATabIndex:function($1,$2){
-if($2==null||$2=="aatabindex"){
-$2=this.getMCRef()
-}
-$2.tabIndex=$1
-this.aatabindex=$1
+Debug.warn("setAATabIndex is not implemented yet.")
},setAASilent:function($1,$2){
-if($2==null||$2=="aasilent"){
-$2=this.getMCRef()
-}
-if($2._accProps==null){
-$2._accProps={}
-}
-$2._accProps.silent=$1
-if($2=this.__LZbuttonRef.but){
-if($2._accProps==null){
-$2._accProps={}
-}
-$2._accProps.silent=$1
-}
-this.aasilent=$1
+Debug.warn("setAASilent is not implemented yet.")
},shouldYieldFocus:function(){
return true
},setContextMenu:function($1){
this.contextMenu=$1
-if(!($1 instanceof ContextMenu)){
-$1=$1.__LZcontextMenu()
-}else{
-
-}
-var $2=this.getMCRef()
-var $3=this.__LZbgRef
-if($2!=null){
-$2.menu=$1
-}
-if($3!=null){
-$3.menu=$1
-}
-if($3==null&&$2==null){
-
-}
+this.sprite.setContextMenu($1)
},getContextMenu:function(){
return this.contextMenu
}},{tagname:"view",__LZproxypolicies:[],__LZcheckProxyPolicy:function($1){
@@ -4183,11 +4348,10 @@
DeclareEvent(prototype,"onxoffset")
DeclareEvent(prototype,"ony")
DeclareEvent(prototype,"onyoffset")
+DeclareEvent(prototype,"ondblclick")
setters.clip=-1
setters.x="setX"
setters.y="setY"
-setters.width="setWidth"
-setters.height="setHeight"
setters.rotation="setRotation"
setters.opacity="setOpacity"
setters.alpha="setOpacity"
@@ -4205,7 +4369,6 @@
setters.stretches="stretchResource"
setters.play="setPlay"
setters.showhandcursor="setShowHandCursor"
-setters.frame="setResourceNumber"
setters.layout="setLayout"
setters.aaactive="setAAActive"
setters.aaname="setAAName"
@@ -4215,10 +4378,11 @@
__LZdelayedSetters.layout="setLayout"
earlySetters.clickregion=7
earlySetters.stretches=8
-setters.xoffset="__LZsetXOffset"
-setters.yoffset="__LZsetYOffset"
-getters.width="getWidth"
-getters.height="getHeight"
+setters.xoffset="setXOffset"
+setters.yoffset="setYOffset"
+setters.width="setWidth"
+setters.height="setHeight"
+setters.frame="setResourceNumber"
LzView.prototype.__LZlastmtrix=[0,0,0,0,0,0,0,0,0,0,0]
prototype.getBounds.dependencies=function($1,$2){
return [$2,"rotation",$2,"x",$2,"y",$2,"width",$2,"height"]
@@ -4299,7 +4463,7 @@
}
}
})()
-var LzViewLinkage=NewClass.make("LzViewLinkage",null,{initialize:function($1,$2){
+var LzViewLinkage=Class.make("LzViewLinkage",null,{initialize:function($1,$2){
this.scale=(new Object())
this.offset=(new Object())
if($1==$2){
@@ -4342,7 +4506,7 @@
this.scale[$1]=$2
this.offset[$1]=$3
}},null)
-var LzText=NewClass.make("LzText",LzView,{colorstring:"#000000",init:function(){
+var LzText=Class.make("LzText",LzView,{scroll:0,maxscroll:0,hscroll:0,maxhscroll:0,multiline:null,resize:true,text:null,colorstring:"#000000",init:function(){
this.nextMethod(arguments.callee,"init").apply(this,arguments)
if(this.sizeToHeight){
var $1=this.sprite.getTextfieldHeight()
@@ -4353,9 +4517,6 @@
},construct:function($1,$2){
this.password="password" in $2&&$2.password?true:false
this.multiline="multiline" in $2?$2.multiline:null
-if(this.multiline&&$2.width==null){
-$2.width=100
-}
this.nextMethod(arguments.callee,"construct").apply(this,arguments)
this.sizeToHeight=false
this.fontname="font" in $2?$2.font:this.searchParents("fontname").fontname
@@ -4370,11 +4531,21 @@
$2.fontstyle=this._ignoreAttribute
this.yscroll=0
this.xscroll=0
-this.resize="resize" in $2?$2.resize==true:false
-this.sprite.setResize(this.resize)
+this.resize="resize" in $2?$2.resize==true:this.resize
+this.setResize(this.resize)
this.text=!("text" in $2)||$2.text==null?"":$2.text
-this.setMultiline("multiline" in $2&&$2.multiline)
+this.setMultiline(this.multiline)
this.sprite.setText(this.text)
+if($2.width==null){
+if(this.text!=null&&this.text!=""&&this.text.length>0){
+$2.width=this.getTextWidth()
+}else{
+$2.width=this.DEFAULT_WIDTH
+}
+}
+if($2.width==null){
+$2.width=100
+}
if(!("height" in $2)||$2.height==null){
this.sizeToHeight=true
}else{
@@ -4390,8 +4561,8 @@
},__makeSprite:function($1){
this.sprite=LzTextSprite.make(this,$1)
},getMCRef:function(){
-return this.__LZtextclip
-},scroll:0,maxscroll:0,hscroll:0,maxhscroll:0,setResize:function($1){
+return this.sprite.getMCRef()
+},setResize:function($1){
this.sprite.setResize($1)
this.resize=$1
},setWidth:function($1){
@@ -4403,20 +4574,24 @@
this.setHeight($2)
}
}
-},setHeight:function($1){
-this.nextMethod(arguments.callee,"setHeight").apply(this,arguments)
},addText:function($1){
this.setText(this.getText()+$1)
},clearText:function(){
this.setText("")
},setMaxLength:function($1){
+if($1==null||$1==""){
+return
+}
this.sprite.setMaxLength($1)
+this.maxlength=$1
+this.onmaxlength.sendEvent($1)
},setPattern:function($1){
if($1==null||$1==""){
return
}
this.sprite.setPattern($1)
this.pattern=$1
+this.onpattern.sendEvent($1)
},getTextWidth:function(){
return this.sprite.getTextWidth()
},getTextHeight:function(){
@@ -4525,6 +4700,7 @@
}
return $4
},setText:function($1){
+$1+=""
if(this.visible){
this.sprite.setVisible(this.visible)
}
@@ -4549,7 +4725,7 @@
this.maxlines=$1
}
},getText:function(){
-return this.sprite.getText()
+return this.text
},escapeText:function($1){
var $2=$1==null?this.text:$1
var $3
@@ -4565,9 +4741,11 @@
},setFontName:function($1){
this.sprite.setFontName($1)
this.fontname=$1
+this.setText(this.getText())
},setFontSize:function($1){
this.sprite.setFontSize($1)
this.fontsize=$1
+this.setText(this.getText())
},setFontStyle:function($1){
this.sprite.setFontStyle($1)
this.fontstyle=$1
@@ -4580,8 +4758,6 @@
this.sprite.setWordWrap($1)
},setEmbedFonts:function($1){
this.sprite.setEmbedFonts($1)
-},__LZforceScrollAttrs:function(){
-this.__LZtextclip.onScroller()
},__updatefieldsize:function(){
if(this.__control.scroll!=this.scroll){
this.__control.scroll=this.scroll
@@ -4624,13 +4800,13 @@
setters.yscroll="setYScroll"
setters.xscroll="setXScroll"
setters.selectable="setSelectable"
+defaultattrs.selectable=false
setters.maxlength="setMaxLength"
setters.pattern="setPattern"
defaultattrs.clip=true
setters.font="setFontName"
setters.fontsize="setFontSize"
setters.fontstyle="setFontStyle"
-defaultattrs.selectable=false
prototype.getTextWidth.dependencies=function($1,$2){
return [$2,"text"]
}
@@ -4646,14 +4822,10 @@
}
}
})()
-var LzInputText=NewClass.make("LzInputText",LzText,{construct:function($1,$2){
-if($2.width==null){
-$2.width=100
-this.width=100
-}
+var LzInputText=Class.make("LzInputText",LzText,{construct:function($1,$2){
+this.nextMethod(arguments.callee,"construct").apply(this,arguments)
this._onfocusDel=LzDelegate.make(this,"_gotFocusEvent",this,"onfocus")
this._onblurDel=LzDelegate.make(this,"_gotBlurEvent",this,"onblur")
-this.nextMethod(arguments.callee,"construct").apply(this,arguments)
},__makeSprite:function($1){
this.sprite=LzInputTextSprite.make(this,$1)
},_gotFocusEvent:function(){
@@ -4668,6 +4840,9 @@
}
}else{
if($1=="onchange"){
+if(this.multiline&&this.sizeToHeight&&this.height!=this.sprite.getTextHeight()){
+this.setHeight(this.sprite.getTextfieldHeight())
+}
this.ontext.sendEvent(this.getText())
return
}
@@ -4678,11 +4853,10 @@
},setEnabled:function($1){
this.sprite.setEnabled($1)
this.onenabled.sendEvent($1)
-},getText:function(){
-return this.sprite.getText()
},setHTML:function($1){
this.__LZtextclip.html=$1
},setText:function($1){
+$1+=""
this.sprite.setText($1)
this.text=$1
if(this.height<9||this.sizeToHeight){
@@ -4693,6 +4867,8 @@
}
}
this.ontext.sendEvent($1)
+},getText:function(){
+return this.sprite.getText()
}},{tagname:"inputtext"});(function(){
with(LzInputText){
with(LzInputText.prototype){
@@ -4701,17 +4877,19 @@
defaultattrs.selectable=true
defaultattrs.enabled=true
setters.enabled="setEnabled"
-prototype.getText.dependencies=function($1,$2){
-return [$2,"text"]
}
}
-}
})()
-var LzCanvas=NewClass.make("LzCanvas",LzView,{initialize:function($1){
+var LzCanvas=Class.make("LzCanvas",LzView,{initialize:function($1){
this.hasdatapath=true
this.datapath={}
this.immediateparent=this
this.__LZmovieClipRef=_root
+this.__LZsvdepth=1
+this.__LZrightmenuclip=null
+if("accessible" in $1){
+this.sprite.setAccessible($1.accessible)
+}
this.mask=null
this.viewLevel=0
this.resourcetable={}
@@ -4729,15 +4907,42 @@
this.proxied=$1.proxied==true
}
delete $1.proxied
+this.sprite=LzSprite.make(this,true)
+this.__canvaswidthratio=null
this.width=Number($1.width)
+if(isNaN(this.width)){
+if($1.width.charAt($1.width.length-1)=="%"){
+var $3=Number($1.width.substr(0,$1.width.length-1))
+this.__canvaswidthratio=$3/100
+if(this.sprite.capabilities.scalecanvastopercentage!=true){
+this.__canvaswidthratio=1
+}
+}else{
+this.width=400
+}
+}
delete $1.width
+this.__canvasheightratio=null
this.height=Number($1.height)
+if(isNaN(this.height)){
+if($1.height.charAt($1.height.length-1)=="%"){
+var $3=Number($1.height.substr(0,$1.height.length-1))
+this.__canvasheightratio=$3/100
+if(this.sprite.capabilities.scalecanvastopercentage!=true){
+this.__canvasheightratio=1
+}
+}else{
+this.height=400
+}
+}
delete $1.height
+if(this.__canvasheightratio!=null||this.__canvaswidthratio!=null){
+LzScreenKernel.setCallback(this,"__windowResize")
+}
this.bgcolor=$1.bgcolor
delete $1.bgcolor
this.lpsversion=$1.lpsversion+"."+this.__LZlfcversion
delete $1.lpsversion
-LzPlatform.initCanvas(this)
this.__LZapplyArgs($1)
if(!("version" in this&&this.version)){
this.version=this.lpsversion
@@ -4747,20 +4952,24 @@
}
this.isinited=false
this._lzinitialsubviews=[]
-this.__LZsvdepth=1
-this.__LZrightmenuclip=null
-this.sprite=LzSprite.make(this,true)
-if("accessible" in $1){
-this.sprite.setAccessible($1.accessible)
-}
this.datasets={}
global.canvas=this
this.parent=this
this.makeMasked()
+this.__LZmouseupDel=LzDelegate.make(this,"__LZmouseup",LzGlobalMouse,"onmouseup")
+this.__LZmousedownDel=LzDelegate.make(this,"__LZmousedown",LzGlobalMouse,"onmousedown")
+this.__LZmousemoveDel=LzDelegate.make(this,"__LZmousemove",LzGlobalMouse,"onmousemove")
+LzPlatform.initCanvas(this)
+},__LZmouseup:function(){
+this.onmouseup.sendEvent()
+},__LZmousemove:function(){
+this.onmousemove.sendEvent()
+},__LZmousedown:function(){
+this.onmousedown.sendEvent()
},__makeSprite:function($1){
this.sprite=LzSprite.make(this,true,$1)
Debug.write("making canvas sprite",this.sprite)
-},initdelay:0,__LZlfcversion:"0",nodeLevel:0,proxied:true,dataloadtimeout:30000,medialoadtimeout:30000,compareVersion:function($1,$2){
+},initdelay:0,lpsversion:null,lpsrelease:null,version:null,__LZlfcversion:"0",nodeLevel:0,proxied:true,dataloadtimeout:30000,medialoadtimeout:30000,percentcreated:null,datasets:null,proxied:null,compareVersion:function($1,$2){
if($2==null){
$2=this.lpsversion
}
@@ -4816,11 +5025,6 @@
},okToInit:function(){
LzInstantiator.resume()
this.__LZcallInit()
-},mouseMoved:function(){
-this.mousex=this.sprite.getMouse("x")
-this.mousey=this.sprite.getMouse("y")
-},mousex:0,mousey:0,mouseUp:function(){
-LzTrack.__LZmouseup()
},updatePercentCreated:function(){
this.percentcreated=Math.max(this.percentcreated,this.creatednodes/this.totalnodes)
this.percentcreated=Math.min(0.99,this.percentcreated)
@@ -4834,20 +5038,30 @@
}
this.isinited=true
this.__LZresolveReferences()
-if(this.subnodes){
-var $2=this.subnodes.length
-for(var $3=0;$3<$2;$3++){
-var $4=this.subnodes[$3]
-if($4.isinited||$4.__LZlateinit){
+var $2=this.subnodes
+if($2){
+var $3=0
+var $4=$2.length
+while($3<$4){
+var $5=$2[$3++]
+var $6=$2[$3]
+if($5.isinited||$5.__LZlateinit){
continue
}
-$4.__LZcallInit()
+$5.__LZcallInit()
+if($6!=$2[$3]){
+while($3>0){
+if($6==$2[--$3]){
+break
}
}
+}
+}
+}
this.init()
this.sprite.init(true)
this.oninit.sendEvent(this)
-if(this.datapath&&typeof this.datapath.__LZApplyDataOnInit=="function"){
+if(this.datapath&&this.datapath.__LZApplyDataOnInit){
this.datapath.__LZApplyDataOnInit()
}
},setWidth:function(){
@@ -4860,12 +5074,35 @@
},setY:function(){
-}},{tagname:"canvas",versionInfoString:function(){
+},setDefaultContextMenu:function($1){
+this.sprite.setDefaultContextMenu($1)
+},__windowResize:function($1){
+if(this.__canvaswidthratio!=null){
+this.width=Math.floor($1.width*this.__canvaswidthratio)
+this.onwidth.sendEvent(this.width)
+this.sprite.setWidth(this.width)
+}
+if(this.__canvasheightratio!=null){
+this.height=Math.floor($1.height*this.__canvasheightratio)
+this.onheight.sendEvent(this.height)
+this.sprite.setHeight(this.height)
+}
+}},{make:function($1){
+if("__LZhenryWasRight" in $1){
+LzNode.__LZhenryWasRight=$1.__LZhenryWasRight
+delete $1.__LZhenryWasRight
+}
+Debug.debug("LzNode.__LZhenryWasRight = %#w",LzNode.__LZhenryWasRight)
+return LzCanvas.prototype.constructor.make.apply(this,arguments)
+},tagname:"canvas",versionInfoString:function(){
return "URL: "+LzBrowser.getLoadURL()+"\n"+"Version: "+canvas.lpsversion+"\n"+"Release: "+canvas.lpsrelease+"\n"+"Build: "+canvas.lpsbuild+"\n"+"Date: "+canvas.lpsbuilddate+"\n"+"Target: "+canvas.runtime+"\n"+"Runtime:"+LzBrowser.getVersion()+"\n"
}});(function(){
with(LzCanvas){
with(LzCanvas.prototype){
DeclareEvent(prototype,"onpercentcreated")
+DeclareEvent(prototype,"onmousedown")
+DeclareEvent(prototype,"onmouseup")
+DeclareEvent(prototype,"onmousemove")
prototype.__LZcheckwidth=null
prototype.__LZcheckheight=null
prototype.hassetwidth=true
@@ -4877,7 +5114,7 @@
LzPlatform.initCanvas=function($1){
}
-var LzDrawView=NewClass.make("LzDrawView",LzView,{globalAlpha:1,lineWidth:1,strokeStyle:"#000000",fillStyle:"#000000",construct:function($1,$2){
+var LzDrawView=Class.make("LzDrawView",LzView,{globalAlpha:1,lineWidth:1,strokeStyle:"#000000",fillStyle:"#000000",construct:function($1,$2){
this.nextMethod(arguments.callee,"construct").apply(this,arguments)
if(isNaN(canvas.width)){
canvas.width=500
@@ -4966,13 +5203,13 @@
}
return this.__drawcontext.createRadialGradient($1+this.__widthOffset,$2+this.__heightOffset,$3,$4+this.__widthOffset,$5+this.__heightOffset,$6)
},arc:function($1,$2,$3,$4,$5,$6){
-$1+=$3*Math.cos($4)
-$2+=$3*Math.sin($4)
+var $7=$1+$3*Math.cos($4)
+var $8=$2+$3*Math.sin(2*Math.PI-$4)
$4*=180/Math.PI
$5*=180/Math.PI
-var $7=$6==true?$4-$5:$5-$4
-this.moveTo($1,$2)
-return this._drawArc($1,$2,$3,$7,$4)
+var $9=$6==true?$5-$4-360:$5-$4
+this.moveTo($7,$8)
+return this._drawArc($1,$2,$3,$9,$4)
},rect:function($1,$2,$3,$4,$5){
if(arguments.length<4){
return
@@ -5095,8 +5332,6 @@
var $13
var $14
var $15
-var $16
-var $17
if(Math.abs($4)>360){
$4=360
}
@@ -5104,20 +5339,18 @@
$7=$4/$11
$8=-($7/180)*Math.PI
$9=-($5/180)*Math.PI
-$12=$1-Math.cos($9)*$3
-$13=$2-Math.sin($9)*$6
if($11>0){
-for(var $18=0;$18<$11;$18++){
+for(var $16=0;$16<$11;$16++){
$9+=$8
$10=$9-$8/2
-$14=$12+Math.cos($9)*$3
-$15=$13+Math.sin($9)*$6
-$16=$12+Math.cos($10)*($3/Math.cos($8/2))
-$17=$13+Math.sin($10)*($6/Math.cos($8/2))
-this.quadraticCurveTo($16,$17,$14,$15)
+$12=$1+Math.cos($9)*$3
+$13=$2+Math.sin($9)*$6
+$14=$1+Math.cos($10)*($3/Math.cos($8/2))
+$15=$2+Math.sin($10)*($6/Math.cos($8/2))
+this.quadraticCurveTo($14,$15,$12,$13)
}
}
-return {x:$14,y:$15}
+return {x:$12,y:$13}
},__convertohexstring:function($1){
if(typeof $1!="number"){
return $1
@@ -5133,11 +5366,11 @@
}
this.__drawcontext.bezierCurveTo($1+this.__widthOffset,$2+this.__heightOffset,$3+this.__widthOffset,$4+this.__heightOffset,$5+this.__widthOffset,$6+this.__heightOffset)
}},{tagname:"drawview"})
-var LzScript=NewClass.make("LzScript",LzNode,{initialize:function($1,$2){
+var LzScript=Class.make("LzScript",LzNode,{initialize:function($1,$2){
this.nextMethod(arguments.callee,"initialize").apply(this,arguments)
$2.script()
}},{tagname:"script"})
-var LzAnimatorGroup=NewClass.make("LzAnimatorGroup",LzNode,{attribute:null,start:true,from:null,to:null,duration:null,indirect:false,relative:false,motion:"easeboth",repeat:null,paused:false,started:null,target:null,process:"sequential",target:null,paused:null,animatorProps:{attribute:true,from:true,duration:true,to:true,relative:true,target:true},construct:function($1,$2){
+var LzAnimatorGroup=Class.make("LzAnimatorGroup",LzNode,{attribute:null,start:true,from:null,to:null,duration:null,indirect:false,relative:false,motion:"easeboth",repeat:null,paused:false,started:null,target:null,process:"sequential",target:null,paused:null,animatorProps:{attribute:true,from:true,duration:true,to:true,relative:true,target:true},construct:function($1,$2){
this.nextMethod(arguments.callee,"construct").apply(this,arguments)
if(this.immediateparent instanceof LzAnimatorGroup){
for(var $3 in this.animatorProps){
@@ -5315,9 +5548,9 @@
}
}
})()
-var LzAnimator=NewClass.make("LzAnimator",LzAnimatorGroup,{beginPoleDelta:0.25,endPoleDelta:0.25,construct:function($1,$2){
+var LzAnimator=Class.make("LzAnimator",LzAnimatorGroup,{beginPoleDelta:0.25,endPoleDelta:0.25,attribute:null,construct:function($1,$2){
this.nextMethod(arguments.callee,"construct").apply(this,arguments)
-this.primary_K=1.0
+this.primary_K=1
},setMotion:function($1){
if($1=="linear"){
this.calcNextValue=this.calcNextValueLinear
@@ -5343,9 +5576,9 @@
this.beginPole=this.currentValue+$2*this.beginPoleDelta
this.endPole=this.to-$2*this.endPoleDelta
}
-this.primary_K=1.0
-var $3=1.0*(this.beginPole-this.to)*(this.currentValue-this.endPole)
-var $4=1.0*(this.beginPole-this.currentValue)*(this.to-this.endPole)
+this.primary_K=1
+var $3=1*(this.beginPole-this.to)*(this.currentValue-this.endPole)
+var $4=1*(this.beginPole-this.currentValue)*(this.to-this.endPole)
if($4!=0){
this.primary_K=Math.abs($3/$4)
}
@@ -5422,8 +5655,8 @@
var $2=this.currentValue
var $3=this.endPole
var $4=this.beginPole
-var $5=Math.exp($1*1.0/this.duration*Math.log(this.primary_K))
-if($5!=1.0){
+var $5=Math.exp($1*1/this.duration*Math.log(this.primary_K))
+if($5!=1){
var $6=$4*$3*(1-$5)
var $7=$3-$5*$4
if($7!=0){
@@ -5466,7 +5699,7 @@
}
}
})()
-var LzLayout=NewClass.make("LzLayout",LzNode,{locked:false,subviews:null,construct:function($1,$2){
+var LzLayout=Class.make("LzLayout",LzNode,{locked:2,subviews:null,updateDelegate:null,delegates:null,construct:function($1,$2){
this.nextMethod(arguments.callee,"construct").apply(this,arguments)
this.subviews=(new Array)
if(this.immediateparent.layouts==null){
@@ -5537,7 +5770,7 @@
}else{
this.unlock()
}
-},locked:2,__parentInit:function(){
+},__parentInit:function(){
if(this.locked==2){
if(this.isinited){
this.unlock()
@@ -5608,7 +5841,7 @@
}
}
})()
-var LzFont=NewClass.make("LzFont",null,{initialize:function($1,$2,$3){
+var LzFont=Class.make("LzFont",null,{style:null,name:null,height:null,ascent:null,descent:null,advancetable:null,lsbtable:null,rsbtable:null,initialize:function($1,$2,$3){
this.nextMethod(arguments.callee,"initialize").apply(this,arguments)
this.name=$1.name
this.style=$3
@@ -5626,7 +5859,7 @@
},leading:2,toString:function(){
return "Font style "+this.style+" of name "+this.name
}},null)
-var LzSelectionManager=NewClass.make("LzSelectionManager",LzNode,{construct:function($1,$2){
+var LzSelectionManager=Class.make("LzSelectionManager",LzNode,{sel:null,selectedHash:null,selected:null,construct:function($1,$2){
this.nextMethod(arguments.callee,"construct").apply(this,arguments)
this.toggle=$2.toggle==true
this.sel=$2.selFuncName==null?"setSelected":$2.selFuncName
@@ -5706,7 +5939,7 @@
},toString:function(){
return "LzSelectionManager"
}},{tagname:"selectionmanager"})
-var LzDataSelectionManager=NewClass.make("LzDataSelectionManager",LzSelectionManager,{makeSelected:function($1){
+var LzDataSelectionManager=Class.make("LzDataSelectionManager",LzSelectionManager,{makeSelected:function($1){
var $2=$1.datapath.p
if(this.manager==null){
this.manager=$1.cloneManager
@@ -5777,7 +6010,7 @@
$1.sel=$2
}
}},{tagname:"dataselectionmanager"})
-var LzCommand=NewClass.make("LzCommand",LzNode,{active:true,setKeys:function($1){
+var LzCommand=Class.make("LzCommand",LzNode,{active:true,keys:null,setKeys:function($1){
this.keys=$1
LzKeys.callOnKeyCombo(this,$1)
},execute:function($1){
@@ -5805,12 +6038,12 @@
}},{tagname:"command"});(function(){
with(LzCommand){
with(LzCommand.prototype){
+setters.key="setKeys"
DeclareEvent(prototype,"onselect")
-setters.key="setKeys"
}
}
})()
-var LzState=NewClass.make("LzState",LzNode,{staterefs:{apply:true},stateevents:{onremove:true,onapply:true},asyncnew:false,subh:null,pooling:false,construct:function($1,$2){
+var LzState=Class.make("LzState",LzNode,{staterefs:{apply:true},stateevents:{onremove:true,onapply:true},asyncnew:false,subh:null,pooling:false,construct:function($1,$2){
this.nextMethod(arguments.callee,"construct").apply(this,arguments)
this.heldArgs={}
this.appliedChildren=[]
@@ -5891,21 +6124,12 @@
this.remove()
this.nextMethod(arguments.callee,"destroy").apply(this,arguments)
},__LZapplyArgs:function($1){
-var $2={}
-for(var $3 in $1){
-if($2[$3]){
-continue
+var $2=this.addProperty
+this.addProperty=function($1,$2){
+this.heldArgs[$1]=$2
}
-$2[$3]=true
-if(this.setters[$3]!=null){
-if(this.setters[$3]==-1){
-continue
-}
-this[this.setters[$3]]($1[$3],$3,$1)
-}else{
-this.heldArgs[$3]=$1[$3]
-}
-}
+this.nextMethod(arguments.callee,"__LZapplyArgs").call(this,$1)
+this.addProperty=$2
},checkRefs:function($1){
var $2={}
var $3={}
@@ -6372,12 +6596,12 @@
}
}
})()
-var LzMiniNode=NewClass.make("LzMiniNode",null,{setAttribute:LzNode.prototype.setAttribute},{initialize:function($1){
+var LzMiniNode=Class.make("LzMiniNode",null,{setAttribute:LzNode.prototype.setAttribute},{initialize:function($1){
if(!$1.hasOwnProperty("setters")){
$1["setters"]=LzInheritedHash.make($1["setters"])
}
}})
-var LzDataElement=NewClass.make("LzDataElement",[LzDataElementTrait,LzDataNode,LzMiniNode],{initialize:function($1,$2,$3){
+var LzDataElement=Class.make("LzDataElement",[LzDataElementTrait,LzDataNode,LzMiniNode],{initialize:function($1,$2,$3){
this.nextMethod(arguments.callee,"initialize").apply(this,arguments)
this.nodeName=$1
this.attributes=$2
@@ -6388,7 +6612,7 @@
this.setChildNodes($3)
}
},nodeName:null,nodeType:LzDataNode.ELEMENT_NODE,childNodes:null,attributes:null},null)
-var LzDataText=NewClass.make("LzDataText",[LzDataNode,LzMiniNode],{initialize:function($1){
+var LzDataText=Class.make("LzDataText",[LzDataNode,LzMiniNode],{initialize:function($1){
this.nextMethod(arguments.callee,"initialize").apply(this,arguments)
this.data=$1
},nodeType:LzDataNode.TEXT_NODE,data:"",length:0,setData:function($1){
@@ -6419,7 +6643,7 @@
}
}
})()
-var LzDataset=NewClass.make("LzDataset",[LzDataElementTrait,LzDataNode,LzNode],{timeout:30000,acceptencodings:false,nsprefix:true,getresponseheaders:false,trimwhitespace:false,nodeType:LzDataNode.DOCUMENT_NODE,cacheable:false,autorequest:false,headers:null,proxied:null,src:null,responseheaders:null,construct:function($1,$2){
+var LzDataset=Class.make("LzDataset",[LzDataElementTrait,LzDataNode,LzNode],{timeout:30000,acceptencodings:false,nsprefix:false,getresponseheaders:false,trimwhitespace:false,nodeType:LzDataNode.DOCUMENT_NODE,cacheable:false,autorequest:false,headers:null,proxied:null,responseheaders:null,construct:function($1,$2){
this.queuerequests=false
this._createdParent=null
if(!($1 instanceof LzDatasource)){
@@ -6646,7 +6870,7 @@
}
}
})()
-var __LzHttpDatasetPoolClass=NewClass.make("__LzHttpDatasetPoolClass",null,{_uid:0,_p:[],get:function($1,$2,$3,$4){
+var __LzHttpDatasetPoolClass=Class.make("__LzHttpDatasetPoolClass",null,{_uid:0,_p:[],get:function($1,$2,$3,$4){
var $5
if(this._p.length>0){
$5=this._p[this._p.length-1]
@@ -6679,7 +6903,7 @@
this._p[this._p.length]=$1
}},null)
var LzHttpDatasetPool=__LzHttpDatasetPoolClass.make()
-var LzDatapointer=NewClass.make("LzDatapointer",LzNode,{p:null,data:null,context:null,__LZtracking:null,__LZtrackDel:null,rerunxpath:false,childOrSelf:function($1){
+var LzDatapointer=Class.make("LzDatapointer",LzNode,{p:null,data:null,context:null,__LZtracking:null,__LZtrackDel:null,rerunxpath:false,childOrSelf:function($1){
var $2=this.p
do{
if($2==$1){
@@ -7422,7 +7646,7 @@
}
}
})()
-var LzParam=NewClass.make("LzParam",LzNode,{construct:function($1,$2){
+var LzParam=Class.make("LzParam",LzNode,{construct:function($1,$2){
this.nextMethod(arguments.callee,"construct").apply(this,arguments)
this.d={}
},parseQueryString:function($1){
@@ -7562,7 +7786,7 @@
}
})()
LzParam.prototype.toString=LzParam.prototype.serialize
-var LzParsedPath=NewClass.make("LzParsedPath",null,{initialize:function($1,$2){
+var LzParsedPath=Class.make("LzParsedPath",null,{initialize:function($1,$2){
this.path=$1
this.selectors=[]
var $3=false
@@ -7736,7 +7960,7 @@
}
return $3?$1.substr($2,$4):$1
}})
-var AnonDatasetGenerator=NewClass.make("AnonDatasetGenerator",null,{initialize:function($1){
+var AnonDatasetGenerator=Class.make("AnonDatasetGenerator",null,{initialize:function($1){
this.pp=$1
},getContext:function(){
var $1=LzDataset.make()
@@ -7752,7 +7976,7 @@
}
return $1
},noncontext:true},null)
-var LzDatapath=NewClass.make("LzDatapath",LzDatapointer,{datacontrolsvisibility:true,__LZtakeDPSlot:true,construct:function($1,$2){
+var LzDatapath=Class.make("LzDatapath",LzDatapointer,{datacontrolsvisibility:true,__LZtakeDPSlot:true,pooling:null,replication:null,sortpath:null,sortorder:null,construct:function($1,$2){
this.nextMethod(arguments.callee,"construct").apply(this,arguments)
if(!("data" in this.immediateparent)){
this.immediateparent.data=null
@@ -8026,7 +8250,7 @@
}
}
})()
-var LzReplicationManager=NewClass.make("LzReplicationManager",LzDatapath,{pooling:false,asyncnew:true,datacontrolsvisibility:false,__LZtakeDPSlot:false,visible:true,__LZpreventXPathUpdate:false,__LZdataoffset:0,construct:function($1,$2){
+var LzReplicationManager=Class.make("LzReplicationManager",LzDatapath,{pooling:false,asyncnew:true,datacontrolsvisibility:false,__LZtakeDPSlot:false,visible:true,__LZpreventXPathUpdate:false,nodes:null,clones:null,__LZdataoffset:0,construct:function($1,$2){
var $3=$1.immediateparent
this.datapath=this
var $4=$3._instanceAttrs.name
@@ -8379,7 +8603,7 @@
}
}
})()
-var LzDatasource=NewClass.make("LzDatasource",LzNode,{proxied:null,loadSuccess:function($1,$2){
+var LzDatasource=Class.make("LzDatasource",LzNode,{proxied:null,loadSuccess:function($1,$2){
$1.dataset.gotRawData($2)
},loadError:function($1,$2){
$1.dataset.gotError($2)
@@ -8419,7 +8643,7 @@
},toString:function(){
return "LzDatasource '"+this.name+"'"
}},null)
-var LzHTTPDatasource=NewClass.make("LzHTTPDatasource",LzDatasource,{reqtype:"GET",isProxied:function($1){
+var LzHTTPDatasource=Class.make("LzHTTPDatasource",LzDatasource,{reqtype:"GET",isProxied:function($1){
var $2=canvas.proxied
if(this.proxied!=null&&this.proxied!="inherit"){
$2=this.proxied=="true"
@@ -8519,7 +8743,7 @@
$1.setData($4,$3)
}},{tagname:"datasource"})
ConstructorMap.httpdatasource=LzHTTPDatasource
-var LzDataAttrBind=NewClass.make("LzDataAttrBind",LzDatapointer,{initialize:function($1,$2,$3){
+var LzDataAttrBind=Class.make("LzDataAttrBind",LzDatapointer,{initialize:function($1,$2,$3){
this.setAttr=$2
this.pathparent=$1
this.node=$1.immediateparent
@@ -8580,7 +8804,7 @@
}
}
})()
-var LzLazyReplicationManager=NewClass.make("LzLazyReplicationManager",LzReplicationManager,{axis:"y",spacing:0,mask:null,construct:function($1,$2){
+var LzLazyReplicationManager=Class.make("LzLazyReplicationManager",LzReplicationManager,{axis:"y",spacing:0,mask:null,construct:function($1,$2){
if($2.pooling!=null){
$2.pooling=true
}
@@ -8722,7 +8946,7 @@
}
}
})()
-var LzResizeReplicationManager=NewClass.make("LzResizeReplicationManager",LzLazyReplicationManager,{construct:function($1,$2){
+var LzResizeReplicationManager=Class.make("LzResizeReplicationManager",LzLazyReplicationManager,{construct:function($1,$2){
this.nextMethod(arguments.callee,"construct").apply(this,arguments)
this.datasizevar="$"+this.getUID()+"track"
},__LZsetCloneAttrs:function(){
@@ -8859,7 +9083,7 @@
}
}
})()
-var LzInstantiatorClass=NewClass.make("LzInstantiatorClass",null,{checkQDel:null,initialize:function(){
+var LzInstantiatorClass=Class.make("LzInstantiatorClass",null,{checkQDel:null,initialize:function(){
this.checkQDel=LzDelegate.make(this,"checkQ")
},halted:false,isimmediate:false,isdatareplicating:false,istrickling:false,isUpdating:false,safe:true,timeout:500,makeQ:[],trickleQ:[],tricklingQ:[],syncNew:true,trickletime:10,setSafeInstantiation:function($1){
this.safe=$1
@@ -9132,6 +9356,12 @@
return this.modeArray[this.modeArray.length-1]||null
}
LzMouseKernel.setCallback(LzModeManager,"rawMouseEvent")
+var LzCursor=(new Object)
+LzCursor.showHandCursor=LzMouseKernel.showHandCursor
+LzCursor.setCursorGlobal=LzMouseKernel.setCursorGlobal
+LzCursor.lock=LzMouseKernel.lock
+LzCursor.unlock=LzMouseKernel.unlock
+LzCursor.restoreCursor=LzMouseKernel.restoreCursor
LzModeManager.rawMouseEvent=function($1){
this.handleMouseEvent(null,$1)
}
@@ -9153,6 +9383,9 @@
LzBrowser.loadJS=function($1,$2){
this.loadURL("javascript:"+$1+";void(0);",$2)
}
+LzBrowser.callJS=function($1){
+return eval($1)
+}
LzBrowser.getVersion=function(){
return navigator.userAgent
}
@@ -9404,27 +9637,6 @@
LzKeys.keyCodes['"']=222
LzKeys.keyCodes["'"]=222
LzKeys.keyCodes["IME"]=229
-var LzCursor=(new Object)
-LzCursor.showHandCursor=function($1){
-
-}
-LzCursor.setCursorGlobal=function($1){
-if(this.amLocked){
-return
-}
-}
-LzCursor.restoreCursor=function(){
-if(this.amLocked){
-return
-}
-}
-LzCursor.lock=function(){
-this.amLocked=true
-}
-LzCursor.unlock=function(){
-this.amLocked=false
-this.restoreCursor()
-}
var LzTrack=(new Object)
LzTrack.__LZreg=(new Object)
LzTrack.__LZactivegroups=null
@@ -9746,7 +9958,7 @@
$5=($5+$2+$4.length)%$4.length
return $4[$5]
}
-var LzIdleClass=NewClass.make("LzIdleClass",null,{coi:[],removeCOI:null,initialize:function(){
+var LzIdleClass=Class.make("LzIdleClass",null,{coi:[],removeCOI:null,initialize:function(){
this.removeCOI=LzDelegate.make(this,"removeCallIdleDelegates")
},callOnIdle:function($1){
this.coi.push($1)
@@ -9781,7 +9993,7 @@
}
}
LzIdleKernel.addCallback(this,"__idleupdate")
-var LzTimerClass=NewClass.make("LzTimerClass",null,{timerList:(new Object),addTimer:function($1,$2){
+var LzTimerClass=Class.make("LzTimerClass",null,{timerList:(new Object),addTimer:function($1,$2){
var p={"delegate":$1}
var $3=function(){
LzTimer.removeTimerWithID(p.delegate,p.id)
@@ -9877,11 +10089,10 @@
}
}
function lzAddLocalData($1,$2){
-return LzDataset.make(null,{name:$1,data:$2})
+return LzDataset.make(canvas,{name:$1,initialdata:$2})
}
+//// END LFC
-
-// End LFC
var $dhtml=true
var $as3=false
var $js1=true
@@ -9919,7 +10130,7 @@
app_fullpath=$1
this.reloadApp()
}
-},height:70,lpsbuild:"2968 /Users/maxcarlson/openlaszlo/legals",lpsbuilddate:"2006-12-07T16:14:07-0800",lpsrelease:"Latest",lpsversion:"4.0.x",proxied:false,reloadApp:function($1){
+},height:70,lpsbuild:"3924 /Users/maxcarlson/openlaszlo/legals",lpsbuilddate:"2007-02-24T20:22:07-0800",lpsrelease:"Latest",lpsversion:"4.0.x",proxied:false,reloadApp:function($1){
with(this){
var $2=rg_runtime.value
var $3=cb_debug.value
@@ -10081,14 +10292,14 @@
ltblue=14540287
ltgreen=14548957
}}},1)
-LzResourceLibrary.lzfocusbracket_topleft_rsrc={ptype:"sr",frames:["lps/components/lz/resources/focus/focus_top_lft.png"],width:7.0,height:7.0}
-LzResourceLibrary.lzfocusbracket_topleft_shdw_rsrc={ptype:"sr",frames:["lps/components/lz/resources/focus/focus_top_lft_shdw.png"],width:9.0,height:9.0}
-LzResourceLibrary.lzfocusbracket_topright_rsrc={ptype:"sr",frames:["lps/components/lz/resources/focus/focus_top_rt.png"],width:7.0,height:7.0}
-LzResourceLibrary.lzfocusbracket_topright_shdw_rsrc={ptype:"sr",frames:["lps/components/lz/resources/focus/focus_top_rt_shdw.png"],width:9.0,height:9.0}
-LzResourceLibrary.lzfocusbracket_bottomleft_rsrc={ptype:"sr",frames:["lps/components/lz/resources/focus/focus_bot_lft.png"],width:7.0,height:7.0}
-LzResourceLibrary.lzfocusbracket_bottomleft_shdw_rsrc={ptype:"sr",frames:["lps/components/lz/resources/focus/focus_bot_lft_shdw.png"],width:9.0,height:9.0}
-LzResourceLibrary.lzfocusbracket_bottomright_rsrc={ptype:"sr",frames:["lps/components/lz/resources/focus/focus_bot_rt.png"],width:7.0,height:7.0}
-LzResourceLibrary.lzfocusbracket_bottomright_shdw={ptype:"sr",frames:["lps/components/lz/resources/focus/focus_bot_rt_shdw.png"],width:9.0,height:9.0}
+LzResourceLibrary.lzfocusbracket_topleft_rsrc={ptype:"sr",frames:["lps/components/lz/resources/focus/focus_top_lft.png"],width:7,height:7}
+LzResourceLibrary.lzfocusbracket_topleft_shdw_rsrc={ptype:"sr",frames:["lps/components/lz/resources/focus/focus_top_lft_shdw.png"],width:9,height:9}
+LzResourceLibrary.lzfocusbracket_topright_rsrc={ptype:"sr",frames:["lps/components/lz/resources/focus/focus_top_rt.png"],width:7,height:7}
+LzResourceLibrary.lzfocusbracket_topright_shdw_rsrc={ptype:"sr",frames:["lps/components/lz/resources/focus/focus_top_rt_shdw.png"],width:9,height:9}
+LzResourceLibrary.lzfocusbracket_bottomleft_rsrc={ptype:"sr",frames:["lps/components/lz/resources/focus/focus_bot_lft.png"],width:7,height:7}
+LzResourceLibrary.lzfocusbracket_bottomleft_shdw_rsrc={ptype:"sr",frames:["lps/components/lz/resources/focus/focus_bot_lft_shdw.png"],width:9,height:9}
+LzResourceLibrary.lzfocusbracket_bottomright_rsrc={ptype:"sr",frames:["lps/components/lz/resources/focus/focus_bot_rt.png"],width:7,height:7}
+LzResourceLibrary.lzfocusbracket_bottomright_shdw={ptype:"sr",frames:["lps/components/lz/resources/focus/focus_bot_rt_shdw.png"],width:9,height:9}
LzInstantiateView({name:"class",attrs:{parent:"view",initobj:{attrs:{$delegates:["onstop","stopanim",null,"onfocus","$m2",function($1){
with(this){
return LzFocus
@@ -10260,13 +10471,11 @@
$3++
}
if(!this._widthdel){
-this._widthdel=LzDelegate.make(this,"followWidth")
+this._widthdel=LzDelegate.make(this,"followWidth",canvas,"onwidth")
}
if(!this._heightdel){
-this._heightdel=LzDelegate.make(this,"followHeight")
+this._heightdel=LzDelegate.make(this,"followHeight",canvas,"onheight")
}
-this._widthdel.register($2,"onwidth")
-this._heightdel.register($2,"onheight")
followXY()
followWidth()
followHeight()
@@ -10287,7 +10496,7 @@
},target:null,visible:false},name:"basefocusview"}}},1)
LzInstantiateView({name:"class",attrs:{parent:"basefocusview",initobj:{attrs:{bounce:function(){
with(this){
-this.animate("offset",12,duration/2.0)
+this.animate("offset",12,duration/2)
this.animate("offset",5,duration)
}
},doFocus:function($1){
@@ -10804,7 +11013,9 @@
}else{
_styledel.unregisterAll()
}
+if($1){
_styledel.register($1,"onstylechanged")
+}
this.style=$1
_usestyle()
if(this.onstyle){
@@ -12534,7 +12745,7 @@
return XML.make().createTextNode($1).toString()
}
}}},1)
-LzInstantiateView({attrs:{initialdata:"<datacontent />",name:"appdata"},name:"dataset"},1)
+lzAddLocalData("appdata","<datacontent />")
LzInstantiateView({name:"script",attrs:{script:function(){
_root.app_runtime=void 0
_root.app_debug=void 0
@@ -12571,7 +12782,7 @@
app_uid=typeof global.lzappuid!="undefined"?global.lzappuid:""
app_uid="XXX"
}}},1)
-LzResourceLibrary.footer_logo={ptype:"sr",frames:["lps/assets/logo_laszlo_footer.gif"],width:70.0,height:70.0}
+LzResourceLibrary.footer_logo={ptype:"sr",frames:["lps/assets/logo_laszlo_footer.gif"],width:70,height:70}
LzInstantiateView({attrs:{$refs:{width:(function(){
var $lzsc$f=function(){
with(this){
Modified: openlaszlo/branches/legals/lps/admin/dev-console.lzx.swf
===================================================================
(Binary files differ)
Modified: openlaszlo/branches/legals/lps/admin/solo-dhtml-deploy.jsp
===================================================================
--- openlaszlo/branches/legals/lps/admin/solo-dhtml-deploy.jsp 2007-02-26 21:58:09 UTC (rev 3936)
+++ openlaszlo/branches/legals/lps/admin/solo-dhtml-deploy.jsp 2007-02-26 22:30:01 UTC (rev 3937)
@@ -408,6 +408,8 @@
// Copy the DHTML LFC to lps/includes/LFC-dhtml.js
copyFileToZipFile(zout, basedir + "/lps/includes/lfc/LFCdhtml.js", "lps/includes/lfc/LFCdhtml.js");
+ // Copy blank.gif for IE
+ copyFileToZipFile(zout, basedir + "/lps/includes/blank.gif", "lps/resources/lps/includes/blank.gif");
// track how big the file is, check that we don't write more than some limit
Modified: openlaszlo/branches/legals/lps/includes/source/embednew.js
===================================================================
--- openlaszlo/branches/legals/lps/includes/source/embednew.js 2007-02-26 21:58:09 UTC (rev 3936)
+++ openlaszlo/branches/legals/lps/includes/source/embednew.js 2007-02-26 22:30:01 UTC (rev 3937)
@@ -25,7 +25,7 @@
* function is called.
*
* @param properties:Object properties used to write the swf, e.g.
- * {url: 'myapp.lzx?lzt=swf', bgcolor: '#000000', width: '800', height: '600'}
+ * {url: 'myapp.lzx?lzt=swf', bgcolor: '#000000', width: '800', height: '600', id: 'lzapp', accessible: 'true'}
*
* @param minimumVersion:Number the version the flash player should
* upgrade to if necessary. Defaults to 7.
@@ -45,16 +45,18 @@
i = url.indexOf('lzr=swf');
//alert('added version ' + url + ', ' + i);
}
+ // account for 'lzr=swf' length
+ i += 7;
// get LPS swf request version
- var requestVersion = url.substring(i + 7, i + 8) * 1;
+ var requestVersion = url.substring(i, i + 1) * 1;
// Check flash comm version
if (dojo.flash.info.commVersion > requestVersion) {
- url = url.substring(0, i + 7) + dojo.flash.info.commVersion + url.substring(i + 8, url.length);
+ url = url.substring(0, i) + dojo.flash.info.commVersion + url.substring(i + 1, url.length);
//alert('updated version ' + url);
minimumVersion = dojo.flash.info.commVersion;
- } else if (dojo.flash.info.commVersion == 6 && requestVersion > 7) {
+ } else if (dojo.flash.info.commVersion <= 7 && requestVersion > 7) {
// if requested lzr=swf8, set dojo comm version to 8
dojo.flash.info.commVersion = 8;
}
@@ -65,29 +67,24 @@
//alert(requestVersion + ', ' + minimumVersion);
- var sp = url.split('?');
- url = sp[0];
- if (sp.length == 1) sp[1] = '';
+ var queryvals = this.__getqueryurl(url);
- // strip query string and use FlashVars for args not required by LPS
- var queryvals = this.__getqueryurl(sp[1]);
- var flashvars = queryvals.flashvars;
- var query = queryvals.q;
- url = url + '?' + query;
-
- var width = properties.width;
- var height = properties.height;
- var id = properties.id;
- var bgcolor = properties.bgcolor;
-
- // TODO: var wmode = properties.wmode;
if (properties.accessible == 'true') {
- // TODO: implement/test this
+ queryvals.flashvars += '&accessible=true';
}
- //alert('url ' + url + ', ' + flashvars);
+ var url = queryvals.url + '?' + queryvals.query;
- dojo.flash.setSwf({flash6: url, flash8: url, bgcolor: bgcolor, width: width, height: height, id: id, flashvars: flashvars}, minimumVersion);
+ var swfargs = { width: properties.width,
+ height: properties.height,
+ id: properties.id,
+ bgcolor: properties.bgcolor,
+ wmode: properties.wmode,
+ flashvars: queryvals.flashvars,
+ flash6: url,
+ flash8: url };
+
+ dojo.flash.setSwf(swfargs, minimumVersion);
}
/**
@@ -139,15 +136,8 @@
window.width = properties.width.indexOf('%') == -1 ? properties.width + 'px' : '100%';
window.height = properties.height.indexOf('%') == -1 ? properties.height + 'px' : '100%';
- var sp = url.split('?');
- url = sp[0];
- if (sp.length == 1) sp[1] = '';
-
- var queryvals = this.__getqueryurl(sp[1], true);
- var query = queryvals.q;
- var appquery = '?lzt=object&' + query;
-
- this.__dhtmlLoadScript(url + appquery)
+ var queryvals = this.__getqueryurl(url, true);
+ this.__dhtmlLoadScript(queryvals.url + '?lzt=object&' + queryvals.query)
}
,__dhtmlLoadScript: function (url) {
@@ -158,27 +148,36 @@
return o;
}
- ,__getqueryurl: function (querystring, setglobals) {
- // strip query string to only request args required by the compiler
+ ,__getqueryurl: function (url, setglobals) {
+ // strip query string to only args required by the compiler
+ // if setglobals == true, set browser globals
+ // return 'flashvars' property args not required by LPS
// TODO Henry: We need to ask the canvas info what the value of the debug flag really is. Don't just trust the query arg, since it can be overriden by the canvas attributes.
- var queryargs = this.__parseQuery(querystring);
- var q = '';
+ var sp = url.split('?');
+ url = sp[0];
+ if (sp.length == 1) return {url: url, flashvars: '', query: ''};
+
+ var queryvals = this.__parseQuery(sp[1]);
+ var query = '';
var flashvars = '';
var re = new RegExp('\\+', 'g');
- for (var i in queryargs) {
- var v = queryargs[i];
+ for (var i in queryvals) {
+ if (i == '' || i == null) continue;
+
+ var v = queryvals[i];
+
// add lps vars to query string
if (i == 'lzr' || i == 'lzt'
|| i == 'krank' || i == 'debug' || i == 'profile'
|| i == 'lzdebug' || i == 'lzkrank' || i == 'lzprofile'
|| i == 'fb' || i == 'sourcelocators' || i == '_canvas_debug') {
- q += i + '=' + v + '&';
+ query += i + '=' + v + '&';
}
+ // set globals for all query args per LPP-2781
if (setglobals) {
- // set globals for all query args per LPP-2781
if (window[i] == null) {
// sometimes URLs contain '+' - change to spaces
window[i] = unescape(v.replace(re, ' '));
@@ -186,19 +185,23 @@
}
}
+ // store for passing in via flashvars
flashvars += i + '=' + v + '&';
}
- q = q.substr(0, q.length - 1);
+ query = query.substr(0, query.length - 1);
flashvars = flashvars.substr(0, flashvars.length - 1);
- return {q: q, flashvars: flashvars};
+
+ return {url: url, flashvars: flashvars, query: query};
}
,__parseQuery: function(s) {
+ // parses a query string into name/value pairs
if (s.indexOf('=') == -1) return;
var p = s.split('&');
var d = {};
for (i in p) {
var nv = p[i].split('=');
+ if (nv.length == 1) continue;
var n = nv[0];
var v = nv[1];
d[n] = v;
Modified: openlaszlo/branches/legals/lps/includes/source/flash.js
===================================================================
--- openlaszlo/branches/legals/lps/includes/source/flash.js 2007-02-26 21:58:09 UTC (rev 3936)
+++ openlaszlo/branches/legals/lps/includes/source/flash.js 2007-02-26 22:30:01 UTC (rev 3937)
@@ -295,6 +295,7 @@
width: 500,
height: 400,
bgcolor: '#ffffff',
+ wmode: 'window',
flashvars: '',
minimumVersion: 7,
id: 'flashObject',
@@ -343,6 +344,10 @@
this.bgcolor = fileInfo.bgcolor;
}
+ if(fileInfo.wmode != null){
+ this.wmode = fileInfo.wmode;
+ }
+
if(fileInfo.visible != null){
this._visible = fileInfo.visible;
}
@@ -455,7 +460,7 @@
}else{
//alert("Writing object out");
// write the flash object into the page
- dojo.flash.obj = new dojo.flash.Embed(this._visible, this.width, this.height, this.bgcolor, this.id, this.flashvars);
+ dojo.flash.obj = new dojo.flash.Embed(this._visible, this.width, this.height, this.bgcolor, this.wmode, this.id, this.flashvars);
dojo.flash.obj.write(dojo.flash.info.commVersion);
// initialize the way we do Flash/JavaScript communication
@@ -662,13 +667,14 @@
}
};
-dojo.flash.Embed = function(visible, width, height, bgcolor, id, flashvars){
+dojo.flash.Embed = function(visible, width, height, bgcolor, wmode, id, flashvars){
// summary: A class that is used to write out the Flash object into the page.
this._visible = visible;
this.width = width ? width : 215;
this.height = height ? height : 138;
this.bgcolor = bgcolor ? bgcolor : '#ffffff';
+ this.wmode = wmode ? wmode : 'window';
this.id = id ? id : 'flashObject';
this.flashvars = flashvars ? flashvars : '';
};
@@ -687,6 +693,8 @@
height: 138,
bgcolor: '#ffffff',
+
+ wmode: 'window',
flashvars: '',
@@ -758,6 +766,7 @@
+ ' quality="high" bgcolor="' + this.bgcolor + '"'
+ ' width="' + this.width + '" height="' + this.height + '" '
+ ' name="' + this.id + '" '
+ + ' wmode="' + this.wmode + '" '
+ ' FlashVars="'+ this.flashvars +'"'
+ ' align="middle" '
+ ' allowScriptAccess="sameDomain" '
@@ -797,11 +806,13 @@
+ '<param name="quality" value="high" /> '
+ '<param name="FlashVars" value="' + swflocObjectVars + '" /> '
+ '<param name="bgcolor" value="' + this.bgcolor + '" /> '
+ + '<param name="wmode" value="' + this.wmode + '" /> '
+ '</object>';
} else {
objectHTML = '<embed src="' + swfloc+ '" '
+ 'quality="high" '
+ 'bgcolor="' + this.bgcolor + '" '
+ + 'wmode="' + this.wmode + '" '
+ 'width="' + this.width + '" '
+ 'height="' + this.height + '" '
+ 'id="' + this.id + '" '
More information about the Laszlo-checkins
mailing list