Implemented resizing and rotation of thumbnails

SVN revision: 2027
This commit is contained in:
2008-02-05 21:20:59 +00:00
parent 92122ccd28
commit 72ebdc83cb
2 changed files with 292 additions and 156 deletions
+49
View File
@@ -0,0 +1,49 @@
/********************************************************************\
Name: md.js
Created by: Stefan Ritt
Contents: JavaScript code for ImageMagic interface inside ELOG
$Id$
\********************************************************************/
var dummy = 0;
function im(id, thumb, image, cmd)
{
var xmlHttp;
try {
xmlHttp = new XMLHttpRequest(); // Firefox, Opera 8.0+, Safari
}
catch (e) {
try {
xmlHttp=new ActiveXObject("Msxml2.XMLHTTP"); // Internet Explorer
}
catch (e) {
try {
xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
}
catch (e) {
alert("Your browser does not support AJAX!");
return false;
}
}
}
xmlHttp.onreadystatechange = function()
{
if(xmlHttp.readyState == 4)
{
if (xmlHttp.responseText != "")
alert(xmlHttp.responseText);
document.getElementById(id).src = thumb+'?'+dummy;
dummy++;
}
}
xmlHttp.open("GET","?cmd=im&req="+cmd+"&img="+image, true);
xmlHttp.send(null);
}