[Scummvm-cvs-logs] CVS: web screenshots.js,NONE,1.1 index.php,1.15,1.16

Max Horn fingolfin at users.sourceforge.net
Tue Jan 27 14:14:49 CET 2004


Update of /cvsroot/scummvm/web
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11107

Modified Files:
	index.php 
Added Files:
	screenshots.js 
Log Message:
move screenshot related javascript back to an external file (because otherwise we get a validation problem <sigh>)

--- NEW FILE: screenshots.js ---
function openWin(fileToOpen,nameOfWindow,width,height) {
	myWindow = window.open("",nameOfWindow,"menubar=no,scrollbars=no,status=no,width="+width+",height="+height);
	myWindow.document.open();
	myWindow.document.write('<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">\n')
	myWindow.document.write('<html><head><title>ScreenShot Viewer</title><link rel="stylesheet" href="styles.css" type="text/css"></head>')
	myWindow.document.write('<body><a href="javascript:self.close();"><img src="'+ fileToOpen +'"></a></body></html>');
	myWindow.document.close();
}

var i_jn = 0;
function scrshot_jn(x,n) {
	if (n) i_jn++; else i_jn--;
	if (i_jn > x) i_jn = 0;
	if (i_jn < 0) i_jn = x;
	document['img_jn'].src = "./screenshots/scummvm_" + i_jn + ".png";
}

Index: index.php
===================================================================
RCS file: /cvsroot/scummvm/web/index.php,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -d -r1.15 -r1.16
--- index.php	27 Jan 2004 21:52:55 -0000	1.15
+++ index.php	27 Jan 2004 22:05:25 -0000	1.16
@@ -13,7 +13,7 @@
 require($file_root."/include/"."incl.php");
 
 // start of html
-html_header("ScummVM");
+html_header("ScummVM", '<script src="'.$file_root.'/screenshots.js" type="text/javascript"></script>');
 sidebar_start();
 
 // display welcome table
@@ -41,23 +41,8 @@
 ?>
 	<script type="text/javascript">
 	<!--
-	function openWin(fileToOpen,nameOfWindow,width,height) {
-		myWindow = window.open("",nameOfWindow,"menubar=no,scrollbars=no,status=no,width="+width+",height="+height);
-		myWindow.document.open();
-		myWindow.document.write('<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">\n')
-		myWindow.document.write('<html><head><title>ScreenShot Viewer</title><link rel="stylesheet" href="styles.css" type="text/css"></head>')
-		myWindow.document.write('<body><a href="javascript:self.close();"><img src="'+ fileToOpen +'"></a></body></html>');
-		myWindow.document.close();
-	}
-	
-	var i_jn = <?=$randImg?>;
-	function scrshot_jn(x,n) {
-		if (n) i_jn++; else i_jn--;
-		if (i_jn > x) i_jn = 0;
-		if (i_jn < 0) i_jn = x;
-		document['img_jn'].src = "./screenshots/scummvm_" + i_jn + ".png";
-	}
-	-->
+	i_jn = <?=$randImg?>;
+	//-->
 	</script>
 
 	<table width="100%" border=0 cellpadding=10 cellspacing=0>





More information about the Scummvm-git-logs mailing list