ticket title not wrapping
This commit is contained in:
@@ -374,6 +374,9 @@ textarea[data-field="description"]:not(:disabled)::after {
|
|||||||
line-height: 1.4;
|
line-height: 1.4;
|
||||||
min-height: fit-content;
|
min-height: fit-content;
|
||||||
height: auto;
|
height: auto;
|
||||||
|
resize: none;
|
||||||
|
overflow-y: hidden;
|
||||||
|
overflow-x: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
.title-input:not(:disabled) {
|
.title-input:not(:disabled) {
|
||||||
|
|||||||
@@ -223,21 +223,36 @@ document.addEventListener('DOMContentLoaded', function() {
|
|||||||
// Show description tab by default
|
// Show description tab by default
|
||||||
showTab('description');
|
showTab('description');
|
||||||
|
|
||||||
|
// Auto-resize function for textareas
|
||||||
|
function autoResizeTextarea(textarea) {
|
||||||
|
// Reset height to auto to get the correct scrollHeight
|
||||||
|
textarea.style.height = 'auto';
|
||||||
|
// Set the height to match the scrollHeight
|
||||||
|
textarea.style.height = textarea.scrollHeight + 'px';
|
||||||
|
}
|
||||||
|
|
||||||
|
// Auto-resize the title textarea to fit content
|
||||||
|
const titleTextarea = document.querySelector('.title-input');
|
||||||
|
if (titleTextarea) {
|
||||||
|
// Initial resize
|
||||||
|
autoResizeTextarea(titleTextarea);
|
||||||
|
|
||||||
|
// Resize on input when in edit mode
|
||||||
|
titleTextarea.addEventListener('input', function() {
|
||||||
|
autoResizeTextarea(this);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
// Auto-resize the description textarea to fit content
|
// Auto-resize the description textarea to fit content
|
||||||
const descriptionTextarea = document.querySelector('textarea[data-field="description"]');
|
const descriptionTextarea = document.querySelector('textarea[data-field="description"]');
|
||||||
if (descriptionTextarea) {
|
if (descriptionTextarea) {
|
||||||
function autoResizeTextarea() {
|
|
||||||
// Reset height to auto to get the correct scrollHeight
|
|
||||||
descriptionTextarea.style.height = 'auto';
|
|
||||||
// Set the height to match the scrollHeight
|
|
||||||
descriptionTextarea.style.height = descriptionTextarea.scrollHeight + 'px';
|
|
||||||
}
|
|
||||||
|
|
||||||
// Initial resize
|
// Initial resize
|
||||||
autoResizeTextarea();
|
autoResizeTextarea(descriptionTextarea);
|
||||||
|
|
||||||
// Resize on input when in edit mode
|
// Resize on input when in edit mode
|
||||||
descriptionTextarea.addEventListener('input', autoResizeTextarea);
|
descriptionTextarea.addEventListener('input', function() {
|
||||||
|
autoResizeTextarea(this);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// Initialize assignment handling
|
// Initialize assignment handling
|
||||||
|
|||||||
@@ -86,7 +86,7 @@ function formatDetails($details, $actionType) {
|
|||||||
<div class="ascii-content">
|
<div class="ascii-content">
|
||||||
<div class="ascii-frame-inner">
|
<div class="ascii-frame-inner">
|
||||||
<div class="ticket-header">
|
<div class="ticket-header">
|
||||||
<h2><input type="text" class="editable title-input" value="<?php echo htmlspecialchars($ticket["title"]); ?>" data-field="title" disabled></h2>
|
<h2><textarea class="editable title-input" data-field="title" disabled rows="1"><?php echo htmlspecialchars($ticket["title"]); ?></textarea></h2>
|
||||||
<div class="ticket-subheader">
|
<div class="ticket-subheader">
|
||||||
<div class="ticket-metadata">
|
<div class="ticket-metadata">
|
||||||
<div class="ticket-id">UUID <?php echo $ticket['ticket_id']; ?></div>
|
<div class="ticket-id">UUID <?php echo $ticket['ticket_id']; ?></div>
|
||||||
|
|||||||
Reference in New Issue
Block a user