Коммит 0bd52239 создал по автору Кабанин Денис Андреевич's avatar Кабанин Денис Андреевич
Просмотр файлов

Видоизменил фильтр

владелец f3dfaf1c
......@@ -228,4 +228,64 @@ body {
.btn:active {
background: #3e5e96;
}
.form-input {
width: 100%;
border-radius: 5px;
padding: 10px;
border: 1px solid #00000030;
color: #000;
font-size: 16px;
font-weight: 400;
margin-bottom: 15px;
}
.search-block-result-list {
margin-top: -15px;
position: absolute;
z-index: 4;
width: 100%;
background: #fff;
box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.5);
max-height: 160px;
overflow-y: auto;
}
.search-block-result-item {
padding: 10px;
font-size: 16px;
font-weight: 300;
cursor: pointer;
}
.search-block-result-item:hover {
background: #ccc;
}
.search-block-list {
flex-wrap: wrap;
display: flex;
justify-content: flex-start;
gap: 10px;
}
.search-block-div {
position: absolute;
top: -7.5px;
right: -7.5px;
width: 15px;
height: 15px;
background-size: auto;
background: url('../../img/global/del.svg') no-repeat center center;
cursor: pointer;
}
.search-block-item {
position: relative;
padding: 5px 15px;
border: 1px solid #1f3f76;
border-radius: 5px;
font-size: 16px;
font-weight: 400;
}
\ Нет новой строки в конце файла
......@@ -154,8 +154,8 @@ function tok_exit() {
// Переключение страниц
// let len = document.querySelector('.pages-list').childNodes.length;
let len = document.querySelector('.pages-list').childNodes.length;
// if (len == 7) {
// $('.pages').css({'display' : 'none'});
// }
\ Нет новой строки в конце файла
if (len <= 20) {
$('.pages').css({'display' : 'none'});
}
\ Нет новой строки в конце файла
......@@ -12,7 +12,6 @@ window.onclick = function(event) {
if (event.target.matches('.list-li')){
let text = event.target.innerHTML;
event.target.parentNode.parentNode.childNodes[1].innerHTML = text;
event.target.parentNode.parentNode.childNodes[1].onchange();
$('.list').css({'display':'none'});
}
else if (!event.target.matches('.list-p')) {
......
......@@ -13,7 +13,7 @@
<link rel="shortcut icon" href="{% static 'img/global/icon.png' %}" type="image/x-icon">
<title>Архив работ</title>
<link rel="stylesheet" href="{% static 'css/global/index.css' %}">
<link rel="stylesheet" href="{% static 'css/archive/archive.css' %}">
<link rel="stylesheet" href="{% static 'css/projects/archive.css' %}">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.0/jquery.min.js"></script>
</head>
......@@ -72,19 +72,13 @@
</ul>
</div>
<div class="filter">
<div class="div-list">
<div class="list-name">Предмет</div>
<input type="hidden" id="subject-filter" name="subject" />
<div class="list-names">
<div class="list-p">Не указано</div>
<ul class="list" name="subject">
<li class="list-li subject">Не указано</li>
{% for subject in subjects %}
<li class="list-li subject">{{subject}}</li>
{% endfor %}
</ul>
</div>
<div style="margin-right: auto; position: relative;">
<input type="text" class="search-block-input form-input search-block-subjects"
placeholder="Введите названние предметной области">
<ul class="search-block-result-list"></ul>
<ul class="search-block-list"></ul>
</div>
<input type="hidden" class="search-block-hidden-input" name="subject" required>
<div class="div-list">
<div class="list-name">Номинация</div>
<input type="hidden" id="nominations-filter" name="nominations" />
......@@ -141,37 +135,8 @@
<script src="{% static 'js/projects/archive.js' %}"></script>
<script src="{% static 'js/global/search_block.js' %}"></script>
<script>
let teacher_arr = {{ teachers | js }}
let teacher_name = [];
for (let i = 0; i < teacher_arr.length; i++) {
teacher_name.push(teacher_arr[i][0]);
}
$('.search-block-subjects').on('focus', function () {
list_arr = {{ subjects_names | js }};
max_item = 3;
add_other_text = true;
});
$('.search-block-teachers').on('focus', function () {
list_arr = teacher_name;
max_item = 1;
add_other_text = false;
});
$($('.search-block-result-list')[0]).on('click', function () {
let input = $('.search-block-hidden-input')[0];
teacher_id(input);
teacher_del();
});
list_arr = {{ subjects | js }};
function teacher_del() {
$($('.search-block-div')[0]).on('click', function () {
let input = $('.search-block-hidden-input')[0];
teacher_id(input);
});
}
</script>
<script src="{% static 'js/projects/create_page.js' %}"></script>
</main>
......
Поддерживает Markdown
0% или .
You are about to add 0 people to the discussion. Proceed with caution.
Сначала завершите редактирование этого сообщения!
Пожалуйста, зарегистрируйтесь или чтобы прокомментировать