{"action":"created","comment":{"url":"https://api.github.com/repos/Karspexet/Karspexet/pulls/comments/120757251","pull_request_review_id":42748112,"id":120757251,"diff_hunk":"@@ -0,0 +1,99 @@\n+function setupSelectSeats(allSeats, takenSeats, pricings) {\n+    var seats = document.querySelectorAll('.seat'),\n+        booking = {};\n+\n+    function selectSeat(event) {\n+        var seat = event.target.id;\n+        if (booking.hasOwnProperty(seat)) {\n+            removeSeat(seat);\n+        } else {\n+            addSeat(seat);\n+        }\n+    }\n+\n+    function addSeat(seat) {\n+        var seatId = seat.replace(\"seat-\", \"\");\n+        booking[seat] = {id: seatId, value: null};\n+        document.querySelector('#' + seat).classList.add('selected-seat');\n+        renderBooking();\n+    }\n+\n+    function removeSeat(seat) {\n+        var seatId = seat.replace(\"seat-\", \"\");\n+        delete booking[seat];\n+        document.querySelector('#' + seat).classList.remove('selected-seat');\n+        renderBooking();\n+    }\n+\n+    function selectSeatType(event) {\n+        var target = event.target,\n+            seatId = target.dataset.id,\n+            seatType = target.value;\n+        seatKey = \"seat-\" + seatId;\n+\n+        booking[seatKey].value = seatType;\n+        renderBooking();\n+    }\n+\n+    function renderBooking() {\n+        output = \"\";\n+        Object.keys(booking).forEach(function(seatId) {\n+            output += renderSeatForm(booking[seatId]);\n+        });\n+\n+        document.querySelector('#booking').innerHTML = output;\n+        document.querySelectorAll('#booking select').forEach(function (select) {","path":"static/select_seats.js","position":45,"original_position":45,"commit_id":"25c3aa569d66f73492ece78762774e8a01b922f9","original_commit_id":"25c3aa569d66f73492ece78762774e8a01b922f9","user":{"login":"Frost","id":2308,"avatar_url":"https://avatars3.githubusercontent.com/u/2308?v=3","gravatar_id":"","url":"https://api.github.com/users/Frost","html_url":"https://github.com/Frost","followers_url":"https://api.github.com/users/Frost/followers","following_url":"https://api.github.com/users/Frost/following{/other_user}","gists_url":"https://api.github.com/users/Frost/gists{/gist_id}","starred_url":"https://api.github.com/users/Frost/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Frost/subscriptions","organizations_url":"https://api.github.com/users/Frost/orgs","repos_url":"https://api.github.com/users/Frost/repos","events_url":"https://api.github.com/users/Frost/events{/privacy}","received_events_url":"https://api.github.com/users/Frost/received_events","type":"User","site_admin":false},"body":"This does work in Firefox at least.","created_at":"2017-06-07T22:06:36Z","updated_at":"2017-06-07T22:06:36Z","html_url":"https://github.com/Karspexet/Karspexet/pull/32#discussion_r120757251","pull_request_url":"https://api.github.com/repos/Karspexet/Karspexet/pulls/32","_links":{"self":{"href":"https://api.github.com/repos/Karspexet/Karspexet/pulls/comments/120757251"},"html":{"href":"https://github.com/Karspexet/Karspexet/pull/32#discussion_r120757251"},"pull_request":{"href":"https://api.github.com/repos/Karspexet/Karspexet/pulls/32"}}},"pull_request":{"url":"https://api.github.com/repos/Karspexet/Karspexet/pulls/32","id":124237331,"html_url":"https://github.com/Karspexet/Karspexet/pull/32","diff_url":"https://github.com/Karspexet/Karspexet/pull/32.diff","patch_url":"https://github.com/Karspexet/Karspexet/pull/32.patch","issue_url":"https://api.github.com/repos/Karspexet/Karspexet/issues/32","number":32,"state":"open","locked":false,"title":"Working seat selection in SVG with extra seat info on hover","user":{"login":"Frost","id":2308,"avatar_url":"https://avatars3.githubusercontent.com/u/2308?v=3","gravatar_id":"","url":"https://api.github.com/users/Frost","html_url":"https://github.com/Frost","followers_url":"https://api.github.com/users/Frost/followers","following_url":"https://api.github.com/users/Frost/following{/other_user}","gists_url":"https://api.github.com/users/Frost/gists{/gist_id}","starred_url":"https://api.github.com/users/Frost/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Frost/subscriptions","organizations_url":"https://api.github.com/users/Frost/orgs","repos_url":"https://api.github.com/users/Frost/repos","events_url":"https://api.github.com/users/Frost/events{/privacy}","received_events_url":"https://api.github.com/users/Frost/received_events","type":"User","site_admin":false},"body":"* Add django-inline-svg dependency\n  This will be used to inline svg images into the template, so that they can be\n  styled using css and interacted with using js.\n\n* Use inline SVG image for main logo\n  This means the ticket page no longer depends on any bitmaps which means that\n  it's super tiny in siz.\n\n**Working seat selection in SVG with extra seat info on hover**\n* Added slimmed down version of testteater\n* Add basic \"select seats by clicking in SVG\" functionality\n* Limit the size of the seat map somewhat\n* Display proper seat names and pricing when selecting\n* Display ticket types and individual prices on payment page\n* Separate select_seats.js file\n\nThis uses a hard-coded sample svg for the venue. Such files should probably be\nstored in a text field in the `venue` table in the database instead.","created_at":"2017-06-06T16:45:08Z","updated_at":"2017-06-07T22:06:36Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e235b2c804d2fdb53fbee2741f017c90c6006a9f","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/Karspexet/Karspexet/pulls/32/commits","review_comments_url":"https://api.github.com/repos/Karspexet/Karspexet/pulls/32/comments","review_comment_url":"https://api.github.com/repos/Karspexet/Karspexet/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Karspexet/Karspexet/issues/32/comments","statuses_url":"https://api.github.com/repos/Karspexet/Karspexet/statuses/25c3aa569d66f73492ece78762774e8a01b922f9","head":{"label":"Karspexet:select-seats-svg","ref":"select-seats-svg","sha":"25c3aa569d66f73492ece78762774e8a01b922f9","user":{"login":"Karspexet","id":9592680,"avatar_url":"https://avatars0.githubusercontent.com/u/9592680?v=3","gravatar_id":"","url":"https://api.github.com/users/Karspexet","html_url":"https://github.com/Karspexet","followers_url":"https://api.github.com/users/Karspexet/followers","following_url":"https://api.github.com/users/Karspexet/following{/other_user}","gists_url":"https://api.github.com/users/Karspexet/gists{/gist_id}","starred_url":"https://api.github.com/users/Karspexet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Karspexet/subscriptions","organizations_url":"https://api.github.com/users/Karspexet/orgs","repos_url":"https://api.github.com/users/Karspexet/repos","events_url":"https://api.github.com/users/Karspexet/events{/privacy}","received_events_url":"https://api.github.com/users/Karspexet/received_events","type":"Organization","site_admin":false},"repo":{"id":50527505,"name":"Karspexet","full_name":"Karspexet/Karspexet","owner":{"login":"Karspexet","id":9592680,"avatar_url":"https://avatars0.githubusercontent.com/u/9592680?v=3","gravatar_id":"","url":"https://api.github.com/users/Karspexet","html_url":"https://github.com/Karspexet","followers_url":"https://api.github.com/users/Karspexet/followers","following_url":"https://api.github.com/users/Karspexet/following{/other_user}","gists_url":"https://api.github.com/users/Karspexet/gists{/gist_id}","starred_url":"https://api.github.com/users/Karspexet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Karspexet/subscriptions","organizations_url":"https://api.github.com/users/Karspexet/orgs","repos_url":"https://api.github.com/users/Karspexet/repos","events_url":"https://api.github.com/users/Karspexet/events{/privacy}","received_events_url":"https://api.github.com/users/Karspexet/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Karspexet/Karspexet","description":"Kårspexets IT system","fork":false,"url":"https://api.github.com/repos/Karspexet/Karspexet","forks_url":"https://api.github.com/repos/Karspexet/Karspexet/forks","keys_url":"https://api.github.com/repos/Karspexet/Karspexet/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Karspexet/Karspexet/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Karspexet/Karspexet/teams","hooks_url":"https://api.github.com/repos/Karspexet/Karspexet/hooks","issue_events_url":"https://api.github.com/repos/Karspexet/Karspexet/issues/events{/number}","events_url":"https://api.github.com/repos/Karspexet/Karspexet/events","assignees_url":"https://api.github.com/repos/Karspexet/Karspexet/assignees{/user}","branches_url":"https://api.github.com/repos/Karspexet/Karspexet/branches{/branch}","tags_url":"https://api.github.com/repos/Karspexet/Karspexet/tags","blobs_url":"https://api.github.com/repos/Karspexet/Karspexet/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Karspexet/Karspexet/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Karspexet/Karspexet/git/refs{/sha}","trees_url":"https://api.github.com/repos/Karspexet/Karspexet/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Karspexet/Karspexet/statuses/{sha}","languages_url":"https://api.github.com/repos/Karspexet/Karspexet/languages","stargazers_url":"https://api.github.com/repos/Karspexet/Karspexet/stargazers","contributors_url":"https://api.github.com/repos/Karspexet/Karspexet/contributors","subscribers_url":"https://api.github.com/repos/Karspexet/Karspexet/subscribers","subscription_url":"https://api.github.com/repos/Karspexet/Karspexet/subscription","commits_url":"https://api.github.com/repos/Karspexet/Karspexet/commits{/sha}","git_commits_url":"https://api.github.com/repos/Karspexet/Karspexet/git/commits{/sha}","comments_url":"https://api.github.com/repos/Karspexet/Karspexet/comments{/number}","issue_comment_url":"https://api.github.com/repos/Karspexet/Karspexet/issues/comments{/number}","contents_url":"https://api.github.com/repos/Karspexet/Karspexet/contents/{+path}","compare_url":"https://api.github.com/repos/Karspexet/Karspexet/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Karspexet/Karspexet/merges","archive_url":"https://api.github.com/repos/Karspexet/Karspexet/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Karspexet/Karspexet/downloads","issues_url":"https://api.github.com/repos/Karspexet/Karspexet/issues{/number}","pulls_url":"https://api.github.com/repos/Karspexet/Karspexet/pulls{/number}","milestones_url":"https://api.github.com/repos/Karspexet/Karspexet/milestones{/number}","notifications_url":"https://api.github.com/repos/Karspexet/Karspexet/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Karspexet/Karspexet/labels{/name}","releases_url":"https://api.github.com/repos/Karspexet/Karspexet/releases{/id}","deployments_url":"https://api.github.com/repos/Karspexet/Karspexet/deployments","created_at":"2016-01-27T18:12:40Z","updated_at":"2016-01-27T23:13:34Z","pushed_at":"2017-06-07T17:59:23Z","git_url":"git://github.com/Karspexet/Karspexet.git","ssh_url":"git@github.com:Karspexet/Karspexet.git","clone_url":"https://github.com/Karspexet/Karspexet.git","svn_url":"https://github.com/Karspexet/Karspexet","homepage":"http://karspexet.se/","size":127,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":6,"forks":0,"open_issues":6,"watchers":0,"default_branch":"master"}},"base":{"label":"Karspexet:master","ref":"master","sha":"59ee9eba8cd2b4c7fe245fa6de7c2a0d1f02125c","user":{"login":"Karspexet","id":9592680,"avatar_url":"https://avatars0.githubusercontent.com/u/9592680?v=3","gravatar_id":"","url":"https://api.github.com/users/Karspexet","html_url":"https://github.com/Karspexet","followers_url":"https://api.github.com/users/Karspexet/followers","following_url":"https://api.github.com/users/Karspexet/following{/other_user}","gists_url":"https://api.github.com/users/Karspexet/gists{/gist_id}","starred_url":"https://api.github.com/users/Karspexet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Karspexet/subscriptions","organizations_url":"https://api.github.com/users/Karspexet/orgs","repos_url":"https://api.github.com/users/Karspexet/repos","events_url":"https://api.github.com/users/Karspexet/events{/privacy}","received_events_url":"https://api.github.com/users/Karspexet/received_events","type":"Organization","site_admin":false},"repo":{"id":50527505,"name":"Karspexet","full_name":"Karspexet/Karspexet","owner":{"login":"Karspexet","id":9592680,"avatar_url":"https://avatars0.githubusercontent.com/u/9592680?v=3","gravatar_id":"","url":"https://api.github.com/users/Karspexet","html_url":"https://github.com/Karspexet","followers_url":"https://api.github.com/users/Karspexet/followers","following_url":"https://api.github.com/users/Karspexet/following{/other_user}","gists_url":"https://api.github.com/users/Karspexet/gists{/gist_id}","starred_url":"https://api.github.com/users/Karspexet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Karspexet/subscriptions","organizations_url":"https://api.github.com/users/Karspexet/orgs","repos_url":"https://api.github.com/users/Karspexet/repos","events_url":"https://api.github.com/users/Karspexet/events{/privacy}","received_events_url":"https://api.github.com/users/Karspexet/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Karspexet/Karspexet","description":"Kårspexets IT system","fork":false,"url":"https://api.github.com/repos/Karspexet/Karspexet","forks_url":"https://api.github.com/repos/Karspexet/Karspexet/forks","keys_url":"https://api.github.com/repos/Karspexet/Karspexet/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Karspexet/Karspexet/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Karspexet/Karspexet/teams","hooks_url":"https://api.github.com/repos/Karspexet/Karspexet/hooks","issue_events_url":"https://api.github.com/repos/Karspexet/Karspexet/issues/events{/number}","events_url":"https://api.github.com/repos/Karspexet/Karspexet/events","assignees_url":"https://api.github.com/repos/Karspexet/Karspexet/assignees{/user}","branches_url":"https://api.github.com/repos/Karspexet/Karspexet/branches{/branch}","tags_url":"https://api.github.com/repos/Karspexet/Karspexet/tags","blobs_url":"https://api.github.com/repos/Karspexet/Karspexet/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Karspexet/Karspexet/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Karspexet/Karspexet/git/refs{/sha}","trees_url":"https://api.github.com/repos/Karspexet/Karspexet/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Karspexet/Karspexet/statuses/{sha}","languages_url":"https://api.github.com/repos/Karspexet/Karspexet/languages","stargazers_url":"https://api.github.com/repos/Karspexet/Karspexet/stargazers","contributors_url":"https://api.github.com/repos/Karspexet/Karspexet/contributors","subscribers_url":"https://api.github.com/repos/Karspexet/Karspexet/subscribers","subscription_url":"https://api.github.com/repos/Karspexet/Karspexet/subscription","commits_url":"https://api.github.com/repos/Karspexet/Karspexet/commits{/sha}","git_commits_url":"https://api.github.com/repos/Karspexet/Karspexet/git/commits{/sha}","comments_url":"https://api.github.com/repos/Karspexet/Karspexet/comments{/number}","issue_comment_url":"https://api.github.com/repos/Karspexet/Karspexet/issues/comments{/number}","contents_url":"https://api.github.com/repos/Karspexet/Karspexet/contents/{+path}","compare_url":"https://api.github.com/repos/Karspexet/Karspexet/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Karspexet/Karspexet/merges","archive_url":"https://api.github.com/repos/Karspexet/Karspexet/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Karspexet/Karspexet/downloads","issues_url":"https://api.github.com/repos/Karspexet/Karspexet/issues{/number}","pulls_url":"https://api.github.com/repos/Karspexet/Karspexet/pulls{/number}","milestones_url":"https://api.github.com/repos/Karspexet/Karspexet/milestones{/number}","notifications_url":"https://api.github.com/repos/Karspexet/Karspexet/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Karspexet/Karspexet/labels{/name}","releases_url":"https://api.github.com/repos/Karspexet/Karspexet/releases{/id}","deployments_url":"https://api.github.com/repos/Karspexet/Karspexet/deployments","created_at":"2016-01-27T18:12:40Z","updated_at":"2016-01-27T23:13:34Z","pushed_at":"2017-06-07T17:59:23Z","git_url":"git://github.com/Karspexet/Karspexet.git","ssh_url":"git@github.com:Karspexet/Karspexet.git","clone_url":"https://github.com/Karspexet/Karspexet.git","svn_url":"https://github.com/Karspexet/Karspexet","homepage":"http://karspexet.se/","size":127,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":6,"forks":0,"open_issues":6,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Karspexet/Karspexet/pulls/32"},"html":{"href":"https://github.com/Karspexet/Karspexet/pull/32"},"issue":{"href":"https://api.github.com/repos/Karspexet/Karspexet/issues/32"},"comments":{"href":"https://api.github.com/repos/Karspexet/Karspexet/issues/32/comments"},"review_comments":{"href":"https://api.github.com/repos/Karspexet/Karspexet/pulls/32/comments"},"review_comment":{"href":"https://api.github.com/repos/Karspexet/Karspexet/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Karspexet/Karspexet/pulls/32/commits"},"statuses":{"href":"https://api.github.com/repos/Karspexet/Karspexet/statuses/25c3aa569d66f73492ece78762774e8a01b922f9"}}}}
{"actor":{"display_login":"Frost"}}