Index: gc_lang/fr/webext/panel/lex_editor.css
==================================================================
--- gc_lang/fr/webext/panel/lex_editor.css
+++ gc_lang/fr/webext/panel/lex_editor.css
@@ -49,10 +49,13 @@
margin: 3px 0 2px 0;
color: hsl(210, 50%, 50%);
font: bold 16px "Trebuchet MS", "Fira Sans", "Liberation Sans", sans-serif;
}
+#editor {
+ display: none;
+}
#categories {
display: flex;
padding: 10px 0;
}
@@ -136,11 +139,11 @@
background: transparent;
font: normal 20px Tahoma, "Ubuntu Condensed";
color: hsl(0, 0%, 20%);
}
input[placeholder] {
- color: hsl(0, 0%, 80%);
+ color: hsl(0, 0%, 50%);
}
#actions {
display: none;
Index: gc_lang/fr/webext/panel/lex_editor.html
==================================================================
--- gc_lang/fr/webext/panel/lex_editor.html
+++ gc_lang/fr/webext/panel/lex_editor.html
@@ -11,11 +11,11 @@
Index: gc_lang/fr/webext/panel/lex_editor.js
==================================================================
--- gc_lang/fr/webext/panel/lex_editor.js
+++ gc_lang/fr/webext/panel/lex_editor.js
@@ -45,11 +45,12 @@
document.getElementById("editor").addEventListener("click", onSelectionClick, false);
document.getElementById("word").addEventListener("keyup", onWrite, false);
document.getElementById("word2").addEventListener("keyup", onWrite2, false);
-
+document.getElementById("lemma").addEventListener("keyup", () => { oFlex.update(); }, false);
+document.getElementById("tags").addEventListener("keyup", () => { oFlex.update(); } , false);
/*
ACTIONS
*/
@@ -108,12 +109,12 @@
document.getElementById("up_v_p").checked = false;
document.getElementById("up_v_m").checked = false;
document.getElementById("up_v_ae").checked = false;
document.getElementById("up_v_aa").checked = false;
// autre
- document.getElementById("up_lemma").value = "";
- document.getElementById("up_tags").value = "";
+ document.getElementById("lemma").value = "";
+ document.getElementById("tags").value = "";
}
catch (e) {
showError(e);
}
},
@@ -181,19 +182,19 @@
let sWord2 = document.getElementById("word2").value.trim();
if (sWord2.length > 0) {
let sTag2 = this.getRadioValue("POS2") + this.getRadioValue("genre2");
switch (this.getRadioValue("pluriel2")) {
case "s":
- this.addFlexion(sWord2, sWord2, sTag2+":s");
- this.addFlexion(sWord2+"s", sWord2, sTag2+":p");
+ this.addFlexion(sWord2, sWord, sTag2+":s");
+ this.addFlexion(sWord2+"s", sWord, sTag2+":p");
break;
case "x":
- this.addFlexion(sWord2, sWord2, sTag2+":s");
- this.addFlexion(sWord2+"x", sWord2, sTag2+":p");
+ this.addFlexion(sWord2, sWord, sTag2+":s");
+ this.addFlexion(sWord2+"x", sWord, sTag2+":p");
break;
case "i":
- this.addFlexion(sWord2, sWord2, sTag2+":i");
+ this.addFlexion(sWord2, sWord, sTag2+":i");
break;
}
}
break;
case "V":
@@ -231,10 +232,17 @@
case "MP":
sGenderTag = this.getRadioValue("genre_mp");
if (sGenderTag) {
this.addFlexion(sWord, sWord, ":MP"+sGenderTag+":i");
}
+ break;
+ case "X":
+ let sLemma = document.getElementById("lemma").value.trim();
+ let sTags = document.getElementById("tags").value.trim();
+ if (sLemma.length > 0 && sTags.startsWith(":")) {
+ this.addFlexion(sWord, sLemma, sTags);
+ }
break;
}
}
this.show();
}