diff --git a/templates/web/thesaurus/export-text-dialog.html.twig b/templates/web/thesaurus/export-text-dialog.html.twig index 35e307c077..5eba09f8db 100644 --- a/templates/web/thesaurus/export-text-dialog.html.twig +++ b/templates/web/thesaurus/export-text-dialog.html.twig @@ -13,12 +13,13 @@ switch(button) { case "submit": - document.forms[0].action = "export_" + format + ".php"; - document.forms[0].submit(); + $('.export-form').attr('action',"export_" + format + ".php"); + $('.export-form').submit(); + $('.close-dialog').trigger('click'); break; case "cancel": self.returnValue = null; - self.close(); + $('.close-dialog').trigger('click'); break; } } @@ -49,19 +50,22 @@ { var i, f; url = "./export_"+format+".php?bid={{ bid }}&piv={{ piv }}&id={{ id }}&typ={{ typ }}&dlg=0&smp=1"; - url += "&osl=" + (document.forms[0].osl[0].checked ? "1" : "0"); - url += "&iln=" + (document.forms[0].iln.checked ? "1" : "0"); - url += "&hit=" + (document.forms[0].hit.checked ? "1" : "0"); - url += "&ilg=" + (document.forms[0].ilg.checked ? "1" : "0"); + url += "&osl=" + ($('.osl_1')[0].checked ? "1" : $('.osl_0')[0].checked ? "0" : "0"); + url += "&iln=" + ($('.iln')[0].checked ? "1" : "0"); + url += "&hit=" + ($('.hit')[0].checked ? "1" : "0"); + url += "&ilg=" + ($('.ilg')[0].checked ? "1" : "0"); document.getElementById("ifrsample").src = url; } + $( document ).ready(function() { + loaded(); + }); - +

