socialbox: limit history to 50 elements to reduce long term browser memory usage; webbuild: debugging console messages improvements
This commit is contained in:
parent
09448ed3dd
commit
ba336825f1
@ -100,6 +100,11 @@ function ajax_getvalues_refresh(request,user,user_email,secret) {
|
|||||||
$("<span name=social sid=\""+ id + "\">" + nodes[i].childNodes[0].nodeValue + "</span>")
|
$("<span name=social sid=\""+ id + "\">" + nodes[i].childNodes[0].nodeValue + "</span>")
|
||||||
.clone().hide().prependTo("#socialbox").slideDown();
|
.clone().hide().prependTo("#socialbox").slideDown();
|
||||||
}
|
}
|
||||||
|
if (nodes.length > 0) {
|
||||||
|
var span_nodes = $("#socialbox").children("span").each(function(idx, el) {
|
||||||
|
if (idx >= 50) el.remove(); // keep a maximum of 50 elements
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (xmldoc.getElementsByTagName("processes")[0] != undefined) {
|
if (xmldoc.getElementsByTagName("processes")[0] != undefined) {
|
||||||
document.getElementById("processes").innerHTML = xmldoc.getElementsByTagName("processes")[0].childNodes[0].nodeValue;
|
document.getElementById("processes").innerHTML = xmldoc.getElementsByTagName("processes")[0].childNodes[0].nodeValue;
|
||||||
|
@ -74,7 +74,11 @@ function ajax_getvalues(request,confirm) {
|
|||||||
if (o.xmlhttp.responseXML == undefined) {
|
if (o.xmlhttp.responseXML == undefined) {
|
||||||
// && xmlhttp.responseText == undefined) {
|
// && xmlhttp.responseText == undefined) {
|
||||||
document.getElementById("status").innerHTML = "";
|
document.getElementById("status").innerHTML = "";
|
||||||
document.getElementById("output").innerHTML = "<br>ERROR: there was a network connection problem.";
|
var errormsg = "<div id=\"outputbottom\" class=\"outputbox\"><pre>";
|
||||||
|
errormsg += "ERROR: there was an error in the network connection or in the format of the XML response.";
|
||||||
|
errormsg += "</pre></div>";
|
||||||
|
document.getElementById("output").innerHTML = errormsg;
|
||||||
|
console.error(o.xmlhttp.responseText);
|
||||||
o.xmlhttp.abort();
|
o.xmlhttp.abort();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user