[gs-commits] rev 10892 - trunk/gs/toolbin/localcluster

robin at ghostscript.com robin at ghostscript.com
Tue Mar 9 16:50:48 UTC 2010


Author: robin
Date: 2010-03-09 16:50:48 +0000 (Tue, 09 Mar 2010)
New Revision: 10892

Modified:
   trunk/gs/toolbin/localcluster/bmps2html.pl
   trunk/gs/toolbin/localcluster/pngs2html.pl
Log:
Misplaced bracket in the javascript meant that only the first images would
swap on mouseover properly. Fixed here.




Modified: trunk/gs/toolbin/localcluster/bmps2html.pl
===================================================================
--- trunk/gs/toolbin/localcluster/bmps2html.pl	2010-03-09 16:39:21 UTC (rev 10891)
+++ trunk/gs/toolbin/localcluster/bmps2html.pl	2010-03-09 16:50:48 UTC (rev 10892)
@@ -83,9 +83,9 @@
 
     $javascript  = "<SCRIPT LANGUAGE=\"JavaScript\"><!--\n";
     $javascript .= "function swap(n){";
-    $javascript .=   "var n0 = ('00000'+3*Math.floor(n/3));"
+    $javascript .=   "var n0 = '00000'+(3*Math.floor(n/3));"
     $javascript .=   "n0=n0.substring(n0.length-5,n0.length);"
-    $javascript .=   "var n1 = ('00000'+3*Math.floor(n/3)+1);"
+    $javascript .=   "var n1 = '00000'+(3*Math.floor(n/3)+1);"
     $javascript .=   "n1=n1.substring(n1.length-5,n1.length);"
     $javascript .=   "var x = document.images['compare'+n0].src;";
     $javascript .=   "document.images['compare'+n0].src=document.images['compare'+n1].src;";

Modified: trunk/gs/toolbin/localcluster/pngs2html.pl
===================================================================
--- trunk/gs/toolbin/localcluster/pngs2html.pl	2010-03-09 16:39:21 UTC (rev 10891)
+++ trunk/gs/toolbin/localcluster/pngs2html.pl	2010-03-09 16:50:48 UTC (rev 10892)
@@ -109,9 +109,9 @@
 
     $javascript  = "<SCRIPT LANGUAGE=\"JavaScript\"><!--\n";
     $javascript .= "function swap(n){";
-    $javascript .=   "var n0 = ('00000'+3*Math.floor(n/3));";
+    $javascript .=   "var n0 = '00000'+(3*Math.floor(n/3));";
     $javascript .=   "n0=n0.substring(n0.length-5,n0.length);";
-    $javascript .=   "var n1 = ('00000'+3*Math.floor(n/3)+1);";
+    $javascript .=   "var n1 = '00000'+(3*Math.floor(n/3)+1);";
     $javascript .=   "n1=n1.substring(n1.length-5,n1.length);";
     $javascript .=   "var x = document.images['compare'+n0].src;";
     $javascript .=   "document.images['compare'+n0].src=document.images['compare'+n1].src;";



More information about the gs-commits mailing list