Overview
Comment: | [fx] fix text formatter and adjustments, +code cleaning |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk | fx |
Files: | files | file ages | folders |
SHA3-256: |
0a02475e6ffdb87b758b7496fc2ba7b7 |
User & Date: | olr on 2019-05-04 16:31:48 |
Other Links: | manifest | tags |
Context
2019-05-04
| ||
16:47 | [fx] text formatter: close even when no change check-in: 43be289176 user: olr tags: trunk, fx | |
16:31 | [fx] fix text formatter and adjustments, +code cleaning check-in: 0a02475e6f user: olr tags: trunk, fx | |
14:17 | [fx] small code cleaning check-in: ce039a8de4 user: olr tags: trunk, fx | |
Changes
Modified gc_lang/fr/webext/content_scripts/init.js from [b64a4037b3] to [3c99cce1ab].
1 2 3 4 | 1 2 3 4 5 6 7 8 9 10 11 12 | - + | // Modify page /* jshint esversion:6, -W097 */ /* jslint esversion:6 */ |
︙ | |||
69 70 71 72 73 74 75 | 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 | - + - + - + - + - + - + - + - + | }, true); }, clearRightClickedNode: function () { this.xRightClickedNode = null; }, |
︙ | |||
134 135 136 137 138 139 140 | 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 | - + - + | //if (this.oLxgPanel !== null) { this.oLxgPanel.hide(); } if (this.oGCPanel !== null) { this.oGCPanel.hide(); } for (let oMenu of this.lMenu) { oMenu.deleteNodes(); } this.lMenu.length = 0; // to clear an array this.listenRightClick(); |
︙ | |||
171 172 173 174 175 176 177 | 171 172 173 174 175 176 177 178 179 180 181 182 183 184 | - - - - - - - - - - - - - | this.oGCPanel.clear(); this.oGCPanel.show(); this.oGCPanel.showEditor(); this.oGCPanel.start(xNode); this.oGCPanel.startWaitIcon(); }, |
︙ | |||
304 305 306 307 308 309 310 | 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 | - + | xGrammalectePort.onMessage.addListener(function (oMessage) { let {sActionDone, result, dInfo, bEnd, bError} = oMessage; switch (sActionDone) { case "init": oGrammalecte.sExtensionUrl = oMessage.sUrl; // Start oGrammalecte.listenRightClick(); |
︙ |
Modified gc_lang/fr/webext/content_scripts/menu.js from [52c256ec70] to [12c726f5e2].
1 2 3 4 5 6 7 8 9 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | - + | // JavaScript /* jshint esversion:6, -W097 */ /* jslint esversion:6 */ /* global oGrammalecte, xGrammalectePort, showError, window, document */ "use strict"; |
︙ |
Modified gc_lang/fr/webext/content_scripts/panel.js from [be9bbebdca] to [3166e1bddd].
︙ | |||
24 25 26 27 28 29 30 31 32 33 34 35 36 37 | 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 | + | } else { this.xParent = document; } this.xPanelBar = oGrammalecte.createNode("div", {className: "grammalecte_panel_bar"}); this.xPanelContent = oGrammalecte.createNode("div", {className: "grammalecte_panel_content"}); this.xWaitIcon = this._createWaitIcon(); this.xCloseButton = null; this.xPanel = this._createPanel(sTitle); this.center(); } _createPanel (sTitle) { try { let xPanel = oGrammalecte.createNode("div", {id: this.sId, className: "grammalecte_panel"}); |
︙ | |||
63 64 65 66 67 68 69 | 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 | + - + | 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")); this.xCloseButton = this._createCloseButton(); |
︙ |
Modified gc_lang/fr/webext/content_scripts/panel_gc.js from [f811c99bef] to [29929fcabe].
︙ | |||
71 72 73 74 75 76 77 | 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 | - - + + - - - - - - - - + | this.xTFButton = oGrammalecte.createNode("div", {className: "grammalecte_menu_button", textContent: "Formateur de texte"}); this.xEditorButton = oGrammalecte.createNode("div", {className: "grammalecte_menu_button", textContent: "Éditeur"}); this.xLxgButton = oGrammalecte.createNode("div", {className: "grammalecte_menu_button", textContent: "Lexicographe"}); this.xConjButton = oGrammalecte.createNode("div", {className: "grammalecte_menu_button", textContent: "Conjugueur "}); this.xLEButton = oGrammalecte.createNode("div", {className: "grammalecte_menu_button", textContent: "Éditeur lexical "}); this.xTFButton.onclick = () => { oGrammalecte.createTFPanel(); |
︙ | |||
111 112 113 114 115 116 117 118 119 | 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 | + - + + + + + + + + + + + - + | this.xMenu.appendChild(this.xLxgButton) this.xMenu.appendChild(this.xConjButton) this.xMenu.appendChild(this.xLEButton) this.xPanelBar.appendChild(this.xMenu); } start (xNode=null) { this.xNode = xNode; this.oTooltip.hide(); this.clear(); |
︙ |
Modified gc_lang/fr/webext/content_scripts/panel_tf.js from [af5a3d9e1f] to [74a60a6517].
︙ | |||
10 11 12 13 14 15 16 | 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 36 37 38 39 40 | - + + + + + + + + + + | class GrammalecteTextFormatter extends GrammalectePanel { constructor (...args) { super(...args); this.xTFNode = this._createTextFormatter(); this.xPanelContent.appendChild(this.xTFNode); |
︙ | |||
170 171 172 173 174 175 176 | 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 | - - - + + + + + + + + + + + + + + + + + | xLine.appendChild(oGrammalecte.createNode("div", {id: "res_"+"o_ordinals_no_exponant", className: "grammalecte_tf_result", textContent: "·"})); return xLine; } /* Actions */ |
︙ | |||
268 269 270 271 272 273 274 | 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 | - + | } apply () { try { const t0 = Date.now(); //window.setCursor("wait"); // change pointer this.resetProgressBar(); |
︙ | |||
514 515 516 517 518 519 520 | 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 | - + | this.xParent.getElementById('grammalecte_tf_progressbar').value = this.xParent.getElementById('grammalecte_tf_progressbar').max; // end of processing //window.setCursor("auto"); // restore pointer const t1 = Date.now(); this.xParent.getElementById('grammalecte_tf_time_res').textContent = this.getTimeRes((t1-t0)/1000); |
︙ |
Modified gc_lang/fr/webext/manifest.json from [29de402bdc] to [f7290722c6].
︙ | |||
76 77 78 79 80 81 82 | 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 | - + | ], "run_at": "document_idle" } ], "commands": { "grammar_checker": { |
︙ |
Modified gc_lang/fr/webext/panel/main.html from [eae55563e2] to [4015290a3b].
︙ | |||
84 85 86 87 88 89 90 | 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 | - + | <p class="option_description">Ces zones de texte sont les champs de formulaire usuels pour saisir du texte. Ils ne permettent que la saisie de texte brut, sans fioritures.</p> </div> <div class="option_section" id="ui_option_editablenode_box"> <p><input type="checkbox" id="ui_option_editablenode" /> <label for="ui_option_editablenode">“Nodes” éditables</label></p> <p class="option_description">Ces zones de texte sont des sections de page web éditables. Il est fréquent que ces zones de texte apparaissent comme des “textareas” standard. Il est aussi fréquent que ces zones de texte soient couplées avec toutes sortes de logiciels (de simples scripts d’aide à la mise en page ou des applications complexes). Ces zones de texte permettent l’affichage de texte enrichi (italique, gras, hyperlien, images, etc.).</p> </div> <h2>Raccourcis clavier</h2> |
︙ |