parent
50f85706b8
commit
68ca59a002
@ -103,6 +103,13 @@
|
|||||||
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-body" style="text-align: left;">
|
<div class="modal-body" style="text-align: left;">
|
||||||
|
<h2>Formatierungen</h2>
|
||||||
|
<ul>
|
||||||
|
<li><code>__TEXT__</code>: Wird zu <u>TEXT</u></li>
|
||||||
|
<li><code>_TEXT_</code>: Wird zu <i>TEXT</i></li>
|
||||||
|
<li><code>**TEXT**</code>: Wird zu <b>TEXT</b></li>
|
||||||
|
<li><code>`TEXT`</code>: Wird zu <code>TEXT</code></li>
|
||||||
|
</ul>
|
||||||
<h2>Tastaturkürzel</h2>
|
<h2>Tastaturkürzel</h2>
|
||||||
überall ausser bei Textfeldern:
|
überall ausser bei Textfeldern:
|
||||||
<ul>
|
<ul>
|
||||||
|
@ -132,6 +132,15 @@ function create_or_update_mood(mood: number, participantId: string) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function formatText(text: string): string {
|
||||||
|
return text
|
||||||
|
.replace(/\n/g, "<br />")
|
||||||
|
.replace(/__(.+?)__/g, "<u>$1</u>")
|
||||||
|
.replace(/_(.+?)_/g, "<i>$1</i>")
|
||||||
|
.replace(/\*\*(.+?)\*\*/g, "<b>$1</b>")
|
||||||
|
.replace(/`(.+?)`/g, "<code>$1</code>")
|
||||||
|
}
|
||||||
|
|
||||||
function displayRemarks(targetElement: HTMLElement, comment: Comment): string {
|
function displayRemarks(targetElement: HTMLElement, comment: Comment): string {
|
||||||
var tmp = "";
|
var tmp = "";
|
||||||
targetElement.innerHTML = "";
|
targetElement.innerHTML = "";
|
||||||
@ -154,7 +163,7 @@ function displayRemarks(targetElement: HTMLElement, comment: Comment): string {
|
|||||||
</div>
|
</div>
|
||||||
</h5>
|
</h5>
|
||||||
<div class="card-body" style="text-align: left">
|
<div class="card-body" style="text-align: left">
|
||||||
<p class="card-text">${remark.text.replace(/\n/g, "<br />")}</p>
|
<p class="card-text">${formatText(remark.text)}</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal fade" id="editBd_${remark.extId}" data-bs-backdrop="static" data-bs-keyboard="true" tabindex="-1" aria-labelledby="staticBackdropLabel" aria-hidden="true">
|
<div class="modal fade" id="editBd_${remark.extId}" data-bs-backdrop="static" data-bs-keyboard="true" tabindex="-1" aria-labelledby="staticBackdropLabel" aria-hidden="true">
|
||||||
@ -353,7 +362,7 @@ function create_or_update(comment: Comment, type: string) {
|
|||||||
document.getElementById(addRemarkTextareaId).focus()
|
document.getElementById(addRemarkTextareaId).focus()
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
document.getElementById(cardContentId).innerHTML = comment.text.replace(/\n/g, "<br />");
|
document.getElementById(cardContentId).innerHTML = formatText(comment.text);
|
||||||
document.getElementById(thumbUpButtonId).classList = upButtonClass;
|
document.getElementById(thumbUpButtonId).classList = upButtonClass;
|
||||||
document.getElementById(thumbDownButtonId).classList = downButtonClass;
|
document.getElementById(thumbDownButtonId).classList = downButtonClass;
|
||||||
document.getElementById(thumbUpCounterId).innerHTML = comment.up.toString();
|
document.getElementById(thumbUpCounterId).innerHTML = comment.up.toString();
|
||||||
@ -548,12 +557,12 @@ export function init_retro(_retroId: string, _participantId: string) {
|
|||||||
exportText = `<ul>`;
|
exportText = `<ul>`;
|
||||||
for (let index = 0; index < comments.length; index++) {
|
for (let index = 0; index < comments.length; index++) {
|
||||||
const comment = comments[index];
|
const comment = comments[index];
|
||||||
exportText += `<li>${comment.text.replace(/\n/g, "<br />")} (${comment.up} 👍/ ${comment.down} 👎)`;
|
exportText += `<li>${formatText(comment.text)} (${comment.up} 👍/ ${comment.down} 👎)`;
|
||||||
if (comment.remarks.length > 0) {
|
if (comment.remarks.length > 0) {
|
||||||
exportText += `<ul>`;
|
exportText += `<ul>`;
|
||||||
for (let remarkIndex = 0; remarkIndex < comment.remarks.length; remarkIndex++) {
|
for (let remarkIndex = 0; remarkIndex < comment.remarks.length; remarkIndex++) {
|
||||||
const remark = comment.remarks[remarkIndex];
|
const remark = comment.remarks[remarkIndex];
|
||||||
exportText += `<li>${remark.text.replace(/\n/g, "<br />")}</li>`
|
exportText += `<li>${formatText(remark.text)}</li>`
|
||||||
}
|
}
|
||||||
exportText += `</ul>`;
|
exportText += `</ul>`;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user