{"action":"created","comment":{"url":"https://api.github.com/repos/htmlacademy-javascript/478669-keksobooking/pulls/comments/195898493","pull_request_review_id":129358579,"id":195898493,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5NTg5ODQ5Mw==","diff_hunk":"@@ -479,5 +542,81 @@ var mainPinHandler = function () {\n   mainPin.removeEventListener('mouseup', mainPinHandler);\n };\n \n-mainPin.addEventListener('mouseup', mainPinHandler);\n-setAddress(getMainPinAddress());\n+resetButton.addEventListener('click', function (evt) {\n+  evt.preventDefault();\n+  resetForm();\n+  resetMap();\n+  initPage();\n+});\n+\n+/**\n+ * Установка параметров поля \"Цена за ночь\"\n+ * @param {number} minPrice\n+ */\n+var setPriceFieldParams = function (minPrice) {\n+  priceField.placeholder = minPrice;\n+  priceField.min = minPrice;\n+};\n+\n+typeField.addEventListener('change', function (evt) {\n+  setPriceFieldParams(MinPrices[evt.target.value]);\n+});\n+\n+/**\n+ * Установка параметра value указанного поля\n+ * @param {Node} field - ссылка на поле в котором нужно изменить значение атрибута value\n+ * @param {string} value - значение атрибута value\n+ */\n+var setTimeField = function (field, value) {\n+  field.value = value;\n+};\n+\n+checkInField.addEventListener('change', function (evt) {\n+  setTimeField(checkOutField, evt.target.value);\n+});\n+\n+checkOutField.addEventListener('change', function (evt) {\n+  setTimeField(checkInField, evt.target.value);\n+});\n+\n+\n+var setCapacity = function (roomsValue) {\n+  /**\n+   * @enum {Array.<string>} RoomsCapacity - соответствия количества гостей количеству комнат\n+   */\n+  var RoomsCapacity = {\n+    '1': ['1'],\n+    '2': ['1', '2'],\n+    '3': ['1', '2', '3'],\n+    '100': ['0']\n+  };\n+\n+  var capacityOptions = capacityField.options;\n+\n+  for (var i = 0; i < capacityOptions.length; i++) {\n+    capacityOptions[i].disabled = RoomsCapacity[roomsValue].indexOf(capacityOptions[i].value) !== -1 ? false : true;\n+    capacityOptions[i].selected = capacityOptions[i].disabled ? false : true;\n+  }\n+};\n+\n+roomsNumberField.addEventListener('change', function (evt) {\n+  setCapacity(evt.target.value);\n+});\n+\n+submitButton.addEventListener('click', function (evt) {","path":"js/map.js","position":204,"original_position":204,"commit_id":"ede597d42d9cd6cb2c7bd0d1e16cf71226ab13c1","original_commit_id":"ede597d42d9cd6cb2c7bd0d1e16cf71226ab13c1","user":{"login":"fyvfyv","id":3251438,"node_id":"MDQ6VXNlcjMyNTE0Mzg=","avatar_url":"https://avatars2.githubusercontent.com/u/3251438?v=4","gravatar_id":"","url":"https://api.github.com/users/fyvfyv","html_url":"https://github.com/fyvfyv","followers_url":"https://api.github.com/users/fyvfyv/followers","following_url":"https://api.github.com/users/fyvfyv/following{/other_user}","gists_url":"https://api.github.com/users/fyvfyv/gists{/gist_id}","starred_url":"https://api.github.com/users/fyvfyv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fyvfyv/subscriptions","organizations_url":"https://api.github.com/users/fyvfyv/orgs","repos_url":"https://api.github.com/users/fyvfyv/repos","events_url":"https://api.github.com/users/fyvfyv/events{/privacy}","received_events_url":"https://api.github.com/users/fyvfyv/received_events","type":"User","site_admin":false},"body":"А почему на клике висит, а не на сабмите?","created_at":"2018-06-16T08:59:49Z","updated_at":"2018-06-16T09:00:54Z","html_url":"https://github.com/htmlacademy-javascript/478669-keksobooking/pull/4#discussion_r195898493","pull_request_url":"https://api.github.com/repos/htmlacademy-javascript/478669-keksobooking/pulls/4","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/htmlacademy-javascript/478669-keksobooking/pulls/comments/195898493"},"html":{"href":"https://github.com/htmlacademy-javascript/478669-keksobooking/pull/4#discussion_r195898493"},"pull_request":{"href":"https://api.github.com/repos/htmlacademy-javascript/478669-keksobooking/pulls/4"}}},"pull_request":{"url":"https://api.github.com/repos/htmlacademy-javascript/478669-keksobooking/pulls/4","id":195089367,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk1MDg5MzY3","html_url":"https://github.com/htmlacademy-javascript/478669-keksobooking/pull/4","diff_url":"https://github.com/htmlacademy-javascript/478669-keksobooking/pull/4.diff","patch_url":"https://github.com/htmlacademy-javascript/478669-keksobooking/pull/4.patch","issue_url":"https://api.github.com/repos/htmlacademy-javascript/478669-keksobooking/issues/4","number":4,"state":"open","locked":false,"title":"Личный проект: доверяй, но проверяй","user":{"login":"quasko","id":5688555,"node_id":"MDQ6VXNlcjU2ODg1NTU=","avatar_url":"https://avatars3.githubusercontent.com/u/5688555?v=4","gravatar_id":"","url":"https://api.github.com/users/quasko","html_url":"https://github.com/quasko","followers_url":"https://api.github.com/users/quasko/followers","following_url":"https://api.github.com/users/quasko/following{/other_user}","gists_url":"https://api.github.com/users/quasko/gists{/gist_id}","starred_url":"https://api.github.com/users/quasko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/quasko/subscriptions","organizations_url":"https://api.github.com/users/quasko/orgs","repos_url":"https://api.github.com/users/quasko/repos","events_url":"https://api.github.com/users/quasko/events{/privacy}","received_events_url":"https://api.github.com/users/quasko/received_events","type":"User","site_admin":false},"body":"\n\n---\n:mortar_board: [Личный проект: доверяй, но проверяй](https://up.htmlacademy.ru/javascript/14/user/478669/tasks/16)\n\n:boom: https://htmlacademy-javascript.github.io/478669-keksobooking/4/","created_at":"2018-06-15T06:42:32Z","updated_at":"2018-06-16T09:00:54Z","closed_at":null,"merged_at":null,"merge_commit_sha":"27fbe74b5d66eaabdab0a45310a4648efe874163","assignee":{"login":"fyvfyv","id":3251438,"node_id":"MDQ6VXNlcjMyNTE0Mzg=","avatar_url":"https://avatars2.githubusercontent.com/u/3251438?v=4","gravatar_id":"","url":"https://api.github.com/users/fyvfyv","html_url":"https://github.com/fyvfyv","followers_url":"https://api.github.com/users/fyvfyv/followers","following_url":"https://api.github.com/users/fyvfyv/following{/other_user}","gists_url":"https://api.github.com/users/fyvfyv/gists{/gist_id}","starred_url":"https://api.github.com/users/fyvfyv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fyvfyv/subscriptions","organizations_url":"https://api.github.com/users/fyvfyv/orgs","repos_url":"https://api.github.com/users/fyvfyv/repos","events_url":"https://api.github.com/users/fyvfyv/events{/privacy}","received_events_url":"https://api.github.com/users/fyvfyv/received_events","type":"User","site_admin":false},"assignees":[{"login":"fyvfyv","id":3251438,"node_id":"MDQ6VXNlcjMyNTE0Mzg=","avatar_url":"https://avatars2.githubusercontent.com/u/3251438?v=4","gravatar_id":"","url":"https://api.github.com/users/fyvfyv","html_url":"https://github.com/fyvfyv","followers_url":"https://api.github.com/users/fyvfyv/followers","following_url":"https://api.github.com/users/fyvfyv/following{/other_user}","gists_url":"https://api.github.com/users/fyvfyv/gists{/gist_id}","starred_url":"https://api.github.com/users/fyvfyv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fyvfyv/subscriptions","organizations_url":"https://api.github.com/users/fyvfyv/orgs","repos_url":"https://api.github.com/users/fyvfyv/repos","events_url":"https://api.github.com/users/fyvfyv/events{/privacy}","received_events_url":"https://api.github.com/users/fyvfyv/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/htmlacademy-javascript/478669-keksobooking/pulls/4/commits","review_comments_url":"https://api.github.com/repos/htmlacademy-javascript/478669-keksobooking/pulls/4/comments","review_comment_url":"https://api.github.com/repos/htmlacademy-javascript/478669-keksobooking/pulls/comments{/number}","comments_url":"https://api.github.com/repos/htmlacademy-javascript/478669-keksobooking/issues/4/comments","statuses_url":"https://api.github.com/repos/htmlacademy-javascript/478669-keksobooking/statuses/ede597d42d9cd6cb2c7bd0d1e16cf71226ab13c1","head":{"label":"quasko:module4-task2","ref":"module4-task2","sha":"ede597d42d9cd6cb2c7bd0d1e16cf71226ab13c1","user":{"login":"quasko","id":5688555,"node_id":"MDQ6VXNlcjU2ODg1NTU=","avatar_url":"https://avatars3.githubusercontent.com/u/5688555?v=4","gravatar_id":"","url":"https://api.github.com/users/quasko","html_url":"https://github.com/quasko","followers_url":"https://api.github.com/users/quasko/followers","following_url":"https://api.github.com/users/quasko/following{/other_user}","gists_url":"https://api.github.com/users/quasko/gists{/gist_id}","starred_url":"https://api.github.com/users/quasko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/quasko/subscriptions","organizations_url":"https://api.github.com/users/quasko/orgs","repos_url":"https://api.github.com/users/quasko/repos","events_url":"https://api.github.com/users/quasko/events{/privacy}","received_events_url":"https://api.github.com/users/quasko/received_events","type":"User","site_admin":false},"repo":{"id":135341056,"node_id":"MDEwOlJlcG9zaXRvcnkxMzUzNDEwNTY=","name":"478669-keksobooking","full_name":"quasko/478669-keksobooking","owner":{"login":"quasko","id":5688555,"node_id":"MDQ6VXNlcjU2ODg1NTU=","avatar_url":"https://avatars3.githubusercontent.com/u/5688555?v=4","gravatar_id":"","url":"https://api.github.com/users/quasko","html_url":"https://github.com/quasko","followers_url":"https://api.github.com/users/quasko/followers","following_url":"https://api.github.com/users/quasko/following{/other_user}","gists_url":"https://api.github.com/users/quasko/gists{/gist_id}","starred_url":"https://api.github.com/users/quasko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/quasko/subscriptions","organizations_url":"https://api.github.com/users/quasko/orgs","repos_url":"https://api.github.com/users/quasko/repos","events_url":"https://api.github.com/users/quasko/events{/privacy}","received_events_url":"https://api.github.com/users/quasko/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/quasko/478669-keksobooking","description":"Денис Пуховский","fork":true,"url":"https://api.github.com/repos/quasko/478669-keksobooking","forks_url":"https://api.github.com/repos/quasko/478669-keksobooking/forks","keys_url":"https://api.github.com/repos/quasko/478669-keksobooking/keys{/key_id}","collaborators_url":"https://api.github.com/repos/quasko/478669-keksobooking/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/quasko/478669-keksobooking/teams","hooks_url":"https://api.github.com/repos/quasko/478669-keksobooking/hooks","issue_events_url":"https://api.github.com/repos/quasko/478669-keksobooking/issues/events{/number}","events_url":"https://api.github.com/repos/quasko/478669-keksobooking/events","assignees_url":"https://api.github.com/repos/quasko/478669-keksobooking/assignees{/user}","branches_url":"https://api.github.com/repos/quasko/478669-keksobooking/branches{/branch}","tags_url":"https://api.github.com/repos/quasko/478669-keksobooking/tags","blobs_url":"https://api.github.com/repos/quasko/478669-keksobooking/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/quasko/478669-keksobooking/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/quasko/478669-keksobooking/git/refs{/sha}","trees_url":"https://api.github.com/repos/quasko/478669-keksobooking/git/trees{/sha}","statuses_url":"https://api.github.com/repos/quasko/478669-keksobooking/statuses/{sha}","languages_url":"https://api.github.com/repos/quasko/478669-keksobooking/languages","stargazers_url":"https://api.github.com/repos/quasko/478669-keksobooking/stargazers","contributors_url":"https://api.github.com/repos/quasko/478669-keksobooking/contributors","subscribers_url":"https://api.github.com/repos/quasko/478669-keksobooking/subscribers","subscription_url":"https://api.github.com/repos/quasko/478669-keksobooking/subscription","commits_url":"https://api.github.com/repos/quasko/478669-keksobooking/commits{/sha}","git_commits_url":"https://api.github.com/repos/quasko/478669-keksobooking/git/commits{/sha}","comments_url":"https://api.github.com/repos/quasko/478669-keksobooking/comments{/number}","issue_comment_url":"https://api.github.com/repos/quasko/478669-keksobooking/issues/comments{/number}","contents_url":"https://api.github.com/repos/quasko/478669-keksobooking/contents/{+path}","compare_url":"https://api.github.com/repos/quasko/478669-keksobooking/compare/{base}...{head}","merges_url":"https://api.github.com/repos/quasko/478669-keksobooking/merges","archive_url":"https://api.github.com/repos/quasko/478669-keksobooking/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/quasko/478669-keksobooking/downloads","issues_url":"https://api.github.com/repos/quasko/478669-keksobooking/issues{/number}","pulls_url":"https://api.github.com/repos/quasko/478669-keksobooking/pulls{/number}","milestones_url":"https://api.github.com/repos/quasko/478669-keksobooking/milestones{/number}","notifications_url":"https://api.github.com/repos/quasko/478669-keksobooking/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/quasko/478669-keksobooking/labels{/name}","releases_url":"https://api.github.com/repos/quasko/478669-keksobooking/releases{/id}","deployments_url":"https://api.github.com/repos/quasko/478669-keksobooking/deployments","created_at":"2018-05-29T19:04:47Z","updated_at":"2018-06-14T20:30:59Z","pushed_at":"2018-06-15T22:13:10Z","git_url":"git://github.com/quasko/478669-keksobooking.git","ssh_url":"git@github.com:quasko/478669-keksobooking.git","clone_url":"https://github.com/quasko/478669-keksobooking.git","svn_url":"https://github.com/quasko/478669-keksobooking","homepage":null,"size":922,"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":"54c64dbc9f19f4a6c39a840c7f421df64d6dfece","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":135339886,"node_id":"MDEwOlJlcG9zaXRvcnkxMzUzMzk4ODY=","name":"478669-keksobooking","full_name":"htmlacademy-javascript/478669-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/478669-keksobooking","description":"Денис Пуховский","fork":false,"url":"https://api.github.com/repos/htmlacademy-javascript/478669-keksobooking","forks_url":"https://api.github.com/repos/htmlacademy-javascript/478669-keksobooking/forks","keys_url":"https://api.github.com/repos/htmlacademy-javascript/478669-keksobooking/keys{/key_id}","collaborators_url":"https://api.github.com/repos/htmlacademy-javascript/478669-keksobooking/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/htmlacademy-javascript/478669-keksobooking/teams","hooks_url":"https://api.github.com/repos/htmlacademy-javascript/478669-keksobooking/hooks","issue_events_url":"https://api.github.com/repos/htmlacademy-javascript/478669-keksobooking/issues/events{/number}","events_url":"https://api.github.com/repos/htmlacademy-javascript/478669-keksobooking/events","assignees_url":"https://api.github.com/repos/htmlacademy-javascript/478669-keksobooking/assignees{/user}","branches_url":"https://api.github.com/repos/htmlacademy-javascript/478669-keksobooking/branches{/branch}","tags_url":"https://api.github.com/repos/htmlacademy-javascript/478669-keksobooking/tags","blobs_url":"https://api.github.com/repos/htmlacademy-javascript/478669-keksobooking/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/htmlacademy-javascript/478669-keksobooking/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/htmlacademy-javascript/478669-keksobooking/git/refs{/sha}","trees_url":"https://api.github.com/repos/htmlacademy-javascript/478669-keksobooking/git/trees{/sha}","statuses_url":"https://api.github.com/repos/htmlacademy-javascript/478669-keksobooking/statuses/{sha}","languages_url":"https://api.github.com/repos/htmlacademy-javascript/478669-keksobooking/languages","stargazers_url":"https://api.github.com/repos/htmlacademy-javascript/478669-keksobooking/stargazers","contributors_url":"https://api.github.com/repos/htmlacademy-javascript/478669-keksobooking/contributors","subscribers_url":"https://api.github.com/repos/htmlacademy-javascript/478669-keksobooking/subscribers","subscription_url":"https://api.github.com/repos/htmlacademy-javascript/478669-keksobooking/subscription","commits_url":"https://api.github.com/repos/htmlacademy-javascript/478669-keksobooking/commits{/sha}","git_commits_url":"https://api.github.com/repos/htmlacademy-javascript/478669-keksobooking/git/commits{/sha}","comments_url":"https://api.github.com/repos/htmlacademy-javascript/478669-keksobooking/comments{/number}","issue_comment_url":"https://api.github.com/repos/htmlacademy-javascript/478669-keksobooking/issues/comments{/number}","contents_url":"https://api.github.com/repos/htmlacademy-javascript/478669-keksobooking/contents/{+path}","compare_url":"https://api.github.com/repos/htmlacademy-javascript/478669-keksobooking/compare/{base}...{head}","merges_url":"https://api.github.com/repos/htmlacademy-javascript/478669-keksobooking/merges","archive_url":"https://api.github.com/repos/htmlacademy-javascript/478669-keksobooking/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/htmlacademy-javascript/478669-keksobooking/downloads","issues_url":"https://api.github.com/repos/htmlacademy-javascript/478669-keksobooking/issues{/number}","pulls_url":"https://api.github.com/repos/htmlacademy-javascript/478669-keksobooking/pulls{/number}","milestones_url":"https://api.github.com/repos/htmlacademy-javascript/478669-keksobooking/milestones{/number}","notifications_url":"https://api.github.com/repos/htmlacademy-javascript/478669-keksobooking/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/htmlacademy-javascript/478669-keksobooking/labels{/name}","releases_url":"https://api.github.com/repos/htmlacademy-javascript/478669-keksobooking/releases{/id}","deployments_url":"https://api.github.com/repos/htmlacademy-javascript/478669-keksobooking/deployments","created_at":"2018-05-29T18:53:34Z","updated_at":"2018-06-14T17:37:11Z","pushed_at":"2018-06-15T22:13:56Z","git_url":"git://github.com/htmlacademy-javascript/478669-keksobooking.git","ssh_url":"git@github.com:htmlacademy-javascript/478669-keksobooking.git","clone_url":"https://github.com/htmlacademy-javascript/478669-keksobooking.git","svn_url":"https://github.com/htmlacademy-javascript/478669-keksobooking","homepage":"https://github.com/quasko/478669-keksobooking","size":982,"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":2,"mirror_url":null,"archived":false,"open_issues_count":1,"license":null,"forks":2,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/htmlacademy-javascript/478669-keksobooking/pulls/4"},"html":{"href":"https://github.com/htmlacademy-javascript/478669-keksobooking/pull/4"},"issue":{"href":"https://api.github.com/repos/htmlacademy-javascript/478669-keksobooking/issues/4"},"comments":{"href":"https://api.github.com/repos/htmlacademy-javascript/478669-keksobooking/issues/4/comments"},"review_comments":{"href":"https://api.github.com/repos/htmlacademy-javascript/478669-keksobooking/pulls/4/comments"},"review_comment":{"href":"https://api.github.com/repos/htmlacademy-javascript/478669-keksobooking/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/htmlacademy-javascript/478669-keksobooking/pulls/4/commits"},"statuses":{"href":"https://api.github.com/repos/htmlacademy-javascript/478669-keksobooking/statuses/ede597d42d9cd6cb2c7bd0d1e16cf71226ab13c1"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"fyvfyv"}}