Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Правки #14

Merged
merged 5 commits into from
Jan 28, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,7 @@ <h2 class="pictures__title visually-hidden">Фотографии других
<section class="img-upload">
<div class="img-upload__wrapper">
<h2 class="img-upload__title visually-hidden">Загрузка фотографии</h2>
<form class="img-upload__form" id="upload-select-image" method="post" action="https://31.javascript.htmlacademy.pro/kekstagram" enctype="multipart/form-data" autocomplete="off">

<form class="img-upload__form" id="upload-select-image" method="post" action="https://32.javascript.htmlacademy.pro/kekstagram" enctype="multipart/form-data" autocomplete="off">

<!-- Изначальное состояние поля для загрузки изображения -->
<fieldset class="img-upload__start">
Expand Down Expand Up @@ -238,7 +237,5 @@ <h2 class="data-error__title">Не удалось загрузить данны
<script src="./js/main.js" type="module"></script>
<script src="/vendor/pristine/pristine.min.js" type="text/javascript"></script>
<script src="./vendor/nouislider/nouislider.js" type="text/javascript"></script>


</body>
</html>
3 changes: 0 additions & 3 deletions js/form.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ const disableSubmitButton = () => {
formSubmitButton.disabled = true;

};

const enableSubmitButton = () => {
formSubmitButton.disabled = false;
};
Expand All @@ -42,7 +41,6 @@ filename.addEventListener('change', (evt) => {
toggleClass();
document.addEventListener('keydown', onDocumentEscape);
});

form.addEventListener('reset', () => {
toggleClass();
document.removeEventListener('keydown', onDocumentEscape);
Expand All @@ -52,7 +50,6 @@ form.addEventListener('reset', () => {
});
form.addEventListener('submit', (evt) => {
evt.preventDefault();

const isValid = validate();
if (isValid) {
disableSubmitButton();
Expand Down
2 changes: 1 addition & 1 deletion js/server.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const BASE_URL = 'https://31.javascript.htmlacademy.pro/kekstagram';
const BASE_URL = 'https://32.javascript.htmlacademy.pro/kekstagram';
const Route = {
GET_DATA: '/data',
SEND_DATA: '/',
Expand Down
1 change: 0 additions & 1 deletion js/successForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,5 @@ export const renderSuccessForm = () => {
document.removeEventListener('click', onCloseSuccess);

newSuccessTemplate.remove();

}
};
1 change: 0 additions & 1 deletion js/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ const getRandomInteger = (a,b) => {
};
const getSortRandom = () => getRandomInteger(-1, 1);


const isEscapeKey = (evt) => evt.key === 'Escape';
const isUniqueArray = (array) => new Set(array).size === array.length;

Expand Down