Grammalecte  Check-in [4ff89b5e43]

Overview
Comment:[fx] close button for the menu
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk | fx
Files: files | file ages | folders
SHA3-256: 4ff89b5e43198c1cf4cbe1a2be4a6ffff4235bd03fca03fbb4ccb27eb4dd2dc7
User & Date: olr on 2017-10-21 11:03:57
Other Links: manifest | tags
Context
2017-10-21
17:55
[core] ibdawg: remove comments check-in: 726af0786e user: olr tags: trunk, core, v0.6.0
11:03
[fx] close button for the menu check-in: 4ff89b5e43 user: olr tags: trunk, fx
10:48
[fx] z-index for menu button check-in: e0176710e6 user: olr tags: trunk, fx
Changes

Modified gc_lang/fr/webext/content_scripts/menu.css from [0b4073ec94] to [40e3449d23].

59
60
61
62
63
64
65
















66
67
68
69
70
71
72
    border-radius: 5px;
    border: 3px solid hsl(210, 50%, 30%);
    box-shadow: 0px 0px 2px hsla(210, 10%, 10%, .5);
    background-color: hsl(210, 50%, 30%);
    font-family: "Trebuchet MS", "Fira Sans", "Liberation Sans", sans-serif;
    z-index: 2147483640; /* maximum is 2147483647: https://stackoverflow.com/questions/491052/minimum-and-maximum-value-of-z-index */
}

















.grammalecte_menu_item {
    padding: 3px 10px;
    background-color: hsl(210, 50%, 40%);
    font-size: 14px;
    color: hsl(210, 50%, 92%);
    cursor: pointer;







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







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
    border-radius: 5px;
    border: 3px solid hsl(210, 50%, 30%);
    box-shadow: 0px 0px 2px hsla(210, 10%, 10%, .5);
    background-color: hsl(210, 50%, 30%);
    font-family: "Trebuchet MS", "Fira Sans", "Liberation Sans", sans-serif;
    z-index: 2147483640; /* maximum is 2147483647: https://stackoverflow.com/questions/491052/minimum-and-maximum-value-of-z-index */
}

.grammalecte_menu_close_button {
    float: right;
    margin: 2px 2px 0 0;
    padding: 1px 5px;
    border-radius: 2px;
    background-color: hsl(0, 50%, 50%);
    color: hsl(0, 20%, 90%);
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
}
.grammalecte_menu_close_button:hover {
    background-color: hsl(0, 60%, 50%);
    color: hsl(0, 30%, 96%);
}

.grammalecte_menu_item {
    padding: 3px 10px;
    background-color: hsl(210, 50%, 40%);
    font-size: 14px;
    color: hsl(210, 50%, 92%);
    cursor: pointer;

Modified gc_lang/fr/webext/content_scripts/menu.js from [35cf68b91a] to [cf81b4bb53].

19
20
21
22
23
24
25



26
27
28
29
30
31
32
        xReferenceNode.parentNode.insertBefore(xNewNode, xReferenceNode.nextSibling);
    }

    _createMenu (xNode) {
        try {
            let sText = (xNode.tagName == "TEXTAREA") ? xNode.value : xNode.textContent;
            let xMenu = oGrammalecte.createNode("div", {id: this.sMenuId, className: "grammalecte_menu"});



            xMenu.appendChild(oGrammalecte.createNode("div", {className: "grammalecte_menu_header", textContent: "GRAMMALECTE"}));
            // Text formatter
            if (xNode.tagName == "TEXTAREA") {
                let xTFButton = oGrammalecte.createNode("div", {className: "grammalecte_menu_item", textContent: "Formateur de texte"});
                xTFButton.onclick = () => {
                    this.switchMenu();
                    oGrammalecte.createTFPanel();







>
>
>







19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
        xReferenceNode.parentNode.insertBefore(xNewNode, xReferenceNode.nextSibling);
    }

    _createMenu (xNode) {
        try {
            let sText = (xNode.tagName == "TEXTAREA") ? xNode.value : xNode.textContent;
            let xMenu = oGrammalecte.createNode("div", {id: this.sMenuId, className: "grammalecte_menu"});
            let xCloseButton = oGrammalecte.createNode("div", {className: "grammalecte_menu_close_button", textContent: "×"} );
            xCloseButton.onclick = () => { this.switchMenu(); }
            xMenu.appendChild(xCloseButton);
            xMenu.appendChild(oGrammalecte.createNode("div", {className: "grammalecte_menu_header", textContent: "GRAMMALECTE"}));
            // Text formatter
            if (xNode.tagName == "TEXTAREA") {
                let xTFButton = oGrammalecte.createNode("div", {className: "grammalecte_menu_item", textContent: "Formateur de texte"});
                xTFButton.onclick = () => {
                    this.switchMenu();
                    oGrammalecte.createTFPanel();