Модалка перенесена в шапку, частично настроены стили
This commit is contained in:
@@ -762,7 +762,7 @@ tbody tr:hover {
|
|||||||
top: 0;
|
top: 0;
|
||||||
left: 0;
|
left: 0;
|
||||||
right: 0;
|
right: 0;
|
||||||
bottom: 0;
|
/*bottom: 0;*/
|
||||||
background: rgba(0, 0, 0, 0.6);
|
background: rgba(0, 0, 0, 0.6);
|
||||||
backdrop-filter: blur(4px);
|
backdrop-filter: blur(4px);
|
||||||
z-index: 1000;
|
z-index: 1000;
|
||||||
@@ -782,8 +782,10 @@ tbody tr:hover {
|
|||||||
border: 1px solid var(--bg-card-border);
|
border: 1px solid var(--bg-card-border);
|
||||||
border-radius: var(--radius-md);
|
border-radius: var(--radius-md);
|
||||||
padding: 2rem;
|
padding: 2rem;
|
||||||
width: 90%;
|
width: 100%;
|
||||||
max-width: 500px;
|
top: 0;
|
||||||
|
max-width: 100%;
|
||||||
|
margin: 0 auto;
|
||||||
position: relative;
|
position: relative;
|
||||||
transform: scale(0.95);
|
transform: scale(0.95);
|
||||||
transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
|
transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
|
||||||
|
|||||||
@@ -264,10 +264,22 @@ export async function initUsers() {
|
|||||||
time: timeSlot // передаём время
|
time: timeSlot // передаём время
|
||||||
});
|
});
|
||||||
showAlert('add-lesson-alert', 'Занятие добавлено', 'success');
|
showAlert('add-lesson-alert', 'Занятие добавлено', 'success');
|
||||||
|
// Очищаем только поля, но оставляем userId
|
||||||
|
lessonGroupSelect.value = '';
|
||||||
|
lessonDisciplineSelect.value = '';
|
||||||
|
lessonClassroomSelect.value = '';
|
||||||
|
lessonTypeSelect.value = '';
|
||||||
|
lessonDaySelect.value = '';
|
||||||
|
lessonTimeSelect.value = '';
|
||||||
|
lessonTimeSelect.disabled = true;
|
||||||
|
weekUpper.checked = false;
|
||||||
|
weekLower.checked = false;
|
||||||
|
document.querySelector('input[name="lessonFormat"][value="Очно"]').checked = true;
|
||||||
|
|
||||||
|
// Убираем сообщение через 3 секунды, чтобы можно было добавлять дальше
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
modalAddLesson.classList.remove('open');
|
hideAlert('add-lesson-alert');
|
||||||
resetLessonForm();
|
}, 3000);
|
||||||
}, 1500);
|
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
showAlert('add-lesson-alert', e.message || 'Ошибка добавления занятия', 'error');
|
showAlert('add-lesson-alert', e.message || 'Ошибка добавления занятия', 'error');
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -54,29 +54,35 @@
|
|||||||
<form id="add-lesson-form">
|
<form id="add-lesson-form">
|
||||||
<input type="hidden" id="lesson-user-id">
|
<input type="hidden" id="lesson-user-id">
|
||||||
|
|
||||||
<div class="form-group" style="margin-top: 1rem;">
|
<!-- Один общий ряд для всех элементов -->
|
||||||
|
<div class="form-row" style="align-items: flex-end; gap: 1rem; flex-wrap: wrap; width: 100%; justify-content: space-between;">
|
||||||
|
|
||||||
|
<!-- Группа -->
|
||||||
|
<div class="form-group" style="flex: 0 1 auto; max-width: 190px">
|
||||||
<label for="lesson-group">Группа</label>
|
<label for="lesson-group">Группа</label>
|
||||||
<select id="lesson-group" required>
|
<select id="lesson-group" required>
|
||||||
<option value="">Выберите группу</option>
|
<option value="">Выберите группу</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group" style="margin-top: 1rem;">
|
<!-- Дисциплина -->
|
||||||
|
<div class="form-group" style="flex: 0 1 auto; max-width: 220px">
|
||||||
<label for="lesson-discipline">Дисциплина</label>
|
<label for="lesson-discipline">Дисциплина</label>
|
||||||
<select id="lesson-discipline" required>
|
<select id="lesson-discipline" required>
|
||||||
<option value="">Выберите дисциплину</option>
|
<option value="">Выберите дисциплину</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group" style="margin-top: 1rem;">
|
<!-- Аудитория -->
|
||||||
|
<div class="form-group" style="flex: 0 1 auto; max-width: 215px">
|
||||||
<label for="lesson-classroom">Аудитория</label>
|
<label for="lesson-classroom">Аудитория</label>
|
||||||
<select id="lesson-classroom" required>
|
<select id="lesson-classroom" required>
|
||||||
<option value="">Выберите аудиторию</option>
|
<option value="">Выберите аудиторию</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-row" style="margin-top: 1rem;">
|
<!-- День недели -->
|
||||||
<div class="form-group" style="flex: 1;">
|
<div class="form-group" style="flex: 0 1 auto; max-width: 170px">
|
||||||
<label for="lesson-day">День недели</label>
|
<label for="lesson-day">День недели</label>
|
||||||
<select id="lesson-day" required>
|
<select id="lesson-day" required>
|
||||||
<option value="">Выберите день</option>
|
<option value="">Выберите день</option>
|
||||||
@@ -88,9 +94,11 @@
|
|||||||
<option value="Суббота">Суббота</option>
|
<option value="Суббота">Суббота</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group" style="flex: 1;">
|
|
||||||
|
<!-- Тип недели (ВЕРТИКАЛЬНО) -->
|
||||||
|
<div class="form-group" style="flex: 0 1 auto; max-width: 192px">
|
||||||
<label>Неделя</label>
|
<label>Неделя</label>
|
||||||
<div style="display: flex; gap: 0.5rem;">
|
<div style="display: flex; gap: 0.2rem;">
|
||||||
<label class="btn-checkbox">
|
<label class="btn-checkbox">
|
||||||
<input type="checkbox" name="weekType" value="Верхняя" id="week-upper">
|
<input type="checkbox" name="weekType" value="Верхняя" id="week-upper">
|
||||||
<span class="checkbox-btn">Верхняя</span>
|
<span class="checkbox-btn">Верхняя</span>
|
||||||
@@ -101,21 +109,22 @@
|
|||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="form-row" style="margin-top: 1rem;">
|
<!-- Тип занятия -->
|
||||||
<div class="form-group" style="flex: 1;">
|
<div class="form-group" style="flex: 0 1 auto; max-width: 160px">
|
||||||
<label for="lesson-type">Тип занятия</label>
|
<label for="lesson-type">Тип занятия</label>
|
||||||
<select id="lesson-type" required>
|
<select id="lesson-type" required>
|
||||||
<option value="">Выберите тип занятия</option>
|
<option value="">Выберите тип</option>
|
||||||
<option value="Практическая работа">Практическая работа</option>
|
<option value="Практическая работа">Практическая</option>
|
||||||
<option value="Лекция">Лекция</option>
|
<option value="Лекция">Лекция</option>
|
||||||
<option value="Лабораторная работа">Лабораторная работа</option>
|
<option value="Лабораторная работа">Лабораторная</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group" style="flex: 1;">
|
|
||||||
|
<!-- Формат занятия (ВЕРТИКАЛЬНО) -->
|
||||||
|
<div class="form-group" style="flex: 0 1 auto; max-width: 170px">
|
||||||
<label>Формат занятия</label>
|
<label>Формат занятия</label>
|
||||||
<div style="display: flex; gap: 0.5rem;">
|
<div style="display: flex; gap: 0.2rem;">
|
||||||
<label class="btn-checkbox">
|
<label class="btn-checkbox">
|
||||||
<input type="radio" name="lessonFormat" value="Очно" id="format-offline" checked>
|
<input type="radio" name="lessonFormat" value="Очно" id="format-offline" checked>
|
||||||
<span class="checkbox-btn">Очно</span>
|
<span class="checkbox-btn">Очно</span>
|
||||||
@@ -126,17 +135,24 @@
|
|||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="form-group" style="margin-top: 1rem;">
|
<!-- Время занятия -->
|
||||||
|
<div class="form-group" style="flex: 0 0 auto; max-width: 235px">
|
||||||
<label for="lesson-time">Время занятия</label>
|
<label for="lesson-time">Время занятия</label>
|
||||||
<select id="lesson-time" required disabled>
|
<select id="lesson-time" required disabled>
|
||||||
<option value="">Сначала выберите день</option>
|
<option value="">Сначала выберите день</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<button type="submit" class="btn-primary" style="width: 100%; margin-top: 1rem;">Сохранить</button>
|
<!-- Кнопка Сохранить (в том же ряду) -->
|
||||||
<div class="form-alert" id="add-lesson-alert" role="alert"></div>
|
<div class="form-group" style="flex: 0 0 auto;">
|
||||||
|
<button type="submit" class="btn-primary" style="white-space: nowrap;">Сохранить</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div> <!-- Закрытие form-row -->
|
||||||
|
|
||||||
|
<div class="form-alert" id="add-lesson-alert" role="alert" style="margin-top: 1rem;"></div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
Reference in New Issue
Block a user