{"action":"created","comment":{"url":"https://api.github.com/repos/interglobalvision/insearchofthetruth-net/pulls/comments/133482416","pull_request_review_id":56668324,"id":133482416,"diff_hunk":"@@ -355,4 +357,87 @@ Site.Portraits = {\n \n };\n \n+Site.Map = {\n+  options: {\n+    // TODO: Set coordinates\n+    center: {\n+      lat: -34.397,\n+      lng: 150.644\n+    },\n+    zoom: 2,\n+  },\n+  markers: [],\n+\n+  init: function() {\n+    var _this = this;\n+\n+    // Get grid element\n+    // TODO: find a way of not repeating this data here and in Site.Portraits\n+    _this.$grid = $('#portraits-grid');\n+\n+    // Get portraits\n+    // TODO: find a way of not repeating this data here and in Site.Portraits\n+    _this.$portraits = _this.$grid.find('.portrait');\n+\n+    // Get map container\n+    _this.$container = $('#portraits-map');\n+\n+    // Init google maps\n+    _this.map = new google.maps.Map(_this.$container[0], _this.options);\n+\n+    // Add a marker for each location\n+    if (WP.locations.length) {\n+      for(var i = 0; i < WP.locations.length; i++) {\n+        var location = WP.locations[i];\n+        // Add marker\n+        _this.markers[i] = new google.maps.Marker({\n+          map: _this.map,\n+          title: location.name,\n+          position: {\n+            lat: parseInt(location.lat),\n+            lng: parseInt(location.lng),\n+          }\n+        });\n+\n+        // Add slug to the marker\n+        _this.markers[i].slug = location.slug;\n+\n+        // Add click listener\n+        _this.markers[i].addListener('click', function() {\n+          _this.playPortraitsByLocation(this.slug);\n+        });\n+      }\n+    }\n+\n+  },\n+\n+  // Play portraits by location\n+  playPortraitsByLocation: function(location) {\n+    var _this = this;\n+\n+    // Empty list for youtube IDs\n+    var list = [];\n+\n+    // Filter selector string\n+    var filter = '[data-filters*=location-' + location + ']';\n+\n+    // Filter portraits\n+    var $filteredPortraits = _this.$portraits.filter(filter);\n+\n+    // Save youtube IDs\n+    $filteredPortraits.each(function(index) {\n+      list[index] = this.dataset.youtubeId;\n+    });\n+\n+    // Load list\n+    Site.Player.setVideosList(list);\n+\n+    // Play first video\n+    Site.Player.playVideo(list[0]);\n+\n+    // TODO: Scroll to player","path":"src/js/main.js","position":97,"original_position":97,"commit_id":"b73abc9b02e41256275dabeb1f1b3012fa2df30a","original_commit_id":"b73abc9b02e41256275dabeb1f1b3012fa2df30a","user":{"login":"varffs","id":845186,"avatar_url":"https://avatars2.githubusercontent.com/u/845186?v=4","gravatar_id":"","url":"https://api.github.com/users/varffs","html_url":"https://github.com/varffs","followers_url":"https://api.github.com/users/varffs/followers","following_url":"https://api.github.com/users/varffs/following{/other_user}","gists_url":"https://api.github.com/users/varffs/gists{/gist_id}","starred_url":"https://api.github.com/users/varffs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/varffs/subscriptions","organizations_url":"https://api.github.com/users/varffs/orgs","repos_url":"https://api.github.com/users/varffs/repos","events_url":"https://api.github.com/users/varffs/events{/privacy}","received_events_url":"https://api.github.com/users/varffs/received_events","type":"User","site_admin":false},"body":"Not suggesting to remove the code comments, just that perhaps we could track them or note them somewhere else so they dont get forgotten. Anyhow the scrollto function isn't styling but a clear feature after styling feature is done","created_at":"2017-08-16T15:23:00Z","updated_at":"2017-08-16T15:23:01Z","html_url":"https://github.com/interglobalvision/insearchofthetruth-net/pull/18#discussion_r133482416","pull_request_url":"https://api.github.com/repos/interglobalvision/insearchofthetruth-net/pulls/18","_links":{"self":{"href":"https://api.github.com/repos/interglobalvision/insearchofthetruth-net/pulls/comments/133482416"},"html":{"href":"https://github.com/interglobalvision/insearchofthetruth-net/pull/18#discussion_r133482416"},"pull_request":{"href":"https://api.github.com/repos/interglobalvision/insearchofthetruth-net/pulls/18"}}},"pull_request":{"url":"https://api.github.com/repos/interglobalvision/insearchofthetruth-net/pulls/18","id":135912057,"html_url":"https://github.com/interglobalvision/insearchofthetruth-net/pull/18","diff_url":"https://github.com/interglobalvision/insearchofthetruth-net/pull/18.diff","patch_url":"https://github.com/interglobalvision/insearchofthetruth-net/pull/18.patch","issue_url":"https://api.github.com/repos/interglobalvision/insearchofthetruth-net/issues/18","number":18,"state":"open","locked":false,"title":"Feat map","user":{"login":"mixcas","id":1994425,"avatar_url":"https://avatars0.githubusercontent.com/u/1994425?v=4","gravatar_id":"","url":"https://api.github.com/users/mixcas","html_url":"https://github.com/mixcas","followers_url":"https://api.github.com/users/mixcas/followers","following_url":"https://api.github.com/users/mixcas/following{/other_user}","gists_url":"https://api.github.com/users/mixcas/gists{/gist_id}","starred_url":"https://api.github.com/users/mixcas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mixcas/subscriptions","organizations_url":"https://api.github.com/users/mixcas/orgs","repos_url":"https://api.github.com/users/mixcas/repos","events_url":"https://api.github.com/users/mixcas/events{/privacy}","received_events_url":"https://api.github.com/users/mixcas/received_events","type":"User","site_admin":false},"body":"Enqueues Google Maps API\r\nInits the map and add markers\r\nPlay location videos when a marker is clicked","created_at":"2017-08-15T23:19:09Z","updated_at":"2017-08-16T15:23:01Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ab6f5d5b7ae1baaadcb59190d12fb2c73978fc4d","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/interglobalvision/insearchofthetruth-net/pulls/18/commits","review_comments_url":"https://api.github.com/repos/interglobalvision/insearchofthetruth-net/pulls/18/comments","review_comment_url":"https://api.github.com/repos/interglobalvision/insearchofthetruth-net/pulls/comments{/number}","comments_url":"https://api.github.com/repos/interglobalvision/insearchofthetruth-net/issues/18/comments","statuses_url":"https://api.github.com/repos/interglobalvision/insearchofthetruth-net/statuses/b73abc9b02e41256275dabeb1f1b3012fa2df30a","head":{"label":"interglobalvision:feat-map","ref":"feat-map","sha":"b73abc9b02e41256275dabeb1f1b3012fa2df30a","user":{"login":"interglobalvision","id":6844994,"avatar_url":"https://avatars1.githubusercontent.com/u/6844994?v=4","gravatar_id":"","url":"https://api.github.com/users/interglobalvision","html_url":"https://github.com/interglobalvision","followers_url":"https://api.github.com/users/interglobalvision/followers","following_url":"https://api.github.com/users/interglobalvision/following{/other_user}","gists_url":"https://api.github.com/users/interglobalvision/gists{/gist_id}","starred_url":"https://api.github.com/users/interglobalvision/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/interglobalvision/subscriptions","organizations_url":"https://api.github.com/users/interglobalvision/orgs","repos_url":"https://api.github.com/users/interglobalvision/repos","events_url":"https://api.github.com/users/interglobalvision/events{/privacy}","received_events_url":"https://api.github.com/users/interglobalvision/received_events","type":"Organization","site_admin":false},"repo":{"id":98676388,"name":"insearchofthetruth-net","full_name":"interglobalvision/insearchofthetruth-net","owner":{"login":"interglobalvision","id":6844994,"avatar_url":"https://avatars1.githubusercontent.com/u/6844994?v=4","gravatar_id":"","url":"https://api.github.com/users/interglobalvision","html_url":"https://github.com/interglobalvision","followers_url":"https://api.github.com/users/interglobalvision/followers","following_url":"https://api.github.com/users/interglobalvision/following{/other_user}","gists_url":"https://api.github.com/users/interglobalvision/gists{/gist_id}","starred_url":"https://api.github.com/users/interglobalvision/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/interglobalvision/subscriptions","organizations_url":"https://api.github.com/users/interglobalvision/orgs","repos_url":"https://api.github.com/users/interglobalvision/repos","events_url":"https://api.github.com/users/interglobalvision/events{/privacy}","received_events_url":"https://api.github.com/users/interglobalvision/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/interglobalvision/insearchofthetruth-net","description":null,"fork":false,"url":"https://api.github.com/repos/interglobalvision/insearchofthetruth-net","forks_url":"https://api.github.com/repos/interglobalvision/insearchofthetruth-net/forks","keys_url":"https://api.github.com/repos/interglobalvision/insearchofthetruth-net/keys{/key_id}","collaborators_url":"https://api.github.com/repos/interglobalvision/insearchofthetruth-net/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/interglobalvision/insearchofthetruth-net/teams","hooks_url":"https://api.github.com/repos/interglobalvision/insearchofthetruth-net/hooks","issue_events_url":"https://api.github.com/repos/interglobalvision/insearchofthetruth-net/issues/events{/number}","events_url":"https://api.github.com/repos/interglobalvision/insearchofthetruth-net/events","assignees_url":"https://api.github.com/repos/interglobalvision/insearchofthetruth-net/assignees{/user}","branches_url":"https://api.github.com/repos/interglobalvision/insearchofthetruth-net/branches{/branch}","tags_url":"https://api.github.com/repos/interglobalvision/insearchofthetruth-net/tags","blobs_url":"https://api.github.com/repos/interglobalvision/insearchofthetruth-net/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/interglobalvision/insearchofthetruth-net/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/interglobalvision/insearchofthetruth-net/git/refs{/sha}","trees_url":"https://api.github.com/repos/interglobalvision/insearchofthetruth-net/git/trees{/sha}","statuses_url":"https://api.github.com/repos/interglobalvision/insearchofthetruth-net/statuses/{sha}","languages_url":"https://api.github.com/repos/interglobalvision/insearchofthetruth-net/languages","stargazers_url":"https://api.github.com/repos/interglobalvision/insearchofthetruth-net/stargazers","contributors_url":"https://api.github.com/repos/interglobalvision/insearchofthetruth-net/contributors","subscribers_url":"https://api.github.com/repos/interglobalvision/insearchofthetruth-net/subscribers","subscription_url":"https://api.github.com/repos/interglobalvision/insearchofthetruth-net/subscription","commits_url":"https://api.github.com/repos/interglobalvision/insearchofthetruth-net/commits{/sha}","git_commits_url":"https://api.github.com/repos/interglobalvision/insearchofthetruth-net/git/commits{/sha}","comments_url":"https://api.github.com/repos/interglobalvision/insearchofthetruth-net/comments{/number}","issue_comment_url":"https://api.github.com/repos/interglobalvision/insearchofthetruth-net/issues/comments{/number}","contents_url":"https://api.github.com/repos/interglobalvision/insearchofthetruth-net/contents/{+path}","compare_url":"https://api.github.com/repos/interglobalvision/insearchofthetruth-net/compare/{base}...{head}","merges_url":"https://api.github.com/repos/interglobalvision/insearchofthetruth-net/merges","archive_url":"https://api.github.com/repos/interglobalvision/insearchofthetruth-net/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/interglobalvision/insearchofthetruth-net/downloads","issues_url":"https://api.github.com/repos/interglobalvision/insearchofthetruth-net/issues{/number}","pulls_url":"https://api.github.com/repos/interglobalvision/insearchofthetruth-net/pulls{/number}","milestones_url":"https://api.github.com/repos/interglobalvision/insearchofthetruth-net/milestones{/number}","notifications_url":"https://api.github.com/repos/interglobalvision/insearchofthetruth-net/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/interglobalvision/insearchofthetruth-net/labels{/name}","releases_url":"https://api.github.com/repos/interglobalvision/insearchofthetruth-net/releases{/id}","deployments_url":"https://api.github.com/repos/interglobalvision/insearchofthetruth-net/deployments","created_at":"2017-07-28T18:24:41Z","updated_at":"2017-07-28T18:42:33Z","pushed_at":"2017-08-15T23:19:09Z","git_url":"git://github.com/interglobalvision/insearchofthetruth-net.git","ssh_url":"git@github.com:interglobalvision/insearchofthetruth-net.git","clone_url":"https://github.com/interglobalvision/insearchofthetruth-net.git","svn_url":"https://github.com/interglobalvision/insearchofthetruth-net","homepage":null,"size":3934,"stargazers_count":0,"watchers_count":0,"language":"CSS","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"interglobalvision:master","ref":"master","sha":"6879df02db6f52e9622739f051e91f87706b08ec","user":{"login":"interglobalvision","id":6844994,"avatar_url":"https://avatars1.githubusercontent.com/u/6844994?v=4","gravatar_id":"","url":"https://api.github.com/users/interglobalvision","html_url":"https://github.com/interglobalvision","followers_url":"https://api.github.com/users/interglobalvision/followers","following_url":"https://api.github.com/users/interglobalvision/following{/other_user}","gists_url":"https://api.github.com/users/interglobalvision/gists{/gist_id}","starred_url":"https://api.github.com/users/interglobalvision/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/interglobalvision/subscriptions","organizations_url":"https://api.github.com/users/interglobalvision/orgs","repos_url":"https://api.github.com/users/interglobalvision/repos","events_url":"https://api.github.com/users/interglobalvision/events{/privacy}","received_events_url":"https://api.github.com/users/interglobalvision/received_events","type":"Organization","site_admin":false},"repo":{"id":98676388,"name":"insearchofthetruth-net","full_name":"interglobalvision/insearchofthetruth-net","owner":{"login":"interglobalvision","id":6844994,"avatar_url":"https://avatars1.githubusercontent.com/u/6844994?v=4","gravatar_id":"","url":"https://api.github.com/users/interglobalvision","html_url":"https://github.com/interglobalvision","followers_url":"https://api.github.com/users/interglobalvision/followers","following_url":"https://api.github.com/users/interglobalvision/following{/other_user}","gists_url":"https://api.github.com/users/interglobalvision/gists{/gist_id}","starred_url":"https://api.github.com/users/interglobalvision/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/interglobalvision/subscriptions","organizations_url":"https://api.github.com/users/interglobalvision/orgs","repos_url":"https://api.github.com/users/interglobalvision/repos","events_url":"https://api.github.com/users/interglobalvision/events{/privacy}","received_events_url":"https://api.github.com/users/interglobalvision/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/interglobalvision/insearchofthetruth-net","description":null,"fork":false,"url":"https://api.github.com/repos/interglobalvision/insearchofthetruth-net","forks_url":"https://api.github.com/repos/interglobalvision/insearchofthetruth-net/forks","keys_url":"https://api.github.com/repos/interglobalvision/insearchofthetruth-net/keys{/key_id}","collaborators_url":"https://api.github.com/repos/interglobalvision/insearchofthetruth-net/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/interglobalvision/insearchofthetruth-net/teams","hooks_url":"https://api.github.com/repos/interglobalvision/insearchofthetruth-net/hooks","issue_events_url":"https://api.github.com/repos/interglobalvision/insearchofthetruth-net/issues/events{/number}","events_url":"https://api.github.com/repos/interglobalvision/insearchofthetruth-net/events","assignees_url":"https://api.github.com/repos/interglobalvision/insearchofthetruth-net/assignees{/user}","branches_url":"https://api.github.com/repos/interglobalvision/insearchofthetruth-net/branches{/branch}","tags_url":"https://api.github.com/repos/interglobalvision/insearchofthetruth-net/tags","blobs_url":"https://api.github.com/repos/interglobalvision/insearchofthetruth-net/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/interglobalvision/insearchofthetruth-net/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/interglobalvision/insearchofthetruth-net/git/refs{/sha}","trees_url":"https://api.github.com/repos/interglobalvision/insearchofthetruth-net/git/trees{/sha}","statuses_url":"https://api.github.com/repos/interglobalvision/insearchofthetruth-net/statuses/{sha}","languages_url":"https://api.github.com/repos/interglobalvision/insearchofthetruth-net/languages","stargazers_url":"https://api.github.com/repos/interglobalvision/insearchofthetruth-net/stargazers","contributors_url":"https://api.github.com/repos/interglobalvision/insearchofthetruth-net/contributors","subscribers_url":"https://api.github.com/repos/interglobalvision/insearchofthetruth-net/subscribers","subscription_url":"https://api.github.com/repos/interglobalvision/insearchofthetruth-net/subscription","commits_url":"https://api.github.com/repos/interglobalvision/insearchofthetruth-net/commits{/sha}","git_commits_url":"https://api.github.com/repos/interglobalvision/insearchofthetruth-net/git/commits{/sha}","comments_url":"https://api.github.com/repos/interglobalvision/insearchofthetruth-net/comments{/number}","issue_comment_url":"https://api.github.com/repos/interglobalvision/insearchofthetruth-net/issues/comments{/number}","contents_url":"https://api.github.com/repos/interglobalvision/insearchofthetruth-net/contents/{+path}","compare_url":"https://api.github.com/repos/interglobalvision/insearchofthetruth-net/compare/{base}...{head}","merges_url":"https://api.github.com/repos/interglobalvision/insearchofthetruth-net/merges","archive_url":"https://api.github.com/repos/interglobalvision/insearchofthetruth-net/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/interglobalvision/insearchofthetruth-net/downloads","issues_url":"https://api.github.com/repos/interglobalvision/insearchofthetruth-net/issues{/number}","pulls_url":"https://api.github.com/repos/interglobalvision/insearchofthetruth-net/pulls{/number}","milestones_url":"https://api.github.com/repos/interglobalvision/insearchofthetruth-net/milestones{/number}","notifications_url":"https://api.github.com/repos/interglobalvision/insearchofthetruth-net/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/interglobalvision/insearchofthetruth-net/labels{/name}","releases_url":"https://api.github.com/repos/interglobalvision/insearchofthetruth-net/releases{/id}","deployments_url":"https://api.github.com/repos/interglobalvision/insearchofthetruth-net/deployments","created_at":"2017-07-28T18:24:41Z","updated_at":"2017-07-28T18:42:33Z","pushed_at":"2017-08-15T23:19:09Z","git_url":"git://github.com/interglobalvision/insearchofthetruth-net.git","ssh_url":"git@github.com:interglobalvision/insearchofthetruth-net.git","clone_url":"https://github.com/interglobalvision/insearchofthetruth-net.git","svn_url":"https://github.com/interglobalvision/insearchofthetruth-net","homepage":null,"size":3934,"stargazers_count":0,"watchers_count":0,"language":"CSS","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/interglobalvision/insearchofthetruth-net/pulls/18"},"html":{"href":"https://github.com/interglobalvision/insearchofthetruth-net/pull/18"},"issue":{"href":"https://api.github.com/repos/interglobalvision/insearchofthetruth-net/issues/18"},"comments":{"href":"https://api.github.com/repos/interglobalvision/insearchofthetruth-net/issues/18/comments"},"review_comments":{"href":"https://api.github.com/repos/interglobalvision/insearchofthetruth-net/pulls/18/comments"},"review_comment":{"href":"https://api.github.com/repos/interglobalvision/insearchofthetruth-net/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/interglobalvision/insearchofthetruth-net/pulls/18/commits"},"statuses":{"href":"https://api.github.com/repos/interglobalvision/insearchofthetruth-net/statuses/b73abc9b02e41256275dabeb1f1b3012fa2df30a"}}}}
{"actor":{"display_login":"varffs"}}