Index: gc_lang/fr/mailext/content/lex_editor.css
==================================================================
--- gc_lang/fr/mailext/content/lex_editor.css
+++ gc_lang/fr/mailext/content/lex_editor.css
@@ -4,11 +4,11 @@
font-weight: bold;
}
/*
Dictionary
-*/
+*/
.dictionary {
font-size: 18px;
font-weight: bold;
color: hsl(210, 50%, 50%);
}
@@ -80,10 +80,16 @@
#lexicon_table {
width: 600px;
height: 650px;
}
+.list_header {
+ padding: 2px 10px;
+ font-weight: bold;
+ background-color: hsl(0, 0%, 95%);
+ border-bottom: 1px solid hsl(0, 0%, 50%);
+}
.info_label {
width: 120px;
}
.data {
width: 90px;
Index: gc_lang/fr/mailext/content/lex_editor.js
==================================================================
--- gc_lang/fr/mailext/content/lex_editor.js
+++ gc_lang/fr/mailext/content/lex_editor.js
@@ -64,19 +64,14 @@
this._createHeader();
}
_createHeader () {
let xListheadNode = createNode("richlistitem");
- for (let sColumn of this.lColumn) {
- xListheadNode.appendChild(createNode("div", { class: "listheader", label: sColumn }));
+ for (let i=0; i < this.lColumn.length; i++) {
+ xListheadNode.appendChild(createNode("label", { class: "listheader", value: this.lColumn[i], flex: this.lColumnWidth[i] }));
}
this.xTable.appendChild(xListheadNode);
- let xListcolsNode = createNode("richlistitem");
- for (let cColumn of this.lColumnWidth) {
- xListcolsNode.appendChild(createNode("div", { class: "listcol", flex: cColumn }));
- }
- this.xTable.appendChild(xListcolsNode);
}
clear () {
while (this.xTable.firstChild) {
this.xTable.removeChild(this.xTable.firstChild);
@@ -118,11 +113,11 @@
}
_addRow (lData) {
let xRowNode = createNode("richlistitem", { id: this.sNodeId + "_item_" + this.iEntryIndex, value: this.iEntryIndex });
for (let data of lData) {
- xRowNode.appendChild(createNode("div", { class:"listcell", label: data }));
+ xRowNode.appendChild(createNode("label", { class:"listcell", label: data }));
}
this.xTable.appendChild(xRowNode);
this.iEntryIndex += 1;
}
Index: gc_lang/fr/mailext/content/lex_editor.xul
==================================================================
--- gc_lang/fr/mailext/content/lex_editor.xul
+++ gc_lang/fr/mailext/content/lex_editor.xul
@@ -157,12 +157,12 @@
-->
-
-
+
+
@@ -180,12 +180,12 @@
-
-
+
+
@@ -239,12 +239,12 @@
La recherche par expressions régulières peut générer un nombre gigantesque de résultats. Seules les 2000 premières occurrences trouvées seront affichées. La recherche peut être longue, parce tout le graphe de mots, qui contient 500 000 flexions, sera parcouru si besoin.
-
-
+
+
Index: gc_lang/fr/mailext/content/overlay.js
==================================================================
--- gc_lang/fr/mailext/content/overlay.js
+++ gc_lang/fr/mailext/content/overlay.js
@@ -338,12 +338,11 @@
});
xNodeSuggLine.appendChild(xNodeSuggButton);
xNodeDiv.appendChild(xNodeSuggLine);
return xNodeDiv;
},
- loadUI: function() {
- console.log("loadUI");
+ loadUI: function () {
this._strings = document.getElementById("grammarchecker-strings");
let that = this;
let nsGrammarCommand = {
isCommandEnabled: function (aCommand, dummy) {
return (IsDocumentEditable() && !IsInHTMLSourceMode());
@@ -358,27 +357,20 @@
xCommandTable.registerCommand("cmd_grammar", nsGrammarCommand);
let sButtonId = "grammarchecker-toolbar-button";
let sButtonId2 = "grammalecte-menu";
let xNavBar = document.getElementById("composeToolbar2");
let lCurSet = xNavBar.currentSet.split(",");
- console.log("navBar", lCurSet);
if (lCurSet.indexOf(sButtonId) == -1) {
let iPos = lCurSet.indexOf("spellingButton") + 1 || lCurSet.length;
let aSet = lCurSet.slice(0, iPos).concat(sButtonId).concat(sButtonId2).concat(lCurSet.slice(iPos));
xNavBar.setAttribute("currentset", aSet.join(","));
- xNavBar.currentSet = aSet.join(",");
- //document.persist(xNavBar.id, "currentset");
+ //xNavBar.currentSet = aSet.join(",");
Services.xulStore.persist(xNavBar, "currentset");
- try {
- Ci.BrowserToolboxCustomizeDone(true);
- }
- catch (e) {
- console.error(e);
- }
+ Ci.BrowserToolboxCustomizeDone(true);
}
},
- clearPreview: function() {
+ clearPreview: function () {
let xPreview = document.getElementById("grammalecte-errors");
while (xPreview.firstChild) {
xPreview.removeChild(xPreview.firstChild);
};
let xEditor = GetCurrentEditor();
@@ -480,32 +472,10 @@
onAbout: function (e) {
this.openDialog("chrome://grammarchecker/content/about.xul", "", "chrome, dialog, modal, resizable=no");
}
};
-
-var oDictIgniter = {
- bDone: false,
- init: function () {
- if (!this.bDone) {
- oSpellControl.init();
- this._setDictionary('fr-FR-modern', 'bDictModern');
- this._setDictionary('fr-FR-classic', 'bDictClassic');
- this._setDictionary('fr-FR-reform', 'bDictReform');
- this._setDictionary('fr-FR-classic-reform', 'bDictClassicReform');
- }
- },
- _setDictionary: function (sDicName, sOptName) {
- try {
- oSpellControl.setExtensionDictFolder(sDicName, prefs.getBoolPref(sOptName));
- }
- catch (e) {
- console.error(e);
- }
- }
-}
-
var oTextFormatter = {
init: function () {
try {
this.closePanel();
@@ -889,11 +859,10 @@
/* EVENTS */
window.addEventListener("load", function (xEvent) {
- // oDictIgniter.init();
oGrammarChecker.loadGC();
//oGrammarChecker.fullTests();
}, false);
window.addEventListener("compose-window-init", function (xEvent) {