Grammalecte  Check-in [c834b85865]

Overview
Comment:[fx] update ui
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk | fx
Files: files | file ages | folders
SHA3-256: c834b8586573820a2b1488da0869639e644e90275c23859e3001725822754082
User & Date: olr on 2019-05-04 13:17:54
Other Links: manifest | tags
Context
2019-05-04
14:17
[fx] small code cleaning check-in: ce039a8de4 user: olr tags: trunk, fx
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
Changes

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

139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
        this.lMenu.length = 0; // to clear an array
        this.listenRightClick();
        this.createMenus();
    },

    createTFPanel: function () {
        if (this.oTFPanel === null) {
            this.oTFPanel = new GrammalecteTextFormatter("grammalecte_tf_panel", "Formateur de texte", 760, 615, false);
            //this.oTFPanel.logInnerHTML();
            this.oTFPanel.insertIntoPage();
            window.setTimeout(function(self){
                self.oTFPanel.adjustHeight();
            }, 50, this);
        }
    },







|







139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
        this.lMenu.length = 0; // to clear an array
        this.listenRightClick();
        this.createMenus();
    },

    createTFPanel: function () {
        if (this.oTFPanel === null) {
            this.oTFPanel = new GrammalecteTextFormatter("grammalecte_tf_panel", "Formateur de texte", 760, 600, false);
            //this.oTFPanel.logInnerHTML();
            this.oTFPanel.insertIntoPage();
            window.setTimeout(function(self){
                self.oTFPanel.adjustHeight();
            }, 50, this);
        }
    },

Modified gc_lang/fr/webext/content_scripts/message_box.css from [e90014c994] to [391156b42c].

8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
    position: fixed;
    padding: 0;
    margin: 0;
    top: 50%;
    left: 50%;
    width: 400px;
    margin-left: -200px;
    margin-left: -100px;
    min-height: 100px;
    box-sizing: content-box;
    z-index: 2147483647; /* maximum is 2147483647: https://stackoverflow.com/questions/491052/minimum-and-maximum-value-of-z-index */
    border: 2px solid hsl(210, 50%, 50%);
    border-radius: 10px 10px 10px 10px;
    background-color: hsl(210, 50%, 50%);
    color: hsl(0, 10%, 92%);







<







8
9
10
11
12
13
14

15
16
17
18
19
20
21
    position: fixed;
    padding: 0;
    margin: 0;
    top: 50%;
    left: 50%;
    width: 400px;
    margin-left: -200px;

    min-height: 100px;
    box-sizing: content-box;
    z-index: 2147483647; /* maximum is 2147483647: https://stackoverflow.com/questions/491052/minimum-and-maximum-value-of-z-index */
    border: 2px solid hsl(210, 50%, 50%);
    border-radius: 10px 10px 10px 10px;
    background-color: hsl(210, 50%, 50%);
    color: hsl(0, 10%, 92%);

Modified gc_lang/fr/webext/content_scripts/message_box.js from [58271c390a] to [1023251c05].

