Fix following links when editing translation

This commit is contained in:
Thelonius Kort
2023-05-29 13:19:42 +02:00
parent 2b25c13095
commit 4828a68bcd
2 changed files with 3 additions and 1 deletions

View File

@ -6,6 +6,8 @@ let TranslationFormHook = {
this.tunit_editor = this.el.querySelector("#tunit-editor-content")
this.save_edit_button = this.el.querySelector("#save-edit-button")
this.save_publish_button = this.el.querySelector("#save-publish-button")
let article_preview_links = document.querySelectorAll(".article-preview a")
article_preview_links.forEach(el => el.addEventListener('click', e => e.preventDefault()))
},
keyupHandler(e) {
var push_event = true

View File

@ -51,7 +51,7 @@ defmodule OutlookWeb.TranslationLive.FormComponent do
</.simple_form>
<.tunit_editor current_tunit={@current_tunit} target={@myself} />
</div>
<div class="article basis-1/2 max-h-screen overflow-auto">
<div class="article article-preview basis-1/2 max-h-screen overflow-auto">
<.button phx-disable-with="Translating..." phx-click="translate-deepl" phx-target={@myself}
data-confirm-not="Are you sure? All previously translated text will be lost.">Translate with Deepl</.button>
<progress :if={@deepl_progress} max="100" value={@deepl_progress} />