{"action":"created","comment":{"url":"https://api.github.com/repos/phenotips/phenotips/pulls/comments/101881231","pull_request_review_id":22623352,"id":101881231,"diff_hunk":"@@ -358,19 +358,9 @@\n   var exportLinks = $$(' .export-link');\n   exportLinks.invoke('observe', 'click', function (event) {\n     event.stop();\n-    if (typeof event.findElement('.editbody') !== \"undefined\") {\n-      // We are in edit mode.\n-      var myWindow = window.open(\"\",\"_blank\");\n-      var exportAfterSave = function() {\n-        myWindow.location = event.findElement().href;\n-        document.stopObserving('xwiki:document:saved', exportAfterSave);\n-      };\n-      document.observe('xwiki:document:saved', exportAfterSave);\n-      document.fire('xwiki:actions:save', {'continue' : true, 'form' : event.findElement('form')});\n-    } else {\n-      // View mode\n+    PhenoTips.widgets.FormUtils.getFormState().saveIfFormDirty(function () {\n       window.open(event.findElement().href,\"_blank\");","path":"components/family-studies/ui/src/main/resources/PhenoTips/FamilyContentTopMenu.xml","position":16,"original_position":16,"commit_id":"4c4fcb438bccf85b1d968e9616dcf1bc38768878","original_commit_id":"4c4fcb438bccf85b1d968e9616dcf1bc38768878","user":{"login":"sdumitriu","id":88663,"avatar_url":"https://avatars.githubusercontent.com/u/88663?v=3","gravatar_id":"","url":"https://api.github.com/users/sdumitriu","html_url":"https://github.com/sdumitriu","followers_url":"https://api.github.com/users/sdumitriu/followers","following_url":"https://api.github.com/users/sdumitriu/following{/other_user}","gists_url":"https://api.github.com/users/sdumitriu/gists{/gist_id}","starred_url":"https://api.github.com/users/sdumitriu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sdumitriu/subscriptions","organizations_url":"https://api.github.com/users/sdumitriu/orgs","repos_url":"https://api.github.com/users/sdumitriu/repos","events_url":"https://api.github.com/users/sdumitriu/events{/privacy}","received_events_url":"https://api.github.com/users/sdumitriu/received_events","type":"User","site_admin":false},"body":"Possible solution:\r\n\r\n    event.stop();\r\n    var myWindow = window.open(\"\", \"_blank\");\r\n    PhenoTips.widgets.FormUtils.getFormState().saveIfFormDirty(function () {\r\n      myWindow.location = event.findElement().href;\r\n    });\r\n\r\nThe same must be done in `ContentTopMenu` too.","created_at":"2017-02-18T02:22:20Z","updated_at":"2017-02-18T02:36:36Z","html_url":"https://github.com/phenotips/phenotips/pull/2209#discussion_r101881231","pull_request_url":"https://api.github.com/repos/phenotips/phenotips/pulls/2209","_links":{"self":{"href":"https://api.github.com/repos/phenotips/phenotips/pulls/comments/101881231"},"html":{"href":"https://github.com/phenotips/phenotips/pull/2209#discussion_r101881231"},"pull_request":{"href":"https://api.github.com/repos/phenotips/phenotips/pulls/2209"}}},"pull_request":{"url":"https://api.github.com/repos/phenotips/phenotips/pulls/2209","id":106191647,"html_url":"https://github.com/phenotips/phenotips/pull/2209","diff_url":"https://github.com/phenotips/phenotips/pull/2209.diff","patch_url":"https://github.com/phenotips/phenotips/pull/2209.patch","issue_url":"https://api.github.com/repos/phenotips/phenotips/issues/2209","number":2209,"state":"open","locked":false,"title":"PT-2977: Auto-save patient data only if there are changes","user":{"login":"marta-","id":651980,"avatar_url":"https://avatars.githubusercontent.com/u/651980?v=3","gravatar_id":"","url":"https://api.github.com/users/marta-","html_url":"https://github.com/marta-","followers_url":"https://api.github.com/users/marta-/followers","following_url":"https://api.github.com/users/marta-/following{/other_user}","gists_url":"https://api.github.com/users/marta-/gists{/gist_id}","starred_url":"https://api.github.com/users/marta-/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marta-/subscriptions","organizations_url":"https://api.github.com/users/marta-/orgs","repos_url":"https://api.github.com/users/marta-/repos","events_url":"https://api.github.com/users/marta-/events{/privacy}","received_events_url":"https://api.github.com/users/marta-/received_events","type":"User","site_admin":false},"body":"","created_at":"2017-02-14T21:04:21Z","updated_at":"2017-02-18T02:36:36Z","closed_at":null,"merged_at":null,"merge_commit_sha":"06198f440dcaeea157c1ebc9bfd8e393c0ea1d38","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/phenotips/phenotips/pulls/2209/commits","review_comments_url":"https://api.github.com/repos/phenotips/phenotips/pulls/2209/comments","review_comment_url":"https://api.github.com/repos/phenotips/phenotips/pulls/comments{/number}","comments_url":"https://api.github.com/repos/phenotips/phenotips/issues/2209/comments","statuses_url":"https://api.github.com/repos/phenotips/phenotips/statuses/4c4fcb438bccf85b1d968e9616dcf1bc38768878","head":{"label":"phenotips:PT-2977","ref":"PT-2977","sha":"4c4fcb438bccf85b1d968e9616dcf1bc38768878","user":{"login":"phenotips","id":4872353,"avatar_url":"https://avatars.githubusercontent.com/u/4872353?v=3","gravatar_id":"","url":"https://api.github.com/users/phenotips","html_url":"https://github.com/phenotips","followers_url":"https://api.github.com/users/phenotips/followers","following_url":"https://api.github.com/users/phenotips/following{/other_user}","gists_url":"https://api.github.com/users/phenotips/gists{/gist_id}","starred_url":"https://api.github.com/users/phenotips/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phenotips/subscriptions","organizations_url":"https://api.github.com/users/phenotips/orgs","repos_url":"https://api.github.com/users/phenotips/repos","events_url":"https://api.github.com/users/phenotips/events{/privacy}","received_events_url":"https://api.github.com/users/phenotips/received_events","type":"Organization","site_admin":false},"repo":{"id":2685841,"name":"phenotips","full_name":"phenotips/phenotips","owner":{"login":"phenotips","id":4872353,"avatar_url":"https://avatars.githubusercontent.com/u/4872353?v=3","gravatar_id":"","url":"https://api.github.com/users/phenotips","html_url":"https://github.com/phenotips","followers_url":"https://api.github.com/users/phenotips/followers","following_url":"https://api.github.com/users/phenotips/following{/other_user}","gists_url":"https://api.github.com/users/phenotips/gists{/gist_id}","starred_url":"https://api.github.com/users/phenotips/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phenotips/subscriptions","organizations_url":"https://api.github.com/users/phenotips/orgs","repos_url":"https://api.github.com/users/phenotips/repos","events_url":"https://api.github.com/users/phenotips/events{/privacy}","received_events_url":"https://api.github.com/users/phenotips/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/phenotips/phenotips","description":"PhenoTips provides an easy-to-use Web interface and standardized database back-end for collecting clinical findings observed in patients with possible genetic disorders.","fork":false,"url":"https://api.github.com/repos/phenotips/phenotips","forks_url":"https://api.github.com/repos/phenotips/phenotips/forks","keys_url":"https://api.github.com/repos/phenotips/phenotips/keys{/key_id}","collaborators_url":"https://api.github.com/repos/phenotips/phenotips/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/phenotips/phenotips/teams","hooks_url":"https://api.github.com/repos/phenotips/phenotips/hooks","issue_events_url":"https://api.github.com/repos/phenotips/phenotips/issues/events{/number}","events_url":"https://api.github.com/repos/phenotips/phenotips/events","assignees_url":"https://api.github.com/repos/phenotips/phenotips/assignees{/user}","branches_url":"https://api.github.com/repos/phenotips/phenotips/branches{/branch}","tags_url":"https://api.github.com/repos/phenotips/phenotips/tags","blobs_url":"https://api.github.com/repos/phenotips/phenotips/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/phenotips/phenotips/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/phenotips/phenotips/git/refs{/sha}","trees_url":"https://api.github.com/repos/phenotips/phenotips/git/trees{/sha}","statuses_url":"https://api.github.com/repos/phenotips/phenotips/statuses/{sha}","languages_url":"https://api.github.com/repos/phenotips/phenotips/languages","stargazers_url":"https://api.github.com/repos/phenotips/phenotips/stargazers","contributors_url":"https://api.github.com/repos/phenotips/phenotips/contributors","subscribers_url":"https://api.github.com/repos/phenotips/phenotips/subscribers","subscription_url":"https://api.github.com/repos/phenotips/phenotips/subscription","commits_url":"https://api.github.com/repos/phenotips/phenotips/commits{/sha}","git_commits_url":"https://api.github.com/repos/phenotips/phenotips/git/commits{/sha}","comments_url":"https://api.github.com/repos/phenotips/phenotips/comments{/number}","issue_comment_url":"https://api.github.com/repos/phenotips/phenotips/issues/comments{/number}","contents_url":"https://api.github.com/repos/phenotips/phenotips/contents/{+path}","compare_url":"https://api.github.com/repos/phenotips/phenotips/compare/{base}...{head}","merges_url":"https://api.github.com/repos/phenotips/phenotips/merges","archive_url":"https://api.github.com/repos/phenotips/phenotips/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/phenotips/phenotips/downloads","issues_url":"https://api.github.com/repos/phenotips/phenotips/issues{/number}","pulls_url":"https://api.github.com/repos/phenotips/phenotips/pulls{/number}","milestones_url":"https://api.github.com/repos/phenotips/phenotips/milestones{/number}","notifications_url":"https://api.github.com/repos/phenotips/phenotips/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/phenotips/phenotips/labels{/name}","releases_url":"https://api.github.com/repos/phenotips/phenotips/releases{/id}","deployments_url":"https://api.github.com/repos/phenotips/phenotips/deployments","created_at":"2011-11-01T05:55:21Z","updated_at":"2017-02-06T00:57:58Z","pushed_at":"2017-02-18T01:04:35Z","git_url":"git://github.com/phenotips/phenotips.git","ssh_url":"git@github.com:phenotips/phenotips.git","clone_url":"https://github.com/phenotips/phenotips.git","svn_url":"https://github.com/phenotips/phenotips","homepage":"http://phenotips.org/","size":991923,"stargazers_count":46,"watchers_count":46,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":41,"mirror_url":null,"open_issues_count":303,"forks":41,"open_issues":303,"watchers":46,"default_branch":"master"}},"base":{"label":"phenotips:master","ref":"master","sha":"b30c180a6309c15c4598eee85a0a23c76435ec1a","user":{"login":"phenotips","id":4872353,"avatar_url":"https://avatars.githubusercontent.com/u/4872353?v=3","gravatar_id":"","url":"https://api.github.com/users/phenotips","html_url":"https://github.com/phenotips","followers_url":"https://api.github.com/users/phenotips/followers","following_url":"https://api.github.com/users/phenotips/following{/other_user}","gists_url":"https://api.github.com/users/phenotips/gists{/gist_id}","starred_url":"https://api.github.com/users/phenotips/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phenotips/subscriptions","organizations_url":"https://api.github.com/users/phenotips/orgs","repos_url":"https://api.github.com/users/phenotips/repos","events_url":"https://api.github.com/users/phenotips/events{/privacy}","received_events_url":"https://api.github.com/users/phenotips/received_events","type":"Organization","site_admin":false},"repo":{"id":2685841,"name":"phenotips","full_name":"phenotips/phenotips","owner":{"login":"phenotips","id":4872353,"avatar_url":"https://avatars.githubusercontent.com/u/4872353?v=3","gravatar_id":"","url":"https://api.github.com/users/phenotips","html_url":"https://github.com/phenotips","followers_url":"https://api.github.com/users/phenotips/followers","following_url":"https://api.github.com/users/phenotips/following{/other_user}","gists_url":"https://api.github.com/users/phenotips/gists{/gist_id}","starred_url":"https://api.github.com/users/phenotips/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phenotips/subscriptions","organizations_url":"https://api.github.com/users/phenotips/orgs","repos_url":"https://api.github.com/users/phenotips/repos","events_url":"https://api.github.com/users/phenotips/events{/privacy}","received_events_url":"https://api.github.com/users/phenotips/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/phenotips/phenotips","description":"PhenoTips provides an easy-to-use Web interface and standardized database back-end for collecting clinical findings observed in patients with possible genetic disorders.","fork":false,"url":"https://api.github.com/repos/phenotips/phenotips","forks_url":"https://api.github.com/repos/phenotips/phenotips/forks","keys_url":"https://api.github.com/repos/phenotips/phenotips/keys{/key_id}","collaborators_url":"https://api.github.com/repos/phenotips/phenotips/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/phenotips/phenotips/teams","hooks_url":"https://api.github.com/repos/phenotips/phenotips/hooks","issue_events_url":"https://api.github.com/repos/phenotips/phenotips/issues/events{/number}","events_url":"https://api.github.com/repos/phenotips/phenotips/events","assignees_url":"https://api.github.com/repos/phenotips/phenotips/assignees{/user}","branches_url":"https://api.github.com/repos/phenotips/phenotips/branches{/branch}","tags_url":"https://api.github.com/repos/phenotips/phenotips/tags","blobs_url":"https://api.github.com/repos/phenotips/phenotips/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/phenotips/phenotips/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/phenotips/phenotips/git/refs{/sha}","trees_url":"https://api.github.com/repos/phenotips/phenotips/git/trees{/sha}","statuses_url":"https://api.github.com/repos/phenotips/phenotips/statuses/{sha}","languages_url":"https://api.github.com/repos/phenotips/phenotips/languages","stargazers_url":"https://api.github.com/repos/phenotips/phenotips/stargazers","contributors_url":"https://api.github.com/repos/phenotips/phenotips/contributors","subscribers_url":"https://api.github.com/repos/phenotips/phenotips/subscribers","subscription_url":"https://api.github.com/repos/phenotips/phenotips/subscription","commits_url":"https://api.github.com/repos/phenotips/phenotips/commits{/sha}","git_commits_url":"https://api.github.com/repos/phenotips/phenotips/git/commits{/sha}","comments_url":"https://api.github.com/repos/phenotips/phenotips/comments{/number}","issue_comment_url":"https://api.github.com/repos/phenotips/phenotips/issues/comments{/number}","contents_url":"https://api.github.com/repos/phenotips/phenotips/contents/{+path}","compare_url":"https://api.github.com/repos/phenotips/phenotips/compare/{base}...{head}","merges_url":"https://api.github.com/repos/phenotips/phenotips/merges","archive_url":"https://api.github.com/repos/phenotips/phenotips/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/phenotips/phenotips/downloads","issues_url":"https://api.github.com/repos/phenotips/phenotips/issues{/number}","pulls_url":"https://api.github.com/repos/phenotips/phenotips/pulls{/number}","milestones_url":"https://api.github.com/repos/phenotips/phenotips/milestones{/number}","notifications_url":"https://api.github.com/repos/phenotips/phenotips/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/phenotips/phenotips/labels{/name}","releases_url":"https://api.github.com/repos/phenotips/phenotips/releases{/id}","deployments_url":"https://api.github.com/repos/phenotips/phenotips/deployments","created_at":"2011-11-01T05:55:21Z","updated_at":"2017-02-06T00:57:58Z","pushed_at":"2017-02-18T01:04:35Z","git_url":"git://github.com/phenotips/phenotips.git","ssh_url":"git@github.com:phenotips/phenotips.git","clone_url":"https://github.com/phenotips/phenotips.git","svn_url":"https://github.com/phenotips/phenotips","homepage":"http://phenotips.org/","size":991923,"stargazers_count":46,"watchers_count":46,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":41,"mirror_url":null,"open_issues_count":303,"forks":41,"open_issues":303,"watchers":46,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/phenotips/phenotips/pulls/2209"},"html":{"href":"https://github.com/phenotips/phenotips/pull/2209"},"issue":{"href":"https://api.github.com/repos/phenotips/phenotips/issues/2209"},"comments":{"href":"https://api.github.com/repos/phenotips/phenotips/issues/2209/comments"},"review_comments":{"href":"https://api.github.com/repos/phenotips/phenotips/pulls/2209/comments"},"review_comment":{"href":"https://api.github.com/repos/phenotips/phenotips/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/phenotips/phenotips/pulls/2209/commits"},"statuses":{"href":"https://api.github.com/repos/phenotips/phenotips/statuses/4c4fcb438bccf85b1d968e9616dcf1bc38768878"}}}}
{"actor":{"display_login":"sdumitriu"}}