From 38db1991232a26ac60001c96b418af4fc0b0328b Mon Sep 17 00:00:00 2001 From: Aevann Date: Sat, 18 Feb 2023 17:58:08 +0200 Subject: [PATCH] move the formatting copy buttons granny added --- files/assets/js/formatting.js | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/files/assets/js/formatting.js b/files/assets/js/formatting.js index 32cd3ed72..6274baefa 100644 --- a/files/assets/js/formatting.js +++ b/files/assets/js/formatting.js @@ -12,9 +12,9 @@ function addFormattingCopyButtons() { for (var i = 1, row; row = allTablesGenerateCopyButtons[table].rows[i]; i++) { - let textCopyButton = document.createElement("button"); + const textCopyButton = document.createElement("button"); textCopyButton.setAttribute("type", "button"); - textCopyButton.className = "btn caction py-0 nobackground px-1 text-muted copy-link"; + textCopyButton.className = "btn caction ml-1 py-0 nobackground px-1 text-muted copy-link"; /* replace HTML newlines with text newlines */ var cleanedText = row.cells[1].cloneNode(true) @@ -27,7 +27,13 @@ function addFormattingCopyButtons() { copyIcon.className = "fas fa-copy"; textCopyButton.insertAdjacentElement('afterbegin', copyIcon) - row.cells[0].appendChild(textCopyButton); + + const textCopyButtonDiv = document.createElement("div"); + textCopyButtonDiv.appendChild(textCopyButton); + textCopyButtonDiv.className = "mr-4 ml-auto my-auto"; + + row.cells[1].classList.add('d-flex'); + row.cells[1].appendChild(textCopyButtonDiv); } }