From 1f0c54bfc3bfa1f9d777e194ca60f755c7c1948b Mon Sep 17 00:00:00 2001 From: Harrys Ravalomanana Date: Wed, 24 Jun 2020 15:17:50 +0400 Subject: [PATCH] PHRAS-3148 :Fix drag and drop terms --- templates/web/thesaurus/accept.html.twig | 33 ++++++++++--------- .../web/thesaurus/import-dialog.html.twig | 13 ++++---- templates/web/thesaurus/properties.html.twig | 1 + 3 files changed, 24 insertions(+), 23 deletions(-) diff --git a/templates/web/thesaurus/accept.html.twig b/templates/web/thesaurus/accept.html.twig index 3f25e80e35..962284af95 100644 --- a/templates/web/thesaurus/accept.html.twig +++ b/templates/web/thesaurus/accept.html.twig @@ -30,17 +30,18 @@ function ok() { as = ""; - if((n=document.forms[0].as.length) > 0) + if($(".as_1").length > 0) { - for(i=0; i @@ -144,9 +145,9 @@ {{ 'thesaurus:: Accepter le terme comme' | trans }}

{{ fullpath_src | raw }}




- {{ 'thesaurus:: comme terme specifique' | trans }} + {{ 'thesaurus:: comme terme specifique' | trans }}

- + {% set fullpath_tgt_raw = fullpath_tgt | raw %} {% trans with {'%fullpath_tgt_raw%' : fullpath_tgt_raw} %}thesaurus:: comme synonyme de %fullpath_tgt_raw%{% endtrans %}
@@ -155,7 +156,7 @@ {{ 'thesaurus:: Accepter la branche comme' | trans }}  {{ 'thesaurus:: comme terme specifique' | trans }}

{{ fullpath_tgt | raw }}



- + {% endif %}

diff --git a/templates/web/thesaurus/import-dialog.html.twig b/templates/web/thesaurus/import-dialog.html.twig index 2696b04ede..563b4de8ef 100644 --- a/templates/web/thesaurus/import-dialog.html.twig +++ b/templates/web/thesaurus/import-dialog.html.twig @@ -15,13 +15,12 @@ { switch(button) { - case "submit": - document.forms[0].target='IFRIM'; - document.forms[0].submit(); + case "submit":= + $('.import-form').submit(); break; case "cancel": self.returnValue = null; - self.close(); + $('.close-dialog').trigger('click'); break; } } @@ -32,8 +31,8 @@ { if(!err) { - {{ opener }}.reload(); - self.close(); + reload(); + $('.close-dialog').trigger('click'); } else { @@ -44,7 +43,7 @@
-
+ diff --git a/templates/web/thesaurus/properties.html.twig b/templates/web/thesaurus/properties.html.twig index 43e1c05b91..a772deaebb 100644 --- a/templates/web/thesaurus/properties.html.twig +++ b/templates/web/thesaurus/properties.html.twig @@ -139,6 +139,7 @@ parms += "&newlng=" + encodeURIComponent(lng); ret = loadXMLDoc(url, parms, true); + alert(ret); sy_list = ret.getElementsByTagName("sy_list").item(0); refresh_sy(sy_list);