better refresh ui

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@3779 6c8d7289-2bf4-0310-a012-ef5d649a1542
This commit is contained in:
allo 2007-06-01 13:58:48 +00:00
parent 44bac7dea1
commit d0f8254f95
4 changed files with 11 additions and 6 deletions

View File

@ -11,7 +11,7 @@
#%env/templates/header.template%#
#%env/templates/submenuCrawler.template%#
<h2>Crawler Monitor</h2>
<p> Next update in <span id="nextUpdate" onclick="changeInterval()"></span> seconds. <img src="/env/grafics/empty.gif" name="ajax" alt="empty"/>
<p> Next update in <input type="text" id="nextUpdate" onfocus="changeInterval()" onblur="newInterval()" size="2" /> seconds. <img src="/env/grafics/empty.gif" name="ajax" alt="empty"/>
</p>
<table border="0" cellpadding="2" cellspacing="1" class="watchCrawler">
<tbody>

View File

@ -3,6 +3,7 @@
<head>
<title>YaCy '#[clientname]#': Web Structure</title>
#%env/templates/metas.template%#
<script type="text/javascript" src="/js/WatchWebStructure.js"></script>
</head>
<body id="WebStructure" style="margin:0px;">
#%env/templates/header.template%#
@ -13,7 +14,7 @@
<tr>
<td valign="top">
<dl>
<dt>host</dt><dd>#[host]#</dd>
<dt>host</dt><dd><input type="text" value="#[host]#" id="host" onblur="changeHost()" /></dd>
<dt>depth</dt><dd>#[depth]#<br/>
<a href="WatchWebStructure_p.html?host=#[host]#&depth=#[depthd]#&width=#[width]#&height=#[height]#"><img src="env/grafics/minus.gif" /></a>
<a href="WatchWebStructure_p.html?host=#[host]#&depth=#[depthi]#&width=#[width]#&height=#[height]#"><img src="env/grafics/plus.gif" /></a>

View File

@ -18,19 +18,20 @@ function changeInterval(){
if(!changing){
window.clearInterval(countInterval);
counter=document.getElementById("nextUpdate");
counter.innerHTML='<input type="text" id="newInterval" onblur="newInterval()" size="2" />';
document.getElementById("newInterval").focus();
//counter.innerHTML='<input type="text" id="newInterval" onblur="newInterval()" size="2" />';
//document.getElementById("newInterval").focus();
counter.value=refreshInterval;
changing=true;
}
}
function newInterval(){
refreshInterval=document.getElementById("newInterval").value;
refreshInterval=document.getElementById("nextUpdate").value;
refresh();
countInterval=window.setInterval("countdown()", 1000);
changing=false;
}
function countdown(){
document.getElementById("nextUpdate").innerHTML=wait;
document.getElementById("nextUpdate").value=wait;
wait--;
if(wait==0){
refresh();

View File

@ -0,0 +1,3 @@
function changeHost(){
window.location.replace("http://"+window.location.host+":"+window.location.port+"/WatchWebStructure_p.html?host="+document.getElementById("host").value);
}