[Laszlo-checkins] r9032 - in openlaszlo/trunk: WEB-INF/lps/lfc/kernel/dhtml demos/lzpix/classes test
pbr@openlaszlo.org
pbr at openlaszlo.org
Wed May 7 11:48:48 PDT 2008
Author: pbr
Date: 2008-05-07 11:48:45 -0700 (Wed, 07 May 2008)
New Revision: 9032
Added:
openlaszlo/trunk/test/lpp-5926.lzx
Modified:
openlaszlo/trunk/WEB-INF/lps/lfc/kernel/dhtml/LzTimeKernel.js
openlaszlo/trunk/demos/lzpix/classes/dataman.lzx
Log:
Change 20080506-Philip-2 by Philip at Philip-DC on 2008-05-06 22:01:37 EDT
in /cygdrive/f/laszlo/svn/src/svn/openlaszlo/trunk_clean
for http://svn.openlaszlo.org/openlaszlo/trunk
Summary: REVISED: Fix most IE7/dhtml dragging issues in lzpix
New Features:
Bugs Fixed: LPP-5926
Technical Reviewer: max
QA Reviewer: (pending)
Doc Reviewer: (pending)
Documentation:
Release Notes:
Details:
Calling window.setInterval.apply() and window.setTimeout.apply() does not work in IE6/IE7. I found a workaround online that presents a fix:
http://webreflection.blogspot.com/2007/06/simple-settimeout-setinterval-extra.html.
The code is conditionized to only run for IE. clearInterval() and
clearTimeout() doesn't call apply since it has a single argument.
Also, running lzpix in debug mode is failing because of a javascript library, md5 that is loaded. Andre found that if this is loaded immediately, no errors are reported in IE.
Tests:
/test/lpp-5926.lzx runs in dhtml in firefox, IE, safari. The test verifies that LzTimeKernel works correctly.
lzpix runs in dhtml in IE6/IE7 as well as other browsers. It also runs when debugging is enabled.
In IE6/IE7 dragging a single image to the clips is not shown, and image is not displayed in the clips until another image is dragged.
Dragging multiple images works except that 1 fewer image is shown being dragged. LPP-5937 is created for this.
Files:
A test/lpp-5926.lzx
M WEB-INF/lps/lfc/kernel/dhtml/LzTimeKernel.js
M demos/lzpix/classes/dataman.lzx
http://svn.openlaszlo.org/openlaszlo/patches/20080506-Philip-2.tar
Modified: openlaszlo/trunk/WEB-INF/lps/lfc/kernel/dhtml/LzTimeKernel.js
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/kernel/dhtml/LzTimeKernel.js 2008-05-07 18:02:56 UTC (rev 9031)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/kernel/dhtml/LzTimeKernel.js 2008-05-07 18:48:45 UTC (rev 9032)
@@ -9,18 +9,39 @@
*/
// Receives and sends timing events
+
+// On IE6/7 window.setTimeout, window.setInterval cannot be called using
+// apply(). A workaround can be found here:
+// http://webreflection.blogspot.com/2007/06/simple-settimeout-setinterval-extra.html
+
+if (Lz.__BrowserDetect.isIE) {
+ (function(f){
+ window.setTimeout = f(window.setTimeout);
+ window.setInterval = f(window.setInterval);
+ })(function(f){
+ return function(c,t){
+ var a = Array.prototype.slice.call(arguments,2);
+ if(typeof c != "function")
+ c = new Function(c);
+ return f(function(){
+ c.apply(this, a)
+ }, t)
+ }
+ });
+}
+
var LzTimeKernel = {
setTimeout: function() {
- return window.setTimeout.apply(null, arguments);
+ return window.setTimeout.apply(window, arguments);
}
,setInterval: function() {
- return window.setInterval.apply(null, arguments);
+ return window.setInterval.apply(window, arguments);
}
- ,clearTimeout: function() {
- return window.clearTimeout.apply(null, arguments);
+ ,clearTimeout: function(id) {
+ return window.clearTimeout(id);
}
- ,clearInterval: function() {
- return window.clearInterval.apply(null, arguments);
+ ,clearInterval: function(id) {
+ return window.clearInterval(id);
}
// Implement actionscript API to get ms since startup time
Modified: openlaszlo/trunk/demos/lzpix/classes/dataman.lzx
===================================================================
--- openlaszlo/trunk/demos/lzpix/classes/dataman.lzx 2008-05-07 18:02:56 UTC (rev 9031)
+++ openlaszlo/trunk/demos/lzpix/classes/dataman.lzx 2008-05-07 18:48:45 UTC (rev 9032)
@@ -1,5 +1,5 @@
<library>
- <script src="md5.js" />
+ <script src="md5.js" when="immediate" />
<!--
GLOBALS
Added: openlaszlo/trunk/test/lpp-5926.lzx
Property changes on: openlaszlo/trunk/test/lpp-5926.lzx
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:eol-style
+ native
More information about the Laszlo-checkins
mailing list