Author: max Date: 2007-09-15 13:11:44 -0700 (Sat, 15 Sep 2007) New Revision: 6499
Modified: openlaszlo/branches/legals/ openlaszlo/branches/legals/WEB-INF/lps/lfc/kernel/swf/dojo/flash8/ExpressInstall.as openlaszlo/branches/legals/lps/includes/source/embed-library.lzs openlaszlo/branches/legals/lps/includes/source/flash.js openlaszlo/branches/legals/lps/includes/source/lzhistory.js Log: Merged revisions 6497 via svnmerge from http://svn.openlaszlo.org/openlaszlo/branches/wafflecone ....... r6497 | max | 2007-09-15 12:53:58 -0700 (Sat, 15 Sep 2007) | 30 lines Change 20070915-maxcarlson-8 by [EMAIL PROTECTED] on 2007-09-15 10:35:13 PDT in /Users/maxcarlson/openlaszlo/wafflecone for http://svn.openlaszlo.org/openlaszlo/branches/wafflecone Summary: Fix Flash player installation and upgrading behavior New Features: Bugs Fixed: LPP-4736 - Iframe used for history mechanism in IE is visible, LPP-4737 - Empty graphic seen when you navigate to the OL app without Flash, LPP-4734 - Flash installation - after flash player has installed the app doesn't load Technical Reviewer: pkang QA Reviewer: promanik Doc Reviewer: (pending) Documentation: Release Notes: Details: ExpressInstall.as - Reload on app completion, use correct scope for other callbacks. lzhistory.js - Set style of iframe correctly. Skip _checklocationhash() when we're installing or upgrading the Flash player. embed-library.lzs - Move flash.js include after embednew.js so browser detection is available. flash.js - Use Lz.__BrowserDetect instead of homecooked browser detection. Reload the page when done installing a player for the first time. Fix ExpressInstall behavior in write(). Upgrade with expressinstall if the player version is less than the required Flash version. Always run installers in swf8 so loaded() callbacks are reliable. Use static URL rather than respecting the current http protocol. Tests: Uninstall the flash player in windows. http://localhost:8080/wafflecone/test/history/history.lzx?lzr=swf8 will install the player and run the application correctly. After uninstalling, and installing player 7.0.19, http://localhost:8080/wafflecone/test/history/history.lzx?lzr=swf8 upgrades correctly via expressinstall. IE history iframes are no longer visible. ....... Property changes on: openlaszlo/branches/legals ___________________________________________________________________ Name: svnmerge-integrated - /openlaszlo/branches/wafflecone:1-5746,5818-6068,6070-6205,6207-6213,6216-6265,6267-6368,6370-6431,6433-6450 /openlaszlo/trunk:1-3892,3894-3952,3954-4393,4395-4461,4463-4467,4469-4471,4473-5085,5087-5171,5173-5203,5205-5209,5211-5331,5333-5334 + /openlaszlo/branches/wafflecone:1-5746,5818-6068,6070-6205,6207-6213,6216-6265,6267-6368,6370-6431,6433-6450,6497 /openlaszlo/trunk:1-3892,3894-3952,3954-4393,4395-4461,4463-4467,4469-4471,4473-5085,5087-5171,5173-5203,5205-5209,5211-5331,5333-5334 Modified: openlaszlo/branches/legals/WEB-INF/lps/lfc/kernel/swf/dojo/flash8/ExpressInstall.as =================================================================== --- openlaszlo/branches/legals/WEB-INF/lps/lfc/kernel/swf/dojo/flash8/ExpressInstall.as 2007-09-15 20:01:13 UTC (rev 6498) +++ openlaszlo/branches/legals/WEB-INF/lps/lfc/kernel/swf/dojo/flash8/ExpressInstall.as 2007-09-15 20:11:44 UTC (rev 6499) @@ -66,11 +66,15 @@ } function onInstallStatus(msg){ - getURL("javascript:dojo.flash.install._onInstallStatus('"+msg+"')"); + if (msg == 'Download.Complete') { + getURL(_root.MMredirectURL); + } else { + getURL("javascript:dojo.flash.installer._onInstallStatus('"+msg+"')"); + } } } /* X_LZ_COPYRIGHT_BEGIN *************************************************** -* Copyright 2001-2006 Laszlo Systems, Inc. All Rights Reserved. * +* Copyright 2001-2007 Laszlo Systems, Inc. All Rights Reserved. * * Use is subject to license terms. * * X_LZ_COPYRIGHT_END ******************************************************/ Modified: openlaszlo/branches/legals/lps/includes/source/embed-library.lzs =================================================================== --- openlaszlo/branches/legals/lps/includes/source/embed-library.lzs 2007-09-15 20:01:13 UTC (rev 6498) +++ openlaszlo/branches/legals/lps/includes/source/embed-library.lzs 2007-09-15 20:11:44 UTC (rev 6499) @@ -5,8 +5,8 @@ lzOptions = {}; } +#include "embednew.js" #include "flash.js" -#include "embednew.js" #include "iframemanager.js" #include "LzMousewheelKernel.js" #include "lzhistory.js" Modified: openlaszlo/branches/legals/lps/includes/source/flash.js =================================================================== --- openlaszlo/branches/legals/lps/includes/source/flash.js 2007-09-15 20:01:13 UTC (rev 6498) +++ openlaszlo/branches/legals/lps/includes/source/flash.js 2007-09-15 20:11:44 UTC (rev 6499) @@ -1,3 +1,4 @@ +Lz.__BrowserDetect.init(); dojo = {}; dojo.flash = function(){ @@ -288,10 +289,6 @@ flash8_version: null, ready: false, _visible: true, - _isopera: navigator.userAgent.indexOf("Opera") != -1, - _issafari: navigator.appVersion.indexOf('Safari') != -1, - // True if we're on IE. By default, Opera (version 8.5) spoofs itself as IE. - _isie: navigator.userAgent.indexOf("MSIE") != -1 && !this._isopera, width: 500, height: 400, bgcolor: '#ffffff', @@ -427,6 +424,11 @@ // // dojo.event.connect(dojo.flash, "loaded", myInstance, "myCallback"); + // reload the page if installing for the first time + if (dojo.flash._isinstaller) { + top.location = top.location + ''; + } + dojo.flash.info.installing = false; //dojo.debug("dojo.flash.loaded"); dojo.flash.ready = true; if(dojo.flash._loadedListeners.length > 0){ @@ -491,7 +493,7 @@ // Visual basic helper required to detect Flash Player ActiveX control // version information on Internet Explorer - if(dojo.flash._isie){ + if(Lz.__BrowserDetect.isIE){ document.writeln('<script language="VBScript" type="text/vbscript">'); document.writeln('Function VBGetSwfVer(i)'); document.writeln(' on error resume next'); @@ -576,7 +578,7 @@ // loop backwards through the versions until we find the newest version for(var testVersion = 25; testVersion > 0; testVersion--){ - if(dojo.flash._isie){ + if(Lz.__BrowserDetect.isIE){ versionStr = VBGetSwfVer(testVersion); }else{ versionStr = this._JSFlashInfo(testVersion); @@ -587,7 +589,7 @@ return; }else if(versionStr != 0){ var versionArray; - if(dojo.flash._isie){ + if(Lz.__BrowserDetect.isIE){ var tempArray = versionStr.split(" "); var tempString = tempArray[1]; versionArray = tempString.split(","); @@ -664,7 +666,7 @@ // at this point, we don't have a flash file to detect features on, // so we need to instead look at the browser environment we are in - if(dojo.flash._issafari == true || dojo.flash._isopera == true){ + if(Lz.__BrowserDetect.isSafari == true || Lz.__BrowserDetect.isOpera == true){ this.commVersion = 8; }else{ this.commVersion = 6; @@ -745,10 +747,6 @@ // information. Optional value; defaults to false. //dojo.debug("write"); - if(doExpressInstall != null){ - doExpressInstall = false; - } - // determine our container div's styling var containerStyle = ''; containerStyle+= ("width: " + this.__getCSSValue(this.width) + ';'); @@ -783,6 +781,7 @@ + this.protocol() + '://www.macromedia.com/go/getflashplayer">'; }else{ // Flash 8 + if (flashVer > dojo.flash.version) doExpressInstall = true; swfloc = dojo.flash.flash8_version; var swflocObjectVars = this.flashvars; var swflocEmbedVars = this.flashvars; @@ -798,7 +797,7 @@ + "&MMplayerType=PlugIn"; } - if (dojo.flash._isie) { + if (Lz.__BrowserDetect.isIE) { objectHTML = '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" ' + 'codebase="' @@ -939,7 +938,7 @@ document.writeln('</script>'); // hook for Internet Explorer to receive FSCommands from Flash - if(dojo.flash._isie){ + if(Lz.__BrowserDetect.isIE){ document.writeln('<SCRIPT LANGUAGE=VBScript> '); document.writeln('on error resume next '); document.writeln('Sub ' + id + '_FSCommand(ByVal command, ByVal args)'); @@ -1280,7 +1279,7 @@ // are we on the Mac? Safari needs Flash version 8 to do Flash 8 // communication, while Firefox/Mac needs Flash 8 to fix bugs it has // with Flash 6 communication - if(dojo.flash._issafari == true && !dojo.flash.info.isVersionOrAbove(8, 0, 0)){ + if(Lz.__BrowserDetect.isSafari == true && !dojo.flash.info.isVersionOrAbove(8, 0, 0)){ return true; } @@ -1306,11 +1305,21 @@ dojo.flash.info.installing = true; dojo.flash.installing(); + dojo.flash.ready = false; if(dojo.flash.info.capable == false){ // we have no Flash at all - //alert("Completely new install"); + dojo.flash._isinstaller = true; // write out a simple Flash object to force the browser to prompt // the user to install things - var installObj = new dojo.flash.Embed(false); + + // upgrade URL to flash 8... + var url = dojo.flash.flash8_version; + var i = url.indexOf('swf7') + if (i != -1) { + dojo.flash._tempurl = url; + url = url.substring(0, i + 3) + '8' + url.substring(i + 4, url.length); + dojo.flash.flash8_version = url; + } + var installObj = new dojo.flash.Embed(true); installObj.write(8); // write out HTML for Flash 8 version+ }else if(dojo.flash.info.isVersionOrAbove(6, 0, 65)){ // Express Install //dojo.debug("Express install"); @@ -1321,8 +1330,7 @@ }else{ // older Flash install than version 6r65 alert("This content requires a more recent version of the Macromedia " +" Flash Player."); - window.location.href = + dojo.flash.Embed.protocol() + - "://www.macromedia.com/go/getflashplayer"; + window.location = "http://www.macromedia.com/go/getflashplayer"; } }, @@ -1335,8 +1343,7 @@ }else if(msg == "Download.Cancelled"){ alert("This content requires a more recent version of the Macromedia " +" Flash Player."); - window.location.href = dojo.flash.Embed.protocol() + - "://www.macromedia.com/go/getflashplayer"; + window.location = "http://www.macromedia.com/go/getflashplayer"; }else if (msg == "Download.Failed"){ // The end user failed to download the installer due to a network failure alert("There was an error downloading the Flash Player update. " Modified: openlaszlo/branches/legals/lps/includes/source/lzhistory.js =================================================================== --- openlaszlo/branches/legals/lps/includes/source/lzhistory.js 2007-09-15 20:01:13 UTC (rev 6498) +++ openlaszlo/branches/legals/lps/includes/source/lzhistory.js 2007-09-15 20:11:44 UTC (rev 6499) @@ -32,9 +32,12 @@ } else if (Lz.__BrowserDetect.isIE) { // use an iframe; var i = document.createElement('iframe'); - i.setAttribute('id', 'lzHistory'); - i.setAttribute('style', 'display:none;left:-9999px'); + Lz.__setAttr(i, 'id', 'lzHistory'); + Lz.__setAttr(i, 'border', '0'); document.body.appendChild(i); + i.style.position = 'absolute'; + i.style.display = 'none'; + i.style.left = '-1000px'; Lz.history._iframe = document.getElementById('lzHistory'); var doc = Lz.history._iframe.contentWindow.document; doc.open(); @@ -59,6 +62,7 @@ ,/** @access private */ _checklocationhash: function() { + if (dojo.flash && dojo.flash.info && dojo.flash.info.installing) return; if (Lz.__BrowserDetect.isSafari) { var h = this._history[this._historylength - 1]; if (h == '') h = '#0'; @@ -118,6 +122,7 @@ top.location.hash = hash; this._parse(s + ''); } + return true; } ,/** */ get: function() { _______________________________________________ Laszlo-checkins mailing list [email protected] http://www.openlaszlo.org/mailman/listinfo/laszlo-checkins
