{"action":"created","comment":{"url":"https://api.github.com/repos/fsi-open/form-extensions-bundle/pulls/comments/32720585","id":32720585,"diff_hunk":"@@ -0,0 +1,113 @@\n+define(['jquery', 'google-maps'], function($, googleMaps) {\n+\n+    $.fn.fsiMap = function(options) {\n+\n+        options = $.extend({\n+            latitudeSelector: '.latitude-field',\n+            longitudeSelector: '.longitude-field',\n+            zoomSelector: '.zoom-field',\n+            mapWrapperSelector: '.map-location__map',\n+            initializedClass: 'map-location--initialized',\n+            defaultLatitude: 52,\n+            defaultLongitude: 20,\n+            zoom: 6\n+        }, options);\n+\n+        this.each(function() {\n+            var $el = $(this),\n+                latitudeField = $el.find(options.latitudeSelector),\n+                longitudeField = $el.find(options.longitudeSelector),\n+                zoomField = $el.find(options.zoomSelector),\n+                mapWrapper = $el.find(options.mapWrapperSelector),\n+                location,\n+                defaultLocation,\n+                latitude,\n+                longitude,\n+                map,\n+                marker;\n+\n+            if (!latitudeField.length || !longitudeField.length || !mapWrapper.length) {\n+                return;\n+            }\n+\n+            if (latitudeField.val() && longitudeField.val()) {\n+                location = {\n+                    lat: parseFloat(latitudeField.val().replace(',','.')),","path":"Resources/public/js/map.js","position":35,"original_position":35,"commit_id":"a5047ab41d942e61266823c0588cb38155cf6692","original_commit_id":"a5047ab41d942e61266823c0588cb38155cf6692","user":{"login":"rn0","id":15381,"avatar_url":"https://avatars.githubusercontent.com/u/15381?v=3","gravatar_id":"","url":"https://api.github.com/users/rn0","html_url":"https://github.com/rn0","followers_url":"https://api.github.com/users/rn0/followers","following_url":"https://api.github.com/users/rn0/following{/other_user}","gists_url":"https://api.github.com/users/rn0/gists{/gist_id}","starred_url":"https://api.github.com/users/rn0/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rn0/subscriptions","organizations_url":"https://api.github.com/users/rn0/orgs","repos_url":"https://api.github.com/users/rn0/repos","events_url":"https://api.github.com/users/rn0/events{/privacy}","received_events_url":"https://api.github.com/users/rn0/received_events","type":"User","site_admin":false},"body":"i would extract `parseFloat(value.replace(',','.'))` as \r\n\r\n```js\r\nfunction normalizeNumber(value)\r\n{\r\n     return parseFloat(value.val().replace(',','.'))\r\n}\r\n```","created_at":"2015-06-18T11:31:34Z","updated_at":"2015-06-18T11:31:34Z","html_url":"https://github.com/fsi-open/form-extensions-bundle/pull/21#discussion_r32720585","pull_request_url":"https://api.github.com/repos/fsi-open/form-extensions-bundle/pulls/21","_links":{"self":{"href":"https://api.github.com/repos/fsi-open/form-extensions-bundle/pulls/comments/32720585"},"html":{"href":"https://github.com/fsi-open/form-extensions-bundle/pull/21#discussion_r32720585"},"pull_request":{"href":"https://api.github.com/repos/fsi-open/form-extensions-bundle/pulls/21"}}},"pull_request":{"url":"https://api.github.com/repos/fsi-open/form-extensions-bundle/pulls/21","id":37554447,"html_url":"https://github.com/fsi-open/form-extensions-bundle/pull/21","diff_url":"https://github.com/fsi-open/form-extensions-bundle/pull/21.diff","patch_url":"https://github.com/fsi-open/form-extensions-bundle/pull/21.patch","issue_url":"https://api.github.com/repos/fsi-open/form-extensions-bundle/issues/21","number":21,"state":"open","locked":false,"title":"map form type","user":{"login":"JarekW","id":4487772,"avatar_url":"https://avatars.githubusercontent.com/u/4487772?v=3","gravatar_id":"","url":"https://api.github.com/users/JarekW","html_url":"https://github.com/JarekW","followers_url":"https://api.github.com/users/JarekW/followers","following_url":"https://api.github.com/users/JarekW/following{/other_user}","gists_url":"https://api.github.com/users/JarekW/gists{/gist_id}","starred_url":"https://api.github.com/users/JarekW/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JarekW/subscriptions","organizations_url":"https://api.github.com/users/JarekW/orgs","repos_url":"https://api.github.com/users/JarekW/repos","events_url":"https://api.github.com/users/JarekW/events{/privacy}","received_events_url":"https://api.github.com/users/JarekW/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-06-12T11:38:49Z","updated_at":"2015-06-18T11:31:34Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c9603060443567bb59b3d828a5f8624844ab7b27","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/fsi-open/form-extensions-bundle/pulls/21/commits","review_comments_url":"https://api.github.com/repos/fsi-open/form-extensions-bundle/pulls/21/comments","review_comment_url":"https://api.github.com/repos/fsi-open/form-extensions-bundle/pulls/comments{/number}","comments_url":"https://api.github.com/repos/fsi-open/form-extensions-bundle/issues/21/comments","statuses_url":"https://api.github.com/repos/fsi-open/form-extensions-bundle/statuses/a5047ab41d942e61266823c0588cb38155cf6692","head":{"label":"JarekW:dev","ref":"dev","sha":"a5047ab41d942e61266823c0588cb38155cf6692","user":{"login":"JarekW","id":4487772,"avatar_url":"https://avatars.githubusercontent.com/u/4487772?v=3","gravatar_id":"","url":"https://api.github.com/users/JarekW","html_url":"https://github.com/JarekW","followers_url":"https://api.github.com/users/JarekW/followers","following_url":"https://api.github.com/users/JarekW/following{/other_user}","gists_url":"https://api.github.com/users/JarekW/gists{/gist_id}","starred_url":"https://api.github.com/users/JarekW/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JarekW/subscriptions","organizations_url":"https://api.github.com/users/JarekW/orgs","repos_url":"https://api.github.com/users/JarekW/repos","events_url":"https://api.github.com/users/JarekW/events{/privacy}","received_events_url":"https://api.github.com/users/JarekW/received_events","type":"User","site_admin":false},"repo":{"id":28968192,"name":"form-extensions-bundle","full_name":"JarekW/form-extensions-bundle","owner":{"login":"JarekW","id":4487772,"avatar_url":"https://avatars.githubusercontent.com/u/4487772?v=3","gravatar_id":"","url":"https://api.github.com/users/JarekW","html_url":"https://github.com/JarekW","followers_url":"https://api.github.com/users/JarekW/followers","following_url":"https://api.github.com/users/JarekW/following{/other_user}","gists_url":"https://api.github.com/users/JarekW/gists{/gist_id}","starred_url":"https://api.github.com/users/JarekW/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JarekW/subscriptions","organizations_url":"https://api.github.com/users/JarekW/orgs","repos_url":"https://api.github.com/users/JarekW/repos","events_url":"https://api.github.com/users/JarekW/events{/privacy}","received_events_url":"https://api.github.com/users/JarekW/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/JarekW/form-extensions-bundle","description":"","fork":true,"url":"https://api.github.com/repos/JarekW/form-extensions-bundle","forks_url":"https://api.github.com/repos/JarekW/form-extensions-bundle/forks","keys_url":"https://api.github.com/repos/JarekW/form-extensions-bundle/keys{/key_id}","collaborators_url":"https://api.github.com/repos/JarekW/form-extensions-bundle/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/JarekW/form-extensions-bundle/teams","hooks_url":"https://api.github.com/repos/JarekW/form-extensions-bundle/hooks","issue_events_url":"https://api.github.com/repos/JarekW/form-extensions-bundle/issues/events{/number}","events_url":"https://api.github.com/repos/JarekW/form-extensions-bundle/events","assignees_url":"https://api.github.com/repos/JarekW/form-extensions-bundle/assignees{/user}","branches_url":"https://api.github.com/repos/JarekW/form-extensions-bundle/branches{/branch}","tags_url":"https://api.github.com/repos/JarekW/form-extensions-bundle/tags","blobs_url":"https://api.github.com/repos/JarekW/form-extensions-bundle/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/JarekW/form-extensions-bundle/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/JarekW/form-extensions-bundle/git/refs{/sha}","trees_url":"https://api.github.com/repos/JarekW/form-extensions-bundle/git/trees{/sha}","statuses_url":"https://api.github.com/repos/JarekW/form-extensions-bundle/statuses/{sha}","languages_url":"https://api.github.com/repos/JarekW/form-extensions-bundle/languages","stargazers_url":"https://api.github.com/repos/JarekW/form-extensions-bundle/stargazers","contributors_url":"https://api.github.com/repos/JarekW/form-extensions-bundle/contributors","subscribers_url":"https://api.github.com/repos/JarekW/form-extensions-bundle/subscribers","subscription_url":"https://api.github.com/repos/JarekW/form-extensions-bundle/subscription","commits_url":"https://api.github.com/repos/JarekW/form-extensions-bundle/commits{/sha}","git_commits_url":"https://api.github.com/repos/JarekW/form-extensions-bundle/git/commits{/sha}","comments_url":"https://api.github.com/repos/JarekW/form-extensions-bundle/comments{/number}","issue_comment_url":"https://api.github.com/repos/JarekW/form-extensions-bundle/issues/comments{/number}","contents_url":"https://api.github.com/repos/JarekW/form-extensions-bundle/contents/{+path}","compare_url":"https://api.github.com/repos/JarekW/form-extensions-bundle/compare/{base}...{head}","merges_url":"https://api.github.com/repos/JarekW/form-extensions-bundle/merges","archive_url":"https://api.github.com/repos/JarekW/form-extensions-bundle/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/JarekW/form-extensions-bundle/downloads","issues_url":"https://api.github.com/repos/JarekW/form-extensions-bundle/issues{/number}","pulls_url":"https://api.github.com/repos/JarekW/form-extensions-bundle/pulls{/number}","milestones_url":"https://api.github.com/repos/JarekW/form-extensions-bundle/milestones{/number}","notifications_url":"https://api.github.com/repos/JarekW/form-extensions-bundle/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/JarekW/form-extensions-bundle/labels{/name}","releases_url":"https://api.github.com/repos/JarekW/form-extensions-bundle/releases{/id}","created_at":"2015-01-08T13:57:17Z","updated_at":"2015-01-08T13:57:17Z","pushed_at":"2015-06-18T09:06:42Z","git_url":"git://github.com/JarekW/form-extensions-bundle.git","ssh_url":"git@github.com:JarekW/form-extensions-bundle.git","clone_url":"https://github.com/JarekW/form-extensions-bundle.git","svn_url":"https://github.com/JarekW/form-extensions-bundle","homepage":null,"size":887,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"fsi-open:master","ref":"master","sha":"d7c742ef2968fe875201453495509096a940c2ac","user":{"login":"fsi-open","id":2317182,"avatar_url":"https://avatars.githubusercontent.com/u/2317182?v=3","gravatar_id":"","url":"https://api.github.com/users/fsi-open","html_url":"https://github.com/fsi-open","followers_url":"https://api.github.com/users/fsi-open/followers","following_url":"https://api.github.com/users/fsi-open/following{/other_user}","gists_url":"https://api.github.com/users/fsi-open/gists{/gist_id}","starred_url":"https://api.github.com/users/fsi-open/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fsi-open/subscriptions","organizations_url":"https://api.github.com/users/fsi-open/orgs","repos_url":"https://api.github.com/users/fsi-open/repos","events_url":"https://api.github.com/users/fsi-open/events{/privacy}","received_events_url":"https://api.github.com/users/fsi-open/received_events","type":"Organization","site_admin":false},"repo":{"id":10219266,"name":"form-extensions-bundle","full_name":"fsi-open/form-extensions-bundle","owner":{"login":"fsi-open","id":2317182,"avatar_url":"https://avatars.githubusercontent.com/u/2317182?v=3","gravatar_id":"","url":"https://api.github.com/users/fsi-open","html_url":"https://github.com/fsi-open","followers_url":"https://api.github.com/users/fsi-open/followers","following_url":"https://api.github.com/users/fsi-open/following{/other_user}","gists_url":"https://api.github.com/users/fsi-open/gists{/gist_id}","starred_url":"https://api.github.com/users/fsi-open/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fsi-open/subscriptions","organizations_url":"https://api.github.com/users/fsi-open/orgs","repos_url":"https://api.github.com/users/fsi-open/repos","events_url":"https://api.github.com/users/fsi-open/events{/privacy}","received_events_url":"https://api.github.com/users/fsi-open/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/fsi-open/form-extensions-bundle","description":"","fork":false,"url":"https://api.github.com/repos/fsi-open/form-extensions-bundle","forks_url":"https://api.github.com/repos/fsi-open/form-extensions-bundle/forks","keys_url":"https://api.github.com/repos/fsi-open/form-extensions-bundle/keys{/key_id}","collaborators_url":"https://api.github.com/repos/fsi-open/form-extensions-bundle/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/fsi-open/form-extensions-bundle/teams","hooks_url":"https://api.github.com/repos/fsi-open/form-extensions-bundle/hooks","issue_events_url":"https://api.github.com/repos/fsi-open/form-extensions-bundle/issues/events{/number}","events_url":"https://api.github.com/repos/fsi-open/form-extensions-bundle/events","assignees_url":"https://api.github.com/repos/fsi-open/form-extensions-bundle/assignees{/user}","branches_url":"https://api.github.com/repos/fsi-open/form-extensions-bundle/branches{/branch}","tags_url":"https://api.github.com/repos/fsi-open/form-extensions-bundle/tags","blobs_url":"https://api.github.com/repos/fsi-open/form-extensions-bundle/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/fsi-open/form-extensions-bundle/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/fsi-open/form-extensions-bundle/git/refs{/sha}","trees_url":"https://api.github.com/repos/fsi-open/form-extensions-bundle/git/trees{/sha}","statuses_url":"https://api.github.com/repos/fsi-open/form-extensions-bundle/statuses/{sha}","languages_url":"https://api.github.com/repos/fsi-open/form-extensions-bundle/languages","stargazers_url":"https://api.github.com/repos/fsi-open/form-extensions-bundle/stargazers","contributors_url":"https://api.github.com/repos/fsi-open/form-extensions-bundle/contributors","subscribers_url":"https://api.github.com/repos/fsi-open/form-extensions-bundle/subscribers","subscription_url":"https://api.github.com/repos/fsi-open/form-extensions-bundle/subscription","commits_url":"https://api.github.com/repos/fsi-open/form-extensions-bundle/commits{/sha}","git_commits_url":"https://api.github.com/repos/fsi-open/form-extensions-bundle/git/commits{/sha}","comments_url":"https://api.github.com/repos/fsi-open/form-extensions-bundle/comments{/number}","issue_comment_url":"https://api.github.com/repos/fsi-open/form-extensions-bundle/issues/comments{/number}","contents_url":"https://api.github.com/repos/fsi-open/form-extensions-bundle/contents/{+path}","compare_url":"https://api.github.com/repos/fsi-open/form-extensions-bundle/compare/{base}...{head}","merges_url":"https://api.github.com/repos/fsi-open/form-extensions-bundle/merges","archive_url":"https://api.github.com/repos/fsi-open/form-extensions-bundle/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/fsi-open/form-extensions-bundle/downloads","issues_url":"https://api.github.com/repos/fsi-open/form-extensions-bundle/issues{/number}","pulls_url":"https://api.github.com/repos/fsi-open/form-extensions-bundle/pulls{/number}","milestones_url":"https://api.github.com/repos/fsi-open/form-extensions-bundle/milestones{/number}","notifications_url":"https://api.github.com/repos/fsi-open/form-extensions-bundle/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/fsi-open/form-extensions-bundle/labels{/name}","releases_url":"https://api.github.com/repos/fsi-open/form-extensions-bundle/releases{/id}","created_at":"2013-05-22T12:24:10Z","updated_at":"2015-04-27T11:30:11Z","pushed_at":"2015-06-18T09:06:42Z","git_url":"git://github.com/fsi-open/form-extensions-bundle.git","ssh_url":"git@github.com:fsi-open/form-extensions-bundle.git","clone_url":"https://github.com/fsi-open/form-extensions-bundle.git","svn_url":"https://github.com/fsi-open/form-extensions-bundle","homepage":null,"size":1070,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":6,"mirror_url":null,"open_issues_count":1,"forks":6,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/fsi-open/form-extensions-bundle/pulls/21"},"html":{"href":"https://github.com/fsi-open/form-extensions-bundle/pull/21"},"issue":{"href":"https://api.github.com/repos/fsi-open/form-extensions-bundle/issues/21"},"comments":{"href":"https://api.github.com/repos/fsi-open/form-extensions-bundle/issues/21/comments"},"review_comments":{"href":"https://api.github.com/repos/fsi-open/form-extensions-bundle/pulls/21/comments"},"review_comment":{"href":"https://api.github.com/repos/fsi-open/form-extensions-bundle/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/fsi-open/form-extensions-bundle/pulls/21/commits"},"statuses":{"href":"https://api.github.com/repos/fsi-open/form-extensions-bundle/statuses/a5047ab41d942e61266823c0588cb38155cf6692"}}}}