{"action":"created","comment":{"url":"https://api.github.com/repos/indico/indico/pulls/comments/75336398","id":75336398,"diff_hunk":"@@ -48,12 +49,76 @@\n         var $noOtherPlaceholder = $fieldDisplay.find('#no-other-placeholder-' + options.fieldId);\n         var $buttonAddExisting = $('#add-existing-' + options.fieldId);\n         var $buttonAddNew = $('#add-new-' + options.fieldId);\n+        var $buttonAlphaOrder = $fieldDisplay.find('.alpha-order-switch');\n+\n+        function updateOrderAttributes($list) {\n+            $list.children().each(function(i, elem) {\n+                $(elem).data('person').displayOrder = i;\n+            });\n+        }\n+\n+        function setupList(entryType, $list, sortedPeople) {\n+            var isSortable = options.sort == 'all' || _.find(options.sort, entryType);\n+\n+            $list.html('');\n+\n+            if (isSortable) {\n+                var initialIndex;\n+\n+                $list.sortable({\n+                    axis: 'y',\n+                    containment: 'parent',\n+                    cursor: 'move',\n+                    distance: 10,\n+                    handle: '.sort-handle',\n+                    items: '> .person-row',\n+                    tolerance: 'pointer',\n+                    forceHelperSize: true,\n+                    forcePlaceholderSize: true,\n+                    helper: function(e, item) {\n+                        var originals = item.children();\n+                        var helper = item.clone();\n+                        helper.children().each(function(i) {\n+                            $(this).width(originals.eq(i).width());\n+                        });\n+                        return helper;\n+                    },\n+                    start: function(e, ui) {\n+                        initialIndex = ui.item.index();\n+                    },\n+                    update: function(e, ui) {\n+                        var newIndex = ui.item.index(),\n+                            person = $(ui.item).data('person');","path":"indico/htdocs/js/indico/widgets/person_link_widget.js","position":null,"original_position":53,"commit_id":"87212875b96212a8113441d35ff3416843efd761","original_commit_id":"0d333fc4e6e44eb5358601140e2eddeabf2fc0b0","user":{"login":"pferreir","id":2699,"avatar_url":"https://avatars.githubusercontent.com/u/2699?v=3","gravatar_id":"","url":"https://api.github.com/users/pferreir","html_url":"https://github.com/pferreir","followers_url":"https://api.github.com/users/pferreir/followers","following_url":"https://api.github.com/users/pferreir/following{/other_user}","gists_url":"https://api.github.com/users/pferreir/gists{/gist_id}","starred_url":"https://api.github.com/users/pferreir/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pferreir/subscriptions","organizations_url":"https://api.github.com/users/pferreir/orgs","repos_url":"https://api.github.com/users/pferreir/repos","events_url":"https://api.github.com/users/pferreir/events{/privacy}","received_events_url":"https://api.github.com/users/pferreir/received_events","type":"User","site_admin":false},"body":"I think we have a mixture of both patterns. I'm trying to find out a good analysis or at least a standard.","created_at":"2016-08-18T15:58:50Z","updated_at":"2016-08-18T15:58:50Z","html_url":"https://github.com/indico/indico/pull/2575#discussion_r75336398","pull_request_url":"https://api.github.com/repos/indico/indico/pulls/2575","_links":{"self":{"href":"https://api.github.com/repos/indico/indico/pulls/comments/75336398"},"html":{"href":"https://github.com/indico/indico/pull/2575#discussion_r75336398"},"pull_request":{"href":"https://api.github.com/repos/indico/indico/pulls/2575"}}},"pull_request":{"url":"https://api.github.com/repos/indico/indico/pulls/2575","id":81831752,"html_url":"https://github.com/indico/indico/pull/2575","diff_url":"https://github.com/indico/indico/pull/2575.diff","patch_url":"https://github.com/indico/indico/pull/2575.patch","issue_url":"https://api.github.com/repos/indico/indico/issues/2575","number":2575,"state":"open","locked":false,"title":"WIP: Ordering of authors/speakers","user":{"login":"pferreir","id":2699,"avatar_url":"https://avatars.githubusercontent.com/u/2699?v=3","gravatar_id":"","url":"https://api.github.com/users/pferreir","html_url":"https://github.com/pferreir","followers_url":"https://api.github.com/users/pferreir/followers","following_url":"https://api.github.com/users/pferreir/following{/other_user}","gists_url":"https://api.github.com/users/pferreir/gists{/gist_id}","starred_url":"https://api.github.com/users/pferreir/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pferreir/subscriptions","organizations_url":"https://api.github.com/users/pferreir/orgs","repos_url":"https://api.github.com/users/pferreir/repos","events_url":"https://api.github.com/users/pferreir/events{/privacy}","received_events_url":"https://api.github.com/users/pferreir/received_events","type":"User","site_admin":false},"body":"Still have to review some of the code. Just to gauge a little bit the opinion on the direction it's taking.\r\n\r\n * [x] Database structures\r\n * [ ] Client-side widget\r\n * [ ] Display of users in the correct order","created_at":"2016-08-18T15:02:53Z","updated_at":"2016-08-18T15:58:50Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c22f37dccd1d0808afa6b4516f259f56311af598","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/indico/indico/pulls/2575/commits","review_comments_url":"https://api.github.com/repos/indico/indico/pulls/2575/comments","review_comment_url":"https://api.github.com/repos/indico/indico/pulls/comments{/number}","comments_url":"https://api.github.com/repos/indico/indico/issues/2575/comments","statuses_url":"https://api.github.com/repos/indico/indico/statuses/87212875b96212a8113441d35ff3416843efd761","head":{"label":"pferreir:wip/person-link-ordering","ref":"wip/person-link-ordering","sha":"87212875b96212a8113441d35ff3416843efd761","user":{"login":"pferreir","id":2699,"avatar_url":"https://avatars.githubusercontent.com/u/2699?v=3","gravatar_id":"","url":"https://api.github.com/users/pferreir","html_url":"https://github.com/pferreir","followers_url":"https://api.github.com/users/pferreir/followers","following_url":"https://api.github.com/users/pferreir/following{/other_user}","gists_url":"https://api.github.com/users/pferreir/gists{/gist_id}","starred_url":"https://api.github.com/users/pferreir/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pferreir/subscriptions","organizations_url":"https://api.github.com/users/pferreir/orgs","repos_url":"https://api.github.com/users/pferreir/repos","events_url":"https://api.github.com/users/pferreir/events{/privacy}","received_events_url":"https://api.github.com/users/pferreir/received_events","type":"User","site_admin":false},"repo":{"id":3867135,"name":"indico","full_name":"pferreir/indico","owner":{"login":"pferreir","id":2699,"avatar_url":"https://avatars.githubusercontent.com/u/2699?v=3","gravatar_id":"","url":"https://api.github.com/users/pferreir","html_url":"https://github.com/pferreir","followers_url":"https://api.github.com/users/pferreir/followers","following_url":"https://api.github.com/users/pferreir/following{/other_user}","gists_url":"https://api.github.com/users/pferreir/gists{/gist_id}","starred_url":"https://api.github.com/users/pferreir/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pferreir/subscriptions","organizations_url":"https://api.github.com/users/pferreir/orgs","repos_url":"https://api.github.com/users/pferreir/repos","events_url":"https://api.github.com/users/pferreir/events{/privacy}","received_events_url":"https://api.github.com/users/pferreir/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/pferreir/indico","description":"The Indico Project (mirror)","fork":true,"url":"https://api.github.com/repos/pferreir/indico","forks_url":"https://api.github.com/repos/pferreir/indico/forks","keys_url":"https://api.github.com/repos/pferreir/indico/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pferreir/indico/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pferreir/indico/teams","hooks_url":"https://api.github.com/repos/pferreir/indico/hooks","issue_events_url":"https://api.github.com/repos/pferreir/indico/issues/events{/number}","events_url":"https://api.github.com/repos/pferreir/indico/events","assignees_url":"https://api.github.com/repos/pferreir/indico/assignees{/user}","branches_url":"https://api.github.com/repos/pferreir/indico/branches{/branch}","tags_url":"https://api.github.com/repos/pferreir/indico/tags","blobs_url":"https://api.github.com/repos/pferreir/indico/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pferreir/indico/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pferreir/indico/git/refs{/sha}","trees_url":"https://api.github.com/repos/pferreir/indico/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pferreir/indico/statuses/{sha}","languages_url":"https://api.github.com/repos/pferreir/indico/languages","stargazers_url":"https://api.github.com/repos/pferreir/indico/stargazers","contributors_url":"https://api.github.com/repos/pferreir/indico/contributors","subscribers_url":"https://api.github.com/repos/pferreir/indico/subscribers","subscription_url":"https://api.github.com/repos/pferreir/indico/subscription","commits_url":"https://api.github.com/repos/pferreir/indico/commits{/sha}","git_commits_url":"https://api.github.com/repos/pferreir/indico/git/commits{/sha}","comments_url":"https://api.github.com/repos/pferreir/indico/comments{/number}","issue_comment_url":"https://api.github.com/repos/pferreir/indico/issues/comments{/number}","contents_url":"https://api.github.com/repos/pferreir/indico/contents/{+path}","compare_url":"https://api.github.com/repos/pferreir/indico/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pferreir/indico/merges","archive_url":"https://api.github.com/repos/pferreir/indico/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pferreir/indico/downloads","issues_url":"https://api.github.com/repos/pferreir/indico/issues{/number}","pulls_url":"https://api.github.com/repos/pferreir/indico/pulls{/number}","milestones_url":"https://api.github.com/repos/pferreir/indico/milestones{/number}","notifications_url":"https://api.github.com/repos/pferreir/indico/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pferreir/indico/labels{/name}","releases_url":"https://api.github.com/repos/pferreir/indico/releases{/id}","deployments_url":"https://api.github.com/repos/pferreir/indico/deployments","created_at":"2012-03-29T15:01:36Z","updated_at":"2015-05-04T14:44:08Z","pushed_at":"2016-08-18T15:50:48Z","git_url":"git://github.com/pferreir/indico.git","ssh_url":"git@github.com:pferreir/indico.git","clone_url":"https://github.com/pferreir/indico.git","svn_url":"https://github.com/pferreir/indico","homepage":"http://indico-software.org","size":191384,"stargazers_count":1,"watchers_count":1,"language":"Python","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":1,"default_branch":"master"}},"base":{"label":"indico:master","ref":"master","sha":"f5d97e49c8de41bbcd663e859e908be79890a933","user":{"login":"indico","id":715236,"avatar_url":"https://avatars.githubusercontent.com/u/715236?v=3","gravatar_id":"","url":"https://api.github.com/users/indico","html_url":"https://github.com/indico","followers_url":"https://api.github.com/users/indico/followers","following_url":"https://api.github.com/users/indico/following{/other_user}","gists_url":"https://api.github.com/users/indico/gists{/gist_id}","starred_url":"https://api.github.com/users/indico/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/indico/subscriptions","organizations_url":"https://api.github.com/users/indico/orgs","repos_url":"https://api.github.com/users/indico/repos","events_url":"https://api.github.com/users/indico/events{/privacy}","received_events_url":"https://api.github.com/users/indico/received_events","type":"Organization","site_admin":false},"repo":{"id":2113067,"name":"indico","full_name":"indico/indico","owner":{"login":"indico","id":715236,"avatar_url":"https://avatars.githubusercontent.com/u/715236?v=3","gravatar_id":"","url":"https://api.github.com/users/indico","html_url":"https://github.com/indico","followers_url":"https://api.github.com/users/indico/followers","following_url":"https://api.github.com/users/indico/following{/other_user}","gists_url":"https://api.github.com/users/indico/gists{/gist_id}","starred_url":"https://api.github.com/users/indico/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/indico/subscriptions","organizations_url":"https://api.github.com/users/indico/orgs","repos_url":"https://api.github.com/users/indico/repos","events_url":"https://api.github.com/users/indico/events{/privacy}","received_events_url":"https://api.github.com/users/indico/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/indico/indico","description":"The Indico Project","fork":false,"url":"https://api.github.com/repos/indico/indico","forks_url":"https://api.github.com/repos/indico/indico/forks","keys_url":"https://api.github.com/repos/indico/indico/keys{/key_id}","collaborators_url":"https://api.github.com/repos/indico/indico/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/indico/indico/teams","hooks_url":"https://api.github.com/repos/indico/indico/hooks","issue_events_url":"https://api.github.com/repos/indico/indico/issues/events{/number}","events_url":"https://api.github.com/repos/indico/indico/events","assignees_url":"https://api.github.com/repos/indico/indico/assignees{/user}","branches_url":"https://api.github.com/repos/indico/indico/branches{/branch}","tags_url":"https://api.github.com/repos/indico/indico/tags","blobs_url":"https://api.github.com/repos/indico/indico/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/indico/indico/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/indico/indico/git/refs{/sha}","trees_url":"https://api.github.com/repos/indico/indico/git/trees{/sha}","statuses_url":"https://api.github.com/repos/indico/indico/statuses/{sha}","languages_url":"https://api.github.com/repos/indico/indico/languages","stargazers_url":"https://api.github.com/repos/indico/indico/stargazers","contributors_url":"https://api.github.com/repos/indico/indico/contributors","subscribers_url":"https://api.github.com/repos/indico/indico/subscribers","subscription_url":"https://api.github.com/repos/indico/indico/subscription","commits_url":"https://api.github.com/repos/indico/indico/commits{/sha}","git_commits_url":"https://api.github.com/repos/indico/indico/git/commits{/sha}","comments_url":"https://api.github.com/repos/indico/indico/comments{/number}","issue_comment_url":"https://api.github.com/repos/indico/indico/issues/comments{/number}","contents_url":"https://api.github.com/repos/indico/indico/contents/{+path}","compare_url":"https://api.github.com/repos/indico/indico/compare/{base}...{head}","merges_url":"https://api.github.com/repos/indico/indico/merges","archive_url":"https://api.github.com/repos/indico/indico/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/indico/indico/downloads","issues_url":"https://api.github.com/repos/indico/indico/issues{/number}","pulls_url":"https://api.github.com/repos/indico/indico/pulls{/number}","milestones_url":"https://api.github.com/repos/indico/indico/milestones{/number}","notifications_url":"https://api.github.com/repos/indico/indico/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/indico/indico/labels{/name}","releases_url":"https://api.github.com/repos/indico/indico/releases{/id}","deployments_url":"https://api.github.com/repos/indico/indico/deployments","created_at":"2011-07-27T13:56:30Z","updated_at":"2016-08-18T10:20:36Z","pushed_at":"2016-08-18T15:50:48Z","git_url":"git://github.com/indico/indico.git","ssh_url":"git@github.com:indico/indico.git","clone_url":"https://github.com/indico/indico.git","svn_url":"https://github.com/indico/indico","homepage":"http://indico-software.org","size":201753,"stargazers_count":158,"watchers_count":158,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":79,"mirror_url":null,"open_issues_count":624,"forks":79,"open_issues":624,"watchers":158,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/indico/indico/pulls/2575"},"html":{"href":"https://github.com/indico/indico/pull/2575"},"issue":{"href":"https://api.github.com/repos/indico/indico/issues/2575"},"comments":{"href":"https://api.github.com/repos/indico/indico/issues/2575/comments"},"review_comments":{"href":"https://api.github.com/repos/indico/indico/pulls/2575/comments"},"review_comment":{"href":"https://api.github.com/repos/indico/indico/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/indico/indico/pulls/2575/commits"},"statuses":{"href":"https://api.github.com/repos/indico/indico/statuses/87212875b96212a8113441d35ff3416843efd761"}}}}
{"actor":{"display_login":"pferreir"}}