mirror of
https://gitea.psi.ch/ELOG/elog.git
synced 2026-09-08 17:13:56 +00:00
Implemented resizing of thumbnails for PDF attachments
SVN revision: 2032
This commit is contained in:
parent
9e9ae3405e
commit
6c46ab832e
@ -22,28 +22,35 @@ function im(id, thumb, image, cmd)
|
|||||||
try {
|
try {
|
||||||
xmlHttp=new ActiveXObject("Msxml2.XMLHTTP"); // Internet Explorer
|
xmlHttp=new ActiveXObject("Msxml2.XMLHTTP"); // Internet Explorer
|
||||||
}
|
}
|
||||||
catch (e) {
|
|
||||||
try {
|
|
||||||
xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
|
|
||||||
}
|
|
||||||
catch (e) {
|
catch (e) {
|
||||||
alert("Your browser does not support AJAX!");
|
try {
|
||||||
return false;
|
xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
|
||||||
|
}
|
||||||
|
catch (e) {
|
||||||
|
alert("Your browser does not support AJAX!");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
xmlHttp.onreadystatechange = function()
|
xmlHttp.onreadystatechange = function()
|
||||||
{
|
{
|
||||||
if(xmlHttp.readyState == 4)
|
if(xmlHttp.readyState == 4) {
|
||||||
{
|
if (xmlHttp.responseText != "" &&
|
||||||
if (xmlHttp.responseText != "")
|
xmlHttp.responseText.search(/Fonts/) == -1)
|
||||||
alert(xmlHttp.responseText);
|
alert(xmlHttp.responseText);
|
||||||
document.getElementById(id).src = thumb+'?'+dummy;
|
o = document.getElementById(id);
|
||||||
dummy++;
|
if (o)
|
||||||
}
|
o.src = thumb+'?'+dummy;
|
||||||
}
|
for (i=0 ; i<8 ; i++) {
|
||||||
|
o = document.getElementById(id+'_'+i);
|
||||||
|
if (o)
|
||||||
|
o.src = thumb+'-'+i+'.png'+'?'+dummy;
|
||||||
|
}
|
||||||
|
dummy++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
xmlHttp.open("GET","?cmd=im&req="+cmd+"&img="+image, true);
|
xmlHttp.open("GET","?cmd=im&req="+cmd+"&img="+image, true);
|
||||||
xmlHttp.send(null);
|
xmlHttp.send(null);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user