{"action":"created","comment":{"url":"https://api.github.com/repos/htmlacademy-javascript/272763-keksobooking/pulls/comments/196147114","pull_request_review_id":129645570,"id":196147114,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5NjE0NzExNA==","diff_hunk":"@@ -274,4 +274,80 @@ mainPin.addEventListener('mouseup', function () {\n \n });\n \n+//  Проверка равенства введенного количества комнат количеству гостей\n \n+var roomsQtySelect = formContent.querySelector('#room_number');\n+var capacitySelect = formContent.querySelector('#capacity');\n+\n+var roomsOptions = roomsQtySelect.querySelectorAll('option');\n+var capacityOptions = capacitySelect.querySelectorAll('option');\n+\n+var checkSelectionEquality = function (selectRooms, optionsCollectionRooms, selectCapacity, optionsCollectionCapacity) {\n+\n+  if (optionsCollectionRooms[selectRooms.options.selectedIndex].value !== optionsCollectionCapacity[selectCapacity.options.selectedIndex].value) {\n+\n+    selectCapacity.setCustomValidity('Количество гостей не совпадает с количеством комнат!');\n+  } else {\n+    selectCapacity.setCustomValidity('');\n+  }\n+\n+};\n+\n+capacitySelect.addEventListener('change', function () {\n+  checkSelectionEquality(roomsQtySelect, roomsOptions, capacitySelect, capacityOptions);\n+});\n+\n+// Зависимость минимально допустимой цены предложения от типа жилья\n+\n+var typeSelect = formContent.querySelector('#type');\n+var typeOptions = typeSelect.querySelectorAll('option');\n+var priceInput = formContent.querySelector('#price');\n+\n+var MIN_PRICE_FLAT = 1000;\n+var MIN_PRICE_BUNGALO = 0;\n+var MIN_PRICE_HOUSE = 5000;\n+var MIN_PRICE_PALACE = 10000;\n+\n+var checkMinPrice = function (optionsCollection, typeSelection, inputPrice) {","path":"js/map.js","position":38,"original_position":38,"commit_id":"9cab1f93f3fd658f0b302b3c3054fd1c9d0f4051","original_commit_id":"9cab1f93f3fd658f0b302b3c3054fd1c9d0f4051","user":{"login":"batogov","id":6384271,"node_id":"MDQ6VXNlcjYzODQyNzE=","avatar_url":"https://avatars0.githubusercontent.com/u/6384271?v=4","gravatar_id":"","url":"https://api.github.com/users/batogov","html_url":"https://github.com/batogov","followers_url":"https://api.github.com/users/batogov/followers","following_url":"https://api.github.com/users/batogov/following{/other_user}","gists_url":"https://api.github.com/users/batogov/gists{/gist_id}","starred_url":"https://api.github.com/users/batogov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/batogov/subscriptions","organizations_url":"https://api.github.com/users/batogov/orgs","repos_url":"https://api.github.com/users/batogov/repos","events_url":"https://api.github.com/users/batogov/events{/privacy}","received_events_url":"https://api.github.com/users/batogov/received_events","type":"User","site_admin":false},"body":"Надо переработать эту функцию.\r\n\r\nВо-первых, валидация не работает – можно отправить некорректные данные. Во-вторых, как мне кажется, лучше тут устанавливать соответствующее значение `min` для `input`, а не играться с `setCustomValidity`. Это проще и надёжнее.","created_at":"2018-06-18T16:43:13Z","updated_at":"2018-06-18T16:45:08Z","html_url":"https://github.com/htmlacademy-javascript/272763-keksobooking/pull/4#discussion_r196147114","pull_request_url":"https://api.github.com/repos/htmlacademy-javascript/272763-keksobooking/pulls/4","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/htmlacademy-javascript/272763-keksobooking/pulls/comments/196147114"},"html":{"href":"https://github.com/htmlacademy-javascript/272763-keksobooking/pull/4#discussion_r196147114"},"pull_request":{"href":"https://api.github.com/repos/htmlacademy-javascript/272763-keksobooking/pulls/4"}}},"pull_request":{"url":"https://api.github.com/repos/htmlacademy-javascript/272763-keksobooking/pulls/4","id":195384376,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk1Mzg0Mzc2","html_url":"https://github.com/htmlacademy-javascript/272763-keksobooking/pull/4","diff_url":"https://github.com/htmlacademy-javascript/272763-keksobooking/pull/4.diff","patch_url":"https://github.com/htmlacademy-javascript/272763-keksobooking/pull/4.patch","issue_url":"https://api.github.com/repos/htmlacademy-javascript/272763-keksobooking/issues/4","number":4,"state":"open","locked":false,"title":"Личный проект: доверяй, но проверяй","user":{"login":"Slavenzka","id":36930766,"node_id":"MDQ6VXNlcjM2OTMwNzY2","avatar_url":"https://avatars3.githubusercontent.com/u/36930766?v=4","gravatar_id":"","url":"https://api.github.com/users/Slavenzka","html_url":"https://github.com/Slavenzka","followers_url":"https://api.github.com/users/Slavenzka/followers","following_url":"https://api.github.com/users/Slavenzka/following{/other_user}","gists_url":"https://api.github.com/users/Slavenzka/gists{/gist_id}","starred_url":"https://api.github.com/users/Slavenzka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Slavenzka/subscriptions","organizations_url":"https://api.github.com/users/Slavenzka/orgs","repos_url":"https://api.github.com/users/Slavenzka/repos","events_url":"https://api.github.com/users/Slavenzka/events{/privacy}","received_events_url":"https://api.github.com/users/Slavenzka/received_events","type":"User","site_admin":false},"body":"\n\n---\n:mortar_board: [Личный проект: доверяй, но проверяй](https://up.htmlacademy.ru/javascript/14/user/272763/tasks/16)\n\n:boom: https://htmlacademy-javascript.github.io/272763-keksobooking/4/","created_at":"2018-06-17T16:20:41Z","updated_at":"2018-06-18T16:45:08Z","closed_at":null,"merged_at":null,"merge_commit_sha":"418b6f4cbe86bd85c67cf913dbdb551c0c252966","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/htmlacademy-javascript/272763-keksobooking/pulls/4/commits","review_comments_url":"https://api.github.com/repos/htmlacademy-javascript/272763-keksobooking/pulls/4/comments","review_comment_url":"https://api.github.com/repos/htmlacademy-javascript/272763-keksobooking/pulls/comments{/number}","comments_url":"https://api.github.com/repos/htmlacademy-javascript/272763-keksobooking/issues/4/comments","statuses_url":"https://api.github.com/repos/htmlacademy-javascript/272763-keksobooking/statuses/9cab1f93f3fd658f0b302b3c3054fd1c9d0f4051","head":{"label":"Slavenzka:module4-task2","ref":"module4-task2","sha":"9cab1f93f3fd658f0b302b3c3054fd1c9d0f4051","user":{"login":"Slavenzka","id":36930766,"node_id":"MDQ6VXNlcjM2OTMwNzY2","avatar_url":"https://avatars3.githubusercontent.com/u/36930766?v=4","gravatar_id":"","url":"https://api.github.com/users/Slavenzka","html_url":"https://github.com/Slavenzka","followers_url":"https://api.github.com/users/Slavenzka/followers","following_url":"https://api.github.com/users/Slavenzka/following{/other_user}","gists_url":"https://api.github.com/users/Slavenzka/gists{/gist_id}","starred_url":"https://api.github.com/users/Slavenzka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Slavenzka/subscriptions","organizations_url":"https://api.github.com/users/Slavenzka/orgs","repos_url":"https://api.github.com/users/Slavenzka/repos","events_url":"https://api.github.com/users/Slavenzka/events{/privacy}","received_events_url":"https://api.github.com/users/Slavenzka/received_events","type":"User","site_admin":false},"repo":{"id":135480400,"node_id":"MDEwOlJlcG9zaXRvcnkxMzU0ODA0MDA=","name":"272763-keksobooking","full_name":"Slavenzka/272763-keksobooking","owner":{"login":"Slavenzka","id":36930766,"node_id":"MDQ6VXNlcjM2OTMwNzY2","avatar_url":"https://avatars3.githubusercontent.com/u/36930766?v=4","gravatar_id":"","url":"https://api.github.com/users/Slavenzka","html_url":"https://github.com/Slavenzka","followers_url":"https://api.github.com/users/Slavenzka/followers","following_url":"https://api.github.com/users/Slavenzka/following{/other_user}","gists_url":"https://api.github.com/users/Slavenzka/gists{/gist_id}","starred_url":"https://api.github.com/users/Slavenzka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Slavenzka/subscriptions","organizations_url":"https://api.github.com/users/Slavenzka/orgs","repos_url":"https://api.github.com/users/Slavenzka/repos","events_url":"https://api.github.com/users/Slavenzka/events{/privacy}","received_events_url":"https://api.github.com/users/Slavenzka/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Slavenzka/272763-keksobooking","description":"Иван Романов","fork":true,"url":"https://api.github.com/repos/Slavenzka/272763-keksobooking","forks_url":"https://api.github.com/repos/Slavenzka/272763-keksobooking/forks","keys_url":"https://api.github.com/repos/Slavenzka/272763-keksobooking/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Slavenzka/272763-keksobooking/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Slavenzka/272763-keksobooking/teams","hooks_url":"https://api.github.com/repos/Slavenzka/272763-keksobooking/hooks","issue_events_url":"https://api.github.com/repos/Slavenzka/272763-keksobooking/issues/events{/number}","events_url":"https://api.github.com/repos/Slavenzka/272763-keksobooking/events","assignees_url":"https://api.github.com/repos/Slavenzka/272763-keksobooking/assignees{/user}","branches_url":"https://api.github.com/repos/Slavenzka/272763-keksobooking/branches{/branch}","tags_url":"https://api.github.com/repos/Slavenzka/272763-keksobooking/tags","blobs_url":"https://api.github.com/repos/Slavenzka/272763-keksobooking/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Slavenzka/272763-keksobooking/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Slavenzka/272763-keksobooking/git/refs{/sha}","trees_url":"https://api.github.com/repos/Slavenzka/272763-keksobooking/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Slavenzka/272763-keksobooking/statuses/{sha}","languages_url":"https://api.github.com/repos/Slavenzka/272763-keksobooking/languages","stargazers_url":"https://api.github.com/repos/Slavenzka/272763-keksobooking/stargazers","contributors_url":"https://api.github.com/repos/Slavenzka/272763-keksobooking/contributors","subscribers_url":"https://api.github.com/repos/Slavenzka/272763-keksobooking/subscribers","subscription_url":"https://api.github.com/repos/Slavenzka/272763-keksobooking/subscription","commits_url":"https://api.github.com/repos/Slavenzka/272763-keksobooking/commits{/sha}","git_commits_url":"https://api.github.com/repos/Slavenzka/272763-keksobooking/git/commits{/sha}","comments_url":"https://api.github.com/repos/Slavenzka/272763-keksobooking/comments{/number}","issue_comment_url":"https://api.github.com/repos/Slavenzka/272763-keksobooking/issues/comments{/number}","contents_url":"https://api.github.com/repos/Slavenzka/272763-keksobooking/contents/{+path}","compare_url":"https://api.github.com/repos/Slavenzka/272763-keksobooking/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Slavenzka/272763-keksobooking/merges","archive_url":"https://api.github.com/repos/Slavenzka/272763-keksobooking/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Slavenzka/272763-keksobooking/downloads","issues_url":"https://api.github.com/repos/Slavenzka/272763-keksobooking/issues{/number}","pulls_url":"https://api.github.com/repos/Slavenzka/272763-keksobooking/pulls{/number}","milestones_url":"https://api.github.com/repos/Slavenzka/272763-keksobooking/milestones{/number}","notifications_url":"https://api.github.com/repos/Slavenzka/272763-keksobooking/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Slavenzka/272763-keksobooking/labels{/name}","releases_url":"https://api.github.com/repos/Slavenzka/272763-keksobooking/releases{/id}","deployments_url":"https://api.github.com/repos/Slavenzka/272763-keksobooking/deployments","created_at":"2018-05-30T18:09:45Z","updated_at":"2018-05-30T18:09:47Z","pushed_at":"2018-06-18T07:01:02Z","git_url":"git://github.com/Slavenzka/272763-keksobooking.git","ssh_url":"git@github.com:Slavenzka/272763-keksobooking.git","clone_url":"https://github.com/Slavenzka/272763-keksobooking.git","svn_url":"https://github.com/Slavenzka/272763-keksobooking","homepage":null,"size":904,"stargazers_count":0,"watchers_count":0,"language":"CSS","has_issues":false,"has_projects":true,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"htmlacademy-javascript:master","ref":"master","sha":"c1d8564a49828a33e71d2cd896fe5907cfa8a746","user":{"login":"htmlacademy-javascript","id":14179712,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE0MTc5NzEy","avatar_url":"https://avatars2.githubusercontent.com/u/14179712?v=4","gravatar_id":"","url":"https://api.github.com/users/htmlacademy-javascript","html_url":"https://github.com/htmlacademy-javascript","followers_url":"https://api.github.com/users/htmlacademy-javascript/followers","following_url":"https://api.github.com/users/htmlacademy-javascript/following{/other_user}","gists_url":"https://api.github.com/users/htmlacademy-javascript/gists{/gist_id}","starred_url":"https://api.github.com/users/htmlacademy-javascript/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/htmlacademy-javascript/subscriptions","organizations_url":"https://api.github.com/users/htmlacademy-javascript/orgs","repos_url":"https://api.github.com/users/htmlacademy-javascript/repos","events_url":"https://api.github.com/users/htmlacademy-javascript/events{/privacy}","received_events_url":"https://api.github.com/users/htmlacademy-javascript/received_events","type":"Organization","site_admin":false},"repo":{"id":135479958,"node_id":"MDEwOlJlcG9zaXRvcnkxMzU0Nzk5NTg=","name":"272763-keksobooking","full_name":"htmlacademy-javascript/272763-keksobooking","owner":{"login":"htmlacademy-javascript","id":14179712,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE0MTc5NzEy","avatar_url":"https://avatars2.githubusercontent.com/u/14179712?v=4","gravatar_id":"","url":"https://api.github.com/users/htmlacademy-javascript","html_url":"https://github.com/htmlacademy-javascript","followers_url":"https://api.github.com/users/htmlacademy-javascript/followers","following_url":"https://api.github.com/users/htmlacademy-javascript/following{/other_user}","gists_url":"https://api.github.com/users/htmlacademy-javascript/gists{/gist_id}","starred_url":"https://api.github.com/users/htmlacademy-javascript/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/htmlacademy-javascript/subscriptions","organizations_url":"https://api.github.com/users/htmlacademy-javascript/orgs","repos_url":"https://api.github.com/users/htmlacademy-javascript/repos","events_url":"https://api.github.com/users/htmlacademy-javascript/events{/privacy}","received_events_url":"https://api.github.com/users/htmlacademy-javascript/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/htmlacademy-javascript/272763-keksobooking","description":"Иван Романов","fork":false,"url":"https://api.github.com/repos/htmlacademy-javascript/272763-keksobooking","forks_url":"https://api.github.com/repos/htmlacademy-javascript/272763-keksobooking/forks","keys_url":"https://api.github.com/repos/htmlacademy-javascript/272763-keksobooking/keys{/key_id}","collaborators_url":"https://api.github.com/repos/htmlacademy-javascript/272763-keksobooking/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/htmlacademy-javascript/272763-keksobooking/teams","hooks_url":"https://api.github.com/repos/htmlacademy-javascript/272763-keksobooking/hooks","issue_events_url":"https://api.github.com/repos/htmlacademy-javascript/272763-keksobooking/issues/events{/number}","events_url":"https://api.github.com/repos/htmlacademy-javascript/272763-keksobooking/events","assignees_url":"https://api.github.com/repos/htmlacademy-javascript/272763-keksobooking/assignees{/user}","branches_url":"https://api.github.com/repos/htmlacademy-javascript/272763-keksobooking/branches{/branch}","tags_url":"https://api.github.com/repos/htmlacademy-javascript/272763-keksobooking/tags","blobs_url":"https://api.github.com/repos/htmlacademy-javascript/272763-keksobooking/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/htmlacademy-javascript/272763-keksobooking/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/htmlacademy-javascript/272763-keksobooking/git/refs{/sha}","trees_url":"https://api.github.com/repos/htmlacademy-javascript/272763-keksobooking/git/trees{/sha}","statuses_url":"https://api.github.com/repos/htmlacademy-javascript/272763-keksobooking/statuses/{sha}","languages_url":"https://api.github.com/repos/htmlacademy-javascript/272763-keksobooking/languages","stargazers_url":"https://api.github.com/repos/htmlacademy-javascript/272763-keksobooking/stargazers","contributors_url":"https://api.github.com/repos/htmlacademy-javascript/272763-keksobooking/contributors","subscribers_url":"https://api.github.com/repos/htmlacademy-javascript/272763-keksobooking/subscribers","subscription_url":"https://api.github.com/repos/htmlacademy-javascript/272763-keksobooking/subscription","commits_url":"https://api.github.com/repos/htmlacademy-javascript/272763-keksobooking/commits{/sha}","git_commits_url":"https://api.github.com/repos/htmlacademy-javascript/272763-keksobooking/git/commits{/sha}","comments_url":"https://api.github.com/repos/htmlacademy-javascript/272763-keksobooking/comments{/number}","issue_comment_url":"https://api.github.com/repos/htmlacademy-javascript/272763-keksobooking/issues/comments{/number}","contents_url":"https://api.github.com/repos/htmlacademy-javascript/272763-keksobooking/contents/{+path}","compare_url":"https://api.github.com/repos/htmlacademy-javascript/272763-keksobooking/compare/{base}...{head}","merges_url":"https://api.github.com/repos/htmlacademy-javascript/272763-keksobooking/merges","archive_url":"https://api.github.com/repos/htmlacademy-javascript/272763-keksobooking/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/htmlacademy-javascript/272763-keksobooking/downloads","issues_url":"https://api.github.com/repos/htmlacademy-javascript/272763-keksobooking/issues{/number}","pulls_url":"https://api.github.com/repos/htmlacademy-javascript/272763-keksobooking/pulls{/number}","milestones_url":"https://api.github.com/repos/htmlacademy-javascript/272763-keksobooking/milestones{/number}","notifications_url":"https://api.github.com/repos/htmlacademy-javascript/272763-keksobooking/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/htmlacademy-javascript/272763-keksobooking/labels{/name}","releases_url":"https://api.github.com/repos/htmlacademy-javascript/272763-keksobooking/releases{/id}","deployments_url":"https://api.github.com/repos/htmlacademy-javascript/272763-keksobooking/deployments","created_at":"2018-05-30T18:05:39Z","updated_at":"2018-06-16T14:39:26Z","pushed_at":"2018-06-18T16:35:39Z","git_url":"git://github.com/htmlacademy-javascript/272763-keksobooking.git","ssh_url":"git@github.com:htmlacademy-javascript/272763-keksobooking.git","clone_url":"https://github.com/htmlacademy-javascript/272763-keksobooking.git","svn_url":"https://github.com/htmlacademy-javascript/272763-keksobooking","homepage":"https://github.com/Slavenzka/272763-keksobooking","size":918,"stargazers_count":0,"watchers_count":0,"language":"CSS","has_issues":false,"has_projects":true,"has_downloads":false,"has_wiki":false,"has_pages":true,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":1,"license":null,"forks":1,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/htmlacademy-javascript/272763-keksobooking/pulls/4"},"html":{"href":"https://github.com/htmlacademy-javascript/272763-keksobooking/pull/4"},"issue":{"href":"https://api.github.com/repos/htmlacademy-javascript/272763-keksobooking/issues/4"},"comments":{"href":"https://api.github.com/repos/htmlacademy-javascript/272763-keksobooking/issues/4/comments"},"review_comments":{"href":"https://api.github.com/repos/htmlacademy-javascript/272763-keksobooking/pulls/4/comments"},"review_comment":{"href":"https://api.github.com/repos/htmlacademy-javascript/272763-keksobooking/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/htmlacademy-javascript/272763-keksobooking/pulls/4/commits"},"statuses":{"href":"https://api.github.com/repos/htmlacademy-javascript/272763-keksobooking/statuses/9cab1f93f3fd658f0b302b3c3054fd1c9d0f4051"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"batogov"}}