From 69cc533ff6b968911023c8418390fc876f7a7c56 Mon Sep 17 00:00:00 2001 From: Jean-Yves Gaulier Date: Tue, 28 Jun 2016 19:10:23 +0200 Subject: [PATCH] PHRAS-726_delete-candidate - change : thesaurus pool notifications is 10s - fix : thesaurus / delete term is ok #time 1h --- .../Phrasea/Controller/Thesaurus/ThesaurusController.php | 4 ++-- templates/web/thesaurus/thesaurus.html.twig | 7 ++----- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/lib/Alchemy/Phrasea/Controller/Thesaurus/ThesaurusController.php b/lib/Alchemy/Phrasea/Controller/Thesaurus/ThesaurusController.php index 44440fa26a..a278a516d7 100644 --- a/lib/Alchemy/Phrasea/Controller/Thesaurus/ThesaurusController.php +++ b/lib/Alchemy/Phrasea/Controller/Thesaurus/ThesaurusController.php @@ -1834,7 +1834,7 @@ class ThesaurusController extends Controller $this->renumerate($newte, $ct->getAttribute("id") . "." . $teid, $chgids); - $databox->saveThesaurus($domth); + $databox->saveCterms($domct); $this->dispatch( ThesaurusEvents::CONCEPT_TRASHED, @@ -1843,7 +1843,7 @@ class ThesaurusController extends Controller $thnode_parent->removeChild($thnode); - $databox->saveCterms($domct); + $databox->saveThesaurus($domth); $r = $refresh_list->appendChild($ret->createElement("refresh")); $r->setAttribute("id", $pid); diff --git a/templates/web/thesaurus/thesaurus.html.twig b/templates/web/thesaurus/thesaurus.html.twig index ef921be0cc..48b4492a0b 100644 --- a/templates/web/thesaurus/thesaurus.html.twig +++ b/templates/web/thesaurus/thesaurus.html.twig @@ -131,11 +131,7 @@ alert("{{ 'phraseanet::erreur: Votre session est fermee, veuillez vous re-authentifier' | trans }}"); self.location.replace(self.location.href); } - //if(manageSession(data)) - var t = 5000; // 120000; - if(data.apps && parseInt(data.apps)>1) - t = Math.round((Math.sqrt(parseInt(data.apps)-1) * 1.3 * 120000)); - window.setTimeout("pollNotifications();", t); + window.setTimeout("pollNotifications();", 10000); return; } @@ -1022,6 +1018,7 @@ if(confirm("{{ 'thesaurus:: deplacer le terme dans la corbeille ?' | trans | e('js') }}"+"\n\n"+fullpath+"\n\n")) { + console.log(url); // xmlhttp/delts.x.php?bid=15&id=T1.629&debug=1 // alert(url+"?"+parms); ret = loadXMLDoc(url, parms, true);