Overview
Comment: | [fx] gc panel: CSS adjustements and auto-refresh adjustements |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk | fx |
Files: | files | file ages | folders |
SHA3-256: |
e4791e17bb2802d8a6bb9bb5252ca268 |
User & Date: | olr on 2019-05-20 12:18:15 |
Other Links: | manifest | tags |
Context
2019-05-20
| ||
13:22 | [fx] gc panel: refresh with blur event (not a so good idea?) check-in: e1f9580c26 user: olr tags: trunk, fx | |
12:18 | [fx] gc panel: CSS adjustements and auto-refresh adjustements check-in: e4791e17bb user: olr tags: trunk, fx | |
08:40 | [fx] gc panel: set size and position update check-in: a0ef5bac85 user: olr tags: trunk, fx | |
Changes
Modified gc_lang/fr/webext/content_scripts/panel.css from [8f13a1fabe] to [e93a7554f8].
︙ | |||
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 | - + - + - + - + + - + + - + - + | font-size: 14px; font-weight: bold; text-align: center; cursor: pointer; } div.grammalecte_copy_button { border-radius: 2px; |
︙ |
Modified gc_lang/fr/webext/content_scripts/panel.js from [84014faa6e] to [a63de2133b].
︙ | |||
64 65 66 67 68 69 70 | 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 | + - + - - + + | return xImg; } _createButtons () { let xButtonLine = oGrammalecte.createNode("div", {className: "grammalecte_panel_commands"}); xButtonLine.appendChild(this.xWaitIcon); if (this.sId === "grammalecte_gc_panel") { this.xClipboardButton = this._createCopyButton(); |
︙ | |||
181 182 183 184 185 186 187 | 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 | - - + + | this.bVertStrech = !this.bVertStrech; this.setSizeAndPosition(); } setSizeAndPosition () { // size if (this.xWidthButton && this.xHeightButton) { |
︙ |
Modified gc_lang/fr/webext/content_scripts/panel_gc.js from [77a59c8edf] to [a4ec903680].
︙ | |||
213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 | 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 | + + + + + + + + + + + + + | xActionsBar.appendChild(oGrammalecte.createNode("div", {id: "grammalecte_check" + oResult.iParaNum, className: "grammalecte_paragraph_button grammalecte_green", textContent: "↻", title: "Réanalyser…"}, {para_num: oResult.iParaNum})); xActionsBar.appendChild(oGrammalecte.createNode("div", {id: "grammalecte_hide" + oResult.iParaNum, className: "grammalecte_paragraph_button grammalecte_red", textContent: "×", title: "Cacher", style: "font-weight: bold;"})); // paragraph let xParagraph = oGrammalecte.createNode("p", {id: "grammalecte_paragraph"+oResult.iParaNum, className: "grammalecte_paragraph", lang: "fr", contentEditable: "true"}, {para_num: oResult.iParaNum}); xParagraph.setAttribute("spellcheck", "false"); // doesn’t seem possible to use “spellcheck” as a common attribute. xParagraph.dataset.timer_id = "0"; xParagraph.addEventListener("input", function (xEvent) { // timer for refreshing analysis window.clearTimeout(parseInt(xParagraph.dataset.timer_id)); xParagraph.dataset.timer_id = window.setTimeout(this.recheckParagraph.bind(this), 3000, oResult.iParaNum); // save caret position let [nStart, nEnd] = oGrammalecte.getCaretPosition(xParagraph); xParagraph.dataset.caret_position_start = nStart; xParagraph.dataset.caret_position_end = nEnd; // write text this.oTextControl.setParagraph(parseInt(xEvent.target.dataset.para_num), this.purgeText(xEvent.target.textContent)); this.oTextControl.write(); }.bind(this) , true); xParagraph.addEventListener("blur", function (xEvent) { // remove timer for refreshing analysis window.clearTimeout(parseInt(xParagraph.dataset.timer_id)); // unset caret position xParagraph.dataset.caret_position_start = "-1"; xParagraph.dataset.caret_position_end = "-1"; // recheck this.recheckParagraph(oResult.iParaNum); }.bind(this) , true); this._tagParagraph(xParagraph, oResult.sParagraph, oResult.iParaNum, oResult.aGrammErr, oResult.aSpellErr); // creation xNodeDiv.appendChild(xActionsBar); xNodeDiv.appendChild(xParagraph); this.xParagraphList.appendChild(xNodeDiv); } |
︙ | |||
331 332 333 334 335 336 337 | 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 | + - - - + + + + | this.xParent.getElementById("grammalecte_check"+xParagraph.dataset.para_num).style.backgroundColor = "hsl(0, 50%, 50%)"; this.xParent.getElementById("grammalecte_check"+xParagraph.dataset.para_num).style.boxShadow = "0 0 0 3px hsla(0, 0%, 50%, .2)"; this.xParent.getElementById("grammalecte_check"+xParagraph.dataset.para_num).style.animation = "grammalecte-pulse 1s linear infinite"; } freeParagraph (xParagraph) { xParagraph.contentEditable = "true"; if (xParagraph.dataset.caret_position_start !== "-1") { |
︙ | |||
385 386 387 388 389 390 391 | 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 | - - - - + + - - - - - - - - - - + + + + + + + + + + + + + - + | let xNode = oGrammalecte.createNode("div", {className: "grammalecte_panel_flow_message", textContent: sMessage}); this.xParagraphList.appendChild(xNode); } copyTextToClipboard () { this.startWaitIcon(); try { |
︙ |