54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
    _createButtons () {
        let xButtonLine = oGrammalecte.createNode("div", {className: "grammalecte_panel_commands"});
        xButtonLine.appendChild(this._createCloseButton());
        return xButtonLine;
    }

    _createCloseButton () {
        let xButton = oGrammalecte.createNode("div", {className: "grammalecte_close_button", textContent: "×", title: "Fermer la fenêtre"});
        xButton.onclick = function () { this.hide(); }.bind(this);  // better than writing “let that = this;” before the function?
        return xButton;
    }

    insertIntoPage () {
        if (this.bShadow){
            oGrammalecte.createStyle("content_scripts/panel.css", null, this.xShadow);







|







54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
    _createButtons () {
        let xButtonLine = oGrammalecte.createNode("div", {className: "grammalecte_panel_commands"});
        xButtonLine.appendChild(this._createCloseButton());
        return xButtonLine;
    }

    _createCloseButton () {
        let xButton = oGrammalecte.createNode("div", {className: "grammalecte_panel_button grammalecte_close_button", textContent: "×", title: "Fermer la fenêtre"});
        xButton.onclick = function () { this.hide(); }.bind(this);  // better than writing “let that = this;” before the function?
        return xButton;
    }

    insertIntoPage () {
        if (this.bShadow){
            oGrammalecte.createStyle("content_scripts/panel.css", null, this.xShadow);

Modified gc_lang/fr/webext/content_scripts/panel.css from [1bbc89bbcd] to [532ff5ba37].

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
    /*visibility: hidden;*/
    font-size: 4px;
    color: hsla(210, 0%, 90%, 0);
}

div.grammalecte_panel_commands {
    float: right;


}
div.grammalecte_copy_button {
    display: inline-block;
    padding: 1px 10px;
    border-radius: 0 0 0 3px;
    font-family: "Trebuchet MS", "Fira Sans", "Liberation Sans", sans-serif;
    font-size: 14px;
    font-weight: bold;
    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: 1px 5px;
    font-family: "Trebuchet MS", "Fira Sans", "Liberation Sans", sans-serif;
    font-size: 14px;
    font-weight: bold;
    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: 1px 10px;
    border-radius: 0 8px 0 0;
    background-color: hsla(0, 80%, 50%, .5);
    font-family: "Trebuchet MS", "Fira Sans", "Liberation Sans", sans-serif;
    font-size: 14px;
    font-weight: bold;
    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 {







>
>

|
<

<



<



>
>
>
>





<

<
|
<

<
<


|



<
<
|

<
<
<

<
<







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
    /*visibility: hidden;*/
    font-size: 4px;
    color: hsla(210, 0%, 90%, 0);
}

div.grammalecte_panel_commands {
    float: right;
    display: flex;
    align-items: stretch;
}
div.grammalecte_panel_button {

    padding: 1px 10px;

    font-family: "Trebuchet MS", "Fira Sans", "Liberation Sans", sans-serif;
    font-size: 14px;
    font-weight: bold;

    text-align: center;
    cursor: pointer;
}
div.grammalecte_copy_button {
    border-radius: 2px;
    color: hsla(150, 0%, 100%, .5);
}
div.grammalecte_copy_button:hover {
    background-color: hsl(150, 90%, 35%);
    color: hsla(150, 0%, 100%, 1);
}
div.grammalecte_move_button {

    padding: 1px 5px;

    border-radius: 16px;

    color: hsla(180, 0%, 100%, .5);


}
div.grammalecte_move_button:hover {
    background-color: hsla(180, 80%, 50%, .1);
    color: hsla(180, 0%, 100%, 1);
}
div.grammalecte_close_button {


    border-radius: 0 8px 0 4px;
    background-color: hsla(0, 80%, 50%, .5);



    color: hsla(210, 0%, 100%, .5);


}
div.grammalecte_close_button:hover {
    background-color: hsl(0, 100%, 60%);
    color: hsla(210, 0%, 100%, 1);
}

div.grammalecte_panel_menu {

Modified gc_lang/fr/webext/content_scripts/panel.js from [a5ed0355b2] to [004624125f].

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

    _createButtons () {
        let xButtonLine = oGrammalecte.createNode("div", {className: "grammalecte_panel_commands"});
        xButtonLine.appendChild(this.xWaitIcon);
        if (this.sId === "grammalecte_gc_panel") {
            xButtonLine.appendChild(this._createCopyButton());
        }
        xButtonLine.appendChild(this._createMoveButton("stickToTop", "¯", "Coller en haut"));
        xButtonLine.appendChild(this._createMoveButton("stickToLeft", "«", "Coller à gauche"));
        xButtonLine.appendChild(this._createMoveButton("center", "•", "Centrer"));
        xButtonLine.appendChild(this._createMoveButton("stickToRight", "»", "Coller à droite"));
        xButtonLine.appendChild(this._createMoveButton("stickToBottom", "_", "Coller en bas"));
        xButtonLine.appendChild(this._createCloseButton());
        return xButtonLine;
    }

    _createWaitIcon () {
        let xWaitIcon = oGrammalecte.createNode("div", {className: "grammalecte_spinner"});
        //xWaitIcon.appendChild(oGrammalecte.createNode("div", {className: "bounce1"}));
        //xWaitIcon.appendChild(oGrammalecte.createNode("div", {className: "bounce2"}));
        return xWaitIcon;
    }

    _createCopyButton () {
        let xButton = oGrammalecte.createNode("div", {id: "grammalecte_clipboard_button", className: "grammalecte_copy_button", textContent: "∑", title: "Copier dans le presse-papiers"});
        xButton.onclick = function () { this.copyTextToClipboard(); }.bind(this);
        return xButton;
    }

    _createMoveButton (sAction, sLabel, sTitle) {
        let xButton = oGrammalecte.createNode("div", {className: "grammalecte_move_button", textContent: sLabel, title: sTitle});
        xButton.onclick = function () { this[sAction](); }.bind(this);
        return xButton;
    }

    _createCloseButton () {
        let xButton = oGrammalecte.createNode("div", {className: "grammalecte_close_button", textContent: "×", title: "Fermer la fenêtre"});
        xButton.onclick = function () { this.hide(); }.bind(this);  // better than writing “let that = this;” before the function?
        return xButton;
    }

    insertIntoPage () {
        if (this.bShadow) {
            oGrammalecte.createStyle("content_scripts/panel.css", null, this.xShadow);







|
|

|
|












|





|





|







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

    _createButtons () {
        let xButtonLine = oGrammalecte.createNode("div", {className: "grammalecte_panel_commands"});
        xButtonLine.appendChild(this.xWaitIcon);
        if (this.sId === "grammalecte_gc_panel") {
            xButtonLine.appendChild(this._createCopyButton());
        }
        xButtonLine.appendChild(this._createMoveButton("stickToTop", "", "Coller en haut"));
        xButtonLine.appendChild(this._createMoveButton("stickToLeft", "", "Coller à gauche"));
        xButtonLine.appendChild(this._createMoveButton("center", "•", "Centrer"));
        xButtonLine.appendChild(this._createMoveButton("stickToRight", "", "Coller à droite"));
        xButtonLine.appendChild(this._createMoveButton("stickToBottom", "", "Coller en bas"));
        xButtonLine.appendChild(this._createCloseButton());
        return xButtonLine;
    }

    _createWaitIcon () {
        let xWaitIcon = oGrammalecte.createNode("div", {className: "grammalecte_spinner"});
        //xWaitIcon.appendChild(oGrammalecte.createNode("div", {className: "bounce1"}));
        //xWaitIcon.appendChild(oGrammalecte.createNode("div", {className: "bounce2"}));
        return xWaitIcon;
    }

    _createCopyButton () {
        let xButton = oGrammalecte.createNode("div", {id: "grammalecte_clipboard_button", className: "grammalecte_panel_button grammalecte_copy_button", textContent: "∑", title: "Copier dans le presse-papiers"});
        xButton.onclick = function () { this.copyTextToClipboard(); }.bind(this);
        return xButton;
    }

    _createMoveButton (sAction, sLabel, sTitle) {
        let xButton = oGrammalecte.createNode("div", {className: "grammalecte_panel_button grammalecte_move_button", textContent: sLabel, title: sTitle});
        xButton.onclick = function () { this[sAction](); }.bind(this);
        return xButton;
    }

    _createCloseButton () {
        let xButton = oGrammalecte.createNode("div", {className: "grammalecte_panel_button grammalecte_close_button", textContent: "×", title: "Fermer la fenêtre"});
        xButton.onclick = function () { this.hide(); }.bind(this);  // better than writing “let that = this;” before the function?
        return xButton;
    }

    insertIntoPage () {
        if (this.bShadow) {
            oGrammalecte.createStyle("content_scripts/panel.css", null, this.xShadow);