Grammalecte  Check-in [4db3740105]

Overview
Comment:[fx] more discrete buttons for paragraph actions
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk | fx
Files: files | file ages | folders
SHA3-256: 4db3740105cba5020d98053d305ce1bc0aab89da0176a65736f2034e76d3c0a5
User & Date: olr on 2019-04-18 22:26:06
Other Links: manifest | tags
Context
2019-04-19
08:27
[fr] ajustement check-in: 74c9efdaf5 user: olr tags: trunk, fr
2019-04-18
22:26
[fx] more discrete buttons for paragraph actions check-in: 4db3740105 user: olr tags: trunk, fx
22:25
[fr] faux positif check-in: a5874e4261 user: olr tags: trunk, fr
Changes

Modified gc_lang/fr/webext/content_scripts/panel_gc.css from [6a5b66f6d8] to [2e15bdec95].

30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
div.grammalecte_paragraph_actions {
    float: right;
    margin: 0 0 5px 10px;
}

div.grammalecte_paragraph_button {
    display: inline-block;
    background-color: hsl(0, 0%, 50%);
    text-align: center;
    margin-left: 2px;
    padding: 1px 4px 3px 4px;
    cursor: pointer;
    font-family: "Trebuchet MS", "Fira Sans", "Liberation Sans", sans-serif;
    font-size: 14px;
    color: hsl(0, 0%, 96%);
    border-radius: 2px;
}
div.grammalecte_paragraph_button:hover {
    background-color: hsl(0, 0%, 40%);
    color: hsl(0, 0%, 100%);
}

div.grammalecte_paragraph_actions .grammalecte_green {
    background-color: hsl(120, 30%, 50%);
    color: hsl(0, 0%, 96%);
}
div.grammalecte_paragraph_actions .grammalecte_green:hover {
    background-color: hsl(120, 50%, 40%);
    color: hsl(0, 0%, 100%);
}
div.grammalecte_paragraph_actions .grammalecte_red {
    background-color: hsl(0, 30%, 50%);
    color: hsl(0, 0%, 96%);
}
div.grammalecte_paragraph_actions .grammalecte_red:hover {
    background-color: hsl(0, 50%, 40%);
    color: hsl(0, 0%, 100%);
}

@keyframes grammalecte-pulse {
    0% { box-shadow: 0 0 0 1px hsla(0, 100%, 50%, .4); }
    50% { box-shadow: 0 0 0 3px hsla(0, 100%, 50%, .4); }
    100% { box-shadow: 0 0 0 1px hsla(0, 100%, 50%, .4); }
}







<









<
<
<
|
<

<
|






|
|



|







30
31
32
33
34
35
36

37
38
39
40
41
42
43
44
45



46

47

48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
div.grammalecte_paragraph_actions {
    float: right;
    margin: 0 0 5px 10px;
}

div.grammalecte_paragraph_button {
    display: inline-block;

    text-align: center;
    margin-left: 2px;
    padding: 1px 4px 3px 4px;
    cursor: pointer;
    font-family: "Trebuchet MS", "Fira Sans", "Liberation Sans", sans-serif;
    font-size: 14px;
    color: hsl(0, 0%, 96%);
    border-radius: 2px;
}





div.grammalecte_paragraph_actions .grammalecte_green {

    color: hsl(0, 0%, 80%);
}
div.grammalecte_paragraph_actions .grammalecte_green:hover {
    background-color: hsl(120, 50%, 40%);
    color: hsl(0, 0%, 100%);
}
div.grammalecte_paragraph_actions .grammalecte_red {
    font-weight: bold;
    color: hsl(0, 50%, 80%);
}
div.grammalecte_paragraph_actions .grammalecte_red:hover {
    background-color: hsl(0, 50%, 40%);
    color: hsl(0, 50%, 96%);
}

@keyframes grammalecte-pulse {
    0% { box-shadow: 0 0 0 1px hsla(0, 100%, 50%, .4); }
    50% { box-shadow: 0 0 0 3px hsla(0, 100%, 50%, .4); }
    100% { box-shadow: 0 0 0 1px hsla(0, 100%, 50%, .4); }
}

Modified gc_lang/fr/webext/content_scripts/panel_gc.js from [c6dbad5da3] to [0a1421fd2a].

214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230

    freeParagraph (xParagraph) {
        xParagraph.contentEditable = "true";
        let nStart = parseInt(xParagraph.dataset.caret_position_start);
        let nEnd = parseInt(xParagraph.dataset.caret_position_end);
        oGrammalecte.setCaretPosition(xParagraph, nStart, nEnd);
        this.xParent.getElementById("grammalecte_check"+xParagraph.dataset.para_num).textContent = "A";
        this.xParent.getElementById("grammalecte_check"+xParagraph.dataset.para_num).style.backgroundColor = "hsl(120, 30%, 50%)";
        this.xParent.getElementById("grammalecte_check"+xParagraph.dataset.para_num).style.animation = "";
        setTimeout(() => { this.xParent.getElementById("grammalecte_check"+xParagraph.dataset.para_num).style.boxShadow = ""; }, 1000);
    }

    applySuggestion (sNodeSuggId) { // sugg
        try {
            let sErrorId = this.xParent.getElementById(sNodeSuggId).dataset.error_id;
            //let sParaNum = sErrorId.slice(0, sErrorId.indexOf("-"));
            let xNodeErr = this.xParent.getElementById("grammalecte_err" + sErrorId);







|

|







214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230

    freeParagraph (xParagraph) {
        xParagraph.contentEditable = "true";
        let nStart = parseInt(xParagraph.dataset.caret_position_start);
        let nEnd = parseInt(xParagraph.dataset.caret_position_end);
        oGrammalecte.setCaretPosition(xParagraph, nStart, nEnd);
        this.xParent.getElementById("grammalecte_check"+xParagraph.dataset.para_num).textContent = "A";
        this.xParent.getElementById("grammalecte_check"+xParagraph.dataset.para_num).style.backgroundColor = "";
        this.xParent.getElementById("grammalecte_check"+xParagraph.dataset.para_num).style.animation = "";
        setTimeout(() => { this.xParent.getElementById("grammalecte_check"+xParagraph.dataset.para_num).style.boxShadow = ""; }, 500);
    }

    applySuggestion (sNodeSuggId) { // sugg
        try {
            let sErrorId = this.xParent.getElementById(sNodeSuggId).dataset.error_id;
            //let sParaNum = sErrorId.slice(0, sErrorId.indexOf("-"));
            let xNodeErr = this.xParent.getElementById("grammalecte_err" + sErrorId);