看板UI更新,主要是弹窗的大BUG

This commit is contained in:
zephyr
2026-06-02 07:14:11 -07:00
committed by zep
parent 83efd98422
commit b1332471d5
6 changed files with 995 additions and 102 deletions
+46 -101
View File
@@ -1,79 +1,8 @@
<style>
/* =========================================================
New Task / Form Modal Redesign (Injected Directly)
========================================================= */
/* 1. 优化遮罩层背景:降低纯黑透明度,加入现代化毛玻璃模糊效果 */
#modal-overlay {
background: rgba(0, 0, 0, 0.45) !important;
backdrop-filter: blur(4px);
}
/* 2. 优化弹窗本身:适当增加宽度,增加现代阴影和圆角 */
#modal-box {
width: 950px !important;
max-width: 95% !important;
border-radius: 12px !important;
box-shadow: 0 12px 36px rgba(0,0,0,0.25) !important;
border: none !important;
}
.custom-task-form-container {
display: flex;
flex-wrap: wrap;
gap: 30px;
}
.custom-task-form-main {
flex: 2 1 400px;
}
.custom-task-form-secondary {
flex: 1 1 250px;
}
.custom-task-form-bottom {
flex: 1 1 100%;
margin-top: 15px;
padding-top: 20px;
border-top: 1px solid #f0f0f0;
}
.custom-task-form-container label {
display: block;
font-size: 13px;
font-weight: 600;
color: #444;
margin-bottom: 6px;
margin-top: 12px;
}
.custom-task-form-container input[type="text"],
.custom-task-form-container input[type="number"],
.custom-task-form-container input[type="password"],
.custom-task-form-container select,
.custom-task-form-container textarea {
width: 100%;
max-width: 100%;
padding: 10px 12px;
border: 1px solid #d1d5db;
border-radius: 6px;
box-sizing: border-box;
font-size: 14px;
color: #333;
transition: all 0.2s ease;
background-color: #fff;
}
.custom-task-form-container input[type="text"]:focus,
.custom-task-form-container input[type="number"]:focus,
.custom-task-form-container input[type="password"]:focus,
.custom-task-form-container select:focus,
.custom-task-form-container textarea:focus {
border-color: #3468C0;
box-shadow: 0 0 0 3px rgba(52, 104, 192, 0.1);
outline: none;
}
.custom-task-form-bottom label { display: inline-block; margin-top: 0; margin-right: 15px; font-weight: 500; }
.custom-task-form-bottom .btn-blue { padding: 10px 24px; font-size: 15px; font-weight: 600; border-radius: 6px; margin-right: 10px; }
.text-editor-toolbar { background-color: #f9f9f9; border: 1px solid #d1d5db; border-bottom: none; border-radius: 6px 6px 0 0; padding: 6px 10px; }
.text-editor-write-mode { margin-top: 0 !important; }
.text-editor-write-mode textarea { border-radius: 0 0 6px 6px !important; border-top: none !important; }
</style>
<?php /*
新建任务弹窗表单。
样式统一在 assets/css/custom_dashboard.css 第 10 节「任务【新建】弹窗 — 表单布局」维护。
本模板不再内联 <style>。弹窗通用外观见同文件第 11 节。
*/ ?>
<div class="page-header">
<h2><?= $this->text->e($project['name']) ?> &gt; <?= t('New task') ?></h2>
</div>
@@ -82,51 +11,67 @@
<div class="custom-task-form-container">
<div class="custom-task-form-main">
<div class="form-row form-row-top joined-input-group">
<div class="form-col"><?= $this->task->renderColorField($values) ?></div>
<div class="form-col"><?= $this->task->renderPriorityField($project, $values) ?></div>
</div>
<?= $this->task->renderTitleField($values, $errors) ?>
<?= $this->task->renderTagField($project) ?>
<?= $this->task->renderDescriptionField($values, $errors) ?>
<?= $this->task->renderDescriptionTemplateDropdown($project['id']) ?>
<?= $this->task->renderTagField($project) ?>
<?= $this->hook->render('template:task:form:first-column', array('values' => $values, 'errors' => $errors)) ?>
</div>
<div class="custom-task-form-secondary">
<?= $this->task->renderColorField($values) ?>
<?= $this->task->renderAssigneeField($users_list, $values, $errors) ?>
<?= $this->task->renderCategoryField($categories_list, $values, $errors) ?>
<?= $this->task->renderSwimlaneField($swimlanes_list, $values, $errors) ?>
<?= $this->task->renderColumnField($columns_list, $values, $errors) ?>
<?= $this->task->renderPriorityField($project, $values) ?>
<div class="form-row form-row-top form-row-gap">
<div class="form-col form-col-selectors">
<?= $this->task->renderCategoryField($categories_list, $values, $errors) ?>
<?= $this->task->renderSwimlaneField($swimlanes_list, $values, $errors) ?>
<?= $this->task->renderColumnField($columns_list, $values, $errors) ?>
</div>
<div class="form-col form-col-assignee">
<?= $this->task->renderAssigneeField($users_list, $values, $errors) ?>
</div>
</div>
<?= $this->hook->render('template:task:form:second-column', array('values' => $values, 'errors' => $errors)) ?>
<?= $this->task->renderDueDateField($values, $errors) ?>
<div class="attachment-area-wrapper">
<div class="attachment-area-title"><?= t('Add attachments') ?></div>
<details class="accordion-section" open style="margin-bottom:0;">
<summary class="accordion-title" style="display:none;"><?= t('Add attachments') ?></summary>
<div class="accordion-content custom-attachments-content" style="margin-top:0;">
<?= $this->task->renderFileUpload($screenshot, $files) ?>
</div>
</details>
</div>
<?= $this->hook->render('template:task:form:bottom-before-buttons', array('values' => $values, 'errors' => $errors)) ?>
</div>
<div class="custom-task-form-tertiary">
<?= $this->task->renderStartDateField($values, $errors) ?>
<?= $this->task->renderDueDateField($values, $errors) ?>
<?= $this->task->renderTimeEstimatedField($values, $errors) ?>
<?= $this->task->renderTimeSpentField($values, $errors) ?>
<?= $this->task->renderScoreField($values, $errors) ?>
<?= $this->task->renderReferenceField($values, $errors) ?>
<?= $this->hook->render('template:task:form:third-column', array('values' => $values, 'errors' => $errors)) ?>
</div>
<div class="custom-task-form-bottom">
<details class="accordion-section">
<summary class="accordion-title"><?= t('Add attachments') ?></summary>
<div class="accordion-content">
<?= $this->task->renderFileUpload($screenshot, $files) ?>
<div class="form-actions-wrapper">
<?php if (! isset($duplicate)): ?>
<div class="checkbox-group">
<?= $this->form->checkbox('another_task', t('Create another task'), 1, isset($values['another_task']) && $values['another_task'] == 1, '', array("tabindex" => "16")) ?>
<?= $this->form->checkbox('duplicate_multiple_projects', t('Duplicate to multiple projects'), 1, false, '', array("tabindex" => "17")) ?>
</div>
<?php endif ?>
<div class="submit-buttons-wrapper">
<a href="#" class="js-modal-close btn btn-cancel">取消</a>
<button type="submit" class="btn btn-blue"><?= t('Save') ?></button>
</div>
</details>
<?= $this->hook->render('template:task:form:bottom-before-buttons', array('values' => $values, 'errors' => $errors)) ?>
<?php if (! isset($duplicate)): ?>
<?= $this->form->checkbox('another_task', t('Create another task'), 1, isset($values['another_task']) && $values['another_task'] == 1, '', array("tabindex" => "16")) ?>
<?= $this->form->checkbox('duplicate_multiple_projects', t('Duplicate to multiple projects'), 1, false, '', array("tabindex" => "17")) ?>
<?php endif ?>
<?= $this->modal->submitButtons() ?>
</div>
</div>
</div>
</form>