1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
// JavaScript
"use strict";
function onGrammalecteGCPanelClick (xEvent) {
try {
let xElem = xEvent.target;
if (xElem.id) {
if (xElem.id.startsWith("grammalecte_sugg")) {
oGCPanel.applySuggestion(xElem.id);
} else if (xElem.id === "grammalecte_tooltip_ignore") {
oGCPanel.ignoreError(xElem.id);
} else if (xElem.id.startsWith("grammalecte_check")) {
oGCPanel.recheckParagraph(parseInt(xElem.id.slice(17)));
} else if (xElem.id.startsWith("grammalecte_hide")) {
xElem.parentNode.parentNode.style.display = "none";
} else if (xElem.tagName === "U" && xElem.id.startsWith("grammalecte_err")
&& xElem.className !== "corrected" && xElem.className !== "ignored") {
oGCPanel.oTooltip.show(xElem.id);
} else if (xElem.id === "grammalecte_tooltip_url") {
oGCPanel.openURL(xElem.getAttribute("href"));
} else {
oGCPanel.oTooltip.hide();
}
} else if (xElem.tagName === "A") {
oGCPanel.openURL(xElem.getAttribute("href"));
} else {
oGCPanel.oTooltip.hide();
}
}
catch (e) {
showError(e);
}
}
|
|
|
|
|
|
|
|
|
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
// JavaScript
"use strict";
function onGrammalecteGCPanelClick (xEvent) {
try {
let xElem = xEvent.target;
if (xElem.id) {
if (xElem.id.startsWith("grammalecte_sugg")) {
oGrammalecte.oGCPanel.applySuggestion(xElem.id);
} else if (xElem.id === "grammalecte_tooltip_ignore") {
oGrammalecte.oGCPanel.ignoreError(xElem.id);
} else if (xElem.id.startsWith("grammalecte_check")) {
oGrammalecte.oGCPanel.recheckParagraph(parseInt(xElem.id.slice(17)));
} else if (xElem.id.startsWith("grammalecte_hide")) {
xElem.parentNode.parentNode.style.display = "none";
} else if (xElem.tagName === "U" && xElem.id.startsWith("grammalecte_err")
&& xElem.className !== "corrected" && xElem.className !== "ignored") {
oGrammalecte.oGCPanel.oTooltip.show(xElem.id);
} else if (xElem.id === "grammalecte_tooltip_url") {
oGrammalecte.oGCPanel.openURL(xElem.getAttribute("href"));
} else {
oGrammalecte.oGCPanel.oTooltip.hide();
}
} else if (xElem.tagName === "A") {
oGrammalecte.oGCPanel.openURL(xElem.getAttribute("href"));
} else {
oGrammalecte.oGCPanel.oTooltip.hide();
}
}
catch (e) {
showError(e);
}
}
|