-
- + + @@ -82,23 +86,23 @@
- + {{ 'thesaurus:: exporter avec les synonymes sur la meme ligne' | trans }}
- + {{ 'thesaurus:: exporter avec une ligne par synonyme' | trans }}
- + {{ 'thesaurus:: export : numeroter les lignes' | trans }}
- + {{ 'thesaurus:: export : inclure la langue' | trans }}
- + {{ 'thesaurus:: export : inclure les hits' | trans }}
diff --git a/templates/web/thesaurus/export-topics-dialog.html.twig b/templates/web/thesaurus/export-topics-dialog.html.twig index 968e5a50f8..d902e3ebbf 100644 --- a/templates/web/thesaurus/export-topics-dialog.html.twig +++ b/templates/web/thesaurus/export-topics-dialog.html.twig @@ -11,12 +11,12 @@ switch(button) { case "submit": - document.forms[0].target = (format == 'tofiles' ? "_self" : "EXPORT2"); - document.forms[0].submit(); + $('.export-topics-form').submit(); + $('.close-dialog').trigger('click'); break; case "cancel": self.returnValue = null; - self.close(); + $('.close-dialog').trigger('click'); break; } } @@ -45,21 +45,25 @@ } function chgFormat() { - var i, f; - for(i=0; i - +
- + @@ -71,11 +75,11 @@
{{ 'thesaurus:: exporter' | trans }}
- + {{ 'thesaurus:: exporter vers topics pour toutes les langues' | trans }}
- + {% trans with {'%piv%' : piv} %}thesaurus:: exporter a l'ecran pour la langue %piv%{% endtrans %}
@@ -85,7 +89,7 @@
{{ 'phraseanet:: tri' | trans }}
- + {{ 'phraseanet:: tri par date' | trans }}
@@ -95,15 +99,15 @@
{{ 'thesaurus:: recherche' | trans }}
- + {{ 'thesaurus:: recherche thesaurus *:"query"' | trans }}
- + {{ 'thesaurus:: recherche fulltext' | trans }}
- + {{ 'thesaurus:: question complete (avec operateurs)' | trans }}
@@ -113,23 +117,23 @@
{{ 'thesaurus:: presentation' | trans }}
- + {{ 'thesaurus:: presentation : branches refermables' | trans }}
- + {{ 'thesaurus:: presentation : branche ouvertes' | trans }}
- + {{ 'thesaurus:: tout deployer - refermable' | trans }}
- + {{ 'thesaurus:: tout deployer - statique' | trans }}
- + {{ 'thesaurus:: tout fermer' | trans }}
diff --git a/templates/web/thesaurus/link-field-step1.html.twig b/templates/web/thesaurus/link-field-step1.html.twig index ced3f72e0c..74e544eb61 100644 --- a/templates/web/thesaurus/link-field-step1.html.twig +++ b/templates/web/thesaurus/link-field-step1.html.twig @@ -25,24 +25,38 @@ switch(button) { case "submit": - // document.forms[0].target="LINKFIELD"; - document.forms[0].submit(); + $('.link-field-1').submit( + $.ajax({ + url : 'linkfield2.php', + type : 'POST', + data : $('.link-field-1').serialize(), + success : function( data ) { + $("#DLG_LINK_FIELD_1").html(''); + $("#DLG_LINK_FIELD_1").append(data); + }, + error : function( xhr, err ) { + alert('Error'); + } + }) + ); break; case "cancel": - self.close(); + $('.close-dialog').trigger('click'); break; } } function loaded() { - window.name="LINKFIELD"; ckField(); } + $( document ).ready(function() { + loaded(); + }); - +
- + diff --git a/templates/web/thesaurus/link-field-step2.html.twig b/templates/web/thesaurus/link-field-step2.html.twig index 06cfceb0a9..070ddaff1a 100644 --- a/templates/web/thesaurus/link-field-step2.html.twig +++ b/templates/web/thesaurus/link-field-step2.html.twig @@ -12,10 +12,23 @@ switch(button) { case "submit": - document.forms[0].submit(); + $('.link-field-2').submit( + $.ajax({ + url : 'linkfield3.php', + type : 'POST', + data : $('.link-field-2').serialize(), + success : function( data ) { + $("#DLG_LINK_FIELD_1").html(''); + $("#DLG_LINK_FIELD_1").append(data); + }, + error : function( xhr, err ) { + alert('Error'); + } + }) + ); break; case "cancel": - self.close(); + $('.close-dialog').trigger('click'); break; } } @@ -23,11 +36,14 @@ { window.name="LINKFIELD"; } + $( document ).ready(function() { + loaded(); + }); - +
- + diff --git a/templates/web/thesaurus/link-field-step3.html.twig b/templates/web/thesaurus/link-field-step3.html.twig index dd5607ae41..1605f551c7 100644 --- a/templates/web/thesaurus/link-field-step3.html.twig +++ b/templates/web/thesaurus/link-field-step3.html.twig @@ -42,7 +42,7 @@ {% endif %}
- +
diff --git a/templates/web/thesaurus/new-term.html.twig b/templates/web/thesaurus/new-term.html.twig index a8ef0a72da..37b18cc8a4 100644 --- a/templates/web/thesaurus/new-term.html.twig +++ b/templates/web/thesaurus/new-term.html.twig @@ -56,7 +56,7 @@
{% else %} - {% if nb_candidates_bad > 0 %}t + {% if nb_candidates_bad > 0 %} {% set prop_label = 'thesaurus:: est candidat en provenance des champs mais ne peut etre accepte a cet emplacement du thesaurus' | trans %} {% else %} {% set prop_label = 'thesaurus:: n\'est pas present dans les candidats' | trans %} @@ -112,17 +112,19 @@ switch(refresh.item(i).getAttribute("type")) { case "CT": - {{ opener }}.reloadCtermsBranch(refresh.item(i).getAttribute("id")); + reloadCtermsBranch(refresh.item(i).getAttribute("id")); break; case "TH": - {{ opener }}.reloadThesaurusBranch(refresh.item(i).getAttribute("id")); + reloadThesaurusBranch(refresh.item(i).getAttribute("id")); break; } } - self.close(); + $("#NEWSY_DLG_CONFIRM").dialog('close'); + $("#NEWSY_DLG_CONFIRM").html(''); break; case "cancel": - self.close(); + $("#NEWSY_DLG_CONFIRM").dialog('close'); + $("#NEWSY_DLG_CONFIRM").html(''); break; } } @@ -168,6 +170,8 @@ break; case "cancel": $("#NEWSY_DLG_CONFIRM").dialog('close'); + $("#NEWSY_DLG_CONFIRM").html(''); + break; } } diff --git a/templates/web/thesaurus/properties.html.twig b/templates/web/thesaurus/properties.html.twig index e5c0280438..43e1c05b91 100644 --- a/templates/web/thesaurus/properties.html.twig +++ b/templates/web/thesaurus/properties.html.twig @@ -24,15 +24,15 @@ font-weight:900; } - - diff --git a/templates/web/thesaurus/thesaurus.html.twig b/templates/web/thesaurus/thesaurus.html.twig index 6a7180a151..492d69974f 100644 --- a/templates/web/thesaurus/thesaurus.html.twig +++ b/templates/web/thesaurus/thesaurus.html.twig @@ -84,7 +84,12 @@ $("#SEARCH_DLG").dialog({ modal: true, title: "{{ 'Chercher' | trans }}", - autoOpen:false + autoOpen:false, + open:function () { + $(this).closest(".ui-dialog") + .find(".ui-button:first") // the first button + .addClass("close-dialog").hide(); + } }); $("#NEWSY_DLG").dialog({ modal: true, @@ -302,11 +307,20 @@ -
-
- +
+
+
+
+
+
+ + + @@ -324,23 +338,25 @@