Commit b88c8ff7 authored by Romain Loth's avatar Romain Loth

[FIX] project view: dont update when corpus is pending deletion + longer start interval

parent c65bd62d
......@@ -127,7 +127,14 @@
<ul>
<li
onclick=&quot;
garganrest.nodes.delete({{corpus.id}}, function(){$('#corpus_'+{{corpus.id}}).remove()});
trashedIds[{{corpus.id}}] = true ;
garganrest.nodes.delete(
{{corpus.id}},
function(){
$('#corpus_'+{{corpus.id}}).remove()
delete trashedIds[{{corpus.id}}]
}
);
$(this).parent().parent().remove();
&quot;>
<a href='#'>Delete this</a>
......@@ -313,6 +320,9 @@
var corporaIds = []
// for corpora ids whose delete is pending
var trashedIds = {}
for (var i = 0 ; i < corporaDivs.length ; i++) {
// ex: corpus_1198
divId = corporaDivs[i].id
......@@ -329,7 +339,6 @@
keepCheckingProjectStatus()
}
// cookie ajax helper ==================================
function getCookie(name) {
var cookieValue = null;
......@@ -969,9 +978,8 @@
var activeCorporaIds = []
for (var i in corporaIds) {
var crid = corporaIds[i]
if (! document.getElementById(
'corpus_'+crid+'_status_ok')
) {
if ((! document.getElementById('corpus_'+crid+'_status_ok'))
&& (! trashedIds[crid])) {
activeCorporaIds.push(crid)
}
}
......@@ -1002,7 +1010,7 @@
}
else {
// decreasing intervals (preserving DB while "loosing interest")
nextTime = nChecks * 3000
nextTime = (nChecks+1) * 3000
// schedule next check
setTimeout(keepCheckingProjectStatus, nextTime)
console.log("next status check in", nextTime/1000, "s" )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment