@@ -1856,6 +1856,12 @@ public void pageCodeClasseJava(String langueNom, JsonObject langueConfig) throws
18561856 tl (4 , "json.put(\" " , langueConfig .getString (I18n .var_pivot ), "\" , true);" );
18571857 tl (3 , "}" );
18581858
1859+ tl (3 , "if(default" , langueConfig .getString (I18n .var_Tri ), "Vars.contains(String.format(\" %s asc\" , var))) {" );
1860+ tl (4 , "json.put(\" " , langueConfig .getString (I18n .var_tri ), "\" , \" asc\" );" );
1861+ tl (3 , "} else if(default" , langueConfig .getString (I18n .var_Tri ), "Vars.contains(String.format(\" %s desc\" , var))) {" );
1862+ tl (4 , "json.put(\" " , langueConfig .getString (I18n .var_tri ), "\" , \" desc\" );" );
1863+ tl (3 , "}" );
1864+
18591865 tl (3 , "vars.put(var, json);" );
18601866 tl (2 , "}" );
18611867 tl (1 , "}" );
@@ -2638,7 +2644,7 @@ public void pageCodeClasseJinja(String langueNom, JsonObject i18nPage) throws Ex
26382644
26392645 // JS Tri //
26402646 auteurPageJsRecherche .l ();
2641- auteurPageJsRecherche .tl (1 , "document.querySelector('#pageFacet " , i18nPage .getString (I18n .var_Tri ), classeNomSimple , "_" , entiteVar , "')?.addEventListener('" , "sl-" .equals (composantsWebPrefixe ) ? "sl-" : "" , "change', (event) => {" );
2647+ auteurPageJsRecherche .tl (1 , "document.querySelector('#pageSelect " , i18nPage .getString (I18n .var_Tri ), classeNomSimple , "_" , entiteVar , "')?.addEventListener('" , "sl-" .equals (composantsWebPrefixe ) ? "sl-" : "" , "change', (event) => {" );
26422648 auteurPageJsRecherche .tl (2 , i18nPage .getString (I18n .var_tri ), "('" , classeNomSimple , "', '" , entiteVar , "', event.currentTarget.value);" );
26432649 auteurPageJsRecherche .tl (1 , "});" );
26442650
@@ -5002,31 +5008,34 @@ public void ecrirePageBarreLaterale(String langueNom, JsonObject i18nPage) throw
50025008 tl (7 , "{% endfor %}" );
50035009 tl (7 , "</div>" );
50045010
5005- tl (7 , "{% for key, value in varsFq.items() %}" );
5006- // JS Tri //
50075011 tl (7 , "<div>" );
5008- t (8 , "<" , composantsWebPrefixe , "radio-group" );
5009- s (" orientation=\" horizontal\" " );
5010- s (" name=\" pageFacet" , i18nPage .getString (I18n .var_Tri ), "\" " );
5011- s (" class=\" pageFacet" , i18nPage .getString (I18n .var_Tri ), " \" " );
5012- s (" id=\" pageFacet" , i18nPage .getString (I18n .var_Tri ), classeNomSimple , "_{{ key }}\" " );
5013- s (" value=\" {% if (key + ' asc') in default" , i18nPage .getString (I18n .var_Tri ), "Vars %}asc{% else %}{% if (key + ' desc') in default" , i18nPage .getString (I18n .var_Tri ), "Vars %}desc{% endif %}{% endif %}\" " );
5014- s ("{% if " , i18nPage .getString (I18n .var_pivot ), " is defined %} checked=\" checked\" {% endif %}" );
5015- s (" label={{ value." , i18nPage .getString (I18n .var_nomAffichage ), " | tojson }}" );
5016- s (" size=\" small\" " );
5017- l (">" );
5018- t (9 , "<" , composantsWebPrefixe , "radio-button value=\" \" pill>" );
5019- s (i18nPage .getString (I18n .str_aucun ));
5020- l ("</" , composantsWebPrefixe , "radio-button>" );
5021- t (9 , "<" , composantsWebPrefixe , "radio-button value=\" asc\" pill>" );
5012+ tl (8 , "{% for key, value in varsFq.items() %}" );
5013+ // JS Tri //
5014+ tl (8 , "<" , composantsWebPrefixe , "details" );
5015+ tl (10 , "summary=\" {{ value." , i18nPage .getString (I18n .var_nomAffichage ), " | e }}\" " );
5016+ tl (10 , "class=\" pageDetails" , i18nPage .getString (I18n .var_Tri ), " \" " );
5017+ tl (10 , "id=\" pageDetails" , i18nPage .getString (I18n .var_Tri ), classeNomSimple , "_{{ key }}\" " );
5018+ tl (12 , "data-value=\" {{ value.var | e }}\" " );
5019+ tl (12 , "{% if value." , i18nPage .getString (I18n .var_tri ), " is defined %}open{% endif %}" );
5020+ tl (10 , ">" );
5021+ tl (9 , "<" , composantsWebPrefixe , "select with-clear" );
5022+ tl (11 , "orientation=\" horizontal\" " );
5023+ tl (11 , "class=\" pageSelect" , i18nPage .getString (I18n .var_Tri ), " \" " );
5024+ tl (11 , "id=\" pageSelect" , i18nPage .getString (I18n .var_Tri ), classeNomSimple , "_{{ key }}\" " );
5025+ tl (11 , "{% if value." , i18nPage .getString (I18n .var_tri ), " is defined %}value=\" {{ value." , i18nPage .getString (I18n .var_tri ), " | e }}\" {% endif %}" );
5026+ tl (11 , "label={{ value." , i18nPage .getString (I18n .var_nomAffichage ), " | tojson }}" );
5027+ tl (11 , "size=\" small\" " );
5028+ tl (11 , ">" );
5029+ t (10 , "<" , composantsWebPrefixe , "option value=\" asc\" >" );
50225030 s (i18nPage .getString (I18n .str_croissante ));
5023- l ("</" , composantsWebPrefixe , "radio-button >" );
5024- t (9 , "<" , composantsWebPrefixe , "radio-button value=\" desc\" pill >" );
5031+ l ("</" , composantsWebPrefixe , "option >" );
5032+ t (10 , "<" , composantsWebPrefixe , "option value=\" desc\" >" );
50255033 s (i18nPage .getString (I18n .str_decroissante ));
5026- l ("</" , composantsWebPrefixe , "radio-button>" );
5027- tl (8 , "</" , composantsWebPrefixe , "radio-group>" );
5034+ l ("</" , composantsWebPrefixe , "option>" );
5035+ tl (9 , "</" , composantsWebPrefixe , "select>" );
5036+ tl (8 , "</" , composantsWebPrefixe , "details>" );
5037+ tl (8 , "{% endfor %}" );
50285038 tl (7 , "</div>" );
5029- tl (7 , "{% endfor %}" );
50305039
50315040 tl (7 , "{%- endblock htmBody" , i18nPage .getString (I18n .var_Tri ), classePageNomSimple , " %}" );
50325041 tl (6 , "</div>" );
@@ -5417,12 +5426,12 @@ public void ecrirePageBoutonsRecherche(String langueNom, JsonObject i18nPage) th
54175426 //////////////
54185427 // bouton q //
54195428 //////////////
5420- // tl(5, "<", composantsWebPrefixe, "tooltip placement=\"top\" content=\"", i18nPage.getString(I18n.str_Recherche_avancee_pour_), classeNomAdjectifPluriel, "\">");
5421- tl (7 , "<" , composantsWebPrefixe , "button class=\" " , i18nPage .getString (I18n .var_BoutonsRecherche ), "_" , i18nPage .getString (I18n .var_Rechercher ), " " , i18nPage .getString (I18n .var_BoutonsRecherche ), "_" , i18nPage .getString (I18n .var_Rechercher ), "_" , classeNomSimple , " \" " , "wa-" .equals (composantsWebPrefixe ) ? " variant=\" brand\" " : " variant=\" primary\" outline" , " onclick=\" document.querySelector('#site" , i18nPage .getString (I18n .var_BarreLaterale ), "Toggle" , i18nPage .getString (I18n .var_Recherche ), "').open = true; \" >" );
5422- tl (8 , "<" , composantsWebPrefixe , "icon slot=\" start\" class=\" {{ FONTAWESOME_STYLE }} fa-magnifying-glass hover-box-shadow \" ></" , composantsWebPrefixe , "icon> " );
5423- tl (8 , i18nPage .getString (I18n .var_Rechercher ));
5424- tl (7 , "</" , composantsWebPrefixe , "button>" );
5425- // tl(5, "</", composantsWebPrefixe, "tooltip>");
5429+ // // tl(5, "<", composantsWebPrefixe, "tooltip placement=\"top\" content=\"", i18nPage.getString(I18n.str_Recherche_avancee_pour_), classeNomAdjectifPluriel, "\">");
5430+ // tl(7, "<", composantsWebPrefixe, "button class=\"", i18nPage.getString(I18n.var_BoutonsRecherche), "_", i18nPage.getString(I18n.var_Rechercher), " ", i18nPage.getString(I18n.var_BoutonsRecherche), "_", i18nPage.getString(I18n.var_Rechercher), "_", classeNomSimple, " \"", "wa-".equals(composantsWebPrefixe) ? " variant=\"brand\"" : " variant=\"primary\" outline", " onclick=\"document.querySelector('#site", i18nPage.getString(I18n.var_BarreLaterale), "Toggle", i18nPage.getString(I18n.var_Recherche), "').open = true; \">");
5431+ // tl(8, "<", composantsWebPrefixe, "icon slot=\"start\" class=\"{{ FONTAWESOME_STYLE }} fa-magnifying-glass hover-box-shadow \"></", composantsWebPrefixe, "icon> ");
5432+ // tl(8, i18nPage.getString(I18n.var_Rechercher));
5433+ // tl(7, "</", composantsWebPrefixe, "button>");
5434+ // // tl(5, "</", composantsWebPrefixe, "tooltip>");
54265435
54275436 ///////////////
54285437 // bouton fq //
@@ -5434,15 +5443,17 @@ public void ecrirePageBoutonsRecherche(String langueNom, JsonObject i18nPage) th
54345443 tl (7 , "</" , composantsWebPrefixe , "button>" );
54355444 // tl(5, "</", composantsWebPrefixe, "tooltip>");
54365445
5437- ///////////////
5438- // bouton fq //
5439- ///////////////
5446+ ////////////////
5447+ // bouton tri //
5448+ ////////////////
5449+ tl (7 , "{% if " , classeVarCleUnique , " is not defined %}" );
54405450 // tl(5, "<", composantsWebPrefixe, "tooltip placement=\"top\" content=\"", i18nPage.getString(I18n.str_Filtres_et_nombres_de_facettes_pour_), classeNomAdjectifPluriel, "\">");
54415451 tl (7 , "<" , composantsWebPrefixe , "button class=\" " , i18nPage .getString (I18n .var_BoutonsRecherche ), "_" , i18nPage .getString (I18n .var_Tri ), " " , i18nPage .getString (I18n .var_BoutonsRecherche ), "_" , i18nPage .getString (I18n .var_Tri ), "_" , classeNomSimple , " \" " , "wa-" .equals (composantsWebPrefixe ) ? " variant=\" brand\" " : " variant=\" primary\" outline" , " onclick=\" document.querySelector('#site" , i18nPage .getString (I18n .var_BarreLaterale ), "Toggle" , i18nPage .getString (I18n .var_Tri ), "').open = true; \" >" );
54425452 tl (8 , "<" , composantsWebPrefixe , "icon slot=\" start\" class=\" {{ FONTAWESOME_STYLE }} fa-arrow-down-a-z hover-box-shadow \" ></" , composantsWebPrefixe , "icon> " );
54435453 tl (8 , i18nPage .getString (I18n .str_Tri ));
54445454 tl (7 , "</" , composantsWebPrefixe , "button>" );
54455455 // tl(5, "</", composantsWebPrefixe, "tooltip>");
5456+ tl (7 , "{% endif %}" );
54465457
54475458 //////////////////
54485459 // bouton gamme //
@@ -5467,12 +5478,12 @@ public void ecrirePageBoutonsRecherche(String langueNom, JsonObject i18nPage) th
54675478 /////////////////////////
54685479 // bouton liste champs //
54695480 /////////////////////////
5470- // tl(5, "<", composantsWebPrefixe, "tooltip placement=\"top\" content=\"", i18nPage.getString(I18n.str_Recherche_avancee_pour_), classeNomAdjectifPluriel, "\">");
5471- tl (7 , "<" , composantsWebPrefixe , "button class=\" " , i18nPage .getString (I18n .var_BoutonsRecherche ), "_" , i18nPage .getString (I18n .var_ListeChamps ), " " , i18nPage .getString (I18n .var_BoutonsRecherche ), "_" , i18nPage .getString (I18n .var_ListeChamps ), "_" , classeNomSimple , " \" " , "wa-" .equals (composantsWebPrefixe ) ? " variant=\" brand\" " : " variant=\" primary\" outline" , " onclick=\" document.querySelector('#site" , i18nPage .getString (I18n .var_BarreLaterale ), "Toggle" , i18nPage .getString (I18n .var_ListeChamps ), "').open = true; \" >" );
5472- tl (8 , "<" , composantsWebPrefixe , "icon slot=\" start\" class=\" {{ FONTAWESOME_STYLE }} fa-list-ul hover-box-shadow \" ></" , composantsWebPrefixe , "icon> " );
5473- tl (8 , i18nPage .getString (I18n .var_ListeChamps ));
5474- tl (7 , "</" , composantsWebPrefixe , "button>" );
5475- // tl(5, "</", composantsWebPrefixe, "tooltip>");
5481+ // // tl(5, "<", composantsWebPrefixe, "tooltip placement=\"top\" content=\"", i18nPage.getString(I18n.str_Recherche_avancee_pour_), classeNomAdjectifPluriel, "\">");
5482+ // tl(7, "<", composantsWebPrefixe, "button class=\"", i18nPage.getString(I18n.var_BoutonsRecherche), "_", i18nPage.getString(I18n.var_ListeChamps), " ", i18nPage.getString(I18n.var_BoutonsRecherche), "_", i18nPage.getString(I18n.var_ListeChamps), "_", classeNomSimple, " \"", "wa-".equals(composantsWebPrefixe) ? " variant=\"brand\"" : " variant=\"primary\" outline", " onclick=\"document.querySelector('#site", i18nPage.getString(I18n.var_BarreLaterale), "Toggle", i18nPage.getString(I18n.var_ListeChamps), "').open = true; \">");
5483+ // tl(8, "<", composantsWebPrefixe, "icon slot=\"start\" class=\"{{ FONTAWESOME_STYLE }} fa-list-ul hover-box-shadow \"></", composantsWebPrefixe, "icon> ");
5484+ // tl(8, i18nPage.getString(I18n.var_ListeChamps));
5485+ // tl(7, "</", composantsWebPrefixe, "button>");
5486+ // // tl(5, "</", composantsWebPrefixe, "tooltip>");
54765487
54775488 //////////////////
54785489 // bouton stats //
0 commit comments