Grammalecte  Check-in [67c539f322]

Overview
Comment:[fx] update: better looking ui
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk | fx
Files: files | file ages | folders
SHA3-256: 67c539f3229721acb77f3278f20640ba92e1ac3569a9cf412319b0d12a58c7e3
User & Date: olr on 2019-05-04 10:40:00
Other Links: manifest | tags
Context
2019-05-04
13:17
[fx] update ui check-in: c834b85865 user: olr tags: trunk, fx
10:40
[fx] update: better looking ui check-in: 67c539f322 user: olr tags: trunk, fx
09:02
[fx] new shortcuts again (numbers only for opening tabs) check-in: 2f39cf3999 user: olr tags: trunk, fx
Changes

Modified gc_lang/fr/webext/content_scripts/init.js from [27867492f0] to [c64c3933c0].

45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
45
46
47
48
49
50
51

52
53
54
55
56
57
58







-








const oGrammalecte = {

    nMenu: 0,
    lMenu: [],

    oTFPanel: null,
    //oLxgPanel: null,
    oGCPanel: null,

    oMessageBox: null,

    xRightClickedNode: null,

    xObserver: null,
394
395
396
397
398
399
400
401

402
403
404
405
406
407
393
394
395
396
397
398
399

400
401
402
403
404
405
406







-
+






        dParam: {sText: oGrammalecte.getPageText(), sCountry: "FR", bDebug: false, bContext: false},
        dInfo: {}
    });
}

function parseAndSpellcheckEditableNode (xNode) {
    oGrammalecte.startGCPanel(xNode);
    let sText = (xNode.tagName == "TEXTAREA" || xNode.tagName == "INPUT") ? xNode.value : xNode.innerText;
    let sText = (xNode.tagName == "TEXTAREA" || xNode.tagName == "INPUT") ? xNode.value.normalize("NFC") : xNode.innerText.normalize("NFC");
    xGrammalectePort.postMessage({
        sCommand: "parseAndSpellcheck",
        dParam: {sText: sText, sCountry: "FR", bDebug: false, bContext: false},
        dInfo: {sTextAreaId: xNode.id}
    });
}

Modified gc_lang/fr/webext/content_scripts/menu.js from [fba25ba52d] to [52c256ec70].

61
62
63
64
65
66
67
68

69
70
71
72
73
74
75
76
77
78
61
62
63
64
65
66
67

68
69
70
71
72
73
74
75
76
77
78







-
+










        });
        /*this.xNode.addEventListener('blur', (e) => {
            window.setTimeout(() => {this.xButton.style.display = "none";}, 300);
        });*/
    }

    _getText () {
        return (this.xNode.tagName == "TEXTAREA") ? this.xNode.value.normalize("NFC") : this.xNode.innerText.normalize("NFC");
        return (this.xNode.tagName == "TEXTAREA" || this.xNode.tagName == "INPUT") ? this.xNode.value.normalize("NFC") : this.xNode.innerText.normalize("NFC")
    }

    deleteNodes () {
        if (this.bShadow) {
            this.xShadowBtn.parentNode.removeChild(this.xShadowBtn);
        } else {
            this.xButton.parentNode.removeChild(this.xButton);
        }
    }
}

Modified gc_lang/fr/webext/content_scripts/panel.css from [912dd5cc55] to [1bbc89bbcd].

27
28
29
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
74
75

76
77
78

79
80

81
82
83
84
85

86
87
88
89

90
91

92
93

94
95

96
97
98
99
100

101


















102
103
104
105
106

107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126

127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
27
28
29
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
74
75

76

77

78
79

80
81
82
83
84
85
86
87
88
89

90
91

92
93

94
95

96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125

126
127
128
129
130
131
132
133
134
135
136
137
138
139
140






141











142
143
144
145
146
147
148







-
+


-
+
-


-
+
+
+









-
-
+
+







-
+
-


-
+

-
+





+



-
+
-

-
+

-
+





+



-
+

-
+

-
+

-
+





+

+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+




-
+














-
-
-
-
-
-
+
-
-
-
-
-
-
-
-
-
-
-







    margin: 0;
    padding: 0;
}

div.grammalecte_panel_bar {
    position: sticky;
    width: 100%;
    background-color: hsl(210, 20%, 92%);
    background-color: hsl(210, 50%, 50%);
    border-radius: 10px 10px 0 0;
    border-bottom: 1px solid hsl(210, 20%, 86%);
    color: hsl(210, 30%, 40%);

    font-size: 20px;
}
div.grammalecte_panel_title {
    padding: 10px 20px;
    padding: 3px 20px;
    color: hsl(210, 30%, 96%);
    font-size: 20px;
}
div.grammalecte_panel_label {
    display: inline-block;
    padding: 0 10px;
    font-family: "Trebuchet MS", "Fira Sans", "Liberation Sans", sans-serif;
}
div.grammalecte_panel_invisible_marker {
    position: absolute;
    /*visibility: hidden;*/
    font-size: 6px;
    color: hsl(210, 0%, 90%); /* same color than panel_bar background */
    font-size: 4px;
    color: hsla(210, 0%, 90%, 0);
}

div.grammalecte_panel_commands {
    float: right;
}
div.grammalecte_copy_button {
    display: inline-block;
    padding: 2px 10px;
    padding: 1px 10px;
    background-color: hsl(150, 80%, 30%);
    border-radius: 0 0 0 3px;
    font-family: "Trebuchet MS", "Fira Sans", "Liberation Sans", sans-serif;
    font-size: 22px;
    font-size: 14px;
    font-weight: bold;
    color: hsl(150, 0%, 100%);
    color: hsla(150, 0%, 100%, .5);
    text-align: center;
    cursor: pointer;
}
div.grammalecte_copy_button:hover {
    background-color: hsl(150, 90%, 35%);
    color: hsla(150, 0%, 100%, 1);
}
div.grammalecte_move_button {
    display: inline-block;
    padding: 2px 5px;
    padding: 1px 5px;
    background-color: hsl(180, 50%, 60%);
    font-family: "Trebuchet MS", "Fira Sans", "Liberation Sans", sans-serif;
    font-size: 22px;
    font-size: 14px;
    font-weight: bold;
    color: hsl(180, 0%, 100%);
    color: hsla(180, 0%, 100%, .5);
    text-align: center;
    cursor: pointer;
}
div.grammalecte_move_button:hover {
    background-color: hsl(180, 80%, 65%);
    color: hsla(180, 0%, 100%, 1);
}
div.grammalecte_close_button {
    display: inline-block;
    padding: 2px 10px;
    padding: 1px 10px;
    border-radius: 0 8px 0 0;
    background-color: hsl(0, 80%, 50%);
    background-color: hsla(0, 80%, 50%, .5);
    font-family: "Trebuchet MS", "Fira Sans", "Liberation Sans", sans-serif;
    font-size: 22px;
    font-size: 14px;
    font-weight: bold;
    color: hsl(210, 0%, 100%);
    color: hsla(210, 0%, 100%, .5);
    text-align: center;
    cursor: pointer;
}
div.grammalecte_close_button:hover {
    background-color: hsl(0, 100%, 60%);
    color: hsla(210, 0%, 100%, 1);
}

div.grammalecte_panel_menu {
    display: flex;
    flex-direction: row;
    justify-content: space-around;
}
div.grammalecte_menu_button {
    color: hsl(210, 50%, 96%);
    padding: 5px 10px;
    font-size: 12px;
    font-variant: small-caps;
    cursor: pointer;
    border-radius: 3px;
}
div.grammalecte_menu_button:hover {
    background-color: hsl(210, 80%, 40%);
}


div.grammalecte_panel_content {
    position: absolute;
    width: 100%;
    height: calc(100% - 75px); /* panel height - title_bar */
    height: calc(100% - 65px); /* panel height - title_bar */
    overflow: auto;
}

div.grammalecte_panel_message {
    margin: 10px;
    padding: 10px;
    border-radius: 5px;
    background-color: hsl(0, 50%, 40%);
    color: hsl(0, 50%, 96%);
    font-family: "Trebuchet MS", "Fira Sans", "Liberation Sans", sans-serif;
    font-size: 16px;
}


div.grammalecte_panel_menu {
    display: flex;
    flex-direction: row;
    justify-content: space-around;
    background-color: hsl(210, 50%, 50%);
}

div.grammalecte_menu_button {
    color: hsl(210, 50%, 96%);
    padding: 5px 10px;
    font-size: 12px;
    font-variant: small-caps;
    cursor: pointer;
    border-radius: 3px;
}
div.grammalecte_menu_button:hover {
    background-color: hsl(210, 80%, 40%);
}


/*
    Spinner
*/
div.grammalecte_spinner {
    visibility: hidden;