{"action":"created","comment":{"url":"https://api.github.com/repos/Victoire/victoire/pulls/comments/51404672","id":51404672,"diff_hunk":"@@ -0,0 +1,69 @@\n+angular.module('ngApp').directive('widget', function ($compile, $rootScope) {\n+    return {\n+        restrict:'A',\n+        scope: {\n+            widgetMap: '='\n+        },\n+        link: function(scope, element, attrs) {\n+            scope.positions = [];\n+            var renderButton = function () {\n+                if (element.prev().attr('position') && element.prev().attr('widget-map') == element.attr('widget-map')) {\n+                    element.prev().remove();\n+                }\n+                if (element.next().attr('position') && element.next().attr('widget-map') == element.attr('widget-map')) {\n+                    element.next().remove();\n+                }\n+\n+                widgets = $vic('.vic-widget-container', '#vic-slot-' + scope.$parent.slotId);\n+                if (!(\"max\" in scope.$parent.options) || (\"max\" in scope.$parent.options) && scope.$parent.options.max > widgets.length) {\n+                    if (scope.positions.before == 1) {","path":"Bundle/CoreBundle/Resources/script/ngApp/directives/widget.js","position":19,"original_position":19,"commit_id":"f531c4ff3db4541c68d8b1e8d8ea77bf9ed45885","original_commit_id":"989f82cb28c7eb4b8449cec4cd7044f446e1e905","user":{"login":"lenybernard","id":618536,"avatar_url":"https://avatars.githubusercontent.com/u/618536?v=3","gravatar_id":"","url":"https://api.github.com/users/lenybernard","html_url":"https://github.com/lenybernard","followers_url":"https://api.github.com/users/lenybernard/followers","following_url":"https://api.github.com/users/lenybernard/following{/other_user}","gists_url":"https://api.github.com/users/lenybernard/gists{/gist_id}","starred_url":"https://api.github.com/users/lenybernard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lenybernard/subscriptions","organizations_url":"https://api.github.com/users/lenybernard/orgs","repos_url":"https://api.github.com/users/lenybernard/repos","events_url":"https://api.github.com/users/lenybernard/events{/privacy}","received_events_url":"https://api.github.com/users/lenybernard/received_events","type":"User","site_admin":false},"body":"please refactor these two conditions, it can be squashed easy, there is only one different variable","created_at":"2016-02-01T11:01:32Z","updated_at":"2016-02-01T11:01:32Z","html_url":"https://github.com/Victoire/victoire/pull/325#discussion_r51404672","pull_request_url":"https://api.github.com/repos/Victoire/victoire/pulls/325","_links":{"self":{"href":"https://api.github.com/repos/Victoire/victoire/pulls/comments/51404672"},"html":{"href":"https://github.com/Victoire/victoire/pull/325#discussion_r51404672"},"pull_request":{"href":"https://api.github.com/repos/Victoire/victoire/pulls/325"}}},"pull_request":{"url":"https://api.github.com/repos/Victoire/victoire/pulls/325","id":57783413,"html_url":"https://github.com/Victoire/victoire/pull/325","diff_url":"https://github.com/Victoire/victoire/pull/325.diff","patch_url":"https://github.com/Victoire/victoire/pull/325.patch","issue_url":"https://api.github.com/repos/Victoire/victoire/issues/325","number":325,"state":"open","locked":false,"title":"Feature/refactor dnd","user":{"login":"paulandrieux","id":1942078,"avatar_url":"https://avatars.githubusercontent.com/u/1942078?v=3","gravatar_id":"","url":"https://api.github.com/users/paulandrieux","html_url":"https://github.com/paulandrieux","followers_url":"https://api.github.com/users/paulandrieux/followers","following_url":"https://api.github.com/users/paulandrieux/following{/other_user}","gists_url":"https://api.github.com/users/paulandrieux/gists{/gist_id}","starred_url":"https://api.github.com/users/paulandrieux/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/paulandrieux/subscriptions","organizations_url":"https://api.github.com/users/paulandrieux/orgs","repos_url":"https://api.github.com/users/paulandrieux/repos","events_url":"https://api.github.com/users/paulandrieux/events{/privacy}","received_events_url":"https://api.github.com/users/paulandrieux/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-01-31T22:56:05Z","updated_at":"2016-02-01T11:01:32Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3f2245b1598b4107172675e49010f90138214aa0","assignee":null,"milestone":{"url":"https://api.github.com/repos/Victoire/victoire/milestones/2","html_url":"https://github.com/Victoire/victoire/milestones/WidgetMap","labels_url":"https://api.github.com/repos/Victoire/victoire/milestones/2/labels","id":1555216,"number":2,"title":"WidgetMap","description":"","creator":{"login":"lenybernard","id":618536,"avatar_url":"https://avatars.githubusercontent.com/u/618536?v=3","gravatar_id":"","url":"https://api.github.com/users/lenybernard","html_url":"https://github.com/lenybernard","followers_url":"https://api.github.com/users/lenybernard/followers","following_url":"https://api.github.com/users/lenybernard/following{/other_user}","gists_url":"https://api.github.com/users/lenybernard/gists{/gist_id}","starred_url":"https://api.github.com/users/lenybernard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lenybernard/subscriptions","organizations_url":"https://api.github.com/users/lenybernard/orgs","repos_url":"https://api.github.com/users/lenybernard/repos","events_url":"https://api.github.com/users/lenybernard/events{/privacy}","received_events_url":"https://api.github.com/users/lenybernard/received_events","type":"User","site_admin":false},"open_issues":1,"closed_issues":0,"state":"open","created_at":"2016-02-01T10:24:52Z","updated_at":"2016-02-01T10:25:02Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/Victoire/victoire/pulls/325/commits","review_comments_url":"https://api.github.com/repos/Victoire/victoire/pulls/325/comments","review_comment_url":"https://api.github.com/repos/Victoire/victoire/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Victoire/victoire/issues/325/comments","statuses_url":"https://api.github.com/repos/Victoire/victoire/statuses/f531c4ff3db4541c68d8b1e8d8ea77bf9ed45885","head":{"label":"paulandrieux:feature/refactor-dnd","ref":"feature/refactor-dnd","sha":"f531c4ff3db4541c68d8b1e8d8ea77bf9ed45885","user":{"login":"paulandrieux","id":1942078,"avatar_url":"https://avatars.githubusercontent.com/u/1942078?v=3","gravatar_id":"","url":"https://api.github.com/users/paulandrieux","html_url":"https://github.com/paulandrieux","followers_url":"https://api.github.com/users/paulandrieux/followers","following_url":"https://api.github.com/users/paulandrieux/following{/other_user}","gists_url":"https://api.github.com/users/paulandrieux/gists{/gist_id}","starred_url":"https://api.github.com/users/paulandrieux/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/paulandrieux/subscriptions","organizations_url":"https://api.github.com/users/paulandrieux/orgs","repos_url":"https://api.github.com/users/paulandrieux/repos","events_url":"https://api.github.com/users/paulandrieux/events{/privacy}","received_events_url":"https://api.github.com/users/paulandrieux/received_events","type":"User","site_admin":false},"repo":{"id":31442083,"name":"victoire","full_name":"paulandrieux/victoire","owner":{"login":"paulandrieux","id":1942078,"avatar_url":"https://avatars.githubusercontent.com/u/1942078?v=3","gravatar_id":"","url":"https://api.github.com/users/paulandrieux","html_url":"https://github.com/paulandrieux","followers_url":"https://api.github.com/users/paulandrieux/followers","following_url":"https://api.github.com/users/paulandrieux/following{/other_user}","gists_url":"https://api.github.com/users/paulandrieux/gists{/gist_id}","starred_url":"https://api.github.com/users/paulandrieux/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/paulandrieux/subscriptions","organizations_url":"https://api.github.com/users/paulandrieux/orgs","repos_url":"https://api.github.com/users/paulandrieux/repos","events_url":"https://api.github.com/users/paulandrieux/events{/privacy}","received_events_url":"https://api.github.com/users/paulandrieux/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/paulandrieux/victoire","description":"","fork":true,"url":"https://api.github.com/repos/paulandrieux/victoire","forks_url":"https://api.github.com/repos/paulandrieux/victoire/forks","keys_url":"https://api.github.com/repos/paulandrieux/victoire/keys{/key_id}","collaborators_url":"https://api.github.com/repos/paulandrieux/victoire/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/paulandrieux/victoire/teams","hooks_url":"https://api.github.com/repos/paulandrieux/victoire/hooks","issue_events_url":"https://api.github.com/repos/paulandrieux/victoire/issues/events{/number}","events_url":"https://api.github.com/repos/paulandrieux/victoire/events","assignees_url":"https://api.github.com/repos/paulandrieux/victoire/assignees{/user}","branches_url":"https://api.github.com/repos/paulandrieux/victoire/branches{/branch}","tags_url":"https://api.github.com/repos/paulandrieux/victoire/tags","blobs_url":"https://api.github.com/repos/paulandrieux/victoire/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/paulandrieux/victoire/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/paulandrieux/victoire/git/refs{/sha}","trees_url":"https://api.github.com/repos/paulandrieux/victoire/git/trees{/sha}","statuses_url":"https://api.github.com/repos/paulandrieux/victoire/statuses/{sha}","languages_url":"https://api.github.com/repos/paulandrieux/victoire/languages","stargazers_url":"https://api.github.com/repos/paulandrieux/victoire/stargazers","contributors_url":"https://api.github.com/repos/paulandrieux/victoire/contributors","subscribers_url":"https://api.github.com/repos/paulandrieux/victoire/subscribers","subscription_url":"https://api.github.com/repos/paulandrieux/victoire/subscription","commits_url":"https://api.github.com/repos/paulandrieux/victoire/commits{/sha}","git_commits_url":"https://api.github.com/repos/paulandrieux/victoire/git/commits{/sha}","comments_url":"https://api.github.com/repos/paulandrieux/victoire/comments{/number}","issue_comment_url":"https://api.github.com/repos/paulandrieux/victoire/issues/comments{/number}","contents_url":"https://api.github.com/repos/paulandrieux/victoire/contents/{+path}","compare_url":"https://api.github.com/repos/paulandrieux/victoire/compare/{base}...{head}","merges_url":"https://api.github.com/repos/paulandrieux/victoire/merges","archive_url":"https://api.github.com/repos/paulandrieux/victoire/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/paulandrieux/victoire/downloads","issues_url":"https://api.github.com/repos/paulandrieux/victoire/issues{/number}","pulls_url":"https://api.github.com/repos/paulandrieux/victoire/pulls{/number}","milestones_url":"https://api.github.com/repos/paulandrieux/victoire/milestones{/number}","notifications_url":"https://api.github.com/repos/paulandrieux/victoire/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/paulandrieux/victoire/labels{/name}","releases_url":"https://api.github.com/repos/paulandrieux/victoire/releases{/id}","deployments_url":"https://api.github.com/repos/paulandrieux/victoire/deployments","created_at":"2015-02-27T22:32:21Z","updated_at":"2015-05-07T16:14:54Z","pushed_at":"2016-02-01T08:25:42Z","git_url":"git://github.com/paulandrieux/victoire.git","ssh_url":"git@github.com:paulandrieux/victoire.git","clone_url":"https://github.com/paulandrieux/victoire.git","svn_url":"https://github.com/paulandrieux/victoire","homepage":null,"size":14668,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"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":"Victoire:master","ref":"master","sha":"fbe364da939e83af91a3bb03280124b72ca015da","user":{"login":"Victoire","id":4686389,"avatar_url":"https://avatars.githubusercontent.com/u/4686389?v=3","gravatar_id":"","url":"https://api.github.com/users/Victoire","html_url":"https://github.com/Victoire","followers_url":"https://api.github.com/users/Victoire/followers","following_url":"https://api.github.com/users/Victoire/following{/other_user}","gists_url":"https://api.github.com/users/Victoire/gists{/gist_id}","starred_url":"https://api.github.com/users/Victoire/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Victoire/subscriptions","organizations_url":"https://api.github.com/users/Victoire/orgs","repos_url":"https://api.github.com/users/Victoire/repos","events_url":"https://api.github.com/users/Victoire/events{/privacy}","received_events_url":"https://api.github.com/users/Victoire/received_events","type":"Organization","site_admin":false},"repo":{"id":25696504,"name":"victoire","full_name":"Victoire/victoire","owner":{"login":"Victoire","id":4686389,"avatar_url":"https://avatars.githubusercontent.com/u/4686389?v=3","gravatar_id":"","url":"https://api.github.com/users/Victoire","html_url":"https://github.com/Victoire","followers_url":"https://api.github.com/users/Victoire/followers","following_url":"https://api.github.com/users/Victoire/following{/other_user}","gists_url":"https://api.github.com/users/Victoire/gists{/gist_id}","starred_url":"https://api.github.com/users/Victoire/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Victoire/subscriptions","organizations_url":"https://api.github.com/users/Victoire/orgs","repos_url":"https://api.github.com/users/Victoire/repos","events_url":"https://api.github.com/users/Victoire/events{/privacy}","received_events_url":"https://api.github.com/users/Victoire/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Victoire/victoire","description":"Fullstack Symfony2 DCMS","fork":false,"url":"https://api.github.com/repos/Victoire/victoire","forks_url":"https://api.github.com/repos/Victoire/victoire/forks","keys_url":"https://api.github.com/repos/Victoire/victoire/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Victoire/victoire/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Victoire/victoire/teams","hooks_url":"https://api.github.com/repos/Victoire/victoire/hooks","issue_events_url":"https://api.github.com/repos/Victoire/victoire/issues/events{/number}","events_url":"https://api.github.com/repos/Victoire/victoire/events","assignees_url":"https://api.github.com/repos/Victoire/victoire/assignees{/user}","branches_url":"https://api.github.com/repos/Victoire/victoire/branches{/branch}","tags_url":"https://api.github.com/repos/Victoire/victoire/tags","blobs_url":"https://api.github.com/repos/Victoire/victoire/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Victoire/victoire/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Victoire/victoire/git/refs{/sha}","trees_url":"https://api.github.com/repos/Victoire/victoire/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Victoire/victoire/statuses/{sha}","languages_url":"https://api.github.com/repos/Victoire/victoire/languages","stargazers_url":"https://api.github.com/repos/Victoire/victoire/stargazers","contributors_url":"https://api.github.com/repos/Victoire/victoire/contributors","subscribers_url":"https://api.github.com/repos/Victoire/victoire/subscribers","subscription_url":"https://api.github.com/repos/Victoire/victoire/subscription","commits_url":"https://api.github.com/repos/Victoire/victoire/commits{/sha}","git_commits_url":"https://api.github.com/repos/Victoire/victoire/git/commits{/sha}","comments_url":"https://api.github.com/repos/Victoire/victoire/comments{/number}","issue_comment_url":"https://api.github.com/repos/Victoire/victoire/issues/comments{/number}","contents_url":"https://api.github.com/repos/Victoire/victoire/contents/{+path}","compare_url":"https://api.github.com/repos/Victoire/victoire/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Victoire/victoire/merges","archive_url":"https://api.github.com/repos/Victoire/victoire/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Victoire/victoire/downloads","issues_url":"https://api.github.com/repos/Victoire/victoire/issues{/number}","pulls_url":"https://api.github.com/repos/Victoire/victoire/pulls{/number}","milestones_url":"https://api.github.com/repos/Victoire/victoire/milestones{/number}","notifications_url":"https://api.github.com/repos/Victoire/victoire/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Victoire/victoire/labels{/name}","releases_url":"https://api.github.com/repos/Victoire/victoire/releases{/id}","deployments_url":"https://api.github.com/repos/Victoire/victoire/deployments","created_at":"2014-10-24T16:09:57Z","updated_at":"2016-01-27T16:54:47Z","pushed_at":"2016-02-01T08:25:42Z","git_url":"git://github.com/Victoire/victoire.git","ssh_url":"git@github.com:Victoire/victoire.git","clone_url":"https://github.com/Victoire/victoire.git","svn_url":"https://github.com/Victoire/victoire","homepage":"http://victoire.io","size":13843,"stargazers_count":22,"watchers_count":22,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":20,"mirror_url":null,"open_issues_count":21,"forks":20,"open_issues":21,"watchers":22,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Victoire/victoire/pulls/325"},"html":{"href":"https://github.com/Victoire/victoire/pull/325"},"issue":{"href":"https://api.github.com/repos/Victoire/victoire/issues/325"},"comments":{"href":"https://api.github.com/repos/Victoire/victoire/issues/325/comments"},"review_comments":{"href":"https://api.github.com/repos/Victoire/victoire/pulls/325/comments"},"review_comment":{"href":"https://api.github.com/repos/Victoire/victoire/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Victoire/victoire/pulls/325/commits"},"statuses":{"href":"https://api.github.com/repos/Victoire/victoire/statuses/f531c4ff3db4541c68d8b1e8d8ea77bf9ed45885"}}}}