This commit is contained in:
Romain Neutron
2012-04-26 00:55:53 +02:00
parent edbfff226e
commit ade22295ad
631 changed files with 92375 additions and 101763 deletions

View File

@@ -1,5 +1,4 @@
<?php
/*
* This file is part of Phraseanet
*
@@ -29,34 +28,34 @@ var avantModif="";
function loadXMLDoc(url, post_parms, asxml)
{
if(typeof(asxml)=="undefined")
asxml = false;
out = null;
xmlhttp = null;
// code for Mozilla, etc.
if (window.XMLHttpRequest)
xmlhttp=new XMLHttpRequest();
else if (window.ActiveXObject)
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
if(typeof(asxml)=="undefined")
asxml = false;
out = null;
xmlhttp = null;
// code for Mozilla, etc.
if (window.XMLHttpRequest)
xmlhttp=new XMLHttpRequest();
else if (window.ActiveXObject)
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
if (xmlhttp)
{
// xmlhttp.onreadystatechange=state_Change
if(post_parms)
{
xmlhttp.open("POST", url, false);
xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded');
xmlhttp.send(post_parms);
}
else
{
xmlhttp.open("GET", url, false);
xmlhttp.send(null);
}
out = asxml ? xmlhttp.responseXML : xmlhttp.responseText;
}
if (xmlhttp)
{
// xmlhttp.onreadystatechange=state_Change
if(post_parms)
{
xmlhttp.open("POST", url, false);
xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded');
xmlhttp.send(post_parms);
}
else
{
xmlhttp.open("GET", url, false);
xmlhttp.send(null);
}
out = asxml ? xmlhttp.responseXML : xmlhttp.responseText;
}
return(out);
return(out);
}
@@ -64,11 +63,11 @@ var pass=false;
/*
function redrawme()
{
hauteur = document.body.clientHeight;
hauteur = document.body.clientHeight;
// document.getElementById("idBox2").style.height = (hauteur-140)+"px"; // div interface graph
// document.getElementById("txtareaxml").style.height = (hauteur-170)+"px"; // textarea interface xml
document.getElementById("idBox2").style.height = (hauteur-130)+"px"; // div interface graph
document.getElementById("txtareaxml").style.height = (hauteur-160)+"px"; // textarea interface xml
document.getElementById("idBox2").style.height = (hauteur-130)+"px"; // div interface graph
document.getElementById("txtareaxml").style.height = (hauteur-160)+"px"; // textarea interface xml
}
*/
@@ -78,48 +77,48 @@ var lastpref=null;
function chgName(name)
{
url = "/admin/adminFeedback.php?action=CHANGETASK";
parms = "task_id=<?php echo $parm['tid'] ?>";
parms += "&name=" + encodeURIComponent(name);
url = "/admin/adminFeedback.php?action=CHANGETASK";
parms = "task_id=<?php echo $parm['tid'] ?>";
parms += "&name=" + encodeURIComponent(name);
// alert(url+"?"+parms);
ret = loadXMLDoc(url, parms, true);
ret = loadXMLDoc(url, parms, true);
}
function chgActive(ck)
{
url = "/admin/adminFeedback.php?action=CHANGETASK";
parms = "task_id=<?php echo $parm['tid'] ?>";
parms += "&active=" + (ck ? "1":"0");
// alert(url+"?"+parms);
if( (ret = loadXMLDoc(url, parms, true)) )
{
crashed = ret.documentElement.getAttribute("crashed");
document.getElementById("idCrashCount").innerHTML = crashed;
document.getElementById("idCrashLine").style.visibility = crashed > 0 ? "visible" : "hidden";
url = "/admin/adminFeedback.php?action=CHANGETASK";
parms = "task_id=<?php echo $parm['tid'] ?>";
parms += "&active=" + (ck ? "1":"0");
// alert(url+"?"+parms);
if( (ret = loadXMLDoc(url, parms, true)) )
{
crashed = ret.documentElement.getAttribute("crashed");
document.getElementById("idCrashCount").innerHTML = crashed;
document.getElementById("idCrashLine").style.visibility = crashed > 0 ? "visible" : "hidden";
// if(ret.documentElement.getAttribute("saved") == "1")
// return(true);
}
}
}
function saveXML()
{
var xml = document.forms["fxml"].txtareaxml.value;
if(xml)
{
url = "/admin/adminFeedback.php?action=CHANGETASK";
parms += "?task_id=<?php echo $parm['tid'] ?>";
parms += "&xml=" + encodeURIComponent(xml);
// alert(url+"?"+parms);
if( (ret = loadXMLDoc(url, parms, true)) )
{
if(ret.documentElement.getAttribute("saved") == "1")
var xml = document.forms["fxml"].txtareaxml.value;
if(xml)
{
url = "/admin/adminFeedback.php?action=CHANGETASK";
parms += "?task_id=<?php echo $parm['tid'] ?>";
parms += "&xml=" + encodeURIComponent(xml);
// alert(url+"?"+parms);
if( (ret = loadXMLDoc(url, parms, true)) )
{
if(ret.documentElement.getAttribute("saved") == "1")
return(true);
}
}
return(true);
}
}
return(false);
return(false);
}