diff --git a/ecrire/inc_mots.php3 b/ecrire/inc_mots.php3 index 448052b28b6c6b0733c9912baee6e2f12023067c..6e7f9aed4197cbbebeff917c25c68893fa733943 100644 --- a/ecrire/inc_mots.php3 +++ b/ecrire/inc_mots.php3 @@ -446,8 +446,7 @@ if (triangle) triangle.src = '" . _DIR_IMG_PACK . "deplierbas$spip_lang_rtl.gif' echo $message_ajouter_mot; $message_ajouter_mot = ""; echo "</td>\n<td>"; - echo "<script language='text/javascript'><!--\nvar antifocus_$id_groupe = false;\n// --></script>\n"; - $jscript = "onfocus=\"if(!antifocus_$id_groupe){this.value='';antifocus_$id_groupe=true;}\"". " onClick=\"setvisibility('valider_groupe_$id_groupe', 'visible');\""; + $jscript = "onfocus=\"setvisibility('valider_groupe_$id_groupe', 'visible'); if(!antifocus_mots[$id_groupe]){this.value='';antifocus_mots[$id_groupe]=true;}\""; if ($obligatoire == "oui" AND !$groupes_vus[$id_groupe]) echo "<INPUT TYPE='text' NAME='cherche_mot' CLASS='fondl' STYLE='width: 180px; background-color:#E86519;' VALUE=\"$titre_groupe\" SIZE='20' $jscript>"; diff --git a/ecrire/presentation.js b/ecrire/presentation.js index 5ebc33fe71d66ac32375caac039218661fef1535..b63a1dca11b32c62a67fde25861c571d0108dbe3 100644 --- a/ecrire/presentation.js +++ b/ecrire/presentation.js @@ -216,4 +216,7 @@ function verifForm() { } -var antifocus=false; // effacement titre quand new=oui +// effacement titre quand new=oui +var antifocus=false; +// effacement titre des groupes de mots-cles de plus de 50 mots +var antifocus_mots = new Array();