Overview
Comment: | [fx] display rule id in debug mode |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | fx | kill_innerHTML |
Files: | files | file ages | folders |
SHA3-256: |
5da1befa0721eb3763dddbc797e43707 |
User & Date: | olr on 2017-07-18 11:47:20 |
Other Links: | branch diff | manifest | tags |
Context
2017-07-25
| ||
11:03 | [fx] merge kill_innerHTML + lexicographer update + UI update check-in: a7259a047c user: olr tags: trunk, major_change, fx | |
2017-07-18
| ||
11:47 | [fx] display rule id in debug mode Closed-Leaf check-in: 5da1befa07 user: olr tags: fx, kill_innerHTML | |
10:38 | [fx] tooltip arrow position adjustment check-in: 22c8e20f5f user: olr tags: fx, kill_innerHTML | |
Changes
Modified gc_core/js/lang_core/gc_engine.js from [e250bfaf63] to [ee18ec83ee].
︙ | ︙ | |||
216 217 218 219 220 221 222 | // Message if (sMsg[0] === "=") { sMessage = oEvalFunc[sMsg.slice(1)](s, m) } else { sMessage = sMsg._expand(m); } if (bIdRule) { | | | 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 | // Message if (sMsg[0] === "=") { sMessage = oEvalFunc[sMsg.slice(1)](s, m) } else { sMessage = sMsg._expand(m); } if (bIdRule) { sMessage += " ##" + sLineId + " #" + sRuleId; } oErr["sMessage"] = sMessage; // URL oErr["URL"] = sURL || ""; // Context if (bContext) { oErr["sUnderlined"] = sx.slice(m.start[iGroup], m.end[iGroup]); |
︙ | ︙ |
Modified gc_lang/fr/xpi/data/gc_panel.css from [c54a2e432d] to [75ceec5406].
︙ | ︙ | |||
162 163 164 165 166 167 168 | } #gc_tooltip_arrow, #sc_tooltip_arrow { position: absolute; display: none; } #gc_tooltip #gc_rule_id { display: none; | > > | < | > | 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 | } #gc_tooltip_arrow, #sc_tooltip_arrow { position: absolute; display: none; } #gc_tooltip #gc_rule_id { display: none; margin: 0 0 5px 0; border: 1px solid hsl(210, 50%, 60%); background-color: hsl(210, 50%, 40%); padding: 2px 5px; border-radius: 2px; color: hsla(210, 0%, 96%, 1); font-size: 11px; font-style: normal; text-align: center; } #gc_message_block { padding: 5px 10px 10px 10px; background-color: hsl(210, 50%, 30%); color: hsl(210, 50%, 96%); } #sc_message_block { |
︙ | ︙ |
Modified gc_lang/fr/xpi/data/gc_panel.js from [7ec8fbbdd9] to [3ba65998c7].
︙ | ︙ | |||
302 303 304 305 306 307 308 | let nLimit = nPanelWidth - 330; // paragraph width - tooltip width xNodeTooltipArrow.style.top = (xNodeErr.offsetTop + 16) + "px" xNodeTooltipArrow.style.left = (xNodeErr.offsetLeft + Math.floor((xNodeErr.offsetWidth / 2))-4) + "px" // 4 is half the width of the arrow. xNodeTooltip.style.top = (xNodeErr.offsetTop + 20) + "px"; xNodeTooltip.style.left = (xNodeErr.offsetLeft > nLimit) ? nLimit + "px" : xNodeErr.offsetLeft + "px"; if (xNodeErr.dataset.error_type === "grammar") { // grammar error | > > > > > > | > | 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 | let nLimit = nPanelWidth - 330; // paragraph width - tooltip width xNodeTooltipArrow.style.top = (xNodeErr.offsetTop + 16) + "px" xNodeTooltipArrow.style.left = (xNodeErr.offsetLeft + Math.floor((xNodeErr.offsetWidth / 2))-4) + "px" // 4 is half the width of the arrow. xNodeTooltip.style.top = (xNodeErr.offsetTop + 20) + "px"; xNodeTooltip.style.left = (xNodeErr.offsetLeft > nLimit) ? nLimit + "px" : xNodeErr.offsetLeft + "px"; if (xNodeErr.dataset.error_type === "grammar") { // grammar error if (xNodeErr.dataset.gc_message.includes(" ##")) { let n = xNodeErr.dataset.gc_message.indexOf(" ##"); document.getElementById("gc_message").textContent = xNodeErr.dataset.gc_message.slice(0, n); document.getElementById("gc_rule_id").textContent = "Règle : " + xNodeErr.dataset.gc_message.slice(n+2); document.getElementById("gc_rule_id").style.display = "block"; } else { document.getElementById("gc_message").textContent = xNodeErr.dataset.gc_message; } if (xNodeErr.dataset.gc_url != "") { document.getElementById("gc_url").style.display = "inline"; document.getElementById("gc_url").setAttribute("href", xNodeErr.dataset.gc_url); } else { document.getElementById("gc_url").style.display = "none"; } document.getElementById("gc_ignore").dataset.error_id = xNodeErr.dataset.error_id; |
︙ | ︙ | |||
366 367 368 369 370 371 372 373 374 375 376 377 378 379 | let sIdParagr = sCheckButtonId.slice(5); self.port.emit("modifyAndCheck", sIdParagr, getPurgedTextOfParagraph("paragr"+sIdParagr)); stopWaitIcon(); } function hideAllTooltips () { document.getElementById("gc_tooltip").style.display = "none"; document.getElementById("sc_tooltip").style.display = "none"; document.getElementById("gc_tooltip_arrow").style.display = "none"; document.getElementById("sc_tooltip_arrow").style.display = "none"; } function setSpellSuggestionsFor (sWord, sSuggestions, sErrId) { // spell checking suggestions | > | 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 | let sIdParagr = sCheckButtonId.slice(5); self.port.emit("modifyAndCheck", sIdParagr, getPurgedTextOfParagraph("paragr"+sIdParagr)); stopWaitIcon(); } function hideAllTooltips () { document.getElementById("gc_tooltip").style.display = "none"; document.getElementById("gc_rule_id").style.display = "none"; document.getElementById("sc_tooltip").style.display = "none"; document.getElementById("gc_tooltip_arrow").style.display = "none"; document.getElementById("sc_tooltip_arrow").style.display = "none"; } function setSpellSuggestionsFor (sWord, sSuggestions, sErrId) { // spell checking suggestions |
︙ | ︙ |