Almost working edit button
This commit is contained in:
@@ -22,6 +22,13 @@
|
||||
|
||||
{{embed}}
|
||||
|
||||
<script>
|
||||
function updateIcon(icon, ConversationAreaId) {
|
||||
var selectedIcon = document.getElementById('selectedIcon-' + ConversationAreaId);
|
||||
selectedIcon.src = 'icons/' + icon + '.png';
|
||||
}
|
||||
</script>
|
||||
|
||||
<script>
|
||||
function copyToClipboardCode(button) {
|
||||
// Get the code element next to the button
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
<div class="field">
|
||||
<div class="control">
|
||||
<textarea class="textarea mt-2" placeholder="Enter your message here"
|
||||
style="background-color: transparent;">{{ Content }}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="field is-grouped mb-3">
|
||||
<div class="control">
|
||||
<button hx-get="/test" class="button is-primary is-small">Submit</button>
|
||||
</div>
|
||||
<div class="control">
|
||||
<button hx-get="/messageContent?id={{ ID }}&onlyContent=true" hx-target="#content-{{ ID }}"
|
||||
class="button is-light is-outlined is-small">Cancel</button>
|
||||
</div>
|
||||
</div>
|
||||
@@ -66,22 +66,4 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<style>
|
||||
.message-button {
|
||||
opacity: 0;
|
||||
transition: opacity 0.3s ease;
|
||||
}
|
||||
|
||||
.message-bot:hover .message-button {
|
||||
opacity: 1;
|
||||
}
|
||||
</style>
|
||||
|
||||
<script>
|
||||
function updateIcon(icon, ConversationAreaId) {
|
||||
var selectedIcon = document.getElementById('selectedIcon-' + ConversationAreaId);
|
||||
selectedIcon.src = 'icons/' + icon + '.png';
|
||||
}
|
||||
</script>
|
||||
</div>
|
||||
@@ -15,7 +15,7 @@
|
||||
</p>
|
||||
</div>
|
||||
<div class="message-body">
|
||||
<div class="content" style="overflow-x: auto;">
|
||||
<div class="content" style="overflow-x: auto;" id="content-{{ ID }}">
|
||||
{{ Content|safe }}
|
||||
</div>
|
||||
</div>
|
||||
@@ -27,7 +27,8 @@
|
||||
<i class="fa-solid fa-arrows-rotate"></i>
|
||||
</span>
|
||||
</button>
|
||||
<button id="edit-button-{{ ID }}" class="button is-small is-primary message-button is-outlined mr-2">
|
||||
<button hx-get="/editMessageForm?id={{ ID }}" hx-target="#content-{{ ID }}" id="edit-button-{{ ID }}"
|
||||
class="button is-small is-primary message-button is-outlined mr-5">
|
||||
<span class="icon">
|
||||
<i class="fa-solid fa-pen"></i>
|
||||
</span>
|
||||
@@ -41,15 +42,4 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<style>
|
||||
.message-button {
|
||||
opacity: 0;
|
||||
transition: opacity 0.3s ease;
|
||||
}
|
||||
|
||||
.message-user:hover .message-button {
|
||||
opacity: 1;
|
||||
}
|
||||
</style>
|
||||
</div>
|
||||
Reference in New Issue
Block